mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Mass replace
This commit is contained in:
@@ -23,7 +23,7 @@ AI MODULES
|
||||
var/datum/ai_laws/laws = null
|
||||
|
||||
/obj/item/weapon/aiModule/proc/install(var/obj/machinery/computer/C)
|
||||
if (istype(C, /obj/machinery/computer/aiupload))
|
||||
if(istype(C, /obj/machinery/computer/aiupload))
|
||||
var/obj/machinery/computer/aiupload/comp = C
|
||||
if(comp.stat & NOPOWER)
|
||||
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
|
||||
@@ -31,13 +31,13 @@ AI MODULES
|
||||
if(comp.stat & BROKEN)
|
||||
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
|
||||
return
|
||||
if (!comp.current)
|
||||
if(!comp.current)
|
||||
to_chat(usr, "<span class='warning'>You haven't selected an AI to transmit laws to!</span>")
|
||||
return
|
||||
|
||||
if (comp.current.stat == DEAD || comp.current.control_disabled == 1)
|
||||
if(comp.current.stat == DEAD || comp.current.control_disabled == 1)
|
||||
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the AI.</span>")
|
||||
else if (comp.current.see_in_dark == 0)
|
||||
else if(comp.current.see_in_dark == 0)
|
||||
to_chat(usr, "<span class='warning'>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.</span>")
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
@@ -49,7 +49,7 @@ AI MODULES
|
||||
R.show_laws()
|
||||
to_chat(usr, "<span class='notice'>Upload complete. The AI's laws have been modified.</span>")
|
||||
|
||||
else if (istype(C, /obj/machinery/computer/borgupload))
|
||||
else if(istype(C, /obj/machinery/computer/borgupload))
|
||||
var/obj/machinery/computer/borgupload/comp = C
|
||||
if(comp.stat & NOPOWER)
|
||||
to_chat(usr, "<span class='warning'>The upload computer has no power!</span>")
|
||||
@@ -57,13 +57,13 @@ AI MODULES
|
||||
if(comp.stat & BROKEN)
|
||||
to_chat(usr, "<span class='warning'>The upload computer is broken!</span>")
|
||||
return
|
||||
if (!comp.current)
|
||||
if(!comp.current)
|
||||
to_chat(usr, "<span class='warning'>You haven't selected a robot to transmit laws to!</span>")
|
||||
return
|
||||
|
||||
if (comp.current.stat == DEAD || comp.current.emagged)
|
||||
if(comp.current.stat == DEAD || comp.current.emagged)
|
||||
to_chat(usr, "<span class='warning'>Upload failed. No signal is being detected from the robot.</span>")
|
||||
else if (comp.current.connected_ai)
|
||||
else if(comp.current.connected_ai)
|
||||
to_chat(usr, "<span class='warning'>Upload failed. The robot is slaved to an AI.</span>")
|
||||
else
|
||||
src.transmitInstructions(comp.current, usr)
|
||||
@@ -138,7 +138,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/oneCrewMember/addAdditionalLaws(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
var/law = "Only [targetName] is crew."
|
||||
if (!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
|
||||
if(!is_special_character(target)) // Makes sure the AI isn't a traitor before changing their law 0. --NeoFite
|
||||
to_chat(target, law)
|
||||
target.set_zeroth_law(law)
|
||||
lawchanges.Add("The law specified [targetName]")
|
||||
@@ -236,7 +236,7 @@ AI MODULES
|
||||
/obj/item/weapon/aiModule/reset/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
log_law_changes(target, sender)
|
||||
|
||||
if (!is_special_character(target))
|
||||
if(!is_special_character(target))
|
||||
target.set_zeroth_law("")
|
||||
target.laws.clear_supplied_laws()
|
||||
target.laws.clear_ion_laws()
|
||||
@@ -252,7 +252,7 @@ AI MODULES
|
||||
|
||||
/obj/item/weapon/aiModule/purge/transmitInstructions(var/mob/living/silicon/ai/target, var/mob/sender)
|
||||
..()
|
||||
if (!is_special_character(target))
|
||||
if(!is_special_character(target))
|
||||
target.set_zeroth_law("")
|
||||
to_chat(target, "[sender.real_name] attempted to wipe your laws using a purge module.")
|
||||
target.clear_supplied_laws()
|
||||
|
||||
@@ -101,7 +101,7 @@ RCD
|
||||
data["door_accesses"] = door_accesses_list
|
||||
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
|
||||
ui.set_initial_data(data)
|
||||
ui.open()
|
||||
@@ -130,20 +130,20 @@ RCD
|
||||
menu = text2num(href_list["menu"])
|
||||
. = 1
|
||||
|
||||
if (href_list["login"])
|
||||
if(href_list["login"])
|
||||
if(istype(usr,/mob/living/silicon))
|
||||
locked = 0
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
if (istype(I, /obj/item/device/pda))
|
||||
if(istype(I, /obj/item/device/pda))
|
||||
var/obj/item/device/pda/pda = I
|
||||
I = pda.id
|
||||
var/obj/item/weapon/card/id/ID = I
|
||||
if (istype(ID) && ID && check_access(ID))
|
||||
if(istype(ID) && ID && check_access(ID))
|
||||
locked = 0
|
||||
. = 1
|
||||
|
||||
if (href_list["logout"])
|
||||
if(href_list["logout"])
|
||||
locked = 1
|
||||
. = 1
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ RSF
|
||||
|
||||
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if ((matter + 10) > 30)
|
||||
if(istype(W, /obj/item/weapon/rcd_ammo))
|
||||
if((matter + 10) > 30)
|
||||
to_chat(user, "The RSF cant hold any more matter.")
|
||||
return
|
||||
qdel(W)
|
||||
@@ -34,27 +34,27 @@ RSF
|
||||
|
||||
/obj/item/weapon/rsf/attack_self(mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
|
||||
if (mode == 1)
|
||||
if(mode == 1)
|
||||
mode = 2
|
||||
to_chat(user, "Changed dispensing mode to 'Drinking Glass'")
|
||||
return
|
||||
if (mode == 2)
|
||||
if(mode == 2)
|
||||
mode = 3
|
||||
to_chat(user, "Changed dispensing mode to 'Paper'")
|
||||
return
|
||||
if (mode == 3)
|
||||
if(mode == 3)
|
||||
mode = 4
|
||||
to_chat(user, "Changed dispensing mode to 'Pen'")
|
||||
return
|
||||
if (mode == 4)
|
||||
if(mode == 4)
|
||||
mode = 5
|
||||
to_chat(user, "Changed dispensing mode to 'Dice Pack'")
|
||||
return
|
||||
if (mode == 5)
|
||||
if(mode == 5)
|
||||
mode = 6
|
||||
to_chat(user, "Changed dispensing mode to 'Cigarette'")
|
||||
return
|
||||
if (mode == 6)
|
||||
if(mode == 6)
|
||||
mode = 1
|
||||
to_chat(user, "Changed dispensing mode to 'Dosh'")
|
||||
return
|
||||
@@ -62,15 +62,15 @@ RSF
|
||||
|
||||
/obj/item/weapon/rsf/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if (!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
|
||||
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
|
||||
return
|
||||
|
||||
if (istype(A, /obj/structure/table) && mode == 1)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
if(istype(A, /obj/structure/table) && mode == 1)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dosh...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
@@ -79,12 +79,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 1)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 1)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dosh...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/spacecash/c10( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
|
||||
else
|
||||
@@ -93,12 +93,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 2)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
else if(istype(A, /obj/structure/table) && mode == 2)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Drinking Glass...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
@@ -107,12 +107,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 2)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 2)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Drinking Glass...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
@@ -121,12 +121,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 3)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
else if(istype(A, /obj/structure/table) && mode == 3)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Paper Sheet...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
@@ -135,12 +135,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 3)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 3)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Paper Sheet...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/paper( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
@@ -149,12 +149,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 4)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
else if(istype(A, /obj/structure/table) && mode == 4)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Pen...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
@@ -163,12 +163,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 4)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 4)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Pen...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/pen( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 50
|
||||
else
|
||||
@@ -177,12 +177,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 5)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
else if(istype(A, /obj/structure/table) && mode == 5)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
@@ -191,12 +191,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 5)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 5)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Dice Pack...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/weapon/storage/pill_bottle/dice( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 200
|
||||
else
|
||||
@@ -205,12 +205,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /obj/structure/table) && mode == 6)
|
||||
if (istype(A, /obj/structure/table) && matter >= 1)
|
||||
else if(istype(A, /obj/structure/table) && mode == 6)
|
||||
if(istype(A, /obj/structure/table) && matter >= 1)
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A.loc )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
@@ -219,12 +219,12 @@ RSF
|
||||
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
|
||||
return
|
||||
|
||||
else if (istype(A, /turf/simulated/floor) && mode == 6)
|
||||
if (istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
else if(istype(A, /turf/simulated/floor) && mode == 6)
|
||||
if(istype(A, /turf/simulated/floor) && matter >= 1)
|
||||
to_chat(user, "Dispensing Cigarette...")
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
|
||||
new /obj/item/clothing/mask/cigarette( A )
|
||||
if (isrobot(user))
|
||||
if(isrobot(user))
|
||||
var/mob/living/silicon/robot/engy = user
|
||||
engy.cell.charge -= 10
|
||||
else
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if (t)
|
||||
if(t)
|
||||
src.name = text("Data Disk- '[]'", t)
|
||||
else
|
||||
src.name = "Data Disk"
|
||||
@@ -122,12 +122,12 @@
|
||||
to_chat(user, "<span class='warning'>It is too far away.</span>")
|
||||
if(guest_pass)
|
||||
to_chat(user, "<span class='notice'>There is a guest pass attached to this ID card</span>")
|
||||
if (world.time < guest_pass.expiration_time)
|
||||
if(world.time < guest_pass.expiration_time)
|
||||
to_chat(user, "<span class='notice'>It expires at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It expired at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
|
||||
for (var/A in guest_pass.temp_access)
|
||||
for(var/A in guest_pass.temp_access)
|
||||
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
|
||||
to_chat(user, "<span class='notice'>Issuing reason: [guest_pass.reason].</span>")
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/weapon/bananapeel/Crossed(AM as mob|obj)
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip("banana peel", 4, 2)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
* Soap
|
||||
*/
|
||||
/obj/item/weapon/soap/Crossed(AM as mob|obj) //EXACTLY the same as bananapeel for now, so it makes sense to put it in the same dm -- Urist
|
||||
if (istype(AM, /mob/living/carbon))
|
||||
if(istype(AM, /mob/living/carbon))
|
||||
var/mob/living/carbon/M = AM
|
||||
M.slip("soap", 4, 2)
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
return unwield()
|
||||
|
||||
/obj/item/weapon/twohanded/shockpaddles/proc/check_defib_exists(mainunit, var/mob/living/carbon/human/M, var/obj/O)
|
||||
if (!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
|
||||
if(!mainunit || !istype(mainunit, /obj/item/weapon/defibrillator)) //To avoid weird issues from admin spawns
|
||||
M.unEquip(O)
|
||||
qdel(O)
|
||||
return 0
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
if(!(NOCLONE in M.mutations) && !(H && (H.species.flags & NO_DNA))) // prevents drained people from having their DNA changed
|
||||
var/prev_ue = M.dna.unique_enzymes
|
||||
// UI in syringe.
|
||||
if (buf.types & DNA2_BUF_UI)
|
||||
if (!block) //isolated block?
|
||||
if(buf.types & DNA2_BUF_UI)
|
||||
if(!block) //isolated block?
|
||||
M.dna.UI = buf.dna.UI.Copy()
|
||||
M.dna.UpdateUI()
|
||||
M.UpdateAppearance()
|
||||
if (buf.types & DNA2_BUF_UE) //unique enzymes? yes
|
||||
if(buf.types & DNA2_BUF_UE) //unique enzymes? yes
|
||||
|
||||
M.real_name = buf.dna.real_name
|
||||
M.name = buf.dna.real_name
|
||||
@@ -87,8 +87,8 @@
|
||||
else
|
||||
M.dna.SetUIValue(block,src.GetValue())
|
||||
M.UpdateAppearance()
|
||||
if (buf.types & DNA2_BUF_SE)
|
||||
if (!block) //isolated block?
|
||||
if(buf.types & DNA2_BUF_SE)
|
||||
if(!block) //isolated block?
|
||||
M.dna.SE = buf.dna.SE.Copy()
|
||||
M.dna.UpdateSE()
|
||||
else
|
||||
@@ -110,7 +110,7 @@
|
||||
if(H.species.flags & NO_DNA)
|
||||
return 0
|
||||
|
||||
if (!user.IsAdvancedToolUser())
|
||||
if(!user.IsAdvancedToolUser())
|
||||
return 0
|
||||
|
||||
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been injected with [name] by [user.name] ([user.ckey])</font>")
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
src.injected(user,user)
|
||||
else
|
||||
user.visible_message("\red <b>[user.name] is trying to inject [M.name] with [src]!</b>")
|
||||
if (do_mob(user,M,30))
|
||||
if(do_mob(user,M,30))
|
||||
user.visible_message("\red <b>[user.name] injects [M.name] with [src].</b>")
|
||||
src.injected(M, user)
|
||||
else
|
||||
|
||||
@@ -74,9 +74,9 @@
|
||||
|
||||
|
||||
/obj/item/weapon/c4/afterattack(atom/target as obj|turf, mob/user as mob, flag)
|
||||
if (!flag)
|
||||
if(!flag)
|
||||
return
|
||||
if (ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/item/clothing/accessory/storage) || istype(target, /obj/item/clothing/under))
|
||||
if(ismob(target) || istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/item/clothing/accessory/storage) || istype(target, /obj/item/clothing/under))
|
||||
return
|
||||
to_chat(user, "Planting explosives...")
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
src.target = target
|
||||
loc = null
|
||||
|
||||
if (ismob(target))
|
||||
if(ismob(target))
|
||||
add_logs(target, user, "planted [name] on")
|
||||
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
|
||||
message_admins("[key_name_admin(user)] planted [src.name] on [key_name_admin(target)] with [timer] second fuse",0,1)
|
||||
@@ -110,13 +110,13 @@
|
||||
explosion(location, -1, -1, 4, 4)
|
||||
|
||||
if(target)
|
||||
if (istype(target, /turf/simulated/wall))
|
||||
if(istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = target
|
||||
W.dismantle_wall(1)
|
||||
else
|
||||
target.ex_act(1)
|
||||
if (isobj(target))
|
||||
if (target)
|
||||
if(isobj(target))
|
||||
if(target)
|
||||
qdel(target)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -83,12 +83,12 @@
|
||||
var/Refill = AttemptRefill(target, user)
|
||||
if(Refill)
|
||||
return
|
||||
if (!safety)
|
||||
if (src.reagents.total_volume < 1)
|
||||
if(!safety)
|
||||
if(src.reagents.total_volume < 1)
|
||||
to_chat(usr, "<span class='danger'>\The [src] is empty.</span>")
|
||||
return
|
||||
|
||||
if (world.time < src.last_use + 20)
|
||||
if(world.time < src.last_use + 20)
|
||||
return
|
||||
|
||||
src.last_use = world.time
|
||||
|
||||
@@ -7,7 +7,7 @@ obj/item/weapon/firework
|
||||
obj/item/weapon/firework/attackby(obj/item/weapon/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
for(var/mob/M in viewers(user))
|
||||
to_chat(M, "[user] lits \the [src]")
|
||||
litzor = 1
|
||||
@@ -29,7 +29,7 @@ obj/item/weapon/sparkler
|
||||
obj/item/weapon/sparkler/attackby(obj/item/weapon/W,mob/user, params)
|
||||
if(litzor)
|
||||
return
|
||||
if (istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
if(istype(W, /obj/item/weapon/weldingtool) && W:welding || istype(W,/obj/item/weapon/lighter) && W:lit)
|
||||
for(var/mob/M in viewers(user))
|
||||
to_chat(M, "[user] lits \the [src]")
|
||||
litzor = 1
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
return
|
||||
|
||||
/obj/effect/spresent/relaymove(mob/user as mob)
|
||||
if (user.stat)
|
||||
if(user.stat)
|
||||
return
|
||||
to_chat(user, "\blue You cant move.")
|
||||
|
||||
/obj/effect/spresent/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
if (!istype(W, /obj/item/weapon/wirecutters))
|
||||
if(!istype(W, /obj/item/weapon/wirecutters))
|
||||
to_chat(user, "\blue I need wirecutters for that.")
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
if (M.client)
|
||||
if(M.client)
|
||||
M.client.eye = M.client.mob
|
||||
M.client.perspective = MOB_PERSPECTIVE
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
M.Weaken(max(10/distance, 3))
|
||||
M.ear_damage += rand(0, 5)
|
||||
M.ear_deaf = max(M.ear_deaf,15)
|
||||
if (M.ear_damage >= 15)
|
||||
if(M.ear_damage >= 15)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring badly!</span>")
|
||||
if(prob(M.ear_damage - 10 + 5))
|
||||
to_chat(M, "<span class='warning'>You can't hear anything!</span>")
|
||||
M.disabilities |= DEAF
|
||||
else
|
||||
if (M.ear_damage >= 5)
|
||||
if(M.ear_damage >= 5)
|
||||
to_chat(M, "<span class='warning'>Your ears start to ring!</span>")
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
|
||||
/*/obj/item/weapon/grenade/afterattack(atom/target as mob|obj|turf|area, mob/user as mob)
|
||||
if (istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if (istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if(istype(target, /obj/item/weapon/storage)) return ..() // Trying to put it in a full container
|
||||
if(istype(target, /obj/item/weapon/gun/grenadelauncher)) return ..()
|
||||
if((user.get_active_hand() == src) && (!active) && (clown_check(user)) && target.loc != src.loc)
|
||||
to_chat(user, "<span class='warning'>You prime the [name]! [det_time/10] seconds!</span>")
|
||||
active = 1
|
||||
@@ -83,16 +83,16 @@
|
||||
/obj/item/weapon/grenade/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
switch(det_time)
|
||||
if ("1")
|
||||
if("1")
|
||||
det_time = 10
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 1 second detonation time.</span>")
|
||||
if ("10")
|
||||
if("10")
|
||||
det_time = 30
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 3 second detonation time.</span>")
|
||||
if ("30")
|
||||
if("30")
|
||||
det_time = 50
|
||||
to_chat(user, "<span class='notice'>You set the [name] for 5 second detonation time.</span>")
|
||||
if ("50")
|
||||
if("50")
|
||||
det_time = 1
|
||||
to_chat(user, "<span class='notice'>You set the [name] for instant detonation.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
..()
|
||||
if(istype(I, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
if(R.use(1))
|
||||
var/obj/item/weapon/wirerod/W = new /obj/item/weapon/wirerod
|
||||
if(!remove_item_from_storage(user))
|
||||
user.unEquip(src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
if(!cause || !imp_in) return 0
|
||||
var/mob/living/carbon/R = imp_in
|
||||
var/injectamount = null
|
||||
if (cause == "action_button")
|
||||
if(cause == "action_button")
|
||||
injectamount = reagents.total_volume
|
||||
else
|
||||
injectamount = cause
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
/obj/item/weapon/implant/death_alarm/activate(var/cause)
|
||||
var/mob/M = imp_in
|
||||
var/area/t = get_area(M)
|
||||
switch (cause)
|
||||
switch(cause)
|
||||
if("death")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
|
||||
@@ -43,7 +43,7 @@
|
||||
a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm")
|
||||
qdel(a)
|
||||
qdel(src)
|
||||
if ("emp")
|
||||
if("emp")
|
||||
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset(null)
|
||||
var/name = prob(50) ? t.name : pick(teleportlocs)
|
||||
a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm")
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
uses = 2
|
||||
|
||||
/obj/item/weapon/implant/emp/activate()
|
||||
if (src.uses < 1) return 0
|
||||
if(src.uses < 1) return 0
|
||||
src.uses--
|
||||
empulse(imp_in, 3, 5)
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
return
|
||||
if(M == occupant) // so that the guy inside can't eject himself -Agouri
|
||||
return
|
||||
if (src.occupant.client)
|
||||
if(src.occupant.client)
|
||||
src.occupant.client.eye = src.occupant.client.mob
|
||||
src.occupant.client.perspective = MOB_PERSPECTIVE
|
||||
src.occupant.loc = src.loc
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
|
||||
/obj/machinery/implantchair/implant(mob/M)
|
||||
if (!istype(M, /mob/living/carbon))
|
||||
if(!istype(M, /mob/living/carbon))
|
||||
return
|
||||
if(!implant_list.len) return
|
||||
for(var/obj/item/weapon/implant/loyalty/imp in implant_list)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
if(T && (M == user || do_after(user, 50, target = M)))
|
||||
if(user && M && (get_turf(M) == T) && src && imp)
|
||||
if(imp.implant(M, user))
|
||||
if (M == user)
|
||||
if(M == user)
|
||||
to_chat(user, "<span class='notice'>You implant yourself.</span>")
|
||||
else
|
||||
M.visible_message("[user] has implanted [M].", "<span class='notice'>[user] implants you.</span>")
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
set name = "Remove Implant"
|
||||
set src in usr
|
||||
|
||||
if (usr.stat || usr.restrained())
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
|
||||
dropcase(usr)
|
||||
@@ -70,7 +70,7 @@
|
||||
add_fingerprint(user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<B>Implant Mini-Computer:</B><HR>"
|
||||
if (case)
|
||||
if(case)
|
||||
if(case.imp)
|
||||
if(istype(case.imp, /obj/item/weapon/implant))
|
||||
dat += "<A href='byond://?src=\ref[src];removecase=1'>Remove Case</A><HR>"
|
||||
@@ -96,7 +96,7 @@
|
||||
return 1
|
||||
|
||||
var/mob/living/user = usr
|
||||
if (href_list["tracking_id"])
|
||||
if(href_list["tracking_id"])
|
||||
if(case && case.imp)
|
||||
var/obj/item/weapon/implant/tracking/T = case.imp
|
||||
T.id += text2num(href_list["tracking_id"])
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
var/max_contents = 1
|
||||
|
||||
/obj/item/weapon/kitchen/utensil/New()
|
||||
if (prob(60))
|
||||
if(prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
|
||||
create_reagents(5)
|
||||
@@ -48,7 +48,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
if (contents.len)
|
||||
if(contents.len)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/toEat = contents[1]
|
||||
if(istype(toEat))
|
||||
if(M.eat(toEat, user))
|
||||
|
||||
@@ -169,9 +169,9 @@
|
||||
H.Stun(2)
|
||||
H.drop_item(src)
|
||||
return
|
||||
if (!thrown_from && usr) //if something hasn't set it already (like a mech does when it launches)
|
||||
if(!thrown_from && usr) //if something hasn't set it already (like a mech does when it launches)
|
||||
thrown_from = usr //then the user must have thrown it
|
||||
if (!istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas))
|
||||
if(!istype(thrown_from, /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas))
|
||||
playsound(src, throw_sound, 20, 1) //because mechs play the sound anyways
|
||||
var/turf/target = get_turf(A)
|
||||
var/atom/movable/adjtarget = new /atom/movable
|
||||
@@ -179,12 +179,12 @@
|
||||
var/yadjust = 0
|
||||
var/scaler = 0 //used to changed the normalised vector to the proper size
|
||||
scaler = throw_range / max(abs(target.x - src.x), abs(target.y - src.y)) //whichever is larger magnitude is what we normalise to
|
||||
if (target.x - src.x != 0) //just to avoid fucking with math for no reason
|
||||
if(target.x - src.x != 0) //just to avoid fucking with math for no reason
|
||||
xadjust = round((target.x - src.x) * scaler) //normalised vector is now scaled up to throw_range
|
||||
adjtarget.x = src.x + xadjust //the new target at max range
|
||||
else
|
||||
adjtarget.x = src.x
|
||||
if (target.y - src.y != 0)
|
||||
if(target.y - src.y != 0)
|
||||
yadjust = round((target.y - src.y) * scaler)
|
||||
adjtarget.y = src.y + yadjust
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_organ_damage(5,5)
|
||||
active = !active
|
||||
if (active)
|
||||
if(active)
|
||||
force = force_on
|
||||
throwforce = throwforce_on
|
||||
hitsound = 'sound/weapons/blade1.ogg'
|
||||
|
||||
@@ -117,7 +117,7 @@ var/global/list/cached_icons = list()
|
||||
|
||||
attack_self(mob/user as mob)
|
||||
var/t1 = input(user, "Please select a color:", "Locking Computer", null) in list( "red", "blue", "green", "yellow", "black", "white")
|
||||
if ((user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
if((user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
return
|
||||
switch(t1)
|
||||
if("red")
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
H.losebreath += 10 //30 Oxy damage over time
|
||||
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
|
||||
var/turf/location = get_turf(H)
|
||||
if (istype(location, /turf/simulated))
|
||||
if(istype(location, /turf/simulated))
|
||||
location.add_blood(H)
|
||||
H.bloody_hands(H)
|
||||
H.bloody_body(H)
|
||||
|
||||
@@ -29,15 +29,15 @@
|
||||
|
||||
/obj/item/weapon/teleportation_scroll/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat || usr.restrained() || src.loc != usr)
|
||||
if(usr.stat || usr.restrained() || src.loc != usr)
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
if(!( istype(H, /mob/living/carbon/human)))
|
||||
return 1
|
||||
if ((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
if((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if (href_list["spell_teleport"])
|
||||
if (src.uses >= 1)
|
||||
if(href_list["spell_teleport"])
|
||||
if(src.uses >= 1)
|
||||
teleportscroll(H)
|
||||
attack_self(H)
|
||||
return
|
||||
@@ -49,7 +49,7 @@
|
||||
A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs
|
||||
var/area/thearea = teleportlocs[A]
|
||||
|
||||
if (user.stat || user.restrained())
|
||||
if(user.stat || user.restrained())
|
||||
return
|
||||
if(!((user == loc || (in_range(src, user) && istype(src.loc, /turf)))))
|
||||
return
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/item/weapon/shard/Crossed(AM as mob|obj)
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
if (M.incorporeal_move || M.flying)//you are incorporal or flying..no shard stepping!
|
||||
if(M.incorporeal_move || M.flying)//you are incorporal or flying..no shard stepping!
|
||||
return
|
||||
to_chat(M, "\red <B>You step on \the [src]!</B>")
|
||||
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
to_chat(user, "<span class='notice'>You 'clean' \the [target.name].</span>")
|
||||
if(istype(target, /turf/simulated))
|
||||
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(target)
|
||||
else if (istype(target,/mob/living/carbon))
|
||||
else if(istype(target,/mob/living/carbon))
|
||||
for(var/obj/item/carried_item in target.contents)
|
||||
if(!istype(carried_item, /obj/item/weapon/implant))//If it's not an implant.
|
||||
carried_item.add_blood(target)//Oh yes, there will be blood...
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/toolbox/green/memetic/proc/consume(mob/M)
|
||||
if (!M)
|
||||
if(!M)
|
||||
return
|
||||
hunger = 0
|
||||
hunger_message_level = 0
|
||||
|
||||
@@ -63,13 +63,13 @@
|
||||
. = ..()
|
||||
|
||||
proc/failcheck(mob/user as mob)
|
||||
if (prob(src.reliability)) return 1 //No failure
|
||||
if (prob(src.reliability))
|
||||
if(prob(src.reliability)) return 1 //No failure
|
||||
if(prob(src.reliability))
|
||||
to_chat(user, "\red The Bluespace portal resists your attempt to add another item.")//light failure
|
||||
|
||||
else
|
||||
to_chat(user, "\red The Bluespace generator malfunctions!")
|
||||
for (var/obj/O in src.contents) //it broke, delete what was in it
|
||||
for(var/obj/O in src.contents) //it broke, delete what was in it
|
||||
qdel(O)
|
||||
crit_fail = 1
|
||||
icon_state = "brokenpack"
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
new /obj/item/seeds/grassseed(O.loc, O)
|
||||
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
if(M.s_active == src)
|
||||
src.close(M)
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
if(!inserted || !S.amount)
|
||||
usr.unEquip(S)
|
||||
usr.update_icons() //update our overlays
|
||||
if (usr.client && usr.s_active != src)
|
||||
if(usr.client && usr.s_active != src)
|
||||
usr.client.screen -= S
|
||||
S.dropped(usr)
|
||||
if(!S.amount)
|
||||
@@ -296,7 +296,7 @@
|
||||
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
if(adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
@@ -432,17 +432,17 @@
|
||||
/obj/item/weapon/storage/bag/tray/cyborg
|
||||
|
||||
/obj/item/weapon/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
|
||||
if ( isturf(target) || istype(target,/obj/structure/table) )
|
||||
if( isturf(target) || istype(target,/obj/structure/table) )
|
||||
var foundtable = istype(target,/obj/structure/table/)
|
||||
if ( !foundtable ) //it must be a turf!
|
||||
if( !foundtable ) //it must be a turf!
|
||||
for(var/obj/structure/table/T in target)
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
var turf/dropspot
|
||||
if ( !foundtable ) // don't unload things onto walls or other silly places.
|
||||
if( !foundtable ) // don't unload things onto walls or other silly places.
|
||||
dropspot = user.loc
|
||||
else if ( isturf(target) ) // they clicked on a turf with a table in it
|
||||
else if( isturf(target) ) // they clicked on a turf with a table in it
|
||||
dropspot = target
|
||||
else // they clicked on a table
|
||||
dropspot = target.loc
|
||||
@@ -462,8 +462,8 @@
|
||||
if(I)
|
||||
step(I, pick(NORTH,SOUTH,EAST,WEST))
|
||||
sleep(rand(2,4))
|
||||
if ( droppedSomething )
|
||||
if ( foundtable )
|
||||
if( droppedSomething )
|
||||
if( foundtable )
|
||||
user.visible_message("\blue [user] unloads their service tray.")
|
||||
else
|
||||
user.visible_message("\blue [user] drops all the items on their tray.")
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return ..()
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!M.restrained() && !M.stat && can_use())
|
||||
if(!M.restrained() && !M.stat && can_use())
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.unEquip(src)
|
||||
@@ -443,13 +443,13 @@
|
||||
can_hold = list()
|
||||
|
||||
proc/failcheck(mob/user as mob)
|
||||
if (prob(src.reliability)) return 1 //No failure
|
||||
if (prob(src.reliability))
|
||||
if(prob(src.reliability)) return 1 //No failure
|
||||
if(prob(src.reliability))
|
||||
to_chat(user, "\red The Bluespace portal resists your attempt to add another item.")//light failure
|
||||
|
||||
else
|
||||
to_chat(user, "\red The Bluespace generator malfunctions!")
|
||||
for (var/obj/O in src.contents) //it broke, delete what was in it
|
||||
for(var/obj/O in src.contents) //it broke, delete what was in it
|
||||
qdel(O)
|
||||
crit_fail = 1
|
||||
return 0
|
||||
@@ -519,9 +519,9 @@
|
||||
// As a last resort, the belt can be used as a plastic explosive with a fixed timer (15 seconds). Naturally, you'll lose all your gear...
|
||||
// Of course, it could be worse. It could spawn a singularity!
|
||||
/obj/item/weapon/storage/belt/bluespace/owlman/afterattack(atom/target as obj|turf, mob/user as mob, flag)
|
||||
if (!flag)
|
||||
if(!flag)
|
||||
return
|
||||
if (istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/structure/table) || istype(target, /obj/structure/closet))
|
||||
if(istype(target, /turf/unsimulated) || istype(target, /turf/simulated/shuttle) || istype(target, /obj/item/weapon/storage) || istype(target, /obj/structure/table) || istype(target, /obj/structure/closet))
|
||||
return
|
||||
to_chat(user, "Planting explosives...")
|
||||
user.visible_message("[user.name] is fiddling with their toolbelt.")
|
||||
@@ -536,8 +536,8 @@
|
||||
target = target
|
||||
loc = null
|
||||
var/location
|
||||
if (isturf(target)) location = target
|
||||
if (ismob(target))
|
||||
if(isturf(target)) location = target
|
||||
if(ismob(target))
|
||||
target:attack_log += "\[[time_stamp()]\]<font color='orange'> Had the [name] planted on them by [user.real_name] ([user.ckey])</font>"
|
||||
user.visible_message("\red [user.name] finished planting an explosive on [target.name]!")
|
||||
target.overlays += image('icons/obj/assemblies.dmi', "plastic-explosive2")
|
||||
@@ -547,12 +547,12 @@
|
||||
if(ismob(target) || isobj(target))
|
||||
location = target.loc // These things can move
|
||||
explosion(location, -1, -1, 2, 3)
|
||||
if (istype(target, /turf/simulated/wall)) target:dismantle_wall(1)
|
||||
if(istype(target, /turf/simulated/wall)) target:dismantle_wall(1)
|
||||
else target.ex_act(1)
|
||||
if (isobj(target))
|
||||
if (target)
|
||||
if(isobj(target))
|
||||
if(target)
|
||||
qdel(target)
|
||||
if (src)
|
||||
if(src)
|
||||
qdel(src)
|
||||
*/
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
if (!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
if(!(istype(user, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")
|
||||
to_chat(user, "\red You don't have the dexterity to do this!")
|
||||
return
|
||||
if(!chaplain)
|
||||
@@ -60,7 +60,7 @@
|
||||
user.take_organ_damage(0,10)
|
||||
return
|
||||
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "\red The [src] slips out of your hand and hits your head.")
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(20)
|
||||
@@ -69,12 +69,12 @@
|
||||
// if(..() == BLOCKED)
|
||||
// return
|
||||
|
||||
if (M.stat !=2)
|
||||
if(M.stat !=2)
|
||||
/*if((M.mind in ticker.mode.cult) && (prob(20)))
|
||||
to_chat(M, "\red The power of [src.deity_name] clears your mind of heresy!")
|
||||
to_chat(user, "\red You see how [M]'s eyes become clear, the cult no longer holds control over him!")
|
||||
ticker.mode.remove_cultist(M.mind)*/
|
||||
if ((istype(M, /mob/living/carbon/human) && prob(60)))
|
||||
if((istype(M, /mob/living/carbon/human) && prob(60)))
|
||||
bless(M)
|
||||
for(var/mob/O in viewers(M, null))
|
||||
O.show_message(text("\red <B>[] heals [] with the power of [src.deity_name]!</B>", user, M), 1)
|
||||
@@ -96,7 +96,7 @@
|
||||
/obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if (istype(A, /turf/simulated/floor))
|
||||
if(istype(A, /turf/simulated/floor))
|
||||
to_chat(user, "<span class='notice'>You hit the floor with the bible.</span>")
|
||||
if(user.mind && (user.mind.assigned_role == "Chaplain"))
|
||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||
|
||||
@@ -603,7 +603,7 @@
|
||||
icon_state = "syringe"
|
||||
New()
|
||||
..()
|
||||
for (var/i; i < storage_slots; i++)
|
||||
for(var/i; i < storage_slots; i++)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector(src)
|
||||
|
||||
/obj/item/weapon/storage/box/autoinjector/utility
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
var/total_contents = src.contents.len - itemremoved
|
||||
src.icon_state = "vialbox[total_contents]"
|
||||
src.overlays.Cut()
|
||||
if (!broken)
|
||||
if(!broken)
|
||||
overlays += image(icon, src, "led[locked]")
|
||||
if(locked)
|
||||
overlays += image(icon, src, "cover")
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
|
||||
icon_state = pick("ointment","firefirstaid")
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/styptic( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/patch/styptic( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/salicylic( src )
|
||||
@@ -71,7 +71,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
|
||||
icon_state = pick("antitoxin","antitoxfirstaid","antitoxfirstaid2","antitoxfirstaid3")
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
|
||||
new /obj/item/weapon/reagent_containers/food/pill/salbutamol( src )
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
|
||||
icon_state = pick("brute","brute2")
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/item/weapon/storage/firstaid/adv/New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
new /obj/item/weapon/reagent_containers/hypospray/autoinjector( src )
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
new /obj/item/stack/medical/advanced/bruise_pack(src)
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
/obj/item/weapon/storage/firstaid/tactical/New()
|
||||
..()
|
||||
if (empty) return
|
||||
if(empty) return
|
||||
new /obj/item/clothing/accessory/stethoscope( src )
|
||||
new /obj/item/weapon/defibrillator/compact/combat/loaded(src)
|
||||
new /obj/item/weapon/reagent_containers/hypospray/combat(src)
|
||||
@@ -223,11 +223,11 @@
|
||||
base_name = name
|
||||
|
||||
/obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri
|
||||
if (ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
if(ishuman(usr)) //Can monkeys even place items in the pocket slots? Leaving this in just in case~
|
||||
var/mob/M = usr
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if ((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
|
||||
if((!( M.restrained() ) && !( M.stat ) /*&& M.pocket == src*/))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
M.unEquip(src)
|
||||
@@ -238,7 +238,7 @@
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if (usr.s_active)
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
|
||||
@@ -30,24 +30,24 @@
|
||||
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
|
||||
//doing it without the ability to call another proc's parent, really.
|
||||
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
|
||||
if (ishuman(user)) //so monkeys can take off their backpacks -- Urist
|
||||
if(ishuman(user)) //so monkeys can take off their backpacks -- Urist
|
||||
|
||||
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
if(istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return 0
|
||||
|
||||
if(over_object == user && Adjacent(user)) // this must come before the screen objects only block
|
||||
src.open(user)
|
||||
return 0
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
return 1
|
||||
|
||||
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
|
||||
//there's got to be a better way of doing this...
|
||||
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
|
||||
if(!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
|
||||
return 0
|
||||
|
||||
if (!( user.restrained() ) && !( user.stat ))
|
||||
if(!( user.restrained() ) && !( user.stat ))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
user.unEquip(master_item)
|
||||
@@ -76,12 +76,12 @@
|
||||
return 0
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (master_item.loc == user)
|
||||
if(master_item.loc == user)
|
||||
src.open(user)
|
||||
return 0
|
||||
|
||||
for(var/mob/M in range(1, master_item.loc))
|
||||
if (M.s_active == src)
|
||||
if(M.s_active == src)
|
||||
src.close(M)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if (istype(W, /obj/item/weapon/card/id))
|
||||
if(istype(W, /obj/item/weapon/card/id))
|
||||
if(src.broken)
|
||||
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
|
||||
return
|
||||
|
||||
@@ -33,19 +33,19 @@
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(locked)
|
||||
if ((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
|
||||
if((istype(W, /obj/item/weapon/melee/energy/blade)) && (!src.emagged))
|
||||
emag_act(user, W)
|
||||
|
||||
if (istype(W, /obj/item/weapon/screwdriver))
|
||||
if (do_after(user, 20, target = src))
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(do_after(user, 20, target = src))
|
||||
src.open =! src.open
|
||||
user.show_message(text("\blue You [] the service panel.", (src.open ? "open" : "close")))
|
||||
return
|
||||
if ((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
if((istype(W, /obj/item/device/multitool)) && (src.open == 1)&& (!src.l_hacking))
|
||||
user.show_message(text("\red Now attempting to reset internal memory, please hold."), 1)
|
||||
src.l_hacking = 1
|
||||
if (do_after(usr, 100, target = src))
|
||||
if (prob(40))
|
||||
if(do_after(usr, 100, target = src))
|
||||
if(prob(40))
|
||||
src.l_setshort = 1
|
||||
src.l_set = 0
|
||||
user.show_message(text("\red Internal memory reset. Please give it a few seconds to reinitialize."), 1)
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
|
||||
MouseDrop(over_object, src_location, over_location)
|
||||
if (locked)
|
||||
if(locked)
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
..()
|
||||
@@ -95,28 +95,28 @@
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>[]</B><BR>\n\nLock Status: []",src, (src.locked ? "LOCKED" : "UNLOCKED"))
|
||||
var/message = "Code"
|
||||
if ((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
|
||||
if((src.l_set == 0) && (!src.emagged) && (!src.l_setshort))
|
||||
dat += text("<p>\n<b>5-DIGIT PASSCODE NOT SET.<br>ENTER NEW PASSCODE.</b>")
|
||||
if (src.emagged)
|
||||
if(src.emagged)
|
||||
dat += text("<p>\n<font color=red><b>LOCKING SYSTEM ERROR - 1701</b></font>")
|
||||
if (src.l_setshort)
|
||||
if(src.l_setshort)
|
||||
dat += text("<p>\n<font color=red><b>ALERT: MEMORY SYSTEM ERROR - 6040 201</b></font>")
|
||||
message = text("[]", src.code)
|
||||
if (!src.locked)
|
||||
if(!src.locked)
|
||||
message = "*****"
|
||||
dat += text("<HR>\n>[]<BR>\n<A href='?src=\ref[];type=1'>1</A>-<A href='?src=\ref[];type=2'>2</A>-<A href='?src=\ref[];type=3'>3</A><BR>\n<A href='?src=\ref[];type=4'>4</A>-<A href='?src=\ref[];type=5'>5</A>-<A href='?src=\ref[];type=6'>6</A><BR>\n<A href='?src=\ref[];type=7'>7</A>-<A href='?src=\ref[];type=8'>8</A>-<A href='?src=\ref[];type=9'>9</A><BR>\n<A href='?src=\ref[];type=R'>R</A>-<A href='?src=\ref[];type=0'>0</A>-<A href='?src=\ref[];type=E'>E</A><BR>\n</TT>", message, src, src, src, src, src, src, src, src, src, src, src, src)
|
||||
user << browse(dat, "window=caselock;size=300x280")
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if ((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
if((usr.stat || usr.restrained()) || (get_dist(src, usr) > 1))
|
||||
return
|
||||
if (href_list["type"])
|
||||
if (href_list["type"] == "E")
|
||||
if ((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
if(href_list["type"])
|
||||
if(href_list["type"] == "E")
|
||||
if((src.l_set == 0) && (length(src.code) == 5) && (!src.l_setshort) && (src.code != "ERROR"))
|
||||
src.l_code = src.code
|
||||
src.l_set = 1
|
||||
else if ((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
else if((src.code == src.l_code) && (src.emagged == 0) && (src.l_set == 1))
|
||||
src.locked = 0
|
||||
src.overlays = null
|
||||
overlays += image('icons/obj/storage.dmi', icon_opened)
|
||||
@@ -124,18 +124,18 @@
|
||||
else
|
||||
src.code = "ERROR"
|
||||
else
|
||||
if ((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
if((href_list["type"] == "R") && (src.emagged == 0) && (!src.l_setshort))
|
||||
src.locked = 1
|
||||
src.overlays = null
|
||||
src.code = null
|
||||
src.close(usr)
|
||||
else
|
||||
src.code += text("[]", href_list["type"])
|
||||
if (length(src.code) > 5)
|
||||
if(length(src.code) > 5)
|
||||
src.code = "ERROR"
|
||||
src.add_fingerprint(usr)
|
||||
for(var/mob/M in viewers(1, src.loc))
|
||||
if ((M.client && M.machine == src))
|
||||
if((M.client && M.machine == src))
|
||||
src.attack_self(M)
|
||||
return
|
||||
return
|
||||
@@ -176,17 +176,17 @@
|
||||
new /obj/item/weapon/pen(src)
|
||||
|
||||
attack_hand(mob/user as mob)
|
||||
if ((src.loc == user) && (src.locked == 1))
|
||||
if((src.loc == user) && (src.locked == 1))
|
||||
to_chat(usr, "\red [src] is locked and cannot be opened!")
|
||||
else if ((src.loc == user) && (!src.locked))
|
||||
else if((src.loc == user) && (!src.locked))
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (user.s_active)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user) //Close and re-open
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
if(M.s_active == src)
|
||||
src.close(M)
|
||||
src.orient2hud(user)
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
var/use_sound = "rustle" //sound played when used. null for no sound.
|
||||
|
||||
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)
|
||||
if (ishuman(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
if(ishuman(usr)) //so monkeys can take off their backpacks -- Urist
|
||||
var/mob/M = usr
|
||||
|
||||
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
if(istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
|
||||
return
|
||||
|
||||
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
|
||||
@@ -39,12 +39,12 @@
|
||||
show_to(M)
|
||||
return
|
||||
|
||||
if ((istype(over_object, /obj/structure/table) || istype(over_object, /turf/simulated/floor)) \
|
||||
if((istype(over_object, /obj/structure/table) || istype(over_object, /turf/simulated/floor)) \
|
||||
&& contents.len && loc == usr && !usr.stat && !usr.restrained() && usr.canmove && over_object.Adjacent(usr) \
|
||||
&& !istype(src, /obj/item/weapon/storage/lockbox))
|
||||
var/turf/T = get_turf(over_object)
|
||||
if (istype(over_object, /turf/simulated/floor))
|
||||
if (get_turf(usr) != T)
|
||||
if(istype(over_object, /turf/simulated/floor))
|
||||
if(get_turf(usr) != T)
|
||||
return // Can only empty containers onto the floor under you
|
||||
if("Yes" != alert(usr,"Empty \the [src] onto \the [T]?","Confirm","Yes","No"))
|
||||
return
|
||||
@@ -59,12 +59,12 @@
|
||||
update_icon() // For content-sensitive icons
|
||||
return
|
||||
|
||||
if (!( istype(over_object, /obj/screen) ))
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
return ..()
|
||||
if (!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
if(!(src.loc == usr) || (src.loc && src.loc.loc == usr))
|
||||
return
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
if (!( M.restrained() ) && !( M.stat ))
|
||||
if(!( M.restrained() ) && !( M.stat ))
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
if(!M.unEquip(src))
|
||||
@@ -77,7 +77,7 @@
|
||||
src.add_fingerprint(usr)
|
||||
return
|
||||
if(over_object == usr && in_range(src, usr) || usr.contents.Find(src))
|
||||
if (usr.s_active)
|
||||
if(usr.s_active)
|
||||
usr.s_active.close(usr)
|
||||
src.show_to(usr)
|
||||
return
|
||||
@@ -94,7 +94,7 @@
|
||||
L += S.return_inv()
|
||||
for(var/obj/item/weapon/gift/G in src)
|
||||
L += G.gift
|
||||
if (istype(G.gift, /obj/item/weapon/storage))
|
||||
if(istype(G.gift, /obj/item/weapon/storage))
|
||||
L += G.gift:return_inv()
|
||||
for(var/obj/item/weapon/folder/F in src)
|
||||
L += F.contents
|
||||
@@ -128,11 +128,11 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/proc/open(mob/user as mob)
|
||||
if (src.use_sound)
|
||||
if(src.use_sound)
|
||||
playsound(src.loc, src.use_sound, 50, 1, -5)
|
||||
|
||||
orient2hud(user)
|
||||
if (user.s_active)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
O.layer = 20
|
||||
O.plane = HUD_PLANE
|
||||
cx++
|
||||
if (cx > mx)
|
||||
if(cx > mx)
|
||||
cx = tx
|
||||
cy--
|
||||
src.closer.screen_loc = "[mx+1],[my]"
|
||||
@@ -173,7 +173,7 @@
|
||||
ND.sample_object.layer = 20
|
||||
ND.sample_object.plane = HUD_PLANE
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
else
|
||||
@@ -184,7 +184,7 @@
|
||||
O.layer = 20
|
||||
O.plane = HUD_PLANE
|
||||
cx++
|
||||
if (cx > (4+cols))
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
cy--
|
||||
src.closer.screen_loc = "[4+cols+1]:16,2:16"
|
||||
@@ -224,7 +224,7 @@
|
||||
//var/mob/living/carbon/human/H = user
|
||||
var/row_num = 0
|
||||
var/col_count = min(7,storage_slots) -1
|
||||
if (adjusted_contents > 7)
|
||||
if(adjusted_contents > 7)
|
||||
row_num = round((adjusted_contents-1) / 7) // 7 is the maximum allowed width.
|
||||
src.standard_orient_objs(row_num, col_count, numbered_contents)
|
||||
return
|
||||
@@ -249,7 +249,7 @@
|
||||
break
|
||||
if(!ok)
|
||||
if(!stop_messages)
|
||||
if (istype(W, /obj/item/weapon/hand_labeler))
|
||||
if(istype(W, /obj/item/weapon/hand_labeler))
|
||||
return 0
|
||||
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
|
||||
return 0
|
||||
@@ -260,7 +260,7 @@
|
||||
to_chat(usr, "<span class='notice'>[src] cannot hold [W].</span>")
|
||||
return 0
|
||||
|
||||
if (W.w_class > max_w_class)
|
||||
if(W.w_class > max_w_class)
|
||||
if(!stop_messages)
|
||||
to_chat(usr, "<span class='notice'>[W] is too big for this [src].</span>")
|
||||
return 0
|
||||
@@ -301,18 +301,18 @@
|
||||
W.loc = src
|
||||
W.on_enter_storage(src)
|
||||
if(usr)
|
||||
if (usr.client && usr.s_active != src)
|
||||
if(usr.client && usr.s_active != src)
|
||||
usr.client.screen -= W
|
||||
W.dropped(usr)
|
||||
add_fingerprint(usr)
|
||||
|
||||
if(!prevent_warning && !istype(W, /obj/item/weapon/gun/energy/kinetic_accelerator/crossbow))
|
||||
for(var/mob/M in viewers(usr, null))
|
||||
if (M == usr)
|
||||
if(M == usr)
|
||||
to_chat(usr, "<span class='notice'>You put the [W] into [src].</span>")
|
||||
else if (M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
else if(M in range(1)) //If someone is standing close enough, they can tell what it is...
|
||||
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
|
||||
else if (W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
|
||||
else if(W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance...
|
||||
M.show_message("<span class='notice'>[usr] puts [W] into [src].</span>")
|
||||
|
||||
src.orient2hud(usr)
|
||||
@@ -331,8 +331,8 @@
|
||||
F.update_icon(1)
|
||||
|
||||
for(var/mob/M in range(1, src.loc))
|
||||
if (M.s_active == src)
|
||||
if (M.client)
|
||||
if(M.s_active == src)
|
||||
if(M.client)
|
||||
M.client.screen -= W
|
||||
|
||||
if(new_location)
|
||||
@@ -392,14 +392,14 @@
|
||||
return
|
||||
|
||||
src.orient2hud(user)
|
||||
if (src.loc == user)
|
||||
if (user.s_active)
|
||||
if(src.loc == user)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
src.show_to(user)
|
||||
else
|
||||
..()
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
if(M.s_active == src)
|
||||
src.close(M)
|
||||
src.add_fingerprint(user)
|
||||
return
|
||||
@@ -409,7 +409,7 @@
|
||||
set category = "Object"
|
||||
|
||||
collection_mode = !collection_mode
|
||||
switch (collection_mode)
|
||||
switch(collection_mode)
|
||||
if(1)
|
||||
to_chat(usr, "[src] now picks up all items in a tile at once.")
|
||||
if(0)
|
||||
@@ -488,19 +488,19 @@
|
||||
return
|
||||
|
||||
//Otherwise we'll try to fold it.
|
||||
if ( contents.len )
|
||||
if( contents.len )
|
||||
return
|
||||
|
||||
if ( !ispath(src.foldable) )
|
||||
if( !ispath(src.foldable) )
|
||||
return
|
||||
var/found = 0
|
||||
// Close any open UI windows first
|
||||
for(var/mob/M in range(1))
|
||||
if (M.s_active == src)
|
||||
if(M.s_active == src)
|
||||
src.close(M)
|
||||
if ( M == user )
|
||||
if( M == user )
|
||||
found = 1
|
||||
if ( !found ) // User is too far away
|
||||
if( !found ) // User is too far away
|
||||
return
|
||||
// Now make the cardboard
|
||||
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
|
||||
@@ -514,14 +514,14 @@
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while (cur_atom && !(cur_atom in container.contents))
|
||||
if (isarea(cur_atom))
|
||||
while(cur_atom && !(cur_atom in container.contents))
|
||||
if(isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
if(istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if (!cur_atom)
|
||||
if(!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
@@ -532,14 +532,14 @@
|
||||
var/depth = 0
|
||||
var/atom/cur_atom = src
|
||||
|
||||
while (cur_atom && !isturf(cur_atom))
|
||||
if (isarea(cur_atom))
|
||||
while(cur_atom && !isturf(cur_atom))
|
||||
if(isarea(cur_atom))
|
||||
return -1
|
||||
if (istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
if(istype(cur_atom.loc, /obj/item/weapon/storage))
|
||||
depth++
|
||||
cur_atom = cur_atom.loc
|
||||
|
||||
if (!cur_atom)
|
||||
if(!cur_atom)
|
||||
return -1 //inside something with a null loc.
|
||||
|
||||
return depth
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
if (src.type == /obj/item/weapon/storage/toolbox)
|
||||
if(src.type == /obj/item/weapon/storage/toolbox)
|
||||
to_chat(world, "BAD: [src] ([src.type]) spawned at [src.x] [src.y] [src.z]")
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/storage/box/syndicate/
|
||||
New()
|
||||
..()
|
||||
switch (pickweight(list("bloodyspai" = 1, "stealth" = 1, "bond" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "implant" = 1, "hacker" = 1, "lordsingulo" = 1, "darklord" = 1)))
|
||||
switch(pickweight(list("bloodyspai" = 1, "stealth" = 1, "bond" = 1, "screwed" = 1, "guns" = 1, "murder" = 1, "implant" = 1, "hacker" = 1, "lordsingulo" = 1, "darklord" = 1)))
|
||||
if("bloodyspai")
|
||||
new /obj/item/clothing/under/chameleon(src)
|
||||
new /obj/item/clothing/mask/gas/voice(src)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
if (user.a_intent == I_HARM)
|
||||
if(user.a_intent == I_HARM)
|
||||
if(!..()) return
|
||||
if(!isrobot(target)) return
|
||||
else
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
*/
|
||||
/obj/item/weapon/rack_parts/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
if (istype(W, /obj/item/weapon/wrench))
|
||||
if(istype(W, /obj/item/weapon/wrench))
|
||||
new /obj/item/stack/sheet/metal(user.loc)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -100,9 +100,9 @@
|
||||
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
if (istype(W, /obj/item/weapon/flamethrower))
|
||||
if(istype(W, /obj/item/weapon/flamethrower))
|
||||
var/obj/item/weapon/flamethrower/F = W
|
||||
if ((!F.status)||(F.ptank)) return
|
||||
if((!F.status)||(F.ptank)) return
|
||||
src.master = F
|
||||
F.ptank = src
|
||||
user.unEquip(src)
|
||||
|
||||
@@ -41,25 +41,25 @@
|
||||
|
||||
/obj/item/weapon/tank/examine(mob/user)
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
if(istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if (!in_range(src, user))
|
||||
if (icon == src)
|
||||
if(!in_range(src, user))
|
||||
if(icon == src)
|
||||
to_chat(user, "\blue It's \a [bicon(icon)][src]! If you want any more information you'll need to get closer.")
|
||||
return
|
||||
|
||||
var/celsius_temperature = src.air_contents.temperature-T0C
|
||||
var/descriptive
|
||||
|
||||
if (celsius_temperature < 20)
|
||||
if(celsius_temperature < 20)
|
||||
descriptive = "cold"
|
||||
else if (celsius_temperature < 40)
|
||||
else if(celsius_temperature < 40)
|
||||
descriptive = "room temperature"
|
||||
else if (celsius_temperature < 80)
|
||||
else if(celsius_temperature < 80)
|
||||
descriptive = "lukewarm"
|
||||
else if (celsius_temperature < 100)
|
||||
else if(celsius_temperature < 100)
|
||||
descriptive = "warm"
|
||||
else if (celsius_temperature < 300)
|
||||
else if(celsius_temperature < 300)
|
||||
descriptive = "hot"
|
||||
else
|
||||
descriptive = "furiously hot"
|
||||
@@ -71,7 +71,7 @@
|
||||
/obj/item/weapon/tank/blob_act()
|
||||
if(prob(50))
|
||||
var/turf/location = src.loc
|
||||
if (!( istype(location, /turf) ))
|
||||
if(!( istype(location, /turf) ))
|
||||
qdel(src)
|
||||
|
||||
if(src.air_contents)
|
||||
@@ -83,17 +83,17 @@
|
||||
..()
|
||||
|
||||
src.add_fingerprint(user)
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
if(istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
|
||||
if ((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
|
||||
if((istype(W, /obj/item/device/analyzer)) && get_dist(user, src) <= 1)
|
||||
atmosanalyzer_scan(air_contents, user)
|
||||
|
||||
if(istype(W, /obj/item/device/assembly_holder))
|
||||
bomb_assemble(W,user)
|
||||
|
||||
/obj/item/weapon/tank/attack_self(mob/user as mob)
|
||||
if (!(src.air_contents))
|
||||
if(!(src.air_contents))
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
@@ -130,7 +130,7 @@
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
|
||||
if (!ui)
|
||||
if(!ui)
|
||||
// the ui does not exist, so we'll create a new() one
|
||||
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
|
||||
ui = new(user, src, ui_key, "tanks.tmpl", "Tank", 500, 300)
|
||||
@@ -143,28 +143,28 @@
|
||||
|
||||
/obj/item/weapon/tank/Topic(href, href_list)
|
||||
..()
|
||||
if (usr.stat|| usr.restrained())
|
||||
if(usr.stat|| usr.restrained())
|
||||
return 0
|
||||
if (src.loc != usr)
|
||||
if(src.loc != usr)
|
||||
return 0
|
||||
|
||||
if (href_list["dist_p"])
|
||||
if (href_list["dist_p"] == "reset")
|
||||
if(href_list["dist_p"])
|
||||
if(href_list["dist_p"] == "reset")
|
||||
src.distribute_pressure = TANK_DEFAULT_RELEASE_PRESSURE
|
||||
else if (href_list["dist_p"] == "max")
|
||||
else if(href_list["dist_p"] == "max")
|
||||
src.distribute_pressure = TANK_MAX_RELEASE_PRESSURE
|
||||
else
|
||||
var/cp = text2num(href_list["dist_p"])
|
||||
src.distribute_pressure += cp
|
||||
src.distribute_pressure = min(max(round(src.distribute_pressure), 0), TANK_MAX_RELEASE_PRESSURE)
|
||||
if (href_list["stat"])
|
||||
if(href_list["stat"])
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/location = loc
|
||||
if(location.internal == src)
|
||||
location.internal = null
|
||||
location.internals.icon_state = "internal0"
|
||||
to_chat(usr, "\blue You close the tank release valve.")
|
||||
if (location.internals)
|
||||
if(location.internals)
|
||||
location.internals.icon_state = "internal0"
|
||||
else
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
if(can_open_valve)
|
||||
location.internal = src
|
||||
to_chat(usr, "\blue You open \the [src] valve.")
|
||||
if (location.internals)
|
||||
if(location.internals)
|
||||
location.internals.icon_state = "internal1"
|
||||
else
|
||||
to_chat(usr, "\blue You need something to connect to \the [src].")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/obj/item/weapon/watertank/verb/toggle_mister()
|
||||
set name = "Toggle Mister"
|
||||
set category = "Object"
|
||||
if (usr.get_item_by_slot(slot_back) != src)
|
||||
if(usr.get_item_by_slot(slot_back) != src)
|
||||
to_chat(usr, "<span class='notice'>The watertank needs to be on your back to use.</span>")
|
||||
return
|
||||
if(usr.incapacitated())
|
||||
@@ -52,7 +52,7 @@
|
||||
return new /obj/item/weapon/reagent_containers/spray/mister(src)
|
||||
|
||||
/obj/item/weapon/watertank/equipped(mob/user, slot)
|
||||
if (slot != slot_back)
|
||||
if(slot != slot_back)
|
||||
remove_noz()
|
||||
|
||||
/obj/item/weapon/watertank/proc/remove_noz()
|
||||
@@ -62,7 +62,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/watertank/Destroy()
|
||||
if (on)
|
||||
if(on)
|
||||
remove_noz()
|
||||
qdel(noz)
|
||||
noz = null
|
||||
@@ -133,7 +133,7 @@
|
||||
return
|
||||
|
||||
/proc/check_tank_exists(parent_tank, var/mob/living/carbon/human/M, var/obj/O)
|
||||
if (!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
|
||||
if(!parent_tank || !istype(parent_tank, /obj/item/weapon/watertank)) //To avoid weird issues from admin spawns
|
||||
M.unEquip(O)
|
||||
qdel(0)
|
||||
return 0
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/obj/item/weapon/locator/attack_self(mob/user as mob)
|
||||
add_fingerprint(usr)
|
||||
var/dat
|
||||
if (temp)
|
||||
if(temp)
|
||||
dat = "[src.temp]<BR><BR><A href='byond://?src=\ref[src];temp=1'>Clear</A>"
|
||||
else
|
||||
dat = {"
|
||||
@@ -52,25 +52,25 @@ Frequency:
|
||||
to_chat(usr, "<span class='warning'>\The [src] is malfunctioning.</span>")
|
||||
return 1
|
||||
|
||||
if (href_list["refresh"])
|
||||
if(href_list["refresh"])
|
||||
temp = "<B>Persistent Signal Locator</B><HR>"
|
||||
var/turf/sr = get_turf(src)
|
||||
|
||||
if (sr)
|
||||
if(sr)
|
||||
temp += "<B>Located Beacons:</B><BR>"
|
||||
|
||||
for(var/obj/item/device/radio/beacon/W in beacons)
|
||||
if (W.frequency == frequency && !W.syndicate)
|
||||
if (W && W.z == z)
|
||||
if(W.frequency == frequency && !W.syndicate)
|
||||
if(W && W.z == z)
|
||||
var/turf/TB = get_turf(W)
|
||||
temp += "[W.code]: [TB.x], [TB.y], [TB.z]<BR>"
|
||||
|
||||
temp += "<B>Located Implants:</B><BR>"
|
||||
for (var/obj/item/weapon/implant/tracking/T in tracked_implants)
|
||||
if (!T.implanted || !T.imp_in)
|
||||
for(var/obj/item/weapon/implant/tracking/T in tracked_implants)
|
||||
if(!T.implanted || !T.imp_in)
|
||||
continue
|
||||
|
||||
if (T && T.z == z)
|
||||
if(T && T.z == z)
|
||||
temp += "[T.id]: [T.imp_in.x], [T.imp_in.y], [T.imp_in.z]<BR>"
|
||||
|
||||
temp += "<B>You are at \[[sr.x],[sr.y],[sr.z]\]</B>."
|
||||
@@ -78,11 +78,11 @@ Frequency:
|
||||
else
|
||||
temp += "<B><FONT color='red'>Processing error:</FONT></B> Unable to locate orbital position.<BR>"
|
||||
else
|
||||
if (href_list["freq"])
|
||||
if(href_list["freq"])
|
||||
frequency += text2num(href_list["freq"])
|
||||
frequency = sanitize_frequency(frequency)
|
||||
else
|
||||
if (href_list["temp"])
|
||||
if(href_list["temp"])
|
||||
temp = null
|
||||
|
||||
attack_self(usr)
|
||||
@@ -123,12 +123,12 @@ Frequency:
|
||||
if(T.x>world.maxx-8 || T.x<8) continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-8 || T.y<8) continue
|
||||
A = get_area(T)
|
||||
if (A.tele_proof == 1) continue // Telescience-proofed areas require a beacon.
|
||||
if(A.tele_proof == 1) continue // Telescience-proofed areas require a beacon.
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
L["None (Dangerous)"] = pick(turfs)
|
||||
var/t1 = input(user, "Please select a teleporter to lock in on.", "Hand Teleporter") as null|anything in L
|
||||
if (!t1 || (user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
if(!t1 || (user.get_active_hand() != src || user.stat || user.restrained()))
|
||||
return
|
||||
if(active_portals >= 3)
|
||||
user.show_message("<span class='notice'>\The [src] is recharging!</span>")
|
||||
|
||||
@@ -56,29 +56,29 @@
|
||||
|
||||
/obj/item/weapon/screwdriver/New()
|
||||
switch(pick("red","blue","purple","brown","green","cyan","yellow"))
|
||||
if ("red")
|
||||
if("red")
|
||||
icon_state = "screwdriver2"
|
||||
item_state = "screwdriver"
|
||||
if ("blue")
|
||||
if("blue")
|
||||
icon_state = "screwdriver"
|
||||
item_state = "screwdriver_blue"
|
||||
if ("purple")
|
||||
if("purple")
|
||||
icon_state = "screwdriver3"
|
||||
item_state = "screwdriver_purple"
|
||||
if ("brown")
|
||||
if("brown")
|
||||
icon_state = "screwdriver4"
|
||||
item_state = "screwdriver_brown"
|
||||
if ("green")
|
||||
if("green")
|
||||
icon_state = "screwdriver5"
|
||||
item_state = "screwdriver_green"
|
||||
if ("cyan")
|
||||
if("cyan")
|
||||
icon_state = "screwdriver6"
|
||||
item_state = "screwdriver_cyan"
|
||||
if ("yellow")
|
||||
if("yellow")
|
||||
icon_state = "screwdriver7"
|
||||
item_state = "screwdriver_yellow"
|
||||
|
||||
if (prob(75))
|
||||
if(prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
return
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
|
||||
if (!S)
|
||||
if(!S)
|
||||
return
|
||||
|
||||
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2)
|
||||
@@ -243,7 +243,7 @@
|
||||
|
||||
if(S.brute_dam)
|
||||
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
if (remove_fuel(0,null))
|
||||
if(remove_fuel(0,null))
|
||||
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
|
||||
@@ -365,7 +365,7 @@
|
||||
/obj/item/weapon/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if (R.use(1))
|
||||
if(R.use(1))
|
||||
var/obj/item/weapon/flamethrower/F = new /obj/item/weapon/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.unEquip(src)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
to_chat(user, "<span class='notice'>You dedicate your module to [name].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You grab the [name] with both hands.</span>")
|
||||
if (wieldsound)
|
||||
if(wieldsound)
|
||||
playsound(loc, wieldsound, 50, 1)
|
||||
var/obj/item/weapon/twohanded/offhand/O = new(user) ////Let's reserve his other hand~
|
||||
O.name = "[name] - offhand"
|
||||
@@ -581,7 +581,7 @@
|
||||
Z.ex_act(2)
|
||||
charged = 3
|
||||
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
|
||||
else if (istype(A, /obj/structure) || istype(A, /obj/mecha/))
|
||||
else if(istype(A, /obj/structure) || istype(A, /obj/mecha/))
|
||||
var/obj/Z = A
|
||||
Z.ex_act(2)
|
||||
charged = 3
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
/obj/item/weapon/wire/proc/update()
|
||||
if (src.amount > 1)
|
||||
if(src.amount > 1)
|
||||
src.icon_state = "spool_wire"
|
||||
src.desc = text("This is just spool of regular insulated wire. It consists of about [] unit\s of wire.", src.amount)
|
||||
else
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/wire/attack_self(mob/user as mob)
|
||||
if (src.laying)
|
||||
if(src.laying)
|
||||
src.laying = 0
|
||||
to_chat(user, "\blue You're done laying wire!")
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user