Prison Architect

Prison Architect

Road Sensors
110 条留言
阳台门口 2021 年 6 月 16 日 上午 8:26 
在你的道路上放置传感器,以检测何时有车辆!

他们就像压力垫,但对道路!

确保在道路大门上方放置两块瓷砖,以便车辆停在上面。

半路传感器只检测一条车道,需要像上面的截图一样放置。

(不过,你不必让两个相邻。)

在您完成远程访问研究后,它们位于实用程序下。
David's Old Acc. 2019 年 8 月 1 日 下午 8:20 
I published a fixed version to the workshop here: https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1822431950
KilledJoy 2019 年 4 月 29 日 下午 9:58 
mod is 5 years out of date an multiple posts about a fix an yall still shout "fix your mod" lol
Minty Senior 2019 年 4 月 22 日 下午 3:36 
I just noticed that nobrainer already suggested this same fix back in August 2018.
Minty Senior 2019 年 3 月 28 日 下午 5:04 
If you don't mind getting your hands dirty with a minor script change, I found a fix that does work (I played several game days with the clock speeded up, with no errors and nothing in the debug.txt log).

Go to the user mod folder for the game, which is usually here:
C:\Users\YOUR_NAME\AppData\Local\Introversion\Prison Architect\mods
Find and edit the Road Sensors mod script (mod id 485302724)
mods\485302724\data\scripts\RoadSensor.lua

At the bottom of the script, in the function named Authorised
Replace this line:
return Get( vehicle, "Pos.y" ) - OurY <= Proximity;
with:
return Get( vehicle, "Pos.y" ) - this.Pos.y <= Proximity;

The OurY variable defined further up the script wasn't being preserved (nil value). Someone with a better knowledge of lua scripting would probably know why.
Restart the game for the change to be picked up, mod shouldn't need reactivating.
If the mod creator (Themias) is still around perhaps he can check the fix and post an update.
Wal der Qual 2019 年 3 月 17 日 上午 1:09 
@Kiano why should asking nicely be an option when you can just scream at someone making free content, right?
Kiano Jajino 2018 年 12 月 17 日 上午 12:31 
Creator ! Update your mod !
Karachay 2018 年 12 月 8 日 上午 7:41 
I think themias have a look about the error
Karachay 2018 年 12 月 8 日 上午 7:39 
I have a error too
Dan B 2018 年 8 月 31 日 上午 3:38 
same here for that error
Leo 2018 年 8 月 24 日 上午 4:10 
ScriptSystem Error : (RoadSensor) RUNTIME ERROR : [string "-- vehicle types; add more if desired (reme..."]:84: attempt to perform arithmetic on upvalue 'OurY' (a nil value)
mckzchi 2018 年 8 月 17 日 下午 10:56 
@nobrainer. Thank you. I have changed the script accordingly and it works. Thanks @howmanyhoursdoineedtobeclockwork for offering your help.
Alpatron 2018 年 8 月 15 日 上午 8:37 
@nobrainer
Thank you. I had thought I'd need to reverse engineer the mod myself to get it to work.
nobrainer 2018 年 8 月 15 日 上午 7:13 
Ok. I've managed to fix it by editing the lua script not to use the local variable 'OurY'.

I changed line 84 from:

return Get( vehicle, "Pos.y" ) - OurY <= Proximity;

to:

return Get( vehicle, "Pos.y" ) - this.Pos.y <= Proximity;

Now it works. For some reason the local variables are not initialized when you load the save, but the object coordinates are correctly available to be used in the code functions.

Most likely the same problem exists in the file halfroadsensor.lua with the variables 'OurY' and 'OurX'.
nobrainer 2018 年 8 月 15 日 上午 6:55 
I get the same error as of update 15.
Something like this:
ScriptSystem Error : (RoadSensor) RUNTIME ERROR : [string "-- vehicle types; add more if desired (reme..."]:84: attempt to perform arithmetic on upvalue 'OurY' (a nil value)

I've checked the roadsensor.lua script file and it appears that, at line 84, there's an arithmetic operation performed to determine the proximity of the vehicle:
return Get( vehicle, "Pos.y" ) - OurY <= Proximity;

But acording to the error message, this operation is being called with the value of 'OurY' not being a number but a nil value. Aparently the initialization of this variable, at line 28, is not being done sucessfully:
local OurY = this.Pos.y;

I can understand the error that is happening but I don't have knowledge of the modding API to fix it myself, at least not yet.

Any help is appreciated.
putispawn 2018 年 8 月 14 日 下午 2:28 
if you tell me your mod list we may do
The Stranger 2018 年 8 月 13 日 上午 6:57 
Can we get a fix?
putispawn 2018 年 8 月 11 日 下午 5:41 
seems like they aint gonna answer so maybe mckzchi if you tell what mods your using i may can help becuase it musts be an unponpability with another mod
mckzchi 2018 年 8 月 6 日 下午 8:14 
hello, as of update 15 the road sensors get a script error when loading the game. uninstalling the road sensor and installing them again fixes it. can you fix this?
putispawn 2018 年 8 月 6 日 下午 12:41 
fix please error in script update 15 b
berry 2017 年 11 月 20 日 下午 12:44 
Can't find them n-game
N1A 2017 年 9 月 10 日 上午 11:18 
dont even need this
Navarth 2017 年 8 月 27 日 上午 5:15 
Seem working for me (take 1-2 seconds to detect a vehicles)
It has the same icon of the pressure plate btw
TJ_84 2017 年 6 月 24 日 上午 2:32 
I play sandbox without utilities, can you place them somewhere else than utilities?
bongerman85 2017 年 5 月 18 日 下午 10:29 
i use to use these on my old account and they use to work. make sure they are correctly hooked up to the servos. my guess is that you arent using the perimeter servos mod which should make this work
PAYSO 2017 年 2 月 13 日 下午 5:27 
DOES NOT WORK!
SirGunar 2016 年 12 月 24 日 下午 11:46 
Looks like a cool mod, but I can't find the sensors in the game.
>OVƎЯS~70P< 2016 年 10 月 22 日 上午 8:11 
Pls, update it to the latest version.
Rio 2016 年 9 月 22 日 上午 10:42 
carnt find them
PlatinumGold 2016 年 7 月 17 日 下午 7:42 
This is a very good mod but the problem is that it wont work with murgh's recycling mod, the main recycling desk is replaced with a road sensor.
murgh 2016 年 7 月 7 日 下午 12:15 
@ThatSanity prisoners require pressure pads, vehicles require road sensors :)
murgh 2016 年 7 月 7 日 下午 12:14 
This mod can work without the use of a sprites.png to save mod space.

Simply use these definitions for the RoadSensor:
Width 5
Height 1
SpriteScale 0.5
BEGIN Sprite x 42 y 4 w 10 h 1 RotateType 0 END

and these for the HalfRoadSensor:

Width 2
Height 1
SpriteScale 0.5
BEGIN Sprite x 42 y 4 w 4 h 1 RotateType 0 END
Barckley 2016 年 2 月 5 日 上午 3:05 
@Themias
Barckley 2016 年 2 月 5 日 上午 3:05 
it works??
FaYaY 2016 年 1 月 29 日 下午 3:10 
Can you update this mod so it works on update 3?
Themias  [作者] 2016 年 1 月 27 日 下午 5:05 
@Mikado-Senpai It works like a pressure pad, if you've used one before. Connect the sensor to the thing you want to trigger, e.g. door servo. Make sure the sensor is placed in the road like it is in the screenshots above.
Star Sanctioned Dreamer 2016 年 1 月 25 日 下午 8:47 
having a little bit of trouble with this one... Are you supposed to connect the Door Servo TO the Road Sensor or do you have to connect the Road Sensor TO the Door Servo...

Can't seem to get it to work, but i know things like the CCTV cameras and monitors only work if you connect it from the monitor TO the camera, so i was wondering if something like that was happening.
Ardith Prime 2016 年 1 月 5 日 下午 12:40 
yes it does.
azairvine 2015 年 12 月 20 日 下午 10:05 
Does this still work after update 2?
The Odd Fox 2015 年 12 月 5 日 上午 3:06 
Nice mod
Dooster 2015 年 11 月 19 日 下午 1:10 
Works like a dream!
7Infamous 2015 年 11 月 7 日 上午 9:24 
i added this one but where do I find I looked in the objects and utilities but couldnt find them
kingdavis45 2015 年 10 月 30 日 上午 7:08 
@gokberk.yilmaz.ant I found it. it was a different light than the normal one. It turns green when the circuit has power to it and it lets you know if you're getting power. Took me a minute but once you firgure out the layout then it's simple. Someone just needs a video showing you how to do this but it WORKS and WORKS WELL.
Burrito 2015 年 10 月 28 日 下午 12:35 
Farted.
BeanSlinger419 2015 年 10 月 24 日 上午 7:19 
:steamhappy::steamhappy:
BeanSlinger419 2015 年 10 月 24 日 上午 7:19 
awesome now i can no longer have prisoners going out
Geek Girl 2015 年 10 月 22 日 上午 1:54 
Thaks, gokberk.yilmaz.ant
kernel sanders 2015 年 10 月 21 日 上午 8:19 
its in utilities
Geek Girl 2015 年 10 月 21 日 上午 1:34 
I researched all in "Security" and in "objects" dind't have any road sensors. :/
Vaktare 2015 年 10 月 20 日 上午 3:12 
i got it to work it was steam that place the files wrong for some reson