mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-30 07:28:53 +01:00
forward refs in usr dialog (#17090)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
f326dec745
commit
adcd25a00f
@@ -54,7 +54,7 @@
|
||||
if("logout")
|
||||
authenticated = 0
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
|
||||
/obj/machinery/computer/am_engine/attack_ai(var/mob/user as mob)
|
||||
return src.attack_hand(user)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
return 1
|
||||
G.mega_energy = CLAMP(new_val, 1, 50)
|
||||
G.update_active_power_usage(G.mega_energy * 1500)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return 1
|
||||
|
||||
if(href_list["modifyrate"])
|
||||
@@ -105,12 +105,12 @@
|
||||
to_chat(usr, span_warning("That's not a valid number."))
|
||||
return 1
|
||||
G.rate = CLAMP(new_val, 1, 10)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return 1
|
||||
|
||||
if(href_list["toggle"])
|
||||
G.activate(usr)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(usr)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -125,5 +125,5 @@
|
||||
gravity_generator:on = 1
|
||||
A.gravitychange(1)
|
||||
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
else
|
||||
for(var/mob/M in viewers(1, src))
|
||||
if (M.client && M.machine == src)
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(M)
|
||||
|
||||
proc
|
||||
overheat()
|
||||
@@ -141,20 +141,20 @@
|
||||
if(!active && HasFuel())
|
||||
active = 1
|
||||
icon_state = "portgen1"
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
if(href_list["action"] == "disable")
|
||||
if (active)
|
||||
active = 0
|
||||
icon_state = "portgen0"
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
if(href_list["action"] == "lower_power")
|
||||
if (power_output > 1)
|
||||
power_output--
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
if (href_list["action"] == "higher_power")
|
||||
if (power_output < 4 || emagged)
|
||||
power_output++
|
||||
src.updateUsrDialog()
|
||||
src.updateUsrDialog(usr)
|
||||
if (href_list["action"] == "close")
|
||||
usr << browse(null, "window=port_gen")
|
||||
usr.machine = null
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
/obj/machinery/power/port_gen/pacman/attackby(var/obj/item/O, var/mob/user)
|
||||
if(istype(O, sheet_path))
|
||||
var/obj/item/stack/addstack = O
|
||||
var/amount = min((max_sheets - sheets), addstack.get_amount())
|
||||
@@ -278,7 +278,7 @@
|
||||
to_chat(user, span_notice("You add [amount] sheet\s to the [src.name]."))
|
||||
sheets += amount
|
||||
addstack.use(amount)
|
||||
updateUsrDialog()
|
||||
updateUsrDialog(user)
|
||||
return
|
||||
else if(!active)
|
||||
if(O.has_tool_quality(TOOL_WRENCH))
|
||||
@@ -299,7 +299,7 @@
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob)
|
||||
/obj/machinery/power/port_gen/pacman/attack_hand(mob/user)
|
||||
..()
|
||||
if (!anchored)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user