diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm
index 577c8093390..e2c04299f1c 100644
--- a/code/__HELPERS/game.dm
+++ b/code/__HELPERS/game.dm
@@ -161,8 +161,6 @@
// The old system would loop through lists for a total of 5000 per function call, in an empty server.
// This new system will loop at around 1000 in an empty server.
-// SCREW THAT SHIT, we're not recursing.
-
/proc/get_mobs_in_view(var/R, var/atom/source)
// Returns a list of mobs in range of R from source. Used in radio and say code.
@@ -174,33 +172,18 @@
var/list/range = hear(R, T)
- for(var/mob/M in range)
- hear += M
-
- var/list/objects = list()
+ for(var/atom/A in range)
+ if(ismob(A))
+ var/mob/M = A
+ if(M.client)
+ hear += M
+ //world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])"
+ else if(istype(A, /obj/item/device/radio))
+ hear += A
- for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object
- objects += O
+ if(isobj(A) || ismob(A))
+ hear |= recursive_mob_check(A, hear, 3, 1, 0, 1)
- for(var/client/C in clients)
- if(!istype(C) || !C.eye)
- continue //I have no idea when this client check would be needed, but if this runtimes people won't hear anything
- //So kinda paranoid about runtime avoidance.
- if(istype(C.eye, /obj/machinery/camera))
- continue //No microphones in cameras.
-
- if(C.mob in hear)
- continue
-
- var/list/hear_and_objects = (hear|objects) //Combined these lists here instead of doing the combine 3 more times.
-
- if(C.eye in hear_and_objects)
- hear += C.mob
-
- else if(C.mob.loc in hear_and_objects)
- hear += C.mob
- else if(C.mob.loc.loc in hear_and_objects)
- hear += C.mob
return hear
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index f9c2c90dd57..c5ec1748419 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -1267,6 +1267,7 @@ proc/is_hot(obj/item/W as obj)
//Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used.
/proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT?
+ if(!W) return 0
if(W.sharp) return 1
return ( \
W.sharp || \
@@ -1374,4 +1375,4 @@ var/list/WALLITEMS = list(
return 0
/proc/format_text(text)
- return replacetext(replacetext(text,"\proper ",""),"\improper ","")
\ No newline at end of file
+ return replacetext(replacetext(text,"\proper ",""),"\improper ","")
diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm
index 112c3431e52..d6918b1f7e0 100644
--- a/code/_onclick/ai.dm
+++ b/code/_onclick/ai.dm
@@ -32,6 +32,9 @@
build_click(src, client.buildmode, params, A)
return
+ if(control_disabled || stat)
+ return
+
var/list/modifiers = params2list(params)
if(modifiers["middle"])
MiddleClickOn(A)
@@ -46,7 +49,8 @@
CtrlClickOn(A)
return
- if(control_disabled || stat || world.time <= next_move) return
+ if(world.time <= next_move)
+ return
next_move = world.time + 9
/*
@@ -123,4 +127,4 @@
else
// disable/6 is not in Topic; disable/5 disables both temporary and permenant shock
Topic("aiDisable=5", list("aiDisable"="5"), 1)
- return
+ return
\ No newline at end of file
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 1dbaeb1a3f6..90a68b02b68 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -39,7 +39,7 @@
user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])"
M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])"
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
+ msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" )
//spawn(1800) // this wont work right
// M.lastattacker = null
diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm
index 4df4329baf6..f4504835b3e 100644
--- a/code/game/gamemodes/revolution/rp_revolution.dm
+++ b/code/game/gamemodes/revolution/rp_revolution.dm
@@ -201,7 +201,7 @@
tried_to_add_revheads = world.time+50
var/active_revs = 0
for(var/datum/mind/rev_mind in head_revolutionaries)
- if(rev_mind.current.client && rev_mind.current.client.inactivity <= 10*60*20) // 20 minutes inactivity are OK
+ if(rev_mind.current && rev_mind.current.client && rev_mind.current.client.inactivity <= 10*60*20) // 20 minutes inactivity are OK
active_revs++
if(active_revs == 0)
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index f2a069c4543..c781bb20c99 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -183,24 +183,25 @@
var/datum/gas_mixture/gas
gas = location.remove_air(0.25*environment.total_moles)
- var/heat_capacity = gas.heat_capacity()
- var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
+ if(gas)
+ var/heat_capacity = gas.heat_capacity()
+ var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
- //Use power. Assuming that each power unit represents 1000 watts....
- use_power(energy_used/1000, ENVIRON)
+ //Use power. Assuming that each power unit represents 1000 watts....
+ use_power(energy_used/1000, ENVIRON)
- //We need to cool ourselves.
- if(environment.temperature > target_temperature)
- gas.temperature -= energy_used/heat_capacity
- else
- gas.temperature += energy_used/heat_capacity
+ //We need to cool ourselves.
+ if(environment.temperature > target_temperature)
+ gas.temperature -= energy_used/heat_capacity
+ else
+ gas.temperature += energy_used/heat_capacity
- environment.merge(gas)
+ environment.merge(gas)
- if(abs(environment.temperature - target_temperature) <= 0.5)
- regulating_temperature = 0
- visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
- "You hear a click as a faint electronic humming stops.")
+ if(abs(environment.temperature - target_temperature) <= 0.5)
+ regulating_temperature = 0
+ visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
+ "You hear a click as a faint electronic humming stops.")
var/old_level = danger_level
danger_level = overall_danger_level()
@@ -1683,4 +1684,4 @@ Code shamelessly copied from apc_frame
else
usr << browse(null, "window=partyalarm")
return
- return
\ No newline at end of file
+ return
diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm
index 219581d5b3d..b0861395f52 100644
--- a/code/game/machinery/kitchen/gibber.dm
+++ b/code/game/machinery/kitchen/gibber.dm
@@ -203,7 +203,7 @@
if(src.occupant.client) // Gibbed a cow with a client in it? log that shit
src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [user]/[user.ckey]"
user.attack_log += "\[[time_stamp()]\] Gibbed [src.occupant]/[src.occupant.ckey]"
- log_attack("\[[time_stamp()]\] [user]/[user.ckey] gibbed [src.occupant]/[src.occupant.ckey]")
+ msg_admin_attack("\[[time_stamp()]\] [key_name(user)] gibbed [key_name(src.occupant)]")
src.occupant.death(1)
src.occupant.ghostize()
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index b2f22ce9089..5585c033c14 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -201,7 +201,8 @@ steam.start() -- spawns the effect
sleep(5)
step(sparks,direction)
spawn(20)
- sparks.delete()
+ if(sparks)
+ sparks.delete()
src.total_sparks--
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 53790716a35..87f0e20735d 100755
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -482,7 +482,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
return 0
if(!can_use()) //Why reinvent the wheel? There's a proc that does exactly that.
U.unset_machine()
- ui.close()
+ if(ui)
+ ui.close()
return 0
add_fingerprint(U)
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index 49dc148d410..a08d856b68a 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -21,6 +21,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
icon = 'icons/obj/cigarettes.dmi'
icon_state = "match_unlit"
var/lit = 0
+ var/burnt = 0
var/smoketime = 5
w_class = 1.0
origin_tech = "materials=1"
@@ -30,24 +31,27 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/turf/location = get_turf(src)
smoketime--
if(smoketime < 1)
- icon_state = "match_burnt"
- lit = -1
- processing_objects.Remove(src)
+ burn_out()
return
if(location)
location.hotspot_expose(700, 5)
return
/obj/item/weapon/match/dropped(mob/user as mob)
- if(lit == 1)
- lit = -1
- damtype = "brute"
- icon_state = "match_burnt"
- item_state = "cigoff"
- name = "burnt match"
- desc = "A match. This one has seen better days."
+ if(lit)
+ burn_out()
return ..()
+/obj/item/weapon/match/proc/burn_out()
+ lit = 0
+ burnt = 1
+ damtype = "brute"
+ icon_state = "match_burnt"
+ item_state = "cigoff"
+ name = "burnt match"
+ desc = "A match. This one has seen better days."
+ processing_objects.Remove(src)
+
//////////////////
//FINE SMOKABLES//
//////////////////
@@ -419,4 +423,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(lit)
user.SetLuminosity(user.luminosity-2)
SetLuminosity(2)
- return
+ return
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index afd63497073..9e876154471 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -185,7 +185,7 @@
H.attack_log += text("\[[time_stamp()]\] Has been wrapped with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to wrap [H.name] ([H.ckey])")
- log_attack("[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])")
+ msg_admin_attack("[key_name(user)] used [src] to wrap [key_name(H)]")
else
user << "\blue You need more paper."
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 1955a9d5388..5546a0db02e 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -54,7 +54,7 @@
C.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [C.name] ([C.ckey])")
- log_attack("[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])")
+ msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(C)]")
var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( )
O.source = user
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index 8798cb699c1..3ad8b79e49a 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -173,7 +173,6 @@
desc = "Can hold security gear like handcuffs and flashes, with more pouches for more storage."
icon_state = "swatbelt"
item_state = "swatbelt"
- var/obj/item/weapon/gun/holstered = null
storage_slots = 9
max_w_class = 3
max_combined_w_class = 21
@@ -195,40 +194,5 @@
"/obj/item/device/flashlight",
"/obj/item/device/pda",
"/obj/item/device/radio/headset",
- "/obj/item/weapon/melee",
- "/obj/item/taperoll/police",
- "/obj/item/weapon/gun/energy/taser"
- )
-
-
- /obj/item/weapon/storage/belt/security/tactical/verb/holster()
- set name = "Holster"
- set category = "Object"
- set src in usr
- if(!istype(usr, /mob/living)) return
- if(usr.stat) return
-
- if(!holstered)
- if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
- usr << "\blue You need your gun equiped to holster it."
- return
- var/obj/item/weapon/gun/W = usr.get_active_hand()
- if (!W.isHandgun())
- usr << "\red This gun won't fit in \the belt!"
- return
- holstered = usr.get_active_hand()
- usr.drop_item()
- holstered.loc = src
- usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].")
- else
- if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
- usr << "\red You need an empty hand to draw the gun!"
- else
- if(usr.a_intent == "hurt")
- usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
- "\red You draw \the [holstered], ready to shoot!")
- else
- usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
- "\blue You draw \the [holstered], pointing it at the ground.")
- usr.put_in_hands(holstered)
- holstered = null
\ No newline at end of file
+ "/obj/item/weapon/melee"
+ )
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index 91c68bd1e74..83189aafd6b 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -418,6 +418,7 @@
w_class = 1
flags = TABLEPASS
slot_flags = SLOT_BELT
+ can_hold = list("/obj/item/weapon/match")
New()
..()
@@ -425,8 +426,9 @@
new /obj/item/weapon/match(src)
attackby(obj/item/weapon/match/W as obj, mob/user as mob)
- if(istype(W, /obj/item/weapon/match) && W.lit == 0)
+ if(istype(W) && !W.lit && !W.burnt)
W.lit = 1
+ W.damtype = "burn"
W.icon_state = "match_lit"
processing_objects.Add(W)
W.update_icon()
diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm
index 119d2d2c22e..5766fd27e45 100644
--- a/code/game/objects/items/weapons/storage/fancy.dm
+++ b/code/game/objects/items/weapons/storage/fancy.dm
@@ -173,7 +173,6 @@
/obj/item/weapon/storage/fancy/cigarettes/update_icon()
icon_state = "[initial(icon_state)][contents.len]"
- desc = "There are [contents.len] cig\s left!"
return
/obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location)
@@ -253,5 +252,4 @@
/obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
- update_icon()
-
+ update_icon()
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 5637f47f983..9f439b2b376 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -88,7 +88,7 @@
user.attack_log += "\[[time_stamp()]\] Stunned [H.name] ([H.ckey]) with [src.name]"
H.attack_log += "\[[time_stamp()]\] Stunned by [user.name] ([user.ckey]) with [src.name]"
- log_attack("[user.name] ([user.ckey]) stunned [H.name] ([H.ckey]) with [src.name]")
+ msg_admin_attack("[key_name(user)] stunned [key_name(H)] with [src.name]")
playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
if(charges < 1)
@@ -115,7 +115,7 @@
H.visible_message("[src], thrown by [foundmob.name], strikes [H] and stuns them!")
H.attack_log += "\[[time_stamp()]\] Stunned by thrown [src.name] last touched by ([src.fingerprintslast])"
- log_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [H.name] ([H.ckey])" )
+ msg_admin_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [key_name(H)]" )
/obj/item/weapon/melee/baton/emp_act(severity)
switch(severity)
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index 8b9d914bc24..bbfb940ec9c 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -104,7 +104,7 @@
M.Weaken(5)
M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])")
user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])")
- log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])")
+ msg_admin_attack("[key_name(user)] attacked [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])")
src.add_fingerprint(user)
for(var/mob/O in viewers(M))
@@ -153,7 +153,7 @@
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
- if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any
+ if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
var/icon/I = new /icon(src.icon, src.icon_state)
@@ -265,4 +265,4 @@
H.update_inv_r_hand()
add_fingerprint(user)
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 0a9dc69bacd..237ee6c92f1 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -268,10 +268,12 @@
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
+ H.clean_blood(washshoes)
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
+ M.clean_blood()
else
O.clean_blood()
@@ -413,4 +415,4 @@
/obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob)
icon_state = "puddle-splash"
..()
- icon_state = "puddle"
+ icon_state = "puddle"
\ No newline at end of file
diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm
index 178384f5f6c..4f0c356dc57 100644
--- a/code/modules/admin/IsBanned.dm
+++ b/code/modules/admin/IsBanned.dm
@@ -51,7 +51,7 @@ world/IsBanned(key,address,computer_id)
failedcid = 0
cidquery = " OR computerid = '[computer_id]' "
- var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
+ var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
query.Execute()
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 664b70bcff2..0258ddb50ae 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -29,7 +29,6 @@ var/list/admin_verbs_admin = list(
/client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/
/datum/admins/proc/access_news_network, /*allows access of newscasters*/
/client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/
- /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
/client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/
/client/proc/jumptocoord, /*we ghost and jump to a coordinate*/
/client/proc/Getmob, /*teleports a mob to our location*/
@@ -89,6 +88,7 @@ var/list/admin_verbs_fun = list(
/client/proc/cmd_admin_dress,
/client/proc/cmd_admin_gib_self,
/client/proc/drop_bomb,
+ /client/proc/everyone_random,
/client/proc/cinematic,
/client/proc/one_click_antag,
/datum/admins/proc/toggle_aliens,
@@ -127,6 +127,7 @@ var/list/admin_verbs_server = list(
/client/proc/check_customitem_activity
)
var/list/admin_verbs_debug = list(
+ /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index f34f9ab4673..33e2788bc36 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -250,9 +250,9 @@ datum/preferences
dat += "-Alpha(transparency): [UI_style_alpha]
"
dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
"
dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
"
- dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
"
- dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]
"
- dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"]
"
+ dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
"
+ dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
"
+ dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
"
if(config.allow_Metadata)
dat += "OOC Notes: Edit
"
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index c58ec18be0f..7299516c9cd 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -190,7 +190,40 @@
desc = "A suit of armor most often used by Special Weapons and Tactics squads. Includes padded vest with pockets along with shoulder and kneeguards."
icon_state = "swatarmor"
item_state = "armor"
+ var/obj/item/weapon/gun/holstered = null
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
slowdown = 1
armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0)
- siemens_coefficient = 0.7
\ No newline at end of file
+ siemens_coefficient = 0.7
+
+ /obj/item/clothing/suit/armor/tactical/verb/holster()
+ set name = "Holster"
+ set category = "Object"
+ set src in usr
+ if(!istype(usr, /mob/living)) return
+ if(usr.stat) return
+
+ if(!holstered)
+ if(!istype(usr.get_active_hand(), /obj/item/weapon/gun))
+ usr << "\blue You need your gun equiped to holster it."
+ return
+ var/obj/item/weapon/gun/W = usr.get_active_hand()
+ if (!W.isHandgun())
+ usr << "\red This gun won't fit in \the belt!"
+ return
+ holstered = usr.get_active_hand()
+ usr.drop_item()
+ holstered.loc = src
+ usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].")
+ else
+ if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
+ usr << "\red You need an empty hand to draw the gun!"
+ else
+ if(usr.a_intent == "hurt")
+ usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \
+ "\red You draw \the [holstered], ready to shoot!")
+ else
+ usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \
+ "\blue You draw \the [holstered], pointing it at the ground.")
+ usr.put_in_hands(holstered)
+ holstered = null
\ No newline at end of file
diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm
index c352caa88d4..356015c6c06 100644
--- a/code/modules/economy/cash.dm
+++ b/code/modules/economy/cash.dm
@@ -17,7 +17,7 @@
var/worth = 0
/obj/item/weapon/spacecash/c1
- name = "1 credip chip"
+ name = "1 credit chip"
icon_state = "spacecash"
desc = "It's worth 1 credit."
worth = 1
diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm
index c33732ed133..e2125ada66c 100644
--- a/code/modules/mob/emote.dm
+++ b/code/modules/mob/emote.dm
@@ -38,15 +38,13 @@
// Type 1 (Visual) emotes are sent to anyone in view of the item
if (m_type & 1)
- var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
- can_see |= viewers(src,null)
- for (var/mob/O in can_see)
+ for (var/mob/O in viewers(src, null))
O.show_message(message, m_type)
// Type 2 (Audible) emotes are sent to anyone in hear range
// of the *LOCATION* -- this is important for pAIs to be heard
else if (m_type & 2)
- for (var/mob/O in get_mobs_in_view(7,src))
+ for (var/mob/O in hearers(get_turf(src), null))
O.show_message(message, m_type)
/mob/proc/emote_dead(var/message)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 6a5102b18c6..886af5d1455 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -47,7 +47,7 @@
if(!dna)
dna = new /datum/dna(null)
- dna.species=species.name
+ dna.species=species.name
for(var/i=0;i<7;i++) // 2 for medHUDs and 5 for secHUDs
hud_list += image('icons/mob/hud.dmi', src, "hudunknown")
@@ -1113,10 +1113,12 @@
verbs += /mob/living/carbon/human/proc/bloody_doodle
return 1 //we applied blood to the item
-/mob/living/carbon/human/clean_blood()
+/mob/living/carbon/human/clean_blood(var/clean_feet)
.=..()
- if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
+ if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
+ feet_blood_color = null
del(feet_blood_DNA)
+ update_inv_shoes(1)
return 1
/mob/living/carbon/human/get_visible_implants(var/class = 0)
@@ -1193,7 +1195,7 @@
if(!new_species)
new_species = dna.species
else
- dna.species = new_species
+ dna.species = new_species
if(species && (species.name && species.name == new_species))
return
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index a085a88b34f..2620a20964d 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -114,7 +114,7 @@
M.attack_log += text("\[[time_stamp()]\] [M.species.attack_verb]ed [src.name] ([src.ckey])")
src.attack_log += text("\[[time_stamp()]\] Has been [M.species.attack_verb]ed by [M.name] ([M.ckey])")
- log_attack("[M.name] ([M.ckey]) [M.species.attack_verb]ed [src.name] ([src.ckey])")
+ msg_admin_attack("[key_name(M)] [M.species.attack_verb]ed [key_name(src)]")
var/damage = rand(0, 5)//BS12 EDIT
if(!damage)
@@ -153,7 +153,7 @@
M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])")
src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])")
- log_attack("[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])")
+ msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey])")
if(w_uniform)
w_uniform.add_fingerprint(M)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 26fa2378e62..bf575c3cb78 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -325,7 +325,7 @@
breath = loc.remove_air(breath_moles)
- if(istype(wear_mask, /obj/item/clothing/mask/gas))
+ if(istype(wear_mask, /obj/item/clothing/mask/gas) && breath)
var/obj/item/clothing/mask/gas/G = wear_mask
var/datum/gas_mixture/filtered = new
diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm
index 93369793586..3f7bd7c02dd 100644
--- a/code/modules/mob/living/say.dm
+++ b/code/modules/mob/living/say.dm
@@ -384,19 +384,20 @@ var/list/department_radio_keys = list(
rendered = "[GetVoice()][alt_name] [message_a]"
var/rendered_ghost = "[GetVoice()][alt_name] [message_ghost]"
for (var/mob/M in heard_a)
- if(hascall(M,"show_message"))
- var/deaf_message = ""
- var/deaf_type = 1
- if(M != src)
- deaf_message = "[name][alt_name] talks but you cannot hear them."
- else
- deaf_message = "You cannot hear yourself!"
- deaf_type = 2 // Since you should be able to hear yourself without looking
- if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen)
- M:show_message(rendered_ghost, 2, deaf_message, deaf_type)
- else
- M:show_message(rendered, 2, deaf_message, deaf_type)
- M << speech_bubble
+ if(M.client)
+ if(hascall(M,"show_message"))
+ var/deaf_message = ""
+ var/deaf_type = 1
+ if(M != src)
+ deaf_message = "[name][alt_name] talks but you cannot hear them."
+ else
+ deaf_message = "You cannot hear yourself!"
+ deaf_type = 2 // Since you should be able to hear yourself without looking
+ if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen)
+ M:show_message(rendered_ghost, 2, deaf_message, deaf_type)
+ else
+ M:show_message(rendered, 2, deaf_message, deaf_type)
+ M << speech_bubble
if (length(heard_b))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 468537ef347..646a138ce02 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -1180,7 +1180,7 @@
if(cleaned_human.shoes)
cleaned_human.shoes.clean_blood()
cleaned_human.update_inv_shoes(0)
- cleaned_human.clean_blood()
+ cleaned_human.clean_blood(1)
cleaned_human << "\red [src] cleans your face!"
return
diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm
index e78e818eccd..1fa531070c2 100644
--- a/code/modules/mob/living/simple_animal/bees.dm
+++ b/code/modules/mob/living/simple_animal/bees.dm
@@ -88,9 +88,10 @@
for(var/this_type in calmers)
var/mob/living/simple_animal/check_effect = locate() in src.loc
- if(check_effect.type == this_type)
- calming = 1
- break
+ if(istype(check_effect))
+ if(check_effect.type == this_type)
+ calming = 1
+ break
if(calming)
if(feral > 0)
diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm
index 13bf68005ee..a95f8612c1b 100644
--- a/code/modules/mob/mob_grab.dm
+++ b/code/modules/mob/mob_grab.dm
@@ -137,7 +137,7 @@
affecting.loc = assailant.loc
affecting.attack_log += "\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])"
assailant.attack_log += "\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])"
- log_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])")
+ msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]")
hud.icon_state = "disarm/kill"
hud.name = "disarm/kill"
else
@@ -158,7 +158,7 @@
assailant.visible_message("[assailant] has tightened \his grip on [affecting]'s neck!")
affecting.attack_log += "\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])"
assailant.attack_log += "\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])"
- log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])")
+ msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]")
assailant.next_move = world.time + 10
affecting.losebreath += 1
diff --git a/code/modules/projectiles/projectile/force.dm b/code/modules/projectiles/projectile/force.dm
index 2fab1a4da18..364ad53370b 100644
--- a/code/modules/projectiles/projectile/force.dm
+++ b/code/modules/projectiles/projectile/force.dm
@@ -4,7 +4,6 @@
icon_state = "ice_1"
damage = 20
flag = "energy"
- embed = 1
/obj/item/projectile/forcebolt/strong
name = "force bolt"
diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm
index 54ff938b7cb..11e31828f45 100644
--- a/code/modules/projectiles/targeting.dm
+++ b/code/modules/projectiles/targeting.dm
@@ -269,7 +269,7 @@ client/proc/add_gun_icons()
screen += usr.gun_run_icon
client/proc/remove_gun_icons()
- if(isnull(usr)) return 1 // Runtime prevention on N00k agents spawning with SMG
+ if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG
screen -= usr.item_use_icon
screen -= usr.gun_move_icon
if (target_can_move)
diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm
index 85ffdf0d79e..9518823ceca 100644
--- a/code/modules/reagents/Chemistry-Reagents.dm
+++ b/code/modules/reagents/Chemistry-Reagents.dm
@@ -949,7 +949,7 @@ datum
for(var/mob/living/carbon/slime/M in T)
M.adjustToxLoss(rand(5,10))
-
+
reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -974,6 +974,9 @@ datum
if(H.shoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0)
+ else
+ H.clean_blood(1)
+ return
M.clean_blood()
leporazine
@@ -3703,4 +3706,4 @@ datum
return
// Undefine the alias for REAGENTS_EFFECT_MULTIPLER
-#undef REM
+#undef REM
diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm
index 6f3b3f3901d..ec9f457b67c 100644
--- a/code/modules/reagents/reagent_containers/food/cans.dm
+++ b/code/modules/reagents/reagent_containers/food/cans.dm
@@ -39,7 +39,7 @@
M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]")
user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]")
- log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)")
+ msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm
index 6d1635f10d1..43305f14003 100644
--- a/code/modules/reagents/reagent_containers/food/drinks.dm
+++ b/code/modules/reagents/reagent_containers/food/drinks.dm
@@ -45,7 +45,7 @@
M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]")
user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]")
- log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)")
+ msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)")
if(reagents.total_volume)
reagents.reaction(M, INGEST)
diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm
index 6d774f1d464..0a1f2fbafcd 100644
--- a/code/modules/reagents/reagent_containers/food/snacks.dm
+++ b/code/modules/reagents/reagent_containers/food/snacks.dm
@@ -66,7 +66,7 @@
M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]")
user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]")
- log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
+ msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])")
for(var/mob/O in viewers(world.view, user))
O.show_message("\red [user] feeds [M] [src].", 1)