pjf / masterwork-dwarf-fortress

Patches and bugfixes applied to Meph's amazing Masterwork Dwarf Fortress
33 stars 22 forks source link

Overhaul orcish cisterns #76

Open pjf opened 10 years ago

pjf commented 10 years ago

Right now they're kinda lame, you have to deconstruct the building to get the water.

Investigate if we can run a script to spawn liquids directly on the tile. These could be 1/7 for buckets/flasks, 4/7 for boulders, etc.

Liquid above 4/7 may panic the worker, and so is probably not recommended for spawning.

Check:

PaulMaynard commented 10 years ago

Can you use the same script the warlocks use for their water/lava wells?

pjf commented 10 years ago

@ppeng: Quite possibly. I haven't looked into how warlocks work at all. But if they have a solution that sucks less than what we have now, then that would be grand. :)

Do you know which script gets used? I know there's an interactive DFHack script for placing liquids, but I have no idea if that's callable in a non-interactive way from a reaction.

PaulMaynard commented 10 years ago

It looks like they use this script here: eruption.lua It seem like some people are getting errors when they try to use it, though:

[DF folder]\hack\scripts/eruption.lua:69: attempt to perform arithmetic on local 'ry' (a nil value)
stack traceback:
[DF folder]\hack\scripts/eruption.lua:69: in function 'eruption'
[DF folder]\hack\scripts/eruption.lua:125: in main chunk
(...tail calls...)
PaulMaynard commented 10 years ago

Here's a reaction using it:

    [REACTION:WARLOCK_MAGMA_S]
    [NAME:Cast Lesser Summoning of Magma]
    [BUILDING:MAGMA_WELL:CUSTOM_A]
[PRODUCT:0:1:BOULDER:NONE:INORGANIC:ERUPTION_MAGMA_S]
...
[INORGANIC:ERUPTION_MAGMA_S]
[USE_MATERIAL_TEMPLATE:STONE_VAPOR_TEMPLATE]
    [STATE_NAME_ADJ:ALL:Magma (radius2)]
[MATERIAL_VALUE:0]
      [SYNDROME][SYN_CLASS:ERUPTION][SYN_CLASS:\AUTO_SYNDROME]
[SYN_CLASS:\COMMAND][SYN_CLASS:eruption][SYN_CLASS:magma][SYN_CLASS:\WORKER_ID][SYN_CLASS:2][SYN_CLASS:0][SYN_CLASS:7]
pjf commented 10 years ago

Oh goodness, that's perfect. Yes, we can definitely use that! Thank you!

I'm currently in transit, so I won't be able to make any changes here myself, but that code looks pretty much perfect for the cistern/fountain reactions. (I'll happily accept pull requests, though!)