Hydromancerx Posted May 26, 2015 Share Posted May 26, 2015 From what I have seen of build 32, even on custom maps like Bedford Falls, Generators will spawn on the ground. How is this done? I looked in the normal loot spawn table and did not see any Generators listed. So where is the code that makes them spawn? Link to comment Share on other sites More sharing options...
RobertJohnson Posted May 26, 2015 Share Posted May 26, 2015 It spawn in building type storageunit, garage and shed Link to comment Share on other sites More sharing options...
Hydromancerx Posted May 26, 2015 Author Share Posted May 26, 2015 It spawn in building type storageunit, garage and shed I figured that's where, from experance in game, but when looking at the code I do not see it listed. For example here for a storage unit. storageunit = { all ={ rolls = 3, items = { "Base.Magazine", 2, "Base.Newspaper", 2, "Base.Lighter", 2, "Base.BaseballBat", 5, "Base.Cigarettes", 5, "Base.Cigarettes", 5, "farming.HandShovel", 3, "Base.Vest", 2, "Base.Shirt", 2, "Base.Blouse", 2, "Base.Trousers", 2, "Base.Skirt", 2, "Base.Shoes", 2, "Base.Socks", 2, "Base.Underwear1", 1, "Base.Underwear2", 1, "camping.CampingTentKit", 0.2, "Base.DishCloth", 2, "Base.Kettle", 3, "farming.HandShovel", 2, "farming.Shovel", 1, "farming.WateredCan", 1, "Base.Paintbrush", 1, "Base.PaintBlue", 0.8, "Base.PaintBrown", 0.8, "Base.PaintCyan", 0.8, "Base.PaintGreen", 0.8, "Base.PaintGrey", 0.8, "Base.PaintLightBlue", 0.8, "Base.PaintLightBrown", 0.8, "Base.PaintOrange", 0.8, "Base.PaintPink", 0.8, "Base.PaintPurple", 0.8, "Base.PaintTurquoise",0.8, "Base.PaintWhite", 0.8, "Base.PaintYellow", 0.8, "Base.PlasterPowder", 0.8, "Base.BucketEmpty", 1, },So how is are they spawned on the floor? Link to comment Share on other sites More sharing options...
RoboMat Posted May 26, 2015 Share Posted May 26, 2015 They probably don't use the item spawn lists. RichCoconut 1 Link to comment Share on other sites More sharing options...
fluffe9911 Posted May 26, 2015 Share Posted May 26, 2015 I think he is looking for the code that made the generator spawn on the ground Link to comment Share on other sites More sharing options...
SandyBeaches Posted June 6, 2016 Share Posted June 6, 2016 I think it is defined in the base code. Remind me to have a poke around some time. Link to comment Share on other sites More sharing options...
ProjectSky Posted December 13, 2016 Share Posted December 13, 2016 I do not know if this is out of date, generator is called a IsoGenerator object. It can be like a building object. function ISGenerator:create(x, y, z, north, sprite) local cell = getWorld():getCell(); self.sq = cell:getGridSquare(x, y, z); self.javaObject = IsoGenerator.new(self.item, getCell(), self.sq) self.javaObject:setActivated(false); self.javaObject:setCondition(100); self.javaObject:setConnected(false); self.javaObject:setFuel(0); self.sq:AddSpecialObject(self.javaObject); buildUtil.consumeMaterial(self); self.javaObject:transmitCompleteItemToServer(); end Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now