mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 22:57:39 +01:00
[MIRROR] usr to user up to player effects (#9552)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Heroman3003
Kashargul
parent
a7e4ef7dad
commit
0180cc74c5
@@ -128,14 +128,13 @@
|
||||
. = ..()
|
||||
tgui_interact(user)
|
||||
|
||||
/obj/item/canvas/tgui_act(action, params)
|
||||
/obj/item/canvas/tgui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(. || finalized)
|
||||
return
|
||||
var/mob/user = usr
|
||||
switch(action)
|
||||
if("paint")
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
var/obj/item/I = ui.user.get_active_hand()
|
||||
var/color = get_paint_tool_color(I)
|
||||
if(!color)
|
||||
return FALSE
|
||||
@@ -149,7 +148,7 @@
|
||||
if("finalize")
|
||||
. = TRUE
|
||||
if(!finalized)
|
||||
finalize(user)
|
||||
finalize(ui.user)
|
||||
|
||||
/obj/item/canvas/proc/finalize(mob/user)
|
||||
finalized = TRUE
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
usr.drop_item()
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(loc)
|
||||
else if(istype(W, /obj/item/packageWrap))
|
||||
@@ -387,7 +387,7 @@
|
||||
/obj/structure/closet/attack_self_tk(mob/user as mob)
|
||||
add_fingerprint(user)
|
||||
if(!toggle())
|
||||
to_chat(usr, span_notice("It won't budge!"))
|
||||
to_chat(user, span_notice("It won't budge!"))
|
||||
|
||||
/obj/structure/closet/verb/verb_toggleopen()
|
||||
set src in oview(1)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
usr.drop_item()
|
||||
user.drop_item()
|
||||
if(W)
|
||||
W.forceMove(src.loc)
|
||||
else
|
||||
|
||||
@@ -34,10 +34,10 @@
|
||||
if (istype(user, /mob/living/silicon/ai)) //Added by Strumpetplaya - AI shouldn't be able to
|
||||
return //activate emergency lockers. This fixes that. (Does this make sense, the AI can't call attack_hand, can it? --Mloc)
|
||||
if(!amount)
|
||||
to_chat(usr, "<spawn class='notice'>It's empty..")
|
||||
to_chat(user, "<spawn class='notice'>It's empty..")
|
||||
return
|
||||
if(amount)
|
||||
to_chat(usr, "<spawn class='notice'>You take out some items from \the [src].")
|
||||
to_chat(user, "<spawn class='notice'>You take out some items from \the [src].")
|
||||
for(var/path in spawnitems)
|
||||
new path(src.loc)
|
||||
amount--
|
||||
|
||||
@@ -72,10 +72,10 @@
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
to_chat(usr, span_warning("You kick the display case."))
|
||||
to_chat(user, span_warning("You kick the display case."))
|
||||
for(var/mob/O in oviewers())
|
||||
if ((O.client && !( O.blinded )))
|
||||
to_chat(O, span_warning("[usr] kicks the display case."))
|
||||
to_chat(O, span_warning("[user] kicks the display case."))
|
||||
src.health -= 2
|
||||
healthcheck()
|
||||
return
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
usr.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
user.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
@@ -39,11 +39,11 @@
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
user.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
user.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/fitness/boxing_ropes/can_climb(var/mob/living/user, post_climb_check=0) //Sets it to keep people from climbing over into the next turf if it is occupied.
|
||||
|
||||
@@ -233,7 +233,7 @@
|
||||
return 0
|
||||
|
||||
var/wall_fake
|
||||
add_hiddenprint(usr)
|
||||
add_hiddenprint(user)
|
||||
|
||||
if(M.integrity < 50)
|
||||
to_chat(user, span_notice("This material is too soft for use in wall construction."))
|
||||
@@ -256,7 +256,7 @@
|
||||
T.set_material(M, reinf_material, girder_material)
|
||||
if(wall_fake)
|
||||
T.can_open = 1
|
||||
T.add_hiddenprint(usr)
|
||||
T.add_hiddenprint(user)
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
return 1
|
||||
|
||||
else if (istype(I, /obj/item/reagent_containers/glass/bucket) && mybucket)
|
||||
I.afterattack(mybucket, usr, 1)
|
||||
I.afterattack(mybucket, user, 1)
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
@@ -189,12 +189,12 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
//Altclick the cart with a reagent container to pour things into the bucket without putting the bottle in trash
|
||||
/obj/structure/janitorialcart/AltClick(mob/living/user)
|
||||
if(user.incapacitated() || !Adjacent(user)) return
|
||||
var/obj/I = usr.get_active_hand()
|
||||
var/obj/I = user.get_active_hand()
|
||||
if(istype(I, /obj/item/mop))
|
||||
equip_janicart_item(user, I)
|
||||
else if(istype(I, /obj/item/reagent_containers) && mybucket)
|
||||
var/obj/item/reagent_containers/C = I
|
||||
C.afterattack(mybucket, usr, 1)
|
||||
C.afterattack(mybucket, user, 1)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -226,62 +226,62 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
var/obj/item/I = ui.user.get_active_hand()
|
||||
|
||||
switch(action)
|
||||
if("bag")
|
||||
if(mybag)
|
||||
usr.put_in_hands(mybag)
|
||||
to_chat(usr, span_notice("You take [mybag] from [src]."))
|
||||
ui.user.put_in_hands(mybag)
|
||||
to_chat(ui.user, span_notice("You take [mybag] from [src]."))
|
||||
mybag = null
|
||||
nullTguiIcon("mybag")
|
||||
else if(is_type_in_typecache(I, equippable_item_whitelist))
|
||||
equip_janicart_item(usr, I)
|
||||
equip_janicart_item(ui.user, I)
|
||||
if("mop")
|
||||
if(mymop)
|
||||
usr.put_in_hands(mymop)
|
||||
to_chat(usr, span_notice("You take [mymop] from [src]."))
|
||||
ui.user.put_in_hands(mymop)
|
||||
to_chat(ui.user, span_notice("You take [mymop] from [src]."))
|
||||
mymop = null
|
||||
nullTguiIcon("mymop")
|
||||
else if(is_type_in_typecache(I, equippable_item_whitelist))
|
||||
equip_janicart_item(usr, I)
|
||||
equip_janicart_item(ui.user, I)
|
||||
if("spray")
|
||||
if(myspray)
|
||||
usr.put_in_hands(myspray)
|
||||
to_chat(usr, span_notice("You take [myspray] from [src]."))
|
||||
ui.user.put_in_hands(myspray)
|
||||
to_chat(ui.user, span_notice("You take [myspray] from [src]."))
|
||||
myspray = null
|
||||
nullTguiIcon("myspray")
|
||||
else if(is_type_in_typecache(I, equippable_item_whitelist))
|
||||
equip_janicart_item(usr, I)
|
||||
equip_janicart_item(ui.user, I)
|
||||
if("replacer")
|
||||
if(myreplacer)
|
||||
usr.put_in_hands(myreplacer)
|
||||
to_chat(usr, span_notice("You take [myreplacer] from [src]."))
|
||||
ui.user.put_in_hands(myreplacer)
|
||||
to_chat(ui.user, span_notice("You take [myreplacer] from [src]."))
|
||||
myreplacer = null
|
||||
nullTguiIcon("myreplacer")
|
||||
else if(is_type_in_typecache(I, equippable_item_whitelist))
|
||||
equip_janicart_item(usr, I)
|
||||
equip_janicart_item(ui.user, I)
|
||||
if("sign")
|
||||
if(istype(I, /obj/item/clothing/suit/caution) && signs < 4)
|
||||
equip_janicart_item(usr, I)
|
||||
equip_janicart_item(ui.user, I)
|
||||
else if(signs)
|
||||
var/obj/item/clothing/suit/caution/sign = locate() in src
|
||||
if(sign)
|
||||
usr.put_in_hands(sign)
|
||||
to_chat(usr, span_notice("You take \a [sign] from [src]."))
|
||||
ui.user.put_in_hands(sign)
|
||||
to_chat(ui.user, span_notice("You take \a [sign] from [src]."))
|
||||
signs--
|
||||
if(!signs)
|
||||
nullTguiIcon("signs")
|
||||
else
|
||||
to_chat(usr, span_notice("[src] doesn't have any signs left."))
|
||||
to_chat(ui.user, span_notice("[src] doesn't have any signs left."))
|
||||
if("bucket")
|
||||
if(mybucket)
|
||||
mybucket.forceMove(get_turf(usr))
|
||||
to_chat(usr, span_notice("You unmount [mybucket] from [src]."))
|
||||
mybucket.forceMove(get_turf(ui.user))
|
||||
to_chat(ui.user, span_notice("You unmount [mybucket] from [src]."))
|
||||
mybucket = null
|
||||
nullTguiIcon("mybucket")
|
||||
else
|
||||
to_chat(usr, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))"))
|
||||
to_chat(ui.user, span_notice("((Drag and drop a mop bucket onto [src] to equip it.))"))
|
||||
return FALSE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
|
||||
/obj/structure/foodcart/attack_hand(var/mob/user as mob)
|
||||
if(contents.len)
|
||||
var/obj/item/reagent_containers/food/choice = tgui_input_list(usr, "What would you like to grab from the cart?", "Grab Choice", contents)
|
||||
var/obj/item/reagent_containers/food/choice = tgui_input_list(user, "What would you like to grab from the cart?", "Grab Choice", contents)
|
||||
if(choice)
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
if(!user.canmove || user.stat || user.restrained() || !in_range(loc, user))
|
||||
return
|
||||
if(ishuman(user))
|
||||
if(!user.get_active_hand())
|
||||
@@ -39,4 +39,4 @@
|
||||
if(contents.len < 5)
|
||||
icon_state = "foodcart-[contents.len]"
|
||||
else
|
||||
icon_state = "foodcart-5"
|
||||
icon_state = "foodcart-5"
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
usr.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
user.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
@@ -66,11 +66,11 @@
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
user.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
user.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
/obj/structure/ledge/can_climb(var/mob/living/user, post_climb_check=0)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
/obj/structure/mirror/raider/attack_hand(var/mob/living/carbon/human/user)
|
||||
if(istype(get_area(src),/area/syndicate_mothership))
|
||||
if(istype(user) && user.mind && user.mind.special_role == "Raider" && user.species.name != SPECIES_VOX && is_alien_whitelisted(user, SPECIES_VOX))
|
||||
var/choice = tgui_alert(usr, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes"))
|
||||
var/choice = tgui_alert(user, "Do you wish to become a true Vox of the Shoal? This is not reversible.", "Become Vox?", list("No","Yes"))
|
||||
if(choice && choice == "Yes")
|
||||
var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX)
|
||||
vox.gender = user.gender
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) && src.loc != user))
|
||||
if ((!in_range(src, user) && src.loc != user))
|
||||
return
|
||||
t = sanitizeSafe(t, MAX_NAME_LEN)
|
||||
if (t)
|
||||
@@ -220,7 +220,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
|
||||
|
||||
/obj/structure/morgue/crematorium/attack_hand(mob/user as mob)
|
||||
if (cremating)
|
||||
to_chat(usr, span_warning("It's locked."))
|
||||
to_chat(user, span_warning("It's locked."))
|
||||
return
|
||||
if ((src.connected) && (src.locked == 0))
|
||||
for(var/atom/movable/A as mob|obj in src.connected.loc)
|
||||
@@ -250,7 +250,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
|
||||
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null)
|
||||
if (user.get_active_hand() != P)
|
||||
return
|
||||
if ((!in_range(src, usr) > 1 && src.loc != user))
|
||||
if ((!in_range(src, user) > 1 && src.loc != user))
|
||||
return
|
||||
t = sanitizeSafe(t, MAX_NAME_LEN)
|
||||
if (t)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return
|
||||
else
|
||||
if(!isemptylist(src.search_contents_for(/obj/item/disk/nuclear)))
|
||||
to_chat(usr, "You get the feeling that you shouldn't cremate one of the items in the cremator.")
|
||||
to_chat(user, "You get the feeling that you shouldn't cremate one of the items in the cremator.")
|
||||
return
|
||||
|
||||
for(var/I in contents)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
to_chat(user, span_warning("\The [src]'s motors resist your efforts to rotate it. You may need to find some form of controller."))
|
||||
return
|
||||
|
||||
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
visible_message(\
|
||||
span_notice("[user.name] decides not to try turning \the [src]."),\
|
||||
@@ -59,13 +59,13 @@
|
||||
|
||||
var/new_bearing
|
||||
if(free_rotate)
|
||||
new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0)
|
||||
new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0)
|
||||
new_bearing = round(new_bearing)
|
||||
if(new_bearing <= -1 || new_bearing > 360)
|
||||
to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time."))
|
||||
return
|
||||
else
|
||||
var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions)
|
||||
var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions)
|
||||
new_bearing = round(compass_directions[choice])
|
||||
|
||||
var/rotate_degrees = new_bearing - degrees_from_north
|
||||
@@ -156,7 +156,7 @@
|
||||
/obj/structure/prop/prismcontrol/attack_hand(mob/living/user)
|
||||
..()
|
||||
|
||||
var/confirm = tgui_alert(usr, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
var/confirm = tgui_alert(user, "Do you want to try to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
visible_message(\
|
||||
span_notice("[user.name] decides not to try turning \the [src]."),\
|
||||
@@ -176,16 +176,16 @@
|
||||
|
||||
var/new_bearing
|
||||
if(free_rotate)
|
||||
new_bearing = tgui_input_number(usr, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0)
|
||||
new_bearing = tgui_input_number(user, "What bearing do you want to rotate \the [src] to?", "[name]", 0, 360, 0)
|
||||
new_bearing = round(new_bearing)
|
||||
if(new_bearing <= -1 || new_bearing > 360)
|
||||
to_chat(user, span_warning("Rotating \the [src] [new_bearing] degrees would be a waste of time."))
|
||||
return
|
||||
else
|
||||
var/choice = tgui_input_list(usr, "What point do you want to set \the [src] to?", "[name]", compass_directions)
|
||||
var/choice = tgui_input_list(user, "What point do you want to set \the [src] to?", "[name]", compass_directions)
|
||||
new_bearing = round(compass_directions[choice])
|
||||
|
||||
confirm = tgui_alert(usr, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
confirm = tgui_alert(user, "Are you certain you want to rotate \the [src]?", "[name]", list("Yes", "No"))
|
||||
if(confirm != "Yes")
|
||||
visible_message(\
|
||||
span_notice("[user.name] decides not to try turning \the [src]."),\
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
if(do_after(user, 20, src))
|
||||
user.visible_message(span_infoplain(span_bold("\The [user]") + " dismantles \the [src]."), span_notice("You dismantle \the [src]."))
|
||||
new /obj/item/stack/material/steel(get_turf(usr), 2)
|
||||
new /obj/item/stack/material/steel(get_turf(user), 2)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
if(!can_climb(user))
|
||||
return
|
||||
|
||||
usr.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
user.visible_message(span_warning("[user] starts climbing onto \the [src]!"))
|
||||
LAZYDISTINCTADD(climbers, user)
|
||||
|
||||
if(!do_after(user,(issmall(user) ? 20 : 34)))
|
||||
@@ -297,11 +297,11 @@
|
||||
return
|
||||
|
||||
if(get_turf(user) == get_turf(src))
|
||||
usr.forceMove(get_step(src, src.dir))
|
||||
user.forceMove(get_step(src, src.dir))
|
||||
else
|
||||
usr.forceMove(get_turf(src))
|
||||
user.forceMove(get_turf(src))
|
||||
|
||||
usr.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
user.visible_message(span_warning("[user] climbed over \the [src]!"))
|
||||
if(!anchored) take_damage(maxhealth) // Fatboy
|
||||
LAZYREMOVE(climbers, user)
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
if(tool.has_tool_quality(TOOL_SCREWDRIVER) && isturf(user.loc))
|
||||
var/direction = tgui_input_list(usr, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel"))
|
||||
var/direction = tgui_input_list(user, "In which direction?", "Select direction.", list("North", "East", "South", "West", "Cancel"))
|
||||
if(direction == "Cancel") return
|
||||
var/target_type = original_type || /obj/structure/sign
|
||||
var/obj/structure/sign/S = new target_type(user.loc)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#undef NEST_RESIST_TIME
|
||||
|
||||
/obj/structure/bed/nest/user_buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || usr.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
if ( !ismob(M) || (get_dist(src, user) > 1) || (M.loc != src.loc) || user.restrained() || user.stat || M.buckled || istype(user, /mob/living/silicon/pai) )
|
||||
return
|
||||
|
||||
unbuckle_mob()
|
||||
@@ -57,7 +57,7 @@
|
||||
if(istype(xenos) && !(locate(/obj/item/organ/internal/xenos/hivenode) in xenos.internal_organs))
|
||||
return
|
||||
|
||||
if(M == usr)
|
||||
if(M == user)
|
||||
return
|
||||
else
|
||||
M.visible_message(\
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/attack_hand(mob/living/user as mob)
|
||||
if (pulling)
|
||||
MouseDrop(usr)
|
||||
MouseDrop(user)
|
||||
else
|
||||
if(has_buckled_mobs())
|
||||
for(var/A in buckled_mobs)
|
||||
@@ -169,7 +169,7 @@
|
||||
user.set_dir(get_dir(user, src))
|
||||
to_chat(user, "You grip \the [name]'s handles.")
|
||||
else
|
||||
to_chat(usr, "You let go of \the [name]'s handles.")
|
||||
to_chat(user, "You let go of \the [name]'s handles.")
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
return
|
||||
@@ -228,7 +228,7 @@
|
||||
/obj/structure/bed/chair/wheelchair/buckle_mob(mob/M as mob, mob/user as mob)
|
||||
if(M == pulling)
|
||||
pulling = null
|
||||
usr.pulledby = null
|
||||
user.pulledby = null
|
||||
..()
|
||||
|
||||
/obj/structure/bed/chair/wheelchair/MouseDrop(over_object, src_location, over_location)
|
||||
|
||||
@@ -98,14 +98,14 @@
|
||||
|
||||
#undef TANK_DISPENSER_CAPACITY
|
||||
|
||||
/obj/structure/dispenser/tgui_act(action, params)
|
||||
/obj/structure/dispenser/tgui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("plasma")
|
||||
var/obj/item/tank/phoron/tank = locate() in src
|
||||
if(tank && Adjacent(usr))
|
||||
usr.put_in_hands(tank)
|
||||
if(tank && Adjacent(ui.user))
|
||||
ui.user.put_in_hands(tank)
|
||||
phorontanks--
|
||||
. = TRUE
|
||||
playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1)
|
||||
@@ -115,8 +115,8 @@
|
||||
if(istype(T, /obj/item/tank/oxygen) || istype(T, /obj/item/tank/air) || istype(T, /obj/item/tank/anesthetic))
|
||||
tank = T
|
||||
break
|
||||
if(tank && Adjacent(usr))
|
||||
usr.put_in_hands(tank)
|
||||
if(tank && Adjacent(ui.user))
|
||||
ui.user.put_in_hands(tank)
|
||||
oxygentanks--
|
||||
. = TRUE
|
||||
playsound(src, 'sound/items/drop/gascan.ogg', 100, 1, 1)
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
/obj/structure/toilet/attack_hand(mob/living/user as mob)
|
||||
if(swirlie)
|
||||
usr.setClickCooldown(user.get_attack_speed())
|
||||
usr.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.")
|
||||
user.setClickCooldown(user.get_attack_speed())
|
||||
user.visible_message(span_danger("[user] slams the toilet seat onto [swirlie.name]'s head!"), span_notice("You slam the toilet seat onto [swirlie.name]'s head!"), "You hear reverberating porcelain.")
|
||||
swirlie.adjustBruteLoss(5)
|
||||
return
|
||||
|
||||
@@ -519,13 +519,13 @@
|
||||
..()
|
||||
if(!istype(thing) || !thing.is_open_container())
|
||||
return ..()
|
||||
if(!usr.Adjacent(src))
|
||||
if(!user.Adjacent(src))
|
||||
return ..()
|
||||
if(!thing.reagents || thing.reagents.total_volume == 0)
|
||||
to_chat(usr, span_warning("\The [thing] is empty."))
|
||||
to_chat(user, span_warning("\The [thing] is empty."))
|
||||
return
|
||||
// Clear the vessel.
|
||||
visible_message(span_infoplain(span_bold("\The [usr]") + " tips the contents of \the [thing] into \the [src]."))
|
||||
visible_message(span_infoplain(span_bold("\The [user]") + " tips the contents of \the [thing] into \the [src]."))
|
||||
thing.reagents.clear_reagents()
|
||||
thing.update_icon()
|
||||
|
||||
@@ -549,13 +549,13 @@
|
||||
to_chat(user, span_warning("Someone's already washing here."))
|
||||
return
|
||||
|
||||
to_chat(usr, span_notice("You start washing your hands."))
|
||||
to_chat(user, span_notice("You start washing your hands."))
|
||||
playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
|
||||
|
||||
busy = 1
|
||||
if(!do_after(user, 40, src))
|
||||
busy = 0
|
||||
to_chat(usr, span_notice("You stop washing your hands."))
|
||||
to_chat(user, span_notice("You stop washing your hands."))
|
||||
return
|
||||
busy = 0
|
||||
|
||||
@@ -629,12 +629,12 @@
|
||||
if(J.water.energy < J.water.max_energy) return
|
||||
//CHOMPAdd End
|
||||
|
||||
to_chat(usr, span_notice("You start washing \the [I]."))
|
||||
to_chat(user, span_notice("You start washing \the [I]."))
|
||||
|
||||
busy = 1
|
||||
if(!do_after(user, 40, src))
|
||||
busy = 0
|
||||
to_chat(usr, span_notice("You stop washing \the [I]."))
|
||||
to_chat(user, span_notice("You stop washing \the [I]."))
|
||||
return
|
||||
busy = 0
|
||||
|
||||
|
||||
@@ -187,12 +187,12 @@
|
||||
//Crowbar to complete the assembly, Step 7 complete.
|
||||
else if(W.has_tool_quality(TOOL_CROWBAR))
|
||||
if(!src.electronics)
|
||||
to_chat(usr,span_warning("The assembly is missing electronics."))
|
||||
to_chat(user,span_warning("The assembly is missing electronics."))
|
||||
return
|
||||
if(src.electronics && istype(src.electronics, /obj/item/circuitboard/broken))
|
||||
to_chat(usr,span_warning("The assembly has broken airlock electronics."))
|
||||
to_chat(user,span_warning("The assembly has broken airlock electronics."))
|
||||
return
|
||||
usr << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner
|
||||
user << browse(null, "window=windoor_access") //Not sure what this actually does... -Ner
|
||||
playsound(src, W.usesound, 100, 1)
|
||||
user.visible_message("[user] pries the windoor into the frame.", "You start prying the windoor into the frame.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user