Fixes merge conflict

This commit is contained in:
Kyep
2016-07-07 21:57:42 -07:00
1117 changed files with 17813 additions and 14233 deletions
+11 -11
View File
@@ -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()
+280 -197
View File
@@ -26,232 +26,315 @@ RCD
var/working = 0
var/mode = 1
var/canRwall = 0
var/menu = 1
var/door_type = /obj/machinery/door/airlock
req_access = list(access_engine)
var/list/door_accesses = list()
var/list/door_accesses_list = list()
var/one_access
var/locked = 1
var/static/list/allowed_door_types = list(/obj/machinery/door/airlock = "Standard",
/obj/machinery/door/airlock/command = "Command", /obj/machinery/door/airlock/security = "Security",
/obj/machinery/door/airlock/engineering = "Engineering", /obj/machinery/door/airlock/medical = "Medical",
/obj/machinery/door/airlock/maintenance = "Maintenance", /obj/machinery/door/airlock/external = "External",
/obj/machinery/door/airlock/glass = "Standard (Glass)", /obj/machinery/door/airlock/freezer = "Freezer",
/obj/machinery/door/airlock/glass_command = "Command (Glass)", /obj/machinery/door/airlock/glass_engineering = "Engineering (Glass)",
/obj/machinery/door/airlock/glass_security = "Security (Glass)", /obj/machinery/door/airlock/glass_medical = "Medical (Glass)",
/obj/machinery/door/airlock/mining = "Mining", /obj/machinery/door/airlock/atmos = "Atmospherics",
/obj/machinery/door/airlock/research = "Research", /obj/machinery/door/airlock/glass_research = "Research (Glass)",
/obj/machinery/door/airlock/glass_mining = "Mining (Glass)", /obj/machinery/door/airlock/glass_atmos = "Atmospherics (Glass)")
New()
/obj/item/weapon/rcd/New()
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
spark_system = new /datum/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
rcd_list += src
door_accesses_list = list()
for(var/access in get_all_accesses())
door_accesses_list[++door_accesses_list.len] = list("name" = get_access_desc(access), "id" = access, "enabled" = (access in door_accesses))
return
/obj/item/weapon/rcd/Destroy()
qdel(spark_system)
spark_system = null
rcd_list -= src
return ..()
/obj/item/weapon/rcd/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='notice'>The RCD cant hold any more matter-units.</span>")
return
matter += R.ammoamt
user.drop_item()
qdel(W)
playsound(loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
src.spark_system = new /datum/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
rcd_list += src
nanomanager.update_uis(src)
return
Destroy()
qdel(spark_system)
spark_system = null
rcd_list -= src
return ..()
attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
var/obj/item/weapon/rcd_ammo/R = W
if((matter + R.ammoamt) > max_matter)
to_chat(user, "<span class='notice'>The RCD cant hold any more matter-units.</span>")
return
matter += R.ammoamt
user.drop_item()
qdel(W)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
to_chat(user, "<span class='notice'>The RCD now holds [matter]/[max_matter] matter-units.</span>")
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
/obj/item/weapon/rcd/attack_self(mob/user)
//Change the mode
ui_interact(user)
/obj/item/weapon/rcd/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1, var/datum/topic_state/state = inventory_state)
var/list/data = list()
data["mode"] = mode
data["door_type"] = door_type
data["menu"] = menu
data["matter"] = matter
data["max_matter"] = max_matter
data["one_access"] = one_access
data["locked"] = locked
if(menu == 2)
var/list/door_types_list = list()
for(var/type in allowed_door_types)
door_types_list[++door_types_list.len] = list("name" = allowed_door_types[type], "type" = type)
data["allowed_door_types"] = door_types_list
data["door_accesses"] = door_accesses_list
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "rcd.tmpl", "[name]", 400, 400, state = state)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
/obj/item/weapon/rcd/Topic(href, href_list, nowindow, state)
if(..())
return 1
if(prob(20))
spark_system.start()
if(href_list["mode"])
mode = text2num(href_list["mode"])
. = 1
if(href_list["door_type"])
var/new_door_type = text2path(href_list["door_type"])
if(!(new_door_type in allowed_door_types))
message_admins("RCD HREF exploit attempted by [key_name(usr, usr.client)]!")
return
door_type = new_door_type
. = 1
if(href_list["menu"])
menu = text2num(href_list["menu"])
. = 1
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))
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))
locked = 0
. = 1
if(href_list["logout"])
locked = 1
. = 1
if(href_list["toggle_one_access"] && !locked)
one_access = !one_access
. = 1
if(href_list["toggle_access"] && !locked)
var/href_access = text2num(href_list["toggle_access"])
if(href_access in door_accesses)
door_accesses -= href_access
else
door_accesses += href_access
door_accesses_list = list()
for(var/access in get_all_accesses())
door_accesses_list[++door_accesses_list.len] = list("name" = get_access_desc(access), "id" = access, "enabled" = (access in door_accesses))
. = 1
/obj/item/weapon/rcd/proc/activate()
playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
attack_self(mob/user)
//Change the mode
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
switch(mode)
if(1)
mode = 2
to_chat(user, "<span class='notice'>Changed mode to 'Airlock'</span>")
if(prob(20))
src.spark_system.start()
return
if(2)
mode = 3
to_chat(user, "<span class='notice'>Changed mode to 'Deconstruct'</span>")
if(prob(20))
src.spark_system.start()
return
if(3)
mode = 4
to_chat(user, "<span class='notice'>Changed mode to 'Windows'</span>")
if(prob(20))
src.spark_system.start()
return
if(4)
mode = 1
to_chat(user, "<span class='notice'>Changed mode to 'Floor & Walls'</span>")
if(prob(20))
src.spark_system.start()
return
/obj/item/weapon/rcd/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
return 0
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
return 0
proc/activate()
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
switch(mode)
if(1)
if(istype(A, /turf/space))
if(useResource(1, user))
to_chat(user, "Building Floor...")
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating)
return 1
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(3, user))
to_chat(user, "Building Wall ...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20, target = A))
if(!useResource(3, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/wall)
return 1
return 0
afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(istype(A,/area/shuttle)||istype(A,/turf/space/transit))
return 0
if(!(istype(A, /turf) || istype(A, /obj/machinery/door/airlock) || istype(A, /obj/structure/grille) || istype(A, /obj/structure/window)))
return 0
if(2)
if(istype(A, /turf/simulated/floor))
if(checkResource(10, user))
to_chat(user, "Building Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new door_type(A)
T.autoclose = 1
if(one_access)
T.req_one_access = door_accesses
else
T.req_access = door_accesses
return 1
return 0
return 0
switch(mode)
if(1)
if(istype(A, /turf/space))
if(useResource(1, user))
to_chat(user, "Building Floor...")
if(3)
if(istype(A, /turf/simulated/wall))
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
return 0
if(checkResource(5, user))
to_chat(user, "Deconstructing Wall...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating)
return 1
return 0
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(3, user))
to_chat(user, "Building Wall ...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 20, target = A))
if(!useResource(3, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/wall)
return 1
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(5, user))
to_chat(user, "Deconstructing Floor...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/space)
return 1
return 0
if(2)
if(istype(A, /turf/simulated/floor))
if(checkResource(10, user))
to_chat(user, "Building Airlock...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(10, user)) return 0
activate()
var/obj/machinery/door/airlock/T = new /obj/machinery/door/airlock( A )
T.autoclose = 1
return 1
return 0
return 0
if(3)
if(istype(A, /turf/simulated/wall))
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
return 0
if(checkResource(5, user))
to_chat(user, "Deconstructing Wall...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 40, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating)
return 1
return 0
if(istype(A, /turf/simulated/floor))
if(checkResource(5, user))
to_chat(user, "Deconstructing Floor...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(5, user)) return 0
activate()
var/turf/AT = A
AT.ChangeTurf(/turf/space)
return 1
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(20, user))
to_chat(user, "Deconstructing Airlock...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(20, user)) return 0
activate()
qdel(A)
return 1
return 0
if(istype(A, /obj/machinery/door/airlock))
if(checkResource(20, user))
to_chat(user, "Deconstructing Airlock...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 50, target = A))
if(!useResource(20, user)) return 0
activate()
qdel(A)
return 1
return 0
if(istype(A, /obj/structure/window)) // You mean the grille of course, do you?
A = locate(/obj/structure/grille) in A.loc
if(istype(A, /obj/structure/grille))
if(!checkResource(2, user))
return 0
to_chat(user, "Deconstructing window...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
return 0
if(locate(/obj/structure/window/full/shuttle) in A.contents)
return 0 // Let's not give shuttle-griefers an easy time.
if(!useResource(2, user))
return 0
activate()
var/turf/T1 = get_turf(A)
qdel(A)
A = null
for(var/obj/structure/window/W in T1.contents)
W.disassembled = 1
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T2 = get_step(T1, cdir)
if(locate(/obj/structure/window/full/shuttle) in T2.contents)
continue // Shuttle windows? Nah. We don't need extra windows there.
if(!(locate(/obj/structure/grille) in T2.contents))
continue
for(var/obj/structure/window/W in T2.contents)
if(istype(A, /obj/structure/window)) // You mean the grille of course, do you?
A = locate(/obj/structure/grille) in A.loc
if(istype(A, /obj/structure/grille))
if(!checkResource(2, user))
return 0
to_chat(user, "Deconstructing window...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
return 0
if(locate(/obj/structure/window/full/shuttle) in A.contents)
return 0 // Let's not give shuttle-griefers an easy time.
if(!useResource(2, user))
return 0
activate()
var/turf/T1 = get_turf(A)
qdel(A)
A = null
for(var/obj/structure/window/W in T1.contents)
W.disassembled = 1
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T2 = get_step(T1, cdir)
if(locate(/obj/structure/window/full/shuttle) in T2.contents)
continue // Shuttle windows? Nah. We don't need extra windows there.
if(!(locate(/obj/structure/grille) in T2.contents))
continue
for(var/obj/structure/window/W in T2.contents)
if(W.dir == turn(cdir, 180))
W.disassembled = 1
W.density = 0
qdel(W)
var/obj/structure/window/reinforced/W = new(T2)
W.dir = turn(cdir, 180)
return 1
return 0
if(4)
if(istype(A, /turf/simulated/floor))
if(locate(/obj/structure/grille) in contents)
return 0 // We already have window
if(!checkResource(2, user))
return 0
to_chat(user, "Constructing window...")
playsound(loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
return 0
if(locate(/obj/structure/grille) in A.contents)
return 0 // We already have window
if(!useResource(2, user))
return 0
activate()
new /obj/structure/grille(A)
for(var/obj/structure/window/W in contents)
W.disassembled = 1 // Prevent that annoying glass breaking sound
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T = get_step(A, cdir)
if(locate(/obj/structure/grille) in T.contents)
for(var/obj/structure/window/W in T.contents)
if(W.dir == turn(cdir, 180))
W.disassembled = 1
W.density = 0
qdel(W)
var/obj/structure/window/reinforced/W = new(T2)
W.dir = turn(cdir, 180)
return 1
return 0
if(4)
if(istype(A, /turf/simulated/floor))
if(locate(/obj/structure/grille) in contents)
return 0 // We already have window
if(!checkResource(2, user))
return 0
to_chat(user, "Constructing window...")
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
if(!do_after(user, 20, target = A))
return 0
if(locate(/obj/structure/grille) in A.contents)
return 0 // We already have window
if(!useResource(2, user))
return 0
activate()
new /obj/structure/grille(A)
for(var/obj/structure/window/W in contents)
W.disassembled = 1 // Prevent that annoying glass breaking sound
W.density = 0
qdel(W)
for(var/cdir in cardinal)
var/turf/T = get_step(A, cdir)
if(locate(/obj/structure/grille) in T.contents)
for(var/obj/structure/window/W in T.contents)
if(W.dir == turn(cdir, 180))
W.disassembled = 1
W.density = 0
qdel(W)
else // Build a window!
var/obj/structure/window/reinforced/W = new(A)
W.dir = cdir
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating) // Platings go under windows.
return 1
else
to_chat(user, "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin.")
return 0
else // Build a window!
var/obj/structure/window/reinforced/W = new(A)
W.dir = cdir
var/turf/AT = A
AT.ChangeTurf(/turf/simulated/floor/plating) // Platings go under windows.
return 1
else
to_chat(user, "ERROR: RCD in MODE: [mode] attempted use by [user]. Send this text #coderbus or an admin.")
return 0
nanomanager.update_uis(src)
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
if(matter < amount)
return 0
matter -= amount
desc = "A RCD. It currently holds [matter]/[max_matter] matter-units."
nanomanager.update_uis(src)
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
+45 -45
View File
@@ -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
+44 -43
View File
@@ -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"
@@ -103,8 +103,6 @@
var/sex
var/age
var/photo
var/icon/front
var/icon/side
var/dat
var/stamped = 0
@@ -124,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>")
@@ -137,12 +135,6 @@
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/paper)
assets.send(user)
if(!front)
front = new(photo, dir = SOUTH)
if(!side)
side = new(photo, dir = WEST)
user << browse_rsc(front, "front.png")
user << browse_rsc(side, "side.png")
var/datum/browser/popup = new(user, "idcard", name, 600, 400)
popup.set_content(dat)
popup.set_title_image(usr.browse_rsc_icon(src.icon, src.icon_state))
@@ -170,16 +162,22 @@
dna_hash = H.dna.unique_enzymes
fingerprint_hash = md5(H.dna.uni_identity)
dat = ("<table><tr><td>")
dat += text("Name: []</A><BR>", registered_name)
dat += text("Sex: []</A><BR>\n", sex)
dat += text("Age: []</A><BR>\n", age)
dat += text("Rank: []</A><BR>\n", assignment)
dat += text("Fingerprint: []</A><BR>\n", fingerprint_hash)
dat += text("Blood Type: []<BR>\n", blood_type)
dat += text("DNA Hash: []<BR><BR>\n", dna_hash)
dat +="<td align = center valign = top>Photo:<br><img src=front.png height=80 width=80 border=4> \
<img src=side.png height=80 width=80 border=4></td></tr></table>"
RebuildHTML()
/obj/item/weapon/card/id/proc/RebuildHTML()
var/photo_front = "'data:image/png;base64,[icon2base64(icon(photo, dir = SOUTH))]'"
var/photo_side = "'data:image/png;base64,[icon2base64(icon(photo, dir = WEST))]'"
dat = {"<table><tr><td>
Name: [registered_name]</A><BR>
Sex: [sex]</A><BR>
Age: [age]</A><BR>
Rank: [assignment]</A><BR>
Fingerprint: [fingerprint_hash]</A><BR>
Blood Type: [blood_type]<BR>
DNA Hash: [dna_hash]<BR><BR>
<td align = center valign = top>Photo:<br><img src=[photo_front] height=80 width=80 border=4>
<img src=[photo_side] height=80 width=80 border=4></td></tr></table>"}
/obj/item/weapon/card/id/GetAccess()
if(!guest_pass)
@@ -292,27 +290,22 @@
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
/obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H, var/side=0)//get_id_photo wouldn't work correctly
/obj/item/weapon/card/id/syndicate/proc/fake_id_photo(var/mob/living/carbon/human/H)//get_id_photo wouldn't work correctly
if(!istype(H))
return
var/storedDir = H.dir //don't want to lose track of this
var/icon/faked
if(!side)
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
var/icon/faked = new()
if(!H.equip_to_slot_if_possible(src, slot_l_store, 0, 1))
to_chat(H, "<span class='warning'>You need to empty your pockets before taking the ID picture.</span>")
return
if(side)
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked = getFlatIcon(H)
H.dir = storedDir //reset the user back to their original direction, not even noticable they changed
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
else
H.dir = SOUTH
faked = getFlatIcon(H)
H.dir = storedDir
H.dir = WEST //ensure the icon is actually the proper direction before copying it
faked.Insert(getFlatIcon(H), dir = WEST)
H.dir = SOUTH
faked.Insert(getFlatIcon(H), dir = SOUTH)
H.dir = storedDir
H.equip_to_slot_if_possible(src, slot_l_hand, 0, 1)
return faked
@@ -349,16 +342,17 @@
src.registered_name = new_name
UpdateName()
to_chat(user, "<span class='notice'>Name changed to [new_name].</span>")
RebuildHTML()
if("Photo")
if(!Adjacent(user))
return
photo = fake_id_photo(user)
var/icon/photoside = fake_id_photo(user,1)
front = new(photo)
side = new(photoside)
if(photo && photoside)
to_chat(user, "<span class='notice'>Photo changed.</span>")
var/icon/newphoto = fake_id_photo(user)
if(!newphoto)
return
photo = newphoto
to_chat(user, "<span class='notice'>Photo changed.</span>")
RebuildHTML()
if("Appearance")
var/list/appearances = list(
@@ -403,6 +397,7 @@
return
src.sex = new_sex
to_chat(user, "<span class='notice'>Sex changed to [new_sex].</span>")
RebuildHTML()
if("Age")
var/new_age = sanitize(stripped_input(user,"What age would you like to put on this card?","Agent Card Age","21", MAX_MESSAGE_LEN))
@@ -410,6 +405,7 @@
return
src.age = new_age
to_chat(user, "<span class='notice'>Age changed to [new_age].</span>")
RebuildHTML()
if("Occupation")
var/new_job = sanitize(stripped_input(user,"What job would you like to put on this card?\nChanging occupation will not grant or remove any access levels.","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
@@ -418,6 +414,7 @@
src.assignment = new_job
to_chat(user, "<span class='notice'>Occupation changed to [new_job].</span>")
UpdateName()
RebuildHTML()
if("Money Account")
var/new_account = input(user,"What money account would you like to link to this card?","Agent Card Account",12345) as num
@@ -438,6 +435,7 @@
return
src.blood_type = new_blood_type
to_chat(user, "<span class='notice'>Blood type changed to [new_blood_type].</span>")
RebuildHTML()
if("DNA Hash")
var/default = "\[UNSET\]"
@@ -451,6 +449,7 @@
return
src.dna_hash = new_dna_hash
to_chat(user, "<span class='notice'>DNA hash changed to [new_dna_hash].</span>")
RebuildHTML()
if("Fingerprint Hash")
var/default = "\[UNSET\]"
@@ -464,6 +463,7 @@
return
src.fingerprint_hash = new_fingerprint_hash
to_chat(user, "<span class='notice'>Fingerprint hash changed to [new_fingerprint_hash].</span>")
RebuildHTML()
if("Reset Card")
name = initial(name)
@@ -480,6 +480,7 @@
registered_user = null
to_chat(user, "<span class='notice'>All information has been deleted from \the [src].</span>")
RebuildHTML()
else
..()
@@ -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)
+3 -3
View File
@@ -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
@@ -421,7 +421,7 @@
else if(ghost)
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
to_chat(ghost, sound('sound/effects/genetics.ogg'))
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='notice'>[defib] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
@@ -542,7 +542,7 @@
else if(ghost)
user.visible_message("<span class='notice'>[user] buzzes: Resuscitation failed: Patient's brain is unresponsive. Further attempts may succeed.</span>")
to_chat(ghost, "<span class='ghostalert'>Your heart is being defibrillated. Return to your body if you want to be revived!</span> (Verbs -> Ghost -> Re-enter corpse)")
to_chat(ghost, sound('sound/effects/genetics.ogg'))
ghost << sound('sound/effects/genetics.ogg')
else
user.visible_message("<span class='warning'>[user] buzzes: Resuscitation failed.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 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,13 +87,13 @@
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
M.dna.SetSEValue(block,src.GetValue())
domutcheck(M, null, block!=null)
domutcheck(M, null, 0)
M.update_mutations()
if(H)
H.sync_organ_dna(assimilate = 0, old_ue = prev_ue)
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
@@ -5,7 +5,7 @@
action_button_custom_type = /datum/action/item_action/hands_free
origin_tech = "materials=2;biotech=3;programming=2"
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like loyalty implants
var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants
var/implanted = null
var/mob/living/imp_in = null
item_color = "b"
@@ -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")
@@ -68,4 +68,4 @@
if(..())
processing_objects.Remove(src)
return 1
return 0
return 0
@@ -125,4 +125,46 @@
/obj/item/weapon/implanter/explosive_macro/New()
imp = new /obj/item/weapon/implant/explosive/macro(src)
..()
// Dust implant, for CC officers. Prevents gear theft if they die.
/obj/item/weapon/implant/dust
name = "duster implant"
desc = "An alarm which monitors host vital signs, transmitting a radio message and dusting the corpse on death."
/obj/item/weapon/implant/dust/get_data()
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Ultraviolet Corp XX-13 Security Implant<BR>
<b>Life:</b> Activates upon death.<BR>
<b>Important Notes:</b> Vaporizes organic matter<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death. <BR>
<b>Special Features:</b> Vaporizes<BR>
"}
return dat
/obj/item/weapon/implant/dust/trigger(emote, mob/source)
if(emote == "deathgasp")
activate("death")
/obj/item/weapon/implant/dust/activate(cause)
if(!cause || !imp_in || cause == "emp")
return 0
if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting implant? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes")
return 0
to_chat(imp_in, "<span class='notice'>Your dusting implant activates!</span>")
imp_in.visible_message("<span class = 'warning'>[imp_in] burns up in a flash!</span>")
imp_in.dust()
/obj/item/weapon/implant/dust/emp_act(severity)
return
/obj/item/weapon/implanter/dust
name = "implanter (Dust-on-death)"
/obj/item/weapon/implanter/dust/New()
imp = new /obj/item/weapon/implant/dust(src)
..()
@@ -1,6 +1,6 @@
/obj/item/weapon/implant/loyalty
name = "loyalty implant"
desc = "Makes you loyal or such."
name = "mindshield implant"
desc = "Stops people messing with your mind."
origin_tech = "materials=2;biotech=4;programming=4"
activated = 0
@@ -8,7 +8,7 @@
var/dat = {"<b>Implant Specifications:</b><BR>
<b>Name:</b> Nanotrasen Employee Management Implant<BR>
<b>Life:</b> Ten years.<BR>
<b>Important Notes:</b> Personnel injected with this device tend to be much more loyal to the company.<BR>
<b>Important Notes:</b> Personnel injected with this device can better resist mental compulsions.<BR>
<HR>
<b>Implant Details:</b><BR>
<b>Function:</b> Contains a small pod of nanobots that manipulate the host's mental functions.<BR>
@@ -29,7 +29,7 @@
if(target.mind in ticker.mode.cult)
to_chat(target, "<span class='warning'>You feel the corporate tendrils of Nanotrasen try to invade your mind!</span>")
else
to_chat(target, "<span class='notice'>You feel a surge of loyalty towards Nanotrasen.</span>")
to_chat(target, "<span class='notice'>Your mind feels hardened - more resistant to brainwashing.</span>")
return 1
return 0
@@ -42,7 +42,7 @@
/obj/item/weapon/implanter/loyalty
name = "implanter (loyalty)"
name = "implanter (mindshield)"
/obj/item/weapon/implanter/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
@@ -51,8 +51,8 @@
/obj/item/weapon/implantcase/loyalty
name = "implant case - 'Loyalty'"
desc = "A glass case containing a loyalty implant."
name = "implant case - 'mindshield'"
desc = "A glass case containing a mindshield implant."
/obj/item/weapon/implantcase/loyalty/New()
imp = new /obj/item/weapon/implant/loyalty(src)
@@ -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)
@@ -1,8 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/machinery/implantchair
name = "loyalty implanter"
desc = "Used to implant occupants with loyalty implants."
name = "mindshield implanter"
desc = "Used to implant occupants with mindshield implants."
icon = 'icons/obj/machines/implantchair.dmi'
icon_state = "implantchair"
density = 1
@@ -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>")
@@ -87,3 +87,9 @@
imp = new /obj/item/weapon/implant/traitor(src)
..()
/obj/item/weapon/implanter/death_alarm
name = "implanter (Death Alarm)"
/obj/item/weapon/implanter/death_alarm/New()
imp = new /obj/item/weapon/implant/death_alarm(src)
..()
@@ -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"])
+2 -2
View File
@@ -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))
+4 -4
View File
@@ -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
+25 -25
View File
@@ -809,7 +809,7 @@
</html>
"}
/obj/item/weapon/book/manual/security_space_law/black
name = "Space Law - Limited Edition"
desc = "A leather-bound, immaculately-written copy of JUSTICE."
@@ -1483,7 +1483,7 @@
<li>Attending Surgeon is to keep the Operating Room in an hygienic condition at all times, <b>again</b>, to prevent infection;</li>
<li>Attending Surgeon is to wash his/her hands between different patients, again, to prevent infection;</li>
<li>Attending Surgeon is to use either Anesthetics or Sedatives (for species that cannot breathe Anesthetics) during Surgical Procedures. Exception is made if the patient requests otherwise;</li>
<li>Attending Surgeon is not to remove any legal Implants (such as Loyalty or Tracking Implants) from the patient, unless requested by Security;</li>
<li>Attending Surgeon is not to remove any legal Implants (such as Mindshield or Tracking Implants) from the patient, unless requested by Security;</li>
<li>If a patient requests that a lost limb be replaced with an organic, rather than mechanical, substitute, said limb must be harvested from a compatible humanized Test Animal (such as Monkeys for Humans, or Farwas for Tajarans). Exception is made if the patient deliberately requests otherwise;</li>
<li>Attending Surgeon is not to bring any of the Surgical Tools outside of their respective Operating Room, and must in fact ensure the Operating Room maintains its proper inventory. This includes ensuring that the Anesthetics Equipment be kept inside the OR</li>
</ol>
@@ -2141,7 +2141,7 @@
<li>Prisoner must then be borged, fired into space via mass driver, cremated, or placed in the morgue with a DNR Notice, at the discretion of the Magistrate, Captain or Head of Security.</li>
</ol>
<br><br>
<h1><a name="elec"><B>Execution: Lethal Injection</B></a></h1><BR>
<ol>
<li>Prisoner must be bucklecuffed to the electric chair or bed.</li>
@@ -2150,7 +2150,7 @@
<li>Prisoner must then be borged, fired into space via mass driver, cremated, or placed in the morgue with a DNR Notice, at the discretion of the Magistrate, Captain or Head of Security.</li>
</ol>
<br><br>
<h1><a name="elec"><B>Execution: Firing Squad</B></a></h1><BR>
<ol>
<li>Prisoner must be brought to the Firing Range.</li>
@@ -2164,7 +2164,7 @@
</html>
"}
/obj/item/weapon/book/manual/sop_general
name = "Standard Operating Procedures"
desc = "A set of guidelines aiming at the safe conduct of all station activities."
@@ -2212,7 +2212,7 @@
<h1><a name="green"><B>Code Green</B></a></h1><BR>
<i>All clear.</i><br>
Default operating level. No immediate or clear threat to the station. All departments may carry out work as normal.
Default operating level. No immediate or clear threat to the station. All departments may carry out work as normal.
This alert level can be set at the Communications Console with a Captain level ID.<br>
<i>All threats to the station have passed. All weapons need to be holstered and privacy laws are once again fully enforced.</i><br>
<br>
@@ -2230,10 +2230,10 @@
Crew:<br>
<ul>
<li>Crew members may freely walk in the hallways</li>
<li>Suit sensors are not mandatory.</li>
<li>Suit sensors are not mandatory.</li>
</ul>
<br><br>
<h1><a name="blue"><B>Code Blue</B></a></h1><BR>
<i>There is a suspected threat.</i><br>
Raised alert level. Suspected threat to the station. Issued by Central Command, the Captain, or a Head of Staff vote. This alert level can be set at the Communications Console with a Captain level ID.<br>
@@ -2255,10 +2255,10 @@
Crew:<br>
<ul>
<li>Employees are recommended to comply with all security requests.</li>
<li>Suit sensors are mandatory, but coordinate positions are not required.</li>
<li>Suit sensors are mandatory, but coordinate positions are not required.</li>
</ul>
<br><br>
<h1><a name="red"><B>Code Red</B></a></h1><BR>
<i>There is a confirmed threat.</i><br>
Maximum alert level. Confirmed threat to the station or severe damage. Issued by Central Command, the Captain, or a Head of Staff vote. This alert level can only be set via the Keycard Authentication Devices in each Heads of Staff office and by swiping two Heads of Staff ID cards simultaneously.<br>
@@ -2279,12 +2279,12 @@
Crew:<br>
<ul>
<li>Suit sensors and coordinate positions are mandatory.</li>
<li>All crew members must remain in their departments.</li>
<li>Employees are required to comply with all security requests.</li>
<li>Emergency Response Team may be authorised. All crew are to comply with their direction.</li>
<li>All crew members must remain in their departments.</li>
<li>Employees are required to comply with all security requests.</li>
<li>Emergency Response Team may be authorised. All crew are to comply with their direction.</li>
</ul>
<br><br>
<h1><a name="gamma"><B>Code Gamma</B></a></h1><BR>
<i>Extremely hostile threat onboard the station.</i><br>
GAMMA Security level has been set by Centcom.<br>
@@ -2306,21 +2306,21 @@
Crew:<br>
<ul>
<li>Employees are required to comply with all security requests.</li>
<li>All civilians are to seek their nearest head for transportation to a safe location.</li>
<li>All civilians are to seek their nearest head for transportation to a safe location.</li>
<li>All personnel are required to defend the station and help security with dealing with the threat. All crew must follow direct orders from Security Personell or Head of Staff.</li>
</ul>
<br><br>
<h1><a name="hiring"><B>Hiring Policies</B></a></h1><BR>
<ul>
<li>Authorisation from the relevant Department Head is required to be hired into a Department. If none exists, the HoP or Captain's authorisation is required.</li>
<li>Promotion to a Department Head requires authorisation from the Captain or Acting Captain.</li>
<li>CentComm Authorisation is required for hiring the following: Blueshield, Security Pod Pilot, Magistrate, Brig Physician, Nanotrasen Representative, Mechanic.</li>
<li>If no Department Head has yet been sent, any promotion to said position is on a temporary basis until one arrives. </li>
<li>All Security personnel are to be loyalty implanted.</li>
<li>All Security personnel are to be mindshield implanted.</li>
</ul>
<br><br>
<h1><a name="firing"><B>Firing Policies</B></a></h1><BR>
<ul>
<li>If a crew is to be dismissed, their ID is to be terminated.</li>
@@ -2329,7 +2329,7 @@
<li>Demotion or Dismissal must have due cause.</li>
</ul>
<br><br>
<h1><a name="causes"><B>Causes for Demotion and Dismissal</B></a></h1><BR>
<ul>
<li>A medium or higher crime may be grounds for dismissal, at the department head's discretion.</li>
@@ -2344,11 +2344,11 @@
<li>Failure or refusal to hand in any items, ID, etc, of their previous job, is to be considered theft.</li>
</ul>
<br><br>
<h1><a name="sit"><B>Situational SoP</B></a></h1><BR>
The following situations have specific SoP. Failure to follow these may result in demotion/dismissal, or detaining by security if failure to follow them presents a significant risk.
<br><br>
<h1><a name="causes"><B>Evacuation</B></a></h1><BR>
<ul>
<li>All personnel are required to assist with evacuation. All crew must be evacuated, regardless of conscious state.</li>
@@ -2359,7 +2359,7 @@
<li>Shortening time to shuttle launch may be authorised if a clear threat to life, limb, or shuttle integrity is present.</li>
</ul>
<br><br>
<h1><a name="viral"><b>Viral Outbreak Procedures</b></a></h1><BR>
<i><b>Definition: </b>A Viral Outbreak is defined as a situation where a Viral Pathogen has infected a significant portion of the crew (>10%)</i>
<ol>
@@ -2376,7 +2376,7 @@
<li>Once the Viral Outbreak is over, all personnel are to return to regular duties.</li>
</ol>
<br><br>
<h1><a name="evac"><B>Evacuation</B></a></h1><BR>
<ul>
<li>Immediate evacuation of all untrained personnel.</li>
@@ -2384,7 +2384,7 @@
<li>Atmospheric Technicians are to remove hazard.</li>
</ul>
<br><br>
<h1><a name="meteor"><B>Meteor Storm</B></a></h1><BR>
<ul>
<li>All crew to move to central parts of the station.</li>
@@ -2392,7 +2392,7 @@
<li>Personel that are doing EVA maintenance should seek shelter immediately.</li>
</ul>
<br><br>
<h1><a name="sing"><B>Singularity Containment Failure</B></a></h1><BR>
<ul>
<li>Observation of Singularity movement.</li>
@@ -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'
@@ -63,6 +63,7 @@
w_class_on = 5
hitsound = "swing_hit"
flags = CONDUCT | NOSHIELD
armour_penetration = 100
origin_tech = "combat=3"
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
attack_verb_on = list()
@@ -83,6 +84,7 @@
throw_range = 5
hitsound = "swing_hit"
flags = NOSHIELD
armour_penetration = 35
origin_tech = "magnets=3;syndicate=4"
sharp = 1
edge = 1
@@ -205,6 +207,7 @@
throw_range = 1
w_class = 4//So you can't hide it in your pocket or some such.
flags = NOSHIELD
armour_penetration = 50
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/datum/effect/system/spark_spread/spark_system
+12 -3
View File
@@ -16,7 +16,6 @@
var/mopcap = 5
var/mopspeed = 30
/obj/item/weapon/mop/New()
create_reagents(mopcap)
janitorial_equipment += src
@@ -34,7 +33,6 @@
reagents.reaction(A, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly.
reagents.remove_any(1) //reaction() doesn't use up the reagents
/obj/item/weapon/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
@@ -80,4 +78,15 @@
force = 6
throwforce = 8
throw_range = 4
mopspeed = 20
mopspeed = 20
/obj/item/weapon/mop/advanced/cyborg
mopcap = 40
/obj/item/weapon/mop/advanced/cyborg/New()
..()
reagents.add_reagent("water", mopcap)
/obj/item/weapon/mop/advanced/cyborg/examine(mob/user)
..(user)
to_chat(user, "<span class='notice'>The mop's water tank has [round(reagents.get_reagent_amount("water"))] units of water left.</span>")
+1 -1
View File
@@ -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")
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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...
+1
View File
@@ -9,6 +9,7 @@
throw_range = 5
w_class = 2.0
flags = NOSHIELD
armour_penetration = 100
attack_verb = list("bludgeoned", "whacked", "disciplined")
/obj/item/weapon/twohanded/staff/broom
@@ -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.")
+13 -12
View File
@@ -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)
@@ -314,6 +314,7 @@
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
new /obj/item/ammo_casing/shotgun/beanbag(src)
update_icon()
/obj/item/weapon/storage/belt/bandolier/update_icon()
..()
@@ -442,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
@@ -518,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.")
@@ -535,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")
@@ -546,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)
@@ -617,7 +617,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
@@ -81,7 +81,7 @@
storage_slots = 1
/obj/item/weapon/storage/lockbox/loyalty
name = "Lockbox (Loyalty Implants)"
name = "Lockbox (Mindshield Implants)"
req_access = list(access_security)
New()
@@ -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)
@@ -132,6 +132,11 @@
/obj/item/weapon/melee/baton/proc/baton_stun(mob/living/L, mob/user)
if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(0, "[user]'s [name]")) //No message; check_shields() handles that
playsound(L, 'sound/weapons/Genhit.ogg', 50, 1)
return
user.lastattacked = L
L.lastattacker = user
@@ -46,11 +46,15 @@
return
if(!isliving(target))
return
if (user.a_intent == I_HARM)
if(user.a_intent == I_HARM)
if(!..()) return
if(!isrobot(target)) return
else
if(cooldown <= 0)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if(H.check_shields(0, "[user]'s [name]"))
return 0
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Weaken(3)
add_logs(target, user, "stunned", object="[src]")
@@ -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)
@@ -72,7 +72,7 @@
if(..(user, 0))
if(air_contents.oxygen < 1 && loc==usr)
to_chat(user, "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
to_chat(user, sound('sound/effects/alert.ogg'))
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/air/New()
..()
@@ -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)
@@ -124,7 +124,7 @@
if(..(user, 0))
if(air_contents.toxins < 0.2 && loc==usr)
to_chat(user, text("\red <B>The meter on the [src.name] indicates you are almost out of plasma!</B>"))
to_chat(user, sound('sound/effects/alert.ogg'))
user << sound('sound/effects/alert.ogg')
/*
* Emergency Oxygen
@@ -151,7 +151,7 @@
if(..(user, 0))
if(air_contents.oxygen < 0.2 && loc==usr)
to_chat(user, text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"))
to_chat(user, sound('sound/effects/alert.ogg'))
user << sound('sound/effects/alert.ogg')
/obj/item/weapon/tank/emergency_oxygen/engi
name = "extended-capacity emergency oxygen tank"
+21 -21
View File
@@ -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>")
+13 -13
View File
@@ -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
@@ -119,7 +119,7 @@
item_state = "cutters_yellow"
/obj/item/weapon/wirecutters/attack(mob/living/carbon/human/C as mob, mob/user as mob)
if(C.handcuffed)
if(istype(C) && C.handcuffed)
if(istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable))
usr.visible_message("\The [usr] cuts \the [C]'s restraints with \the [src]!",\
"You cut \the [C]'s restraints with \the [src]!",\
@@ -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>")
@@ -345,7 +345,7 @@
if(!message)
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
else
to_chat(user, "<span class='warning'>[src] shuts off!</span>")
visible_message("<span class='warning'>[src] shuts off!</span>")
force = 3
damtype = "brute"
hitsound = "swing_hit"
@@ -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)
+5 -2
View File
@@ -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"
@@ -206,6 +206,7 @@
wieldsound = 'sound/weapons/saberon.ogg'
unwieldsound = 'sound/weapons/saberoff.ogg'
flags = NOSHIELD
armour_penetration = 35
origin_tech = "magnets=3;syndicate=4"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
sharp = 1
@@ -293,6 +294,7 @@
force_wielded = 18 // Was 13, Buffed - RR
throwforce = 20
throw_speed = 3
armour_penetration = 10
no_spin_thrown = 1 // Thrown spears that spin look dumb. -Fox
flags = NOSHIELD
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
@@ -370,6 +372,7 @@
wieldsound = 'sound/weapons/chainsawstart.ogg'
hitsound = null
flags = NOSHIELD
armour_penetration = 35
origin_tech = "materials=6;syndicate=4"
attack_verb = list("sawed", "cut", "hacked", "carved", "cleaved", "butchered", "felled", "timbered")
sharp = 1
@@ -578,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
+2 -2
View File
@@ -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