Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Inside only buildings  (Read 1462 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Inside only buildings
« on: July 31, 2014, 07:14:00 am »

I couldnt find anything in the readme or forum... dfhack has this feature:

Quote
outsideOnly

This plugin makes it so that buildings whose names begin with OUTSIDE_ONLY cannot be built inside. If the player attempts to do so, the building will automatically be deconstructed.

Does an equivalent for insideOnly exist? Or could one be done?
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: Inside only buildings
« Reply #1 on: July 31, 2014, 08:39:58 am »

In the new version, this is the help section of outside-only
Code: [Select]
if args.help then
 print([[scripts/modtools/outside-only
arguments
    -help
        print this help message
    -clear
        clears the list of registered buildings
    -checkEvery n
        set how often existing buildings are checked for whether they are in the appropriate location to n ticks
    -type [EITHER, OUTSIDE_ONLY, INSIDE_ONLY]
        specify what sort of restriction to put on the building
    -building name
        specify the id of the building
]])
 return
end
So it looks like INSIDE_ONLY is an option. Note that this is with the onLoad.init system so instead of naming buildings OUTSIDE_ONLY or INSIDE_ONLY you instead have something like
Code: [Select]
modtools/outside-only -building MY_CUSTOM_BUILDING -type OUTSIDE_ONLY
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Inside only buildings
« Reply #2 on: July 31, 2014, 08:52:16 am »

I checked the readme in the dfhack r5 thread. I guess with "new version" you mean the one with registration? How finished is it by now? The last time I checked, expwnent was still working on it, and you were porting your dfhack spells to it.

I am not sure if I can use it without breaking old content.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: Inside only buildings
« Reply #3 on: July 31, 2014, 09:07:56 am »

There are still a couple bugs here and there, but most of it is working. Not sure if you want to wait for a more stable version that has all the needed scripts, but just so you know it is possible. Might even be able to rig up the old version by splicing it with the new version.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Inside only buildings
« Reply #4 on: July 31, 2014, 09:15:58 am »

Best would be if a dfhack version would support both. AutoSyndrome/SyndromeTrigger, as well as registration. I could install it without having to worry about breaking older features, do all new features with the new system and slowly port the older ones bit by bit. Obviously I have no idea if thats possible or not.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: Inside only buildings
« Reply #5 on: July 31, 2014, 09:23:17 am »

That would be a question for expwnent. Right now I don't think the option is available, but I don't know if there is a reason it couldn't be (like if it would be as simple as building it with both options or if there is some conflict)
Logged