mirror of
https://github.com/Yawn-Wider/YWPolarisVore.git
synced 2026-08-25 05:57:21 +01:00
Merge branch 'master' into kk-charpod
This commit is contained in:
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user