Ludeon Forums

RimWorld => Mods => Help => Topic started by: henryheyhey123 on August 26, 2015, 12:14:37 PM

Title: Can you make a worktable dependant on a facility?
Post by: henryheyhey123 on August 26, 2015, 12:14:37 PM
Hi peeps! I've been wondering: is there a way to make a worktable not work if it isn't connected to a facility (i.e. multi-analyzer)? Would I need C# code in a dll or a manipulation factor or something?
Title: Re: Can you make a worktable dependant on a facility?
Post by: Jaxxa on August 26, 2015, 07:28:57 PM
I haven't looked into it but you may be able to use C# to have the tick / ticklong shut-down the power if it does not have the facility connected, this should effectively disable it.
Title: Re: Can you make a worktable dependant on a facility?
Post by: henryheyhey123 on August 28, 2015, 11:10:42 AM
Quote from: Jaxxa on August 26, 2015, 07:28:57 PM
I haven't looked into it but you may be able to use C# to have the tick / ticklong shut-down the power if it does not have the facility connected, this should effectively disable it.

Yeah, I've been looking into the code and there's no real way to check if its connected to a facility... i still have to look into the def tree for C# so there's still hope  :)
Title: Re: Can you make a worktable dependant on a facility?
Post by: 1000101 on August 30, 2015, 10:19:55 AM
BuildableDef does contain something along those lines (untested):

public List<ThingDef> buildingPrerequisites;

You could look into that and see if it's what you need.
Title: Re: Can you make a worktable dependant on a facility?
Post by: henryheyhey123 on September 01, 2015, 04:33:16 PM
Quote from: 1000101 on August 30, 2015, 10:19:55 AM
BuildableDef does contain something along those lines (untested):

public List<ThingDef> buildingPrerequisites;

You could look into that and see if it's what you need.

Thanks again 1000101!