mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Fix NanoUI missing assignment; use two-line ifs
This commit is contained in:
@@ -98,7 +98,7 @@ Passive gate is similar to the regular pump except:
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0)
|
||||
SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 400, 100)
|
||||
ui.open()
|
||||
@@ -146,12 +146,14 @@ Passive gate is similar to the regular pump except:
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/attack_hand(mob/user)
|
||||
if(..() || !user) return
|
||||
if(..() || !user)
|
||||
return
|
||||
add_fingerprint(usr)
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/passive_gate/Topic(href, href_list)
|
||||
if(..()) return
|
||||
if(..())
|
||||
return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
|
||||
@@ -106,7 +106,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0)
|
||||
SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 400, 100)
|
||||
ui.open()
|
||||
@@ -153,11 +153,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/attack_hand(mob/user)
|
||||
if(..() | !user) return
|
||||
if(..() | !user)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/pump/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..())
|
||||
return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
|
||||
@@ -95,14 +95,15 @@ Thus, the two variables affect pump operation are set in New():
|
||||
return 1
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/interact(mob/user)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
if(!src.allowed(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 0)
|
||||
SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
ui = SSnano.try_update_ui(user, src, ui_key, ui, force_open = force_open)
|
||||
if (!ui)
|
||||
ui = new(user, src, ui_key, "atmos_pump.tmpl", name, 400, 100)
|
||||
ui.open()
|
||||
@@ -149,11 +150,13 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/attack_hand(mob/user)
|
||||
if(..() | !user) return
|
||||
if(..() | !user)
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/components/binary/volume_pump/Topic(href,href_list)
|
||||
if(..()) return
|
||||
if(..())
|
||||
return
|
||||
if(href_list["power"])
|
||||
on = !on
|
||||
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", "atmos")
|
||||
|
||||
Reference in New Issue
Block a user