Jump to content

Panda

Member
  • Posts

    29
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Panda reacted to The_Real_Al in Insert / Import new code in existing files?   
    Quite the opposite, unless we are both stupid. I'm very much interested.
     
    If i look into override.lua in the sleeping overhaul i find the following:
    require'ISUI/ISModalDialog'; -- 1-- Old = {}; -- we'll store all overwritten functions in here. -- 2-- Old.ISModalDialog = {}; -- 3Old.ISModalDialog.new = ISModalDialog.new; -- 4function ISModalDialog:new -- 5So basically it works like this:
    1. Call the original file.
    2. Make the slate
    3. Call the original table.
    4. Make sure the original function is overwritten.
    5. Overwrite the original function.
     
    What about tables? In case of farming_vegetableconf.icons the above method would suggest:
     
    or with table.insert simply
    table.insert(farming_vegetableconf.icons[farmingText.Watermelons] = "Item_Watermelon");
  2. Like
    Panda reacted to Eggplanticus in Insert / Import new code in existing files?   
    As RoboMatt has already pointed out, you need to
     
    1) require the file whose data you want to modify/override
    e.g. require "TimedActions/ISBaseTimedAction" at the top of the file if you wanted to mess with ISBaseTimedAction
     
    2) replace the original functions / variables / symbols with new ones either by assignment or by declaration
  3. Like
    Panda reacted to RoboMat in Insert / Import new code in existing files?   
    Merged your posts. Please be patient and don't bump your thread.
     
    As Stormy said, as it is a global table you shouldn't have any problems with editing it from an external file. You can overwrite the function in an external file and for inserting values in farming_vegetableconf.icons "table.insert" should work.
  4. Like
    Panda reacted to Stormy in Insert / Import new code in existing files?   
    I wrote something and then realised I had misunderstood... nevermind. Without poking in the code, I'm thinhking you're just adding new functions and variables to this table: farming_vegetableconf
     
    In that case, why can't this be done in a separate file... presumably farming_vegetableconf is a global variable and you'll be able to edit it from anywhere?
  5. Like
    Panda reacted to RoboMat in Insert / Import new code in existing files?   
    Well you could overwrite the original function ...
     
    simply "require" the file in your mod and then overwrite the function. You could check out the overwrite code in my Sleeping Overhaul mod. I do exactly that there
  6. Like
    Panda reacted to nuget102 in Cement for buildings   
    Pretty much what he said ^ Of course for larger constructions (or simply to cut the time for the concrete to harden down) the hoover dam comes to mind. For those of you that don't know, when the hoover dam was constructed (and finished two years ahead of schedule) they estimated it would take over 100 years for the concrete to harden. So, instead, they did something that was fairly unique. They ran pipes through the concrete that carried cold water, which in turn caused the concrete to cool much faster.
     
    Of course I have no clue how you would do this in PZ... It would be kind of fun though. :3 And maybe for starters we could just have concrete floors, those aren't too hard to make are they? And it doesn't take nearly as much wood, just simple 2 by 4's would work right? Please correct me if i'm wrong. :3
  7. Like
    Panda reacted to RoboMat in Not Enough Bags   
    Not Enough Bags

    This mod adds several new container items to the game and also tweaks / nerves the existing vanilla ones.

    New bags:Paper Bag Fanny Pack Briefcase Messenger Satchel Medical Bag Golf Bag Download from pz-mods.net

    Permission (Click the spiffo for more informations):


    Changelog

  8. Like
    Panda reacted to RoboMat in Sleeping Overhaul (DOES NOT WORK WITH STEAM FFS)   
    I'm happy to announce that after a long time of brain storming and multiple 3rd party inputs I'm working on Sleeping Overhaul 2.0 which will add new features aswell as changing the main mechanics of the current release
     
    Stay tuned.
  9. Like
    Panda reacted to lemmy101 in [ANNOUNCE] Turn Based Zomboid Mod   
    wait no - the whole thing is far from two lines of code
     
    I just mean the system I'm writing for NPC combat can be repurposed for a core turn-based engine with two lines of code
  10. Like
    Panda reacted to CrazyEyes in Solar Panels!   
    Solar panels would be incredibly rare, especially in a small rainy city like Muldraugh.  It might be feasible for a single survivor to get lucky and stumble across a solar panel.  Let's assume this random person also has the skill to install it without breaking it or electrocuting themselves.  At best, they could power their fridge during the 8-10 hours a day the sun is shining on their house.  
     
    I don't think the average person would consider it worth their effort to learn electircal engineering on the off chance they happen across a working panel and can install it.
     
    More feasible to me is that a few houses might have solar panels pre-installed on the roof, making them desirable and contested safehouses for their ability to chill food after the power is out.
×
×
  • Create New...