mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
One-way conveyor switches
This commit is contained in:
committed by
CHOMPStation2
parent
95d6752941
commit
d85bf59b5e
@@ -207,6 +207,7 @@
|
||||
var/position = 0 // 0 off, -1 reverse, 1 forward
|
||||
var/last_pos = -1 // last direction setting
|
||||
var/operated = 1 // true if just operated
|
||||
var/oneway = 0 // Voreadd: One way levels mid-round!
|
||||
|
||||
var/id = "" // must match conveyor IDs to control them
|
||||
|
||||
@@ -265,7 +266,7 @@
|
||||
return
|
||||
|
||||
if(position == 0)
|
||||
if(last_pos < 0)
|
||||
if(last_pos < 0 || oneway == 1)
|
||||
position = 1
|
||||
last_pos = 0
|
||||
else
|
||||
@@ -315,6 +316,7 @@
|
||||
conveyors += C
|
||||
return
|
||||
|
||||
<<<<<<< HEAD
|
||||
//CHOMPedit: Conveyor belts can be fast :)
|
||||
if(istype(I, /obj/item/weapon/tool/wirecutters))
|
||||
if(panel_open)
|
||||
@@ -332,12 +334,25 @@
|
||||
position = convdir
|
||||
else
|
||||
position = 0
|
||||
=======
|
||||
if(istype(I, /obj/item/weapon/tool/wrench))
|
||||
if(panel_open)
|
||||
if(oneway == 1)
|
||||
to_chat(user, "You set the switch to two way operation.")
|
||||
oneway = 0
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
return
|
||||
else
|
||||
to_chat(user, "You set the switch to one way operation.")
|
||||
oneway = 1
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
return
|
||||
>>>>>>> 326496ce71... Merge pull request #14806 from ReoDaProtovali/master
|
||||
|
||||
operated = 1
|
||||
update()
|
||||
/obj/machinery/conveyor_switch/oneway
|
||||
oneway = 1
|
||||
|
||||
// find any switches with same id as this one, and set their positions to match us
|
||||
for(var/obj/machinery/conveyor_switch/S in machines)
|
||||
if(S.id == src.id)
|
||||
S.position = position
|
||||
S.update()
|
||||
/obj/machinery/conveyor_switch/examine()
|
||||
.=..()
|
||||
if(oneway == 1)
|
||||
. += " It appears to only go in one direction."
|
||||
|
||||
@@ -25087,7 +25087,7 @@
|
||||
/area/gateway/prep_room)
|
||||
"kHf" = (
|
||||
/obj/machinery/conveyor_switch/oneway{
|
||||
convdir = -1;
|
||||
//convdir = -1; //Incompatable with new behavior -Reo
|
||||
id = "QMLoad2"
|
||||
},
|
||||
/obj/machinery/light{
|
||||
|
||||
Reference in New Issue
Block a user