RimWorld

RimWorld

676 vurderinger
PowerSwitch
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Mod, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
Filstørrelse:
Offentliggjort:
Opdateret:
1.194 MB
4. juli 2016 kl. 14:57
11. juli kl. 14:11
36 ændringsbemærkninger ( vis )

Abonner for at downloade
PowerSwitch

Beskrivelse
This mod adds additional functions to the vanilla power switch.

Here you have various research topics available, which will improve the functionality of the switch.
You can research the upgrade for a motion detector, an enemy detector and for a timer.


Note: Mod settings are available.


Description:

- Pawn Detection in Room: Available after research with the normal switch.
Detects if a Pawn (human, animal) is in the room

- Pawn Detection within 7 squares: Available after research.
Normal pawn detection mode for wall switches.
Normal switches can be switched between this mode and the pawn in room mode by repeatedly pressing the selection button.

- Enemy detection (within 1/2 of the map): Available after research.
Available modes: Switch on when detected and switch off when detected.

- Timer: Switches on and off at specified times.
Time is initially set to 6h->On and 20h->Off. This can be changed by pressing the buttons repeatedly



NOTE:
This mod can savely be added to a running savegame, but to use the functionality you have to destroy and rebuild (by debug mode or the normal way) the switches you already have, as the old ones don't have the needed references.


(Version: 1.6.0)
Language: English, German, Russian, Chinese, Spanish

Thanks to duduluu and Biscuit for the Chinese translation
Thanks to 53N4 for the Spanish translation
Thanks to Well for the Russian translation
264 kommentarer
Ninjaxas 19. juli kl. 6:50 
I agree with the wall mounted option! It's more realistic too. A switch does not need to be full tile size.
Soup_UK 15. juli kl. 4:53 
Hi! I'm a fan of your mod. I was wondering if it's possible to have a wall-mounted variant? This is more for aesthetic (than practical) reasons. :steamthumbsup:
Haplo_X1  [ophavsmand] 11. juli kl. 14:11 
Done
The Byzarkandian 11. juli kl. 11:44 
1.6?
Haplo_X1  [ophavsmand] 8. maj kl. 11:53 
You can do a pull request if you like, then I can merge it
Scentese 6. maj kl. 7:40 
Haplo_X1, should I make a push/fork/anything? All the code changes are just one block and one line. And thank you for the great mod!
Scentese 6. maj kl. 7:36 
also add this in your class scope (outside of the method) if anyone is using the fix

private int lastCheckedHour = -1;
Scentese 6. maj kl. 7:33 
I was using this mod along with Logic Switch. I am not sure if it resulted in any conflict, but this fix seems to have made the timer of this mod work for me, by flicking the switch only once per hour. The timer may not start to work immediately, but should do after an hour of in game time.
Scentese 6. maj kl. 7:33 
with

[code]
// Improved Timer switching
if (autoSwitchTimerActive)
{
int currentHour = GenLocalDate.HourInteger(Map);

if (currentHour != lastCheckedHour)
{
lastCheckedHour = currentHour;

if (currentHour == autoSwitchTimerOnTime && !flickableComp.SwitchIsOn)
{
flickableComp.SwitchIsOn = true; // No designator usage!
SetWantSwitchOn(true);
}

if (currentHour == autoSwitchTimerOffTime && flickableComp.SwitchIsOn)
{
flickableComp.SwitchIsOn = false; // No designator usage!
SetWantSwitchOn(false);
}
}
}
[/code]
Scentese 6. maj kl. 7:32 
ok I might have made a fix:

replace
[code]
// Timer switching
if (autoSwitchTimerActive)
{
// Time = Off-Time => Switch OFF
if (GenLocalDate.HourInteger(Map) == autoSwitchTimerOffTime && flickableComp.SwitchIsOn)
{
flickableComp.SwitchIsOn = false; // No designator usage!
SetWantSwitchOn(false);
}

// Time = On-Time => Switch ON
if (GenLocalDate.HourInteger(Map) == autoSwitchTimerOnTime && !flickableComp.SwitchIsOn)
{
flickableComp.SwitchIsOn = true; // No designator usage!
SetWantSwitchOn(true);
}
}
[/code]