Merge branch 'kk-charpod' of https://github.com/KillianKirilenko/VOREStation into kk-charpod

This commit is contained in:
Killian
2024-12-04 09:27:16 +00:00
382 changed files with 4527 additions and 3682 deletions
+3 -4
View File
@@ -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
@@ -148,7 +147,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))
@@ -385,7 +385,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--
@@ -448,4 +448,4 @@
/obj/structure/closet/walllocker_double/engineering/east
pixel_x = 32
dir = EAST
dir = EAST
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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.
+293
View File
@@ -0,0 +1,293 @@
/obj/structure/gargoyle
name = "statue"
desc = "A very lifelike carving."
density = TRUE
anchored = TRUE
var/mob/living/carbon/human/gargoyle
var/initial_sleep
var/initial_blind
var/initial_is_shifted
var/initial_lying
var/initial_lying_prev
var/wagging
var/flapping
var/obj_integrity = 100
var/original_int = 100
var/max_integrity = 100
var/stored_examine
var/identifier = "statue"
var/material = "stone"
var/adjective = "hardens"
var/list/tail_lower_dirs = list(SOUTH, EAST, WEST)
var/image/tail_image
var/tail_alt = TAIL_UPPER_LAYER
var/can_revert = TRUE
var/was_rayed = FALSE
/obj/structure/gargoyle/Initialize(mapload, var/mob/living/carbon/human/H, var/ident_ovr, var/mat_ovr, var/adj_ovr, var/tint_ovr, var/revert = TRUE, var/discard_clothes)
. = ..()
if (isspace(loc) || isopenspace(loc))
anchored = FALSE
if (!istype(H) || !isturf(H.loc))
return
var/datum/component/gargoyle/comp = H.GetComponent(/datum/component/gargoyle)
var/tint = "#FFFFFF"
if (comp)
comp.cooldown = world.time + (15 SECONDS)
comp.statue = src
comp.transformed = TRUE
comp.paused = FALSE
identifier = length(comp.identifier) > 0 ? comp.identifier : initial(identifier)
material = length(comp.material) > 0 ? comp.material : initial(material)
tint = length(comp.tint) > 0 ? comp.tint : initial(tint)
adjective = length(comp.adjective) > 0 ? comp.adjective : initial(adjective)
if (copytext_char(adjective, -1) != "s")
adjective += "s"
gargoyle = H
if (H.get_effective_size(TRUE) < 0.5) // "So small! I can step over it!"
density = FALSE
if (ident_ovr)
identifier = ident_ovr
if (mat_ovr)
material = mat_ovr
if (adj_ovr)
adjective = adj_ovr
if (tint_ovr)
tint = tint_ovr
if (H.tail_style?.clip_mask_state)
tail_lower_dirs.Cut()
else if (H.tail_style)
tail_lower_dirs = H.tail_style.lower_layer_dirs.Copy()
tail_alt = H.tail_alt ? TAIL_UPPER_LAYER_ALT : TAIL_UPPER_LAYER
max_integrity = H.getMaxHealth() + 100
obj_integrity = H.health + 100
original_int = obj_integrity
name = "[identifier] of [H.name]"
desc = "A very lifelike [identifier] made of [material]."
stored_examine = H.examine(H)
description_fluff = H.get_description_fluff()
if (H.buckled)
H.buckled.unbuckle_mob(H, TRUE)
//icon = H.icon
//copy_overlays(H)
//calculate our tints
var/list/RGB = rgb2num(tint)
var/colorr = rgb(RGB[1]*0.299, RGB[2]*0.299, RGB[3]*0.299)
var/colorg = rgb(RGB[1]*0.587, RGB[2]*0.587, RGB[3]*0.587)
var/colorb = rgb(RGB[1]*0.114, RGB[2]*0.114, RGB[3]*0.114)
var/tint_color = list(colorr, colorg, colorb, "#000000")
var/list/body_layers = HUMAN_BODY_LAYERS
var/list/other_layers = HUMAN_OTHER_LAYERS
for (var/i = 1; i <= length(H.overlays_standing); i++)
if (i in other_layers)
continue
if (discard_clothes && !(i in body_layers))
continue
if (istype(H.overlays_standing[i], /image) && (i in body_layers))
var/image/old_image = H.overlays_standing[i]
var/image/new_image = image(old_image)
if (i == TAIL_LOWER_LAYER || i == TAIL_UPPER_LAYER || i == TAIL_UPPER_LAYER_ALT)
tail_image = new_image
new_image.color = tint_color
new_image.layer = old_image.layer
add_overlay(new_image)
else
if (!isnull(H.overlays_standing[i]))
add_overlay(H.overlays_standing[i])
initial_sleep = H.sleeping
initial_blind = H.eye_blind
initial_is_shifted = H.is_shifted
transform = H.transform
layer = H.layer
pixel_x = H.pixel_x
pixel_y = H.pixel_y
dir = H.dir
initial_lying = H.lying
initial_lying_prev = H.lying_prev
H.sdisabilities |= MUTE
if (H.appearance_flags & PIXEL_SCALE)
appearance_flags |= PIXEL_SCALE
wagging = H.wagging
H.transforming = TRUE
flapping = H.flapping
H.toggle_tail(FALSE, FALSE)
H.toggle_wing(FALSE, FALSE)
H.visible_message(span_warning("[H]'s skin rapidly [adjective] as they turn to [material]!"), span_warning("Your skin abruptly [adjective] as you turn to [material]!"))
H.forceMove(src)
H.SetBlinded(0)
H.SetSleeping(0)
H.status_flags |= GODMODE
H.updatehealth()
H.canmove = 0
can_revert = revert
START_PROCESSING(SSprocessing, src)
/obj/structure/gargoyle/Destroy()
STOP_PROCESSING(SSprocessing, src)
if (!gargoyle)
return ..()
if (can_revert)
unpetrify(deleting = FALSE) //don't delete if we're already deleting!
else
visible_message(span_warning("The [identifier] loses shape and crumbles into a pile of [material]!"))
. = ..()
/obj/structure/gargoyle/process()
if (!gargoyle)
qdel(src)
if (gargoyle.loc != src)
can_revert = TRUE //something's gone wrong, they escaped, lets not qdel them
unpetrify(deal_damage = FALSE, deleting = TRUE)
/obj/structure/gargoyle/examine_icon()
var/icon/examine_icon = icon(icon=src.icon, icon_state=src.icon_state, dir=SOUTH, frame=1, moving=0)
examine_icon.MapColors(rgb(77,77,77), rgb(150,150,150), rgb(28,28,28), rgb(0,0,0))
return examine_icon
/obj/structure/gargoyle/get_description_info()
if (gargoyle)
if (isspace(loc) || isopenspace(loc))
return
return "It can be [anchored ? "un" : ""]anchored with a wrench."
/obj/structure/gargoyle/examine(mob/user)
. = ..()
if (gargoyle && stored_examine)
. += "The [identifier] seems to have a bit more to them..."
. += stored_examine
return
/obj/structure/gargoyle/proc/unpetrify(var/deal_damage = TRUE, var/deleting = FALSE)
if (!gargoyle)
return
var/datum/component/gargoyle/comp = gargoyle.GetComponent(/datum/component/gargoyle)
if (comp)
comp.cooldown = world.time + (15 SECONDS)
comp.statue = null
comp.transformed = FALSE
else
if (was_rayed)
remove_verb(gargoyle,/mob/living/carbon/human/proc/gargoyle_transformation)
if (gargoyle.loc == src)
gargoyle.forceMove(loc)
gargoyle.transform = transform
gargoyle.pixel_x = pixel_x
gargoyle.pixel_y = pixel_y
gargoyle.is_shifted = initial_is_shifted
gargoyle.dir = dir
gargoyle.lying = initial_lying
gargoyle.lying_prev = initial_lying_prev
gargoyle.toggle_tail(wagging, FALSE)
gargoyle.toggle_wing(flapping, FALSE)
gargoyle.sdisabilities &= ~MUTE //why is there no ADD_TRAIT etc here that's actually ussssed
gargoyle.status_flags &= ~GODMODE
gargoyle.SetBlinded(initial_blind)
gargoyle.SetSleeping(initial_sleep)
gargoyle.transforming = FALSE
gargoyle.canmove = 1
gargoyle.update_canmove()
var/hurtmessage = ""
if (deal_damage)
if (obj_integrity < original_int)
var/f = (original_int - obj_integrity) / 10
for (var/x in 1 to 10)
gargoyle.adjustBruteLoss(f)
hurtmessage = " " + span_bold("You feel your body take the damage that was dealt while being [material]!")
gargoyle.updatehealth()
alpha = 0
gargoyle.visible_message(span_warning("[gargoyle]'s skin rapidly reverts, returning them to normal!"), span_warning("Your skin reverts, freeing your movement once more![hurtmessage]"))
gargoyle = null
if (deleting)
qdel(src)
/obj/structure/gargoyle/return_air()
return return_air_for_internal_lifeform()
/obj/structure/gargoyle/return_air_for_internal_lifeform(var/mob/living/lifeform)
var/air_type = /datum/gas_mixture/belly_air
if(istype(lifeform))
air_type = lifeform.get_perfect_belly_air_type()
var/air = new air_type(1000)
return air
/obj/structure/gargoyle/proc/damage(var/damage)
if (was_rayed)
return //gargoyle quick regenerates, the others don't, so let's not have them getting too damaged
obj_integrity = min(obj_integrity-damage, max_integrity)
if(obj_integrity <= 0)
qdel(src)
/obj/structure/gargoyle/take_damage(var/damage)
damage(damage)
/obj/structure/gargoyle/attack_generic(var/mob/user, var/damage, var/attack_message = "hits")
user.do_attack_animation(src)
visible_message(span_danger("[user] [attack_message] the [src]!"))
damage(damage)
/obj/structure/gargoyle/attackby(var/obj/item/W as obj, var/mob/living/user as mob)
if(W.is_wrench())
if (isspace(loc) || isopenspace(loc))
to_chat(user, span_warning("You can't anchor that here!"))
anchored = FALSE
return ..()
playsound(src, W.usesound, 50, 1)
if (do_after(user, (2 SECONDS) * W.toolspeed, target = src))
to_chat(user, span_notice("You [anchored ? "un" : ""]anchor the [src]."))
anchored = !anchored
else if(!isrobot(user) && gargoyle && gargoyle.vore_selected && gargoyle.trash_catching)
if(istype(W,/obj/item/grab || /obj/item/holder))
gargoyle.vore_attackby(W, user)
return
if(gargoyle.adminbus_trash || is_type_in_list(W,edible_trash) && W.trash_eatable && !is_type_in_list(W,item_vore_blacklist))
to_chat(user, span_warning("You slip [W] into [gargoyle]'s [lowertext(gargoyle.vore_selected.name)] ."))
user.drop_item()
W.forceMove(gargoyle.vore_selected)
return
else if (!(W.flags & NOBLUDGEON))
user.setClickCooldown(user.get_attack_speed(W))
if(W.damtype == BRUTE || W.damtype == BURN)
user.do_attack_animation(src)
playsound(src, W.hitsound, 50, 1)
damage(W.force)
else
return ..()
/obj/structure/gargoyle/set_dir(var/new_dir)
. = ..()
if(. && tail_image)
cut_overlay(tail_image)
tail_image.layer = BODY_LAYER + ((dir in tail_lower_dirs) ? TAIL_LOWER_LAYER : tail_alt)
add_overlay(tail_image)
/obj/structure/gargoyle/hitby(atom/movable/AM as mob|obj,var/speed = THROWFORCE_SPEED_DIVISOR)
if(istype(AM,/obj/item) && gargoyle && gargoyle.vore_selected && gargoyle.trash_catching)
var/obj/item/I = AM
if(gargoyle.adminbus_trash || is_type_in_list(I,edible_trash) && I.trash_eatable && !is_type_in_list(I,item_vore_blacklist))
gargoyle.hitby(AM, speed)
return
else if(istype(AM,/mob/living) && gargoyle)
var/mob/living/L = AM
if(gargoyle.throw_vore && L.throw_vore && gargoyle.can_be_drop_pred && L.can_be_drop_prey)
var/drop_prey_temp = FALSE
if(gargoyle.can_be_drop_prey)
drop_prey_temp = TRUE
gargoyle.can_be_drop_prey = FALSE //Making sure the original gargoyle body is not the one getting throwvored instead.
gargoyle.hitby(L, speed)
if(drop_prey_temp)
gargoyle.can_be_drop_prey = TRUE
return
return ..()
+2 -2
View File
@@ -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
+23 -23
View File
@@ -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"
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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]."),\
+5 -5
View File
@@ -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)
+1 -1
View File
@@ -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)
+12 -9
View File
@@ -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
@@ -573,6 +573,9 @@
H.l_hand.clean_blood()
H.bloody_hands = 0
H.germ_level = 0
H.hand_blood_color = null
LAZYCLEARLIST(H.blood_DNA)
H.update_bloodied()
else
user.clean_blood()
for(var/mob/V in viewers(src, null))
@@ -620,12 +623,12 @@
var/obj/item/I = O
if(!I || !istype(I,/obj/item)) return
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.")