usermattcancel
branchsbox/weaker-resourcecancel

4 Commits over 0 Days - ∞cph!

1 Year Ago
Cleanup dupe code, add some docs
1 Year Ago
Decouple the system that holds references from base Resource class to ResourceLibrary. ResourceLibrary is only for GameResource, this was the only way it was being used and it makes no sense for normal Resource to be there. Precaching keeps strong handles of native resources( mainly so we can NetRead them.. ), never add GameResource to precache stringtable (they're always loaded) Texture.Load behaves better and doesn't try to cache a not found file Comment these out, need to figure out ResourceJsonConvert (this is just for GameResources again?) w/ ResourceLibrary, and probably make another ResourceLibrary for Sandbox.Tools ResourceJsonConvert uses given ResourceLibrary Promises assign ResourceId again Oops ResourceLibrary dictionary shouldn't be static no wonder it was fucked Resource.Load doesn't need GameHost Tools gets it's own ResourceLibrary, doesn't use GameHost.Menu anymore NetRead.ReadResource can handle non-GameResource again Replace optional GameHost virtuals GameResource.PostLoad/PostReload with simply passing ResourceLibrary Replace Resource.Update in memory system with ResourceLibrary.UpdateGameResource, only used from tool asset inspector to propagate live changes of GameResource to game / menu
1 Year Ago
Decouple the system that holds references from base Resource class to ResourceLibrary. ResourceLibrary is only for GameResource, this was the only way it was being used and it makes no sense for normal Resource to be there. Precaching keeps strong handles of native resources( mainly so we can NetRead them.. ), never add GameResource to precache stringtable (they're always loaded) Texture.Load behaves better and doesn't try to cache a not found file Comment these out, need to figure out ResourceJsonConvert (this is just for GameResources again?) w/ ResourceLibrary, and probably make another ResourceLibrary for Sandbox.Tools ResourceJsonConvert uses given ResourceLibrary Promises assign ResourceId again Oops ResourceLibrary dictionary shouldn't be static no wonder it was fucked Resource.Load doesn't need GameHost Tools gets it's own ResourceLibrary, doesn't use GameHost.Menu anymore
1 Year Ago
Decouple the system that holds references from base Resource class to ResourceLibrary. ResourceLibrary is only for GameResource, this was the only way it was being used and it makes no sense for normal Resource to be there. Precaching keeps strong handles of native resources( mainly so we can NetRead them.. ), never add GameResource to precache stringtable (they're always loaded) Texture.Load behaves better and doesn't try to cache a not found file Comment these out, need to figure out ResourceJsonConvert (this is just for GameResources again?) w/ ResourceLibrary, and probably make another ResourceLibrary for Sandbox.Tools