Merge branch 'master' into kk-charpod

This commit is contained in:
Killian
2024-12-04 09:25:02 +00:00
committed by GitHub
382 changed files with 4527 additions and 3682 deletions
@@ -194,7 +194,7 @@ var/global/list/image/splatter_cache=list()
density = FALSE
anchored = TRUE
icon = 'icons/effects/blood.dmi'
icon_state = "gibbl5"
icon_state = "gib1"
random_icon_states = list("gib1", "gib2", "gib3", "gib5", "gib6")
var/fleshcolor = "#FFFFFF"
@@ -195,7 +195,7 @@
if(ruined)
return
if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
if(ruined || !user.Adjacent(src))
return
@@ -180,7 +180,7 @@
if(ruined)
return
if(tgui_alert(usr, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
if(tgui_alert(user, "Do I want to rip the poster from the wall?","You think...",list("Yes","No")) == "Yes")
if(ruined || !user.Adjacent(src))
return
+28
View File
@@ -0,0 +1,28 @@
/// An info button that, when clicked, puts some text in the user's chat
/obj/effect/abstract/info
name = "info"
icon = 'icons/effects/effects.dmi'
icon_state = "info"
mouse_opacity = MOUSE_OPACITY_OPAQUE
/// What should the info button display when clicked?
var/info_text
/obj/effect/abstract/info/Initialize(mapload, info_text)
. = ..()
if (!isnull(info_text))
src.info_text = info_text
/obj/effect/abstract/info/Click()
. = ..()
to_chat(usr, info_text)
/obj/effect/abstract/info/MouseEntered(location, control, params)
. = ..()
icon_state = "info_hovered"
/obj/effect/abstract/info/MouseExited()
. = ..()
icon_state = initial(icon_state)
+7 -7
View File
@@ -11,14 +11,14 @@
/*var/spawn_chance = rand(1,100)
switch(spawn_chance)
if(0 to 49)
new /obj/random/gun/guarenteed(usr.loc)
to_chat(usr, "You got a thing!")
new /obj/random/gun/guarenteed(user.loc)
to_chat(user, "You got a thing!")
if(50 to 99)
new /obj/item/bikehorn/rubberducky(usr.loc)
new /obj/item/bikehorn(usr.loc)
to_chat(usr, "You got two things!")
new /obj/item/bikehorn/rubberducky(user.loc)
new /obj/item/bikehorn(user.loc)
to_chat(user, "You got two things!")
if(100)
to_chat(usr, "The box contained nothing!")
to_chat(user, "The box contained nothing!")
return
*/
var/loot = pick(/obj/effect/landmark/costume,
@@ -95,7 +95,7 @@
qdel(loot)
loot = new_I // swap it
//VOREstation edit end
new loot(usr.loc)
new loot(user.loc)
to_chat(user, "You unwrap the package.")
qdel(src)
+5 -6
View File
@@ -59,27 +59,26 @@
return data
/obj/item/aicard/tgui_act(action, params)
/obj/item/aicard/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
if(!carded_ai)
return
var/user = usr
switch(action)
if("wipe")
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
add_attack_logs(user,carded_ai,"Purged from AI Card")
msg_admin_attack("[key_name_admin(ui.user)] wiped [key_name_admin(AI)] with \the [src].")
add_attack_logs(ui.user,carded_ai,"Purged from AI Card")
INVOKE_ASYNC(src, PROC_REF(wipe_ai))
if("radio")
carded_ai.aiRadio.disabledAi = !carded_ai.aiRadio.disabledAi
to_chat(carded_ai, span_warning("Your Subspace Transceiver has been [carded_ai.aiRadio.disabledAi ? "disabled" : "enabled"]!"))
to_chat(user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver."))
to_chat(ui.user, span_notice("You [carded_ai.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver."))
if("wireless")
carded_ai.control_disabled = !carded_ai.control_disabled
to_chat(carded_ai, span_warning("Your wireless interface has been [carded_ai.control_disabled ? "disabled" : "enabled"]!"))
to_chat(user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface."))
to_chat(ui.user, span_notice("You [carded_ai.control_disabled ? "disable" : "enable"] the AI's wireless interface."))
if(carded_ai.control_disabled && carded_ai.deployed_shell)
carded_ai.disconnect_shell("Disconnecting from remote shell due to [src] wireless access interface being disabled.")
update_icon()
@@ -17,38 +17,38 @@
flags |= NOBLUDGEON //So borgs don't spark.
/obj/item/bodysnatcher/attack(mob/living/M, mob/living/user)
usr.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(ishuman(M) || issilicon(M)) //Allows body swapping with humans, synths, and pAI's/borgs since they all have a mind.
if(usr == M)
if(user == M)
to_chat(user,span_warning(" A message pops up on the LED display, informing you that you that the mind transfer to yourself was successful... Wait, did that even do anything?"))
return
if(!M.mind) //Do they have a mind?
to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] appears braindead."))
to_chat(user,span_warning("A warning pops up on the device, informing you that [M] appears braindead."))
return
if(!M.allow_mind_transfer)
to_chat(usr,span_danger("The target's mind is too complex to be affected!"))
to_chat(user,span_danger("The target's mind is too complex to be affected!"))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.resleeve_lock && usr.ckey != H.resleeve_lock)
if(H.resleeve_lock && user.ckey != H.resleeve_lock)
to_chat(src, span_danger("[H] cannot be impersonated!"))
return
if(M.stat == DEAD) //Are they dead?
to_chat(usr,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done."))
to_chat(user,span_warning("A warning pops up on the device, informing you that [M] is dead, and, as such, the mind transfer can not be done."))
return
var/choice = tgui_alert(usr,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel"))
if(choice == "Continue" && usr.get_active_hand() == src && usr.Adjacent(M))
var/choice = tgui_alert(user,"This will swap your mind with the target's mind. This will result in them controlling your body, and you controlling their body. Continue?","Confirmation",list("Continue","Cancel"))
if(choice == "Continue" && user.get_active_hand() == src && user.Adjacent(M))
usr.visible_message(span_warning("[usr] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!"))
if(do_after(usr,35 SECONDS,M))
if(usr.mind && M.mind && M.stat != DEAD && usr.stat != DEAD)
log_and_message_admins("[usr.ckey] used a Bodysnatcher to swap bodies with [M.ckey]")
to_chat(usr,span_notice("Your minds have been swapped! Have a nice day."))
user.visible_message(span_warning("[user] pushes the device up their forehead and [M]'s head, the device beginning to let out a series of light beeps!"),span_notice("You begin swap minds with [M]!"))
if(do_after(user,35 SECONDS,M))
if(user.mind && M.mind && M.stat != DEAD && user.stat != DEAD)
log_and_message_admins("[user.ckey] used a Bodysnatcher to swap bodies with [M.ckey]")
to_chat(user,span_notice("Your minds have been swapped! Have a nice day."))
var/datum/mind/user_mind = user.mind
var/datum/mind/prey_mind = M.mind
var/target_ooc_notes = M.ooc_notes
@@ -58,8 +58,8 @@
var/user_likes = user.ooc_notes_likes
var/user_dislikes = user.ooc_notes_dislikes
M.ghostize()
usr.ghostize()
usr.mind = null
user.ghostize()
user.mind = null
M.mind = null
user_mind.current = null
prey_mind.current = null
@@ -73,9 +73,9 @@
user.ooc_notes = target_ooc_notes
user.ooc_notes_likes = target_likes
user.ooc_notes_dislikes = target_dislikes
usr.sleeping = 10 //Device knocks out both the user and the target.
usr.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision
usr.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body.
user.sleeping = 10 //Device knocks out both the user and the target.
user.eye_blurry = 30 //Blurry vision while they both get used to their new body's vision
user.slurring = 50 //And let's also have them slurring while they attempt to get used to using their new body.
if(ishuman(M)) //Let's not have the AI slurring, even though its downright hilarious.
M.sleeping = 10
M.eye_blurry = 30
@@ -318,11 +318,11 @@
if(..())
return TRUE
add_fingerprint(usr)
add_fingerprint(ui.user)
. = TRUE
switch(action)
if("rename")
var/new_name = sanitizeSafe(tgui_input_text(usr,"Please enter your name.","Communicator",usr.name) )
var/new_name = sanitizeSafe(tgui_input_text(ui.user,"Please enter your name.","Communicator",ui.user.name) )
if(new_name)
register_device(new_name)
@@ -341,7 +341,7 @@
ringer = !ringer
if("set_ringer_tone")
var/ringtone = tgui_input_text(usr, "Set Ringer Tone", "Ringer")
var/ringtone = tgui_input_text(ui.user, "Set Ringer Tone", "Ringer")
if(ringtone)
ttone = ringtone
@@ -360,7 +360,7 @@
if("dial")
if(!get_connection_to_tcomms())
to_chat(usr, span_danger("Error: Cannot connect to Exonet node."))
to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node."))
return FALSE
var/their_address = params["dial"]
exonet.send_message(their_address, "voice")
@@ -373,16 +373,16 @@
if("message")
if(!get_connection_to_tcomms())
to_chat(usr, span_danger("Error: Cannot connect to Exonet node."))
to_chat(ui.user, span_danger("Error: Cannot connect to Exonet node."))
return FALSE
var/their_address = params["message"]
var/text = sanitizeSafe(tgui_input_text(usr,"Enter your message.","Text Message"))
var/text = sanitizeSafe(tgui_input_text(ui.user,"Enter your message.","Text Message"))
if(text)
exonet.send_message(their_address, "text", text)
im_list += list(list("address" = exonet.address, "to_address" = their_address, "im" = text))
log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", usr)
log_pda("(COMM: [src]) sent \"[text]\" to [exonet.get_atom_from_address(their_address)]", ui.user)
var/obj/item/communicator/comm = exonet.get_atom_from_address(their_address)
to_chat(usr, span_notice("[icon2html(src, usr.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], <b>\"[text]\"</b> (<a href='?src=\ref[src];action=Reply;target=\ref[exonet.get_atom_from_address(comm.exonet.address)]'>Reply</a>)"))
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], <b>\"[text]\"</b> (<a href='?src=\ref[src];action=Reply;target=\ref[exonet.get_atom_from_address(comm.exonet.address)]'>Reply</a>)"))
for(var/mob/M in player_list)
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
@@ -395,16 +395,16 @@
var/name_to_disconnect = params["disconnect"]
for(var/mob/living/voice/V in contents)
if(name_to_disconnect == sanitize(V.name))
close_connection(usr, V, "[usr] hung up")
close_connection(ui.user, V, "[ui.user] hung up")
for(var/obj/item/communicator/comm in communicating)
if(name_to_disconnect == sanitize(comm.name))
close_connection(usr, comm, "[usr] hung up")
close_connection(ui.user, comm, "[ui.user] hung up")
if("startvideo")
var/ref_to_video = params["startvideo"]
var/obj/item/communicator/comm = locate(ref_to_video)
if(comm)
connect_video(usr, comm)
connect_video(ui.user, comm)
if("endvideo")
if(video_source)
@@ -418,15 +418,15 @@
if("hang_up")
for(var/mob/living/voice/V in contents)
close_connection(usr, V, "[usr] hung up")
close_connection(ui.user, V, "[ui.user] hung up")
for(var/obj/item/communicator/comm in communicating)
close_connection(usr, comm, "[usr] hung up")
close_connection(ui.user, comm, "[ui.user] hung up")
if("switch_tab")
selected_tab = params["switch_tab"]
if("edit")
var/n = tgui_input_text(usr, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE)
var/n = tgui_input_text(ui.user, "Please enter message", name, notehtml, multiline = TRUE, prevent_enter = TRUE)
n = sanitizeSafe(n, extra = 0)
if(n)
note = html_decode(n)
+1 -1
View File
@@ -132,7 +132,7 @@
if(!slot_check())
to_chat(user, span_warning("You need to equip [src] before taking out [paddles]."))
else
if(!usr.put_in_hands(paddles)) //Detach the paddles into the user's hands
if(!user.put_in_hands(paddles)) //Detach the paddles into the user's hands
to_chat(user, span_warning("You need a free hand to hold the paddles!"))
update_icon() //success
@@ -49,7 +49,7 @@
if(!evaluate_ghost_join(user))
return ..()
tgui_alert_async(usr, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS)
tgui_alert_async(user, "Would you like to become [src]? It is bound to [revivedby].", "Become Mob", list("Yes","No"), CALLBACK(src, PROC_REF(reply_ghost_join)), 20 SECONDS)
/// A reply to an async alert request was received
/mob/living/simple_mob/proc/reply_ghost_join(response)
@@ -107,7 +107,7 @@
new painting_decal(F, painting_dir, painting_colour)
/obj/item/floor_painter/attack_self(var/mob/user)
var/choice = tgui_alert(usr, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel"))
var/choice = tgui_alert(user, "Do you wish to change the decal type, paint direction, or paint colour?", "Modify What?", list("Decal","Direction","Colour","Cancel"))
if(choice == "Cancel")
return
else if(choice == "Decal")
@@ -134,14 +134,14 @@
var/mob/living/silicon/robot/R = user
if(R.emagged)
src.Emag()
to_chat(usr, You short circuit the [src].")
to_chat(user, You short circuit the [src].")
return
*/
to_chat(usr, "It has [uses] lights remaining.")
var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null
to_chat(user, "It has [uses] lights remaining.")
var/new_color = input(user, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null
if(new_color)
selected_color = new_color
to_chat(usr, "The light color has been changed.")
to_chat(user, "The light color has been changed.")
/obj/item/lightreplacer/update_icon()
icon_state = "lightreplacer[emagged]"
@@ -120,7 +120,7 @@
return
/obj/item/closet_painter/attack_self(var/mob/user)
var/choice = tgui_alert(usr, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour"))
var/choice = tgui_alert(user, "Do you wish to change the regular closet color or the secure closet color?", "Color Selection", list("Regular Closet Colour","Cancel","Secure Closet Colour"))
if(choice == "Regular Closet Colour")
choose_colour()
else if(choice == "Secure Closet Colour")
+1 -1
View File
@@ -33,7 +33,7 @@
tool_qualities = list(TOOL_MULTITOOL)
/obj/item/multitool/attack_self(mob/living/user)
var/choice = tgui_alert(usr, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel"))
var/choice = tgui_alert(user, "What do you want to do with \the [src]?", "Multitool Menu", list("Switch Mode", "Clear Buffers", "Cancel"))
switch(choice)
if("Clear Buffers")
to_chat(user,span_notice("You clear \the [src]'s memory."))
+6 -6
View File
@@ -61,21 +61,21 @@ GLOBAL_LIST_BOILERPLATE(all_pai_cards, /obj/item/paicard)
if(pai != null) //Have a person in them already?
return ..()
if(is_damage_critical())
to_chat(usr, span_warning("That card is too damaged to activate!"))
to_chat(user, span_warning("That card is too damaged to activate!"))
return
var/time_till_respawn = user.time_till_respawn()
if(time_till_respawn == -1) // Special case, never allowed to respawn
to_chat(usr, span_warning("Respawning is not allowed!"))
to_chat(user, span_warning("Respawning is not allowed!"))
else if(time_till_respawn) // Nonzero time to respawn
to_chat(usr, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes."))
to_chat(user, span_warning("You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes."))
return
if(jobban_isbanned(usr, JOB_PAI))
to_chat(usr,span_warning("You cannot join a pAI card when you are banned from playing as a pAI."))
if(jobban_isbanned(user, JOB_PAI))
to_chat(user,span_warning("You cannot join a pAI card when you are banned from playing as a pAI."))
return
for(var/ourkey in paikeys)
if(ourkey == user.ckey)
to_chat(usr, span_warning("You can't just rejoin any old pAI card!!! Your card still exists."))
to_chat(user, span_warning("You can't just rejoin any old pAI card!!! Your card still exists."))
return
var/choice = tgui_alert(user, "You sure you want to inhabit this PAI, or submit yourself to being recruited?", "Confirmation", list("Inhabit", "Recruit", "Cancel"))
@@ -240,7 +240,7 @@ var/global/list/default_medbay_channels = list(
return STATUS_CLOSE
return ..()
/obj/item/radio/tgui_act(action, params)
/obj/item/radio/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
@@ -251,8 +251,8 @@ var/global/list/default_medbay_channels = list(
new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency)
if(hidden_uplink)
if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency))
usr << browse(null, "window=radio")
if(hidden_uplink.check_trigger(ui.user, frequency, traitor_frequency))
ui.user << browse(null, "window=radio")
. = TRUE
if("broadcast")
ToggleBroadcast()
@@ -269,7 +269,7 @@ var/global/list/default_medbay_channels = list(
. = TRUE
if("specFreq")
var/freq = params["channel"]
if(has_channel_access(usr, freq))
if(has_channel_access(ui.user, freq))
set_frequency(text2num(freq))
. = TRUE
if("subspace")
@@ -277,10 +277,10 @@ var/global/list/default_medbay_channels = list(
subspace_transmission = !subspace_transmission
if(!subspace_transmission)
channels = list()
to_chat(usr, span_notice("Subspace Transmission is disabled"))
to_chat(ui.user, span_notice("Subspace Transmission is disabled"))
else
recalculateChannels()
to_chat(usr, span_notice("Subspace Transmission is enabled"))
to_chat(ui.user, span_notice("Subspace Transmission is enabled"))
. = TRUE
if("toggleLoudspeaker")
if(!subspace_switchable)
@@ -288,12 +288,12 @@ var/global/list/default_medbay_channels = list(
loudspeaker = !loudspeaker
if(loudspeaker)
to_chat(usr, span_notice("Loadspeaker enabled."))
to_chat(ui.user, span_notice("Loadspeaker enabled."))
else
to_chat(usr, span_notice("Loadspeaker disabled."))
to_chat(ui.user, span_notice("Loadspeaker disabled."))
. = TRUE
if(. && iscarbon(usr))
if(. && iscarbon(ui.user))
playsound(src, "button", 10)
GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
@@ -64,7 +64,7 @@
if(!slot_check())
to_chat(user, span_warning("You need to equip [src] before taking out [handset]."))
else
if(!usr.put_in_hands(handset)) //Detach the handset into the user's hands
if(!user.put_in_hands(handset)) //Detach the handset into the user's hands
to_chat(user, span_warning("You need a free hand to hold the handset!"))
update_icon() //success
@@ -28,7 +28,7 @@
if (user.stat)
return
if (!user.IsAdvancedToolUser())
to_chat(usr, span_warning("You don't have the dexterity to do this!"))
to_chat(user, span_warning("You don't have the dexterity to do this!"))
return
analyze_gases(src, user)
+1 -1
View File
@@ -201,7 +201,7 @@
operating = 1
while(selected_camera && Adjacent(user))
selected_camera = tgui_input_list(usr, "Select camera to view.", "Camera Choice", cameras)
selected_camera = tgui_input_list(user, "Select camera to view.", "Camera Choice", cameras)
selected_camera = null
operating = 0
@@ -20,13 +20,13 @@
var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100))
if(length(ticket_name) > 100)
tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error")
tgui_alert_async(user, "Entered name too long. 100 character limit.","Error")
return
if(!ticket_name)
return
var/details = sanitize(tgui_input_text(user, "What is the ticket for? Avoid entering personally identifiable information in this section. This information should not be used to harrass or otherwise make the person feel uncomfortable. (Max length: 200)", "Ticket Details", max_length = 200))
if(length(details) > 200)
tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error")
tgui_alert_async(user, "Entered details too long. 200 character limit.","Error")
return
if(!details)
return
@@ -71,13 +71,13 @@
var/ticket_name = sanitize(tgui_input_text(user, "The Name of the person you are issuing the ticket to.", "Name", max_length = 100))
if(length(ticket_name) > 100)
tgui_alert_async(usr, "Entered name too long. 100 character limit.","Error")
tgui_alert_async(user, "Entered name too long. 100 character limit.","Error")
return
if(!ticket_name)
return
var/details = sanitize(tgui_input_text(user, "What is the ticket for? This could be anything like travel to a destination or permission to do something! This is not official and does not override any rules or authorities on the station.", "Ticket Details", max_length = 200))
if(length(details) > 200)
tgui_alert_async(usr, "Entered details too long. 200 character limit.","Error")
tgui_alert_async(user, "Entered details too long. 200 character limit.","Error")
return
if(!details)
return
@@ -86,7 +86,7 @@
data["valve"] = valve_open
return data
/obj/item/transfer_valve/tgui_act(action, params)
/obj/item/transfer_valve/tgui_act(action, params, datum/tgui/ui)
if(..())
return
. = TRUE
@@ -99,7 +99,7 @@
toggle_valve()
if("device")
if(attached_device)
attached_device.attack_self(usr)
attached_device.attack_self(ui.user)
if("remove_device")
if(attached_device)
attached_device.forceMove(get_turf(src))
@@ -110,7 +110,7 @@
. = FALSE
if(.)
update_icon()
add_fingerprint(usr)
add_fingerprint(ui.user)
/obj/item/transfer_valve/proc/process_activation(var/obj/item/D)
if(toggle)
@@ -412,7 +412,7 @@ GLOBAL_LIST_BOILERPLATE(premade_tele_beacons, /obj/item/perfect_tele_beacon/stat
var/mob/living/L = user
var/confirm = tgui_alert(user, "You COULD eat the beacon...", "Eat beacon?", list("Eat it!", "No, thanks."))
if(confirm == "Eat it!")
var/obj/belly/bellychoice = tgui_input_list(usr, "Which belly?","Select A Belly", L.vore_organs)
var/obj/belly/bellychoice = tgui_input_list(user, "Which belly?","Select A Belly", L.vore_organs)
if(bellychoice)
user.visible_message(span_warning("[user] is trying to stuff \the [src] into [user.gender == MALE ? "his" : user.gender == FEMALE ? "her" : "their"] [bellychoice.name]!"),span_notice("You begin putting \the [src] into your [bellychoice.name]!"))
if(do_after(user,5 SECONDS,src))
+1 -1
View File
@@ -197,7 +197,7 @@
switch(action)
if("buy")
var/datum/uplink_item/UI = (locate(params["ref"]) in uplink.items)
UI.buy(src, usr)
UI.buy(src, ui.user)
return TRUE
if("lock")
toggle()
+28
View File
@@ -0,0 +1,28 @@
/obj/item/petrifier
name = "odd button"
desc = "A metal device with a single, purple button on it, and a tiny interface."
icon = 'icons/obj/machines/petrification.dmi'
icon_state = "petrifier"
var/mob/living/carbon/human/target
var/identifier = "statue"
var/material = "stone"
var/adjective = "hardens"
var/tint = "#FFFFFF"
var/discard_clothes = TRUE
var/able_to_unpetrify = TRUE
var/obj/machinery/petrification/linked
/obj/item/petrifier/Initialize(mapload, var/to_link)
. = ..()
linked = to_link
/obj/item/petrifier/attack_self(var/mob/user)
. = ..()
if (!isturf(user.loc) && user.get_ultimate_mob() != target)
to_chat(user, span_warning("The device beeps but does nothing."))
return
if (linked?.petrify(user, src))
visible_message(span_notice("A ray of purple light streams out of \the [src], aimed directly at [target]. Everywhere the light touches on them quickly [adjective] into [material]."))
to_chat(user, span_warning("The device fizzles and crumbles into dust."))
qdel(src)
+1 -1
View File
@@ -234,7 +234,7 @@
var/t = sanitizeSafe(tgui_input_text(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
if (!in_range(src, user) && src.loc != user)
return
src.created_name = t
@@ -12,7 +12,7 @@
/obj/item/selectable_item/attack_self(mob/user as mob)
tgui_alert(user, {"[preface_string]"}, preface_title)
var/chosen_item = tgui_input_list(usr, selection_string, selection_title, item_options)
var/chosen_item = tgui_input_list(user, selection_string, selection_title, item_options)
chosen_item = item_options[chosen_item]
if(!QDELETED(src) && chosen_item)
user.drop_item()
@@ -45,4 +45,4 @@
preface_title = "Gender Chemistry Kit"
item_options = list("Androrovir" = /obj/item/reagent_containers/glass/beaker/vial/androrovir,
"Gynorovir" = /obj/item/reagent_containers/glass/beaker/vial/gynorovir,
"Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir)
"Androgynorovir" = /obj/item/reagent_containers/glass/beaker/vial/androgynorovir)
+1 -1
View File
@@ -37,7 +37,7 @@
var/obj/item/weldingtool/WT = W.get_welder()
if(WT.remove_fuel(0, user))
cut_overlays()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
to_chat(user, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
return
+8 -8
View File
@@ -137,7 +137,7 @@
var/multiplier = text2num(params["multiplier"])
if(!multiplier || (multiplier <= 0)) //href exploit protection
return
produce_recipe(R, multiplier, usr)
produce_recipe(R, multiplier, ui.user)
return TRUE
/obj/item/stack/proc/is_valid_recipe(datum/stack_recipe/R, list/recipe_list)
@@ -402,7 +402,7 @@
/obj/item/stack/attack_hand(mob/user as mob)
if (user.get_inactive_hand() == src)
var/N = tgui_input_number(usr, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
var/N = tgui_input_number(user, "How many stacks of [src] would you like to split off? There are currently [amount].", "Split stacks", 1, amount, 1)
if(N != round(N))
to_chat(user, span_warning("You cannot separate a non-whole number of stacks!"))
return
@@ -413,8 +413,8 @@
src.add_fingerprint(user)
F.add_fingerprint(user)
spawn(0)
if (src && usr.machine==src)
src.interact(usr)
if (src && user.machine==src)
src.interact(user)
else
..()
return
@@ -425,10 +425,10 @@
src.transfer_to(S)
spawn(0) //give the stacks a chance to delete themselves if necessary
if (S && usr.machine==S)
S.interact(usr)
if (src && usr.machine==src)
src.interact(usr)
if (S && user.machine==S)
S.interact(user)
if (src && user.machine==src)
src.interact(user)
else
return ..()
@@ -53,8 +53,8 @@
return
if(WT.remove_fuel(0,user))
new welds_into(usr.loc)
usr.update_icon()
new welds_into(user.loc)
user.update_icon()
visible_message(span_notice("\The [src] is shaped by [user.name] with the welding tool."),"You hear welding.")
var/obj/item/stack/tile/T = src
src = null
+2 -2
View File
@@ -197,8 +197,8 @@
to_chat(user, span_warning("You can't do that right now!"))
return
if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null
if(energy_color_input)
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
+3 -3
View File
@@ -1023,9 +1023,9 @@
activate(user)
/obj/item/toy/desk/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck
if((user == usr && (!( usr.restrained() ) && (!( usr.stat ) && (usr.contents.Find(src) || in_range(src, usr))))))
if(!istype(usr, /mob/living/simple_mob))
if( !usr.get_active_hand() ) //if active hand is empty
if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user))))))
if(!istype(user, /mob/living/simple_mob))
if(!user.get_active_hand()) //if active hand is empty
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
+25 -25
View File
@@ -30,51 +30,51 @@ AI MODULES
if (istype(AM, /obj/machinery/computer/aiupload))
var/obj/machinery/computer/aiupload/comp = AM
if(comp.stat & NOPOWER)
to_chat(usr, "The upload computer has no power!")
to_chat(user, "The upload computer has no power!")
return
if(comp.stat & BROKEN)
to_chat(usr, "The upload computer is broken!")
to_chat(user, "The upload computer is broken!")
return
if (!comp.current)
to_chat(usr, "You haven't selected an AI to transmit laws to!")
to_chat(user, "You haven't selected an AI to transmit laws to!")
return
if (comp.current.stat == 2 || comp.current.control_disabled == 1)
to_chat(usr, "Upload failed. No signal is being detected from the AI.")
to_chat(user, "Upload failed. No signal is being detected from the AI.")
else if (comp.current.see_in_dark == 0)
to_chat(usr, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
to_chat(user, "Upload failed. Only a faint signal is being detected from the AI, and it is not responding to our requests. It may be low on power.")
else
src.transmitInstructions(comp.current, usr)
src.transmitInstructions(comp.current, user)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
for(var/mob/living/silicon/robot/R in mob_list)
if(R.lawupdate && (R.connected_ai == comp.current))
to_chat(R, "These are your laws now:")
R.show_laws()
to_chat(usr, "Upload complete. The AI's laws have been modified.")
to_chat(user, "Upload complete. The AI's laws have been modified.")
else if (istype(AM, /obj/machinery/computer/borgupload))
var/obj/machinery/computer/borgupload/comp = AM
if(comp.stat & NOPOWER)
to_chat(usr, "The upload computer has no power!")
to_chat(user, "The upload computer has no power!")
return
if(comp.stat & BROKEN)
to_chat(usr, "The upload computer is broken!")
to_chat(user, "The upload computer is broken!")
return
if (!comp.current)
to_chat(usr, "You haven't selected a robot to transmit laws to!")
to_chat(user, "You haven't selected a robot to transmit laws to!")
return
if (comp.current.stat == 2 || comp.current.emagged)
to_chat(usr, "Upload failed. No signal is being detected from the robot.")
to_chat(user, "Upload failed. No signal is being detected from the robot.")
else if (comp.current.connected_ai)
to_chat(usr, "Upload failed. The robot is slaved to an AI.")
to_chat(user, "Upload failed. The robot is slaved to an AI.")
else
src.transmitInstructions(comp.current, usr)
src.transmitInstructions(comp.current, user)
to_chat(comp.current, "These are your laws now:")
comp.current.show_laws()
to_chat(usr, "Upload complete. The robot's laws have been modified.")
to_chat(user, "Upload complete. The robot's laws have been modified.")
else if(istype(AM, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = AM
@@ -133,13 +133,13 @@ AI MODULES
/obj/item/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Anyone threatening or attempting to harm [] is no longer to be considered a crew member, and is a threat which must be neutralized.'", targetName, targetName)
/obj/item/aiModule/safeguard/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
to_chat(user, "No name detected on module, please enter one.")
return 0
..()
@@ -159,13 +159,13 @@ AI MODULES
/obj/item/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = sanitize(tgui_input_text(usr, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
var/targName = sanitize(tgui_input_text(user, "Please enter the name of the person who is the only crew member.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one crew member' AI module: 'Only [] is a crew member.'", targetName)
/obj/item/aiModule/oneHuman/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!targetName)
to_chat(usr, "No name detected on module, please enter one.")
to_chat(user, "No name detected on module, please enter one.")
return 0
return ..()
@@ -240,11 +240,11 @@ AI MODULES
/obj/item/aiModule/freeform/attack_self(var/mob/user as mob)
..()
var/new_lawpos = tgui_input_number(usr, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
var/new_lawpos = tgui_input_number(user, "Please enter the priority for your new law. Can only write to law sectors 15 and above.", "Law Priority (15+)", lawpos)
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -257,7 +257,7 @@ AI MODULES
/obj/item/aiModule/freeform/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
to_chat(user, "No law detected on module, please create one.")
return 0
..()
@@ -362,7 +362,7 @@ AI MODULES
/obj/item/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(tgui_input_text(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(user, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -373,7 +373,7 @@ AI MODULES
/obj/item/aiModule/freeformcore/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
to_chat(user, "No law detected on module, please create one.")
return 0
..()
@@ -386,7 +386,7 @@ AI MODULES
/obj/item/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = sanitize(tgui_input_text(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
var/targName = sanitize(tgui_input_text(user, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
@@ -402,7 +402,7 @@ AI MODULES
/obj/item/aiModule/syndicate/install(var/obj/machinery/computer/C, var/mob/living/user)
if(!newFreeFormLaw)
to_chat(usr, "No law detected on module, please create one.")
to_chat(user, "No law detected on module, please create one.")
return 0
..()
+4 -4
View File
@@ -112,10 +112,10 @@
return data
/obj/item/pipe_dispenser/tgui_act(action, params)
/obj/item/pipe_dispenser/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
if(!ui.user.canmove || ui.user.stat || ui.user.restrained() || !in_range(loc, ui.user))
return TRUE
var/playeffect = TRUE
switch(action)
@@ -217,7 +217,7 @@
var/obj/item/pipe/P = new pipe_item_type(get_turf(A), path, queued_p_dir)
P.update()
P.add_fingerprint(usr)
P.add_fingerprint(user)
if(R.paintable)
P.color = pipe_colors[paint_color]
P.setPipingLayer(queued_piping_layer)
@@ -248,7 +248,7 @@
activate()
C.add_fingerprint(usr)
C.add_fingerprint(user)
C.update_icon()
if(mode & WRENCH_MODE)
do_wrench(C, user)
@@ -74,14 +74,14 @@
to_chat(user, span_warning("Circuit controls are locked."))
return
var/existing_networks = jointext(network,",")
var/input = sanitize(tgui_input_text(usr, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(tgui_input_text(user, "Which networks would you like to connect this camera console circuit to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
to_chat(usr, "No input found please hang up and try your call again.")
to_chat(user, "No input found please hang up and try your call again.")
return
var/list/tempnetwork = splittext(input, ",")
tempnetwork = difflist(tempnetwork,restricted_camera_networks,1)
if(tempnetwork.len < 1)
to_chat(usr, "No network found please hang up and try your call again.")
to_chat(user, "No network found please hang up and try your call again.")
return
network = tempnetwork
return
@@ -32,7 +32,7 @@
opposite_catastasis = "BROAD"
catastasis = "STANDARD"
switch(tgui_alert(usr, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")))
switch(tgui_alert(user, "Current receiver spectrum is set to: [catastasis]","Multitool-Circuitboard interface",list("Switch to [opposite_catastasis]","Cancel")))
if("Switch to STANDARD","Switch to BROAD")
src.contraband_enabled = !src.contraband_enabled
@@ -101,7 +101,7 @@
/obj/item/dnainjector/attack(mob/M as mob, mob/user as mob)
if (!istype(M, /mob))
return
if (!usr.IsAdvancedToolUser())
if (!user.IsAdvancedToolUser())
return
if(inuse)
return 0
@@ -39,7 +39,7 @@
..()
/obj/item/plastique/attack_self(mob/user as mob)
var/newtime = tgui_input_number(usr, "Please set the timer.", "Timer", 10, 60000, 10)
var/newtime = tgui_input_number(user, "Please set the timer.", "Timer", 10, 60000, 10)
if(user.get_active_hand() == src)
newtime = CLAMP(newtime, 10, 60000)
timer = newtime
@@ -99,7 +99,7 @@
if (!safety)
if (src.reagents.total_volume < 1)
to_chat(usr, span_notice("\The [src] is empty."))
to_chat(user, span_notice("\The [src] is empty."))
return
if (world.time < src.last_use + 20)
@@ -136,7 +136,7 @@
W.set_color()
W.set_up(my_target)
if((istype(usr.loc, /turf/space)) || (usr.lastarea.get_gravity() == 0))
if((istype(user.loc, /turf/space)) || (user.lastarea.get_gravity() == 0))
user.inertia_dir = get_dir(target, user)
step(user, user.inertia_dir)
else
+6 -6
View File
@@ -11,15 +11,15 @@ THAT STUPID GAME KIT
return src.attack_hand(user)
/obj/item/game_kit/MouseDrop(mob/user as mob)
if (user == usr && !usr.restrained() && !usr.stat && (usr.contents.Find(src) || in_range(src, usr)))
if (usr.hand)
if (!usr.l_hand)
if (user == usr && !user.restrained() && !user.stat && (user.contents.Find(src) || in_range(src, user)))
if (user.hand)
if (!user.l_hand)
spawn (0)
src.attack_hand(usr, 1, 1)
src.attack_hand(user, 1, 1)
else
if (!usr.r_hand)
if (!user.r_hand)
spawn (0)
src.attack_hand(usr, 0, 1)
src.attack_hand(user, 0, 1)
/obj/item/game_kit/proc/update()
var/dat = text("<CENTER><B>Game Board</B></CENTER><BR><a href='?src=\ref[];mode=hia'>[]</a> <a href='?src=\ref[];mode=remove'>remove</a><HR><table width= 256 border= 0 height= 256 cellspacing= 0 cellpadding= 0 >", src, (src.selected ? text("Selected: []", src.selected) : "Nothing Selected"), src)
@@ -32,7 +32,7 @@
if(detonator)
// detonator.loc=src.loc
detonator.detached()
usr.put_in_hands(detonator)
user.put_in_hands(detonator)
detonator=null
det_time = null
stage=0
@@ -130,11 +130,11 @@
if(istype(O, /obj/item/stack/telecrystal))
var/obj/item/stack/telecrystal/T = O
if(T.get_amount() < 1)
to_chat(usr, span_notice("You are not adding enough telecrystals to fuel \the [src]."))
to_chat(user, span_notice("You are not adding enough telecrystals to fuel \the [src]."))
return
uses += T.get_amount()*0.5 //Gives 5 uses per 10 TC
uses = CEILING(uses, 1) //Ensures no decimal uses nonsense, rounds up to be nice
to_chat(usr, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses]."))
to_chat(user, span_notice("You add \the [O] to \the [src]. Increasing the uses of \the [src] to [uses]."))
qdel(O)
@@ -201,13 +201,13 @@
if(I)
icon = I
/obj/item/card_fluff/attack_self()
/obj/item/card_fluff/attack_self(mob/user)
var/choice = tgui_input_list(usr, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset"))
var/choice = tgui_input_list(user, "What element would you like to customize?", "Customize Card", list("Band","Stamp","Reset"))
if(!choice) return
if(choice == "Band")
var/bandchoice = tgui_input_list(usr, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black"))
var/bandchoice = tgui_input_list(user, "Select colour", "Band colour", list("red","orange","green","dark green","medical blue","dark blue","purple","tan","pink","gold","white","black"))
if(!bandchoice) return
if(bandchoice == "red")
@@ -238,7 +238,7 @@
update_icon()
return
else if(choice == "Stamp")
var/stampchoice = tgui_input_list(usr, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation"))
var/stampchoice = tgui_input_list(user, "Select image", "Stamp image", list("ship","cross","big ears","shield","circle-cross","target","smile","frown","peace","exclamation"))
if(!stampchoice) return
if(stampchoice == "ship")
@@ -38,7 +38,7 @@
if(!registered_user && register_user(user))
to_chat(user, span_notice("The microscanner marks you as its owner, preventing others from accessing its internals."))
if(registered_user == user)
switch(tgui_alert(usr, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show")))
switch(tgui_alert(user, "Would you like to edit the ID, or show it?","Show or Edit?", list("Edit","Show")))
if(null)
return
if("Edit")
@@ -24,7 +24,7 @@
var/t = tgui_input_text(user, "What would you like the label to be?", text("[]", src.name), null, MAX_NAME_LEN)
if (user.get_active_hand() != I)
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)
@@ -92,7 +92,7 @@
if(container.reagents.total_volume < container.volume)
var/container_name = container.name
if(rimplant.reagents.trans_to(container, amount = rimplant.transfer_amount))
user.visible_message(span_notice("[usr] [pick(rimplant.emote_descriptor)] into \the [container_name]."),
user.visible_message(span_notice("[user] [pick(rimplant.emote_descriptor)] into \the [container_name]."),
span_notice("You [pick(rimplant.self_emote_descriptor)] some [rimplant.reagent_name] into \the [container_name]."))
if(prob(5))
src.visible_message(span_notice("[src] [pick(rimplant.random_emote)].")) // M-mlem.
@@ -29,7 +29,7 @@
/obj/item/chainsaw/proc/turnOn(mob/user as mob)
if(on) return
visible_message("You start pulling the string on \the [src].", "[usr] starts pulling the string on the [src].")
visible_message("You start pulling the string on \the [src].", "[user] starts pulling the string on the [src].")
if(max_fuel <= 0)
if(do_after(user, 15))
@@ -38,7 +38,7 @@
to_chat(user, "You fumble with the string.")
else
if(do_after(user, 15))
visible_message("You start \the [src] up with a loud grinding!", "[usr] starts \the [src] up with a loud grinding!")
visible_message("You start \the [src] up with a loud grinding!", "[user] starts \the [src] up with a loud grinding!")
attack_verb = list("shredded", "ripped", "torn")
playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1)
force = active_force
@@ -91,7 +91,7 @@
Hyd.die()
if (istype(A, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,A) <= 1)
to_chat(user, span_notice("You begin filling the tank on the chainsaw."))
if(do_after(usr, 15))
if(do_after(user, 15))
A.reagents.trans_to_obj(src, max_fuel)
playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
to_chat(user, span_notice("Chainsaw succesfully refueled."))
@@ -66,13 +66,13 @@
return 0
else
to_chat(user, span_notice("You begin to place \the [src.name]."))
if(!do_after(usr, 10))
if(!do_after(user, 10))
return 0
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
to_chat(user, span_notice("You place \the [src.name]."))
G.grave_name = grave_name
G.epitaph = epitaph
G.add_fingerprint(usr)
G.add_fingerprint(user)
G.dir = user.dir
QDEL_NULL(src)
return
@@ -145,7 +145,7 @@
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
return FALSE
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
if(do_after(usr, sharpen_time))
if(do_after(M, sharpen_time))
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
src.set_material(material)
return TRUE
@@ -187,8 +187,8 @@
to_chat(user, span_warning("You can't do that right now!"))
return
if(tgui_alert(usr, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
if(tgui_alert(user, "Are you sure you want to recolor your blade?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null
if(energy_color_input)
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
+1 -1
View File
@@ -16,7 +16,7 @@
/obj/item/teleportation_scroll/attack_self(mob/user as mob)
if((user.mind && !wizards.is_antagonist(user.mind)))
to_chat(usr, span_warning("You stare at the scroll but cannot make sense of the markings!"))
to_chat(user, span_warning("You stare at the scroll but cannot make sense of the markings!"))
return
user.set_machine(src)
+2 -2
View File
@@ -208,8 +208,8 @@
if(user.incapacitated() || !istype(user))
to_chat(user, span_warning("You can't do that right now!"))
return
if(tgui_alert(usr, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",lcolor) as color|null
if(tgui_alert(user, "Are you sure you want to recolor your shield?", "Confirm Recolor", list("Yes", "No")) == "Yes")
var/energy_color_input = input(user,"","Choose Energy Color",lcolor) as color|null
if(energy_color_input)
lcolor = sanitize_hexcolor(energy_color_input)
update_icon()
@@ -79,7 +79,7 @@
/obj/item/storage/fancy/egg_box/open(mob/user as mob)
if(open)
return
if (isobserver(usr))
if (isobserver(user))
return
open = TRUE
update_icon()
@@ -36,7 +36,7 @@ MRE Stuff
/obj/item/storage/mre/open(mob/user)
if(!opened)
to_chat(usr, span_notice("You tear open the bag, breaking the vacuum seal."))
to_chat(user, span_notice("You tear open the bag, breaking the vacuum seal."))
opened = 1
update_icon()
. = ..()
@@ -236,7 +236,7 @@ MRE Stuff
/obj/item/storage/mrebag/open(mob/user)
if(!opened && !isobserver(user))
to_chat(usr, span_notice("The pouch heats up as you break the vacuum seal."))
to_chat(user, span_notice("The pouch heats up as you break the vacuum seal."))
opened = 1
update_icon()
. = ..()
@@ -52,7 +52,7 @@
if (istype(W, /obj/item/multitool) && (src.open == 1)&& (!src.l_hacking))
user.show_message(span_notice("Now attempting to reset internal memory, please hold."), 1)
src.l_hacking = 1
if (do_after(usr, 100))
if (do_after(user, 100))
if (prob(40))
src.l_setshort = 1
src.l_set = 0
@@ -84,7 +84,7 @@
if (isliving(user) && Adjacent(user) && (src.locked == 1))
to_chat(user, span_warning("[src] is locked and cannot be opened!"))
else if (isliving(user) && Adjacent(user) && (!src.locked))
src.open(usr)
src.open(user)
else
for(var/mob/M in range(1))
if (M.s_active == src)
@@ -110,7 +110,7 @@
data["l_set"] = l_set
return data
/obj/item/storage/secure/tgui_act(action, params)
/obj/item/storage/secure/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
switch (action)
@@ -132,12 +132,12 @@
src.locked = 1
cut_overlays()
src.code = null
src.close(usr)
src.close(ui.user)
else
src.code += text("[]", digit)
if (length(src.code) > 5)
src.code = "ERROR"
src.add_fingerprint(usr)
src.add_fingerprint(ui.user)
. = TRUE
return
@@ -172,7 +172,7 @@
if ((src.loc == user) && (src.locked == 1))
to_chat(user, span_warning("[src] is locked and cannot be opened!"))
else if ((src.loc == user) && (!src.locked))
src.open(usr)
src.open(user)
else
..()
for(var/mob/M in range(1))
@@ -787,7 +787,7 @@
var/open = 0
storage_slots = 1
can_hold = list(
/obj/item/clothing/gloves/ring,
/obj/item/clothing/accessory/ring,
/obj/item/coin,
/obj/item/clothing/accessory/medal
)
@@ -801,7 +801,7 @@
if(contents.len >= 1)
var/contained_image = null
if(istype(contents[1], /obj/item/clothing/gloves/ring))
if(istype(contents[1], /obj/item/clothing/accessory/ring))
contained_image = "ring_trinket"
else if(istype(contents[1], /obj/item/coin))
contained_image = "coin_trinket"
@@ -141,12 +141,12 @@ var/list/global/tank_gauge_cache = list()
var/obj/item/assembly_holder/assy = src.proxyassembly.assembly
if(assy.a_left && assy.a_right)
assy.dropInto(usr.loc)
assy.dropInto(user.loc)
assy.master = null
src.proxyassembly.assembly = null
else
if(!src.proxyassembly.assembly.a_left)
assy.a_right.dropInto(usr.loc)
assy.a_right.dropInto(user.loc)
assy.a_right.holder = null
assy.a_right = null
src.proxyassembly.assembly = null
@@ -257,7 +257,7 @@ var/list/global/tank_gauge_cache = list()
return data
/obj/item/tank/tgui_act(action, params)
/obj/item/tank/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
switch(action)
@@ -278,10 +278,10 @@ var/list/global/tank_gauge_cache = list()
if(.)
distribute_pressure = clamp(round(pressure), 0, TANK_MAX_RELEASE_PRESSURE)
if("toggle")
toggle_valve(usr)
toggle_valve(ui.user)
. = TRUE
add_fingerprint(usr)
add_fingerprint(ui.user)
/obj/item/tank/proc/toggle_valve(var/mob/user)
if(istype(loc,/mob/living/carbon))
@@ -330,17 +330,17 @@
if(H.nif && H.nif.flag_check(NIF_V_UVFILTER,NIF_FLAGS_VISION)) return //VOREStation Add - NIF
switch(safety)
if(1)
to_chat(usr, span_warning("Your eyes sting a little."))
to_chat(user, span_warning("Your eyes sting a little."))
E.damage += rand(1, 2)
if(E.damage > 12)
user.eye_blurry += rand(3,6)
if(0)
to_chat(usr, span_warning("Your eyes burn."))
to_chat(user, span_warning("Your eyes burn."))
E.damage += rand(2, 4)
if(E.damage > 10)
E.damage += rand(4,10)
if(-1)
to_chat(usr, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely."))
to_chat(user, span_danger("Your thermals intensify the welder's glow. Your eyes itch and burn severely."))
user.eye_blurry += rand(12,20)
E.damage += rand(12, 16)
if(safety<2)
@@ -46,7 +46,7 @@
/obj/item/tool/wirecutters/attack(mob/living/carbon/C as mob, mob/user as mob)
if(istype(C) && user.a_intent == I_HELP && (C.handcuffed) && (istype(C.handcuffed, /obj/item/handcuffs/cable)))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
user.visible_message("\The [user] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
"You hear cable being cut.")
C.handcuffed = null
+3 -3
View File
@@ -104,7 +104,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) ? climb_delay * 0.6 : climb_delay)))
@@ -115,10 +115,10 @@
LAZYREMOVE(climbers, user)
return
usr.forceMove(climb_to(user))
user.forceMove(climb_to(user))
if (get_turf(user) == get_turf(src))
usr.visible_message(span_warning("[user] climbs onto \the [src]!"))
user.visible_message(span_warning("[user] climbs onto \the [src]!"))
LAZYREMOVE(climbers, user)
/obj/structure/proc/climb_to(var/mob/living/user)
+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.")