[Dev] SVN: james/501 Math Marauders: Now saves any changes you make to the map
James Paige
Bob at HamsterRepublic.com
Fri Apr 11 11:56:52 PDT 2008
On Fri, Apr 11, 2008 at 11:50:15AM -0700, Brian Fisher wrote:
> The error is bad there - but I think the correct solution is to create a
> new map in the editor that is connected to a file, and then edit it. The
> broken asset is really intended to be a "hey! you have a bad asset
> reference" object and to be a bootstrapping device (i.e. you can run it
> long enough to create an asset)
>
> basically it might be nice to have a "save as" mechanic, but I don't see
> how any such mechanic would be any less work than creating a new asset in
> the editor?
It would be needed for something edited directly in the game window.
---
James
> On Fri, Apr 11, 2008 at 11:31 AM, James Paige <Bob at hamsterrepublic.com>
> wrote:
>
> I was running into problems when saving a not-yet-existing asset.
>
> Basically, I have a map asset which I create like so:
>
> map = AssetRef(BaseMap, "default")
>
> So "data/default.map" does not exist anymore, but it correctly uses the
> _BrokenMap object when I play, so I have a map, but when I try to call
> map.asset_save() it crashes because map has no .asset_metadata property.
> (which makes sense, because this was not deserialized from disk)
>
> So I have worked around the problem by manually creating default.map in
> the editor, but is there some better way to say, "please save this
> asset to disk even though it was not loaded from disk"
>
> You can reproduce the problem I was having by deleting data/default.map,
> running main.py, and clicking anywhere (which triggers the
> .asset_save() call)
>
> ---
> James
> On Fri, Apr 11, 2008 at 11:09:58AM -0700, subversion at HamsterRepublic.com
> wrote:
> > james
> > 2008-04-11 11:09:57 -0700 (Fri, 11 Apr 2008)
> > 58
> > Math Marauders: Now saves any changes you make to the map
> > ---
> > A marauders/data/default.map
> > U marauders/locals.py
> > U marauders/main.py
> > U marauders/map.py
> >
> >
> _______________________________________________
> Dev mailing list
> Dev at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
> _______________________________________________
> Dev mailing list
> Dev at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/dev-motherhamster.org
More information about the Dev
mailing list