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
+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