mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-11 15:14:27 +01:00
Ghost interaction with atmos machinery
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/interact(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/interact(mob/user)
|
||||
var/dat = {"<b>Power: </b><a href='?src=[UID()];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=[UID()];set_press=1'>Change</a>
|
||||
@@ -131,32 +131,37 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
if(!src.allowed(user))
|
||||
add_fingerprint(user)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='alert'>Access denied.</span>")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_ghost(mob/user)
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..())
|
||||
return 1
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
if(href_list["set_press"])
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
|
||||
src.target_pressure = max(0, min(4500, new_pressure))
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",target_pressure) as num
|
||||
target_pressure = max(0, min(4500, new_pressure))
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
|
||||
usr.set_machine(src)
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if(on)
|
||||
|
||||
@@ -103,7 +103,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
radio_connection.post_signal(src, signal, filter = RADIO_ATMOSIA)
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/interact(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/pump/interact(mob/user)
|
||||
var/dat = {"<b>Power: </b><a href='?src=[UID()];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output pressure: </b>
|
||||
[round(target_pressure,0.1)]kPa | <a href='?src=[UID()];set_press=1'>Change</a>
|
||||
@@ -151,16 +151,20 @@ Thus, the two variables affect pump operation are set in New():
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/pump/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
if(!src.allowed(user))
|
||||
add_fingerprint(user)
|
||||
if(!allowed(user))
|
||||
to_chat(user, "<span class='alert'>Access denied.</span>")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attack_ghost(mob/user)
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/Topic(href,href_list)
|
||||
if(..())
|
||||
@@ -169,13 +173,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
if(href_list["set_press"])
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",src.target_pressure) as num
|
||||
src.target_pressure = max(0, min(4500, new_pressure))
|
||||
var/new_pressure = input(usr,"Enter new output pressure (0-4500kPa)","Pressure control",target_pressure) as num
|
||||
target_pressure = max(0, min(4500, new_pressure))
|
||||
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
|
||||
usr.set_machine(src)
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/power_change()
|
||||
var/old_stat = stat
|
||||
@@ -183,7 +186,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/pump/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if(!(stat & NOPOWER) && on)
|
||||
|
||||
@@ -45,17 +45,21 @@
|
||||
investigate_log("was closed by [usr ? key_name(usr) : "a remote signal"]", "atmos")
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ai(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ai(mob/user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_ghost(mob/user)
|
||||
if(user.can_advanced_admin_interact())
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/attack_hand(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/valve/attack_hand(mob/user)
|
||||
add_fingerprint(usr)
|
||||
update_icon(1)
|
||||
sleep(10)
|
||||
if(open)
|
||||
close()
|
||||
return
|
||||
open()
|
||||
else
|
||||
open()
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital // can be controlled by AI
|
||||
name = "digital valve"
|
||||
@@ -67,13 +71,13 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
settagwhitelist = list("id_tag")
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_ai(mob/user)
|
||||
return attack_hand(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_hand(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attack_hand(mob/user)
|
||||
if(!powered())
|
||||
return
|
||||
if(!src.allowed(user))
|
||||
if(!allowed(user) && !user.can_advanced_admin_interact())
|
||||
to_chat(user, "<span class='alert'>Access denied.</span>")
|
||||
return
|
||||
..()
|
||||
@@ -130,7 +134,7 @@
|
||||
if(open)
|
||||
close()
|
||||
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/valve/digital/attackby(var/obj/item/weapon/W as obj, var/mob/user)
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
update_multitool_menu(user)
|
||||
return 1
|
||||
|
||||
@@ -99,7 +99,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/interact(mob/user as mob)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/interact(mob/user)
|
||||
var/dat = {"<b>Power: </b><a href='?src=[UID()];power=1'>[on?"On":"Off"]</a><br>
|
||||
<b>Desirable output flow: </b>
|
||||
[round(transfer_rate,1)]l/s | <a href='?src=[UID()];set_transfer_rate=1'>Change</a>
|
||||
@@ -142,16 +142,20 @@ Thus, the two variables affect pump operation are set in New():
|
||||
broadcast_status()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(user as mob)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
if(!src.allowed(user))
|
||||
add_fingerprint(user)
|
||||
if(!allowed(user) && !user.can_admin_interact())
|
||||
to_chat(user, "<span class='alert'>Access denied.</span>")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_ghost(mob/user)
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
return
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/Topic(href,href_list)
|
||||
if(..())
|
||||
@@ -160,13 +164,12 @@ Thus, the two variables affect pump operation are set in New():
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
if(href_list["set_transfer_rate"])
|
||||
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",src.transfer_rate) as num
|
||||
src.transfer_rate = max(0, min(200, new_transfer_rate))
|
||||
var/new_transfer_rate = input(usr,"Enter new output volume (0-200l/s)","Flow control",transfer_rate) as num
|
||||
transfer_rate = max(0, min(200, new_transfer_rate))
|
||||
investigate_log("was set to [transfer_rate] L/s by [key_name(usr)]", "atmos")
|
||||
usr.set_machine(src)
|
||||
src.update_icon()
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
update_icon()
|
||||
updateUsrDialog()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/power_change()
|
||||
var/old_stat = stat
|
||||
@@ -174,7 +177,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
if(old_stat != stat)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if(!istype(W, /obj/item/weapon/wrench))
|
||||
return ..()
|
||||
if(!(stat & NOPOWER) && on)
|
||||
|
||||
Reference in New Issue
Block a user