diff --git a/code/defines/procs/statistics.dm b/code/defines/procs/statistics.dm
index 810bfb79aac..8a9eb4042dc 100644
--- a/code/defines/procs/statistics.dm
+++ b/code/defines/procs/statistics.dm
@@ -47,9 +47,8 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
if(!H.key || !H.mind)
return
- var/turf/T = H.loc
- var/area/placeofdeath = get_area(T.loc)
- var/podname = placeofdeath.name
+ var/area/placeofdeath = get_area(H)
+ var/podname = placeofdeath ? placeofdeath.name : "Unknown area"
var/sqlname = sanitizeSQL(H.real_name)
var/sqlkey = sanitizeSQL(H.key)
@@ -82,9 +81,8 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
if(!H.key || !H.mind)
return
- var/turf/T = H.loc
- var/area/placeofdeath = get_area(T.loc)
- var/podname = placeofdeath.name
+ var/area/placeofdeath = get_area(H)
+ var/podname = placeofdeath ? placeofdeath.name : "Unknown area"
var/sqlname = sanitizeSQL(H.real_name)
var/sqlkey = sanitizeSQL(H.key)
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index e3ac71b77cc..041575c4b70 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -32,6 +32,8 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology",
var/word1
var/word2
var/word3
+ var/list/converting = list()
+
// Places these combos are mentioned: this file - twice in the rune code, once in imbued tome, once in tome's HTML runes.dm - in the imbue rune code. If you change a combination - dont forget to change it everywhere.
// travel self [word] - Teleport to random [rune with word destination matching]
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 88e16dbe46b..21c0b8e78b0 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -1,6 +1,7 @@
var/list/sacrificed = list()
/obj/effect/rune
+
/////////////////////////////////////////FIRST RUNE
proc
teleport(var/key)
@@ -98,50 +99,82 @@ var/list/sacrificed = list()
/////////////////////////////////////////THIRD RUNE
convert()
+ var/mob/living/carbon/target = null
for(var/mob/living/carbon/M in src.loc)
- if(iscultist(M))
- continue
- if(M.stat==2)
- continue
- usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!")
+ if(!iscultist(M) && M.stat < DEAD && !(M in converting))
+ target = M
+ break
+
+ if(!target) //didn't find any new targets
+ if(!converting.len)
+ fizzle()
+ else
+ usr << "You sense that the power of the dark one is already working away at them."
+ return
- if (M.species && (M.species.flags & NO_PAIN))
- M.visible_message("\red The markings below [M] glow a bloody red.")
- else
- M.visible_message("\red [M] writhes in pain as the markings below \him glow a bloody red.", \
- "\red AAAAAAHHHH!", \
- "\red You hear an anguished scream.")
- if(is_convertable_to_cult(M.mind) && !jobban_isbanned(M, "cultist"))//putting jobban check here because is_convertable uses mind as argument
-
- // Mostly for the benefit of those who resist, but it makes sense for even those who join to have some.. effect.
- M.take_overall_damage(0, 10)
-
- var/choice = alert(M,"Do you want to join the cult?","Submit to Nar'Sie","Resist","Submit")
- if(choice == "Submit")
- ticker.mode.add_cultist(M.mind)
- M.mind.special_role = "Cultist"
- M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root."
- M << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back."
- return 1
-
- else if(choice == "Resist")
-
- M.take_overall_damage(0, rand(5, 10)) // You dirty resister cannot handle the damage to your mind. Easily.
- // Resist messages go!
- var/BurnLoss = M.getFireLoss()
- if (BurnLoss < 25) M << "Your blood boils as you force yourself to resist the corruption invading every corner of your mind."
- else if (BurnLoss < 45) M << "Your blood boils and your body burns as the corruption further forces itself into your body and mind."
- else if (BurnLoss < 75) M << "You begin to hallucinate images of a dark and incomprehensible being and your entire body feels like its engulfed in flame as your mental defenses crumble."
- else if (BurnLoss < 100) M << "Your mind turns to ash as the burning flames engulf your very soul and images of Nar'Sie begin to bombard the last remnants of mental resistance."
- else M << "Your entire broken soul and being is engulfed in corruption and flames as your mind shatters away into nothing."
- return 0
- else
- M << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root."
- M << "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs."
+ usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!")
+
+ converting |= target
+ var/list/waiting_for_input = list(target = 0) //need to box this up in order to be able to reset it again from inside spawn, apparently
+ var/initial_message = 0
+ while(target in converting)
+ if(target.loc != src.loc || target.stat == DEAD)
+ converting -= target
+ if(target.getFireLoss() < 100)
+ target.hallucination = min(target.hallucination, 500)
return 0
- return fizzle()
+
+ target.take_overall_damage(0, rand(5, 20)) // You dirty resister cannot handle the damage to your mind. Easily. - even cultists who accept right away should experience some effects
+ // Resist messages go!
+ if(initial_message) //don't do this stuff right away, only if they resist or hesitate.
+ switch(target.getFireLoss())
+ if(0 to 25)
+ target << "Your blood boils as you force yourself to resist the corruption invading every corner of your mind."
+ if(25 to 45)
+ target << "Your blood boils and your body burns as the corruption further forces itself into your body and mind."
+ if(45 to 75)
+ target << "You begin to hallucinate images of a dark and incomprehensible being and your entire body feels like its engulfed in flame as your mental defenses crumble."
+ target.apply_effect(rand(1,10), STUTTER)
+ if(75 to 100)
+ target << "Your mind turns to ash as the burning flames engulf your very soul and images of an unspeakable horror begin to bombard the last remnants of mental resistance."
+ //broken mind - 5000 may seem like a lot I wanted the effect to really stand out for maxiumum losing-your-mind-spooky
+ //hallucination is reduced when the step off as well, provided they haven't hit the last stage...
+ target.hallucination += 5000
+ target.apply_effect(10, STUTTER)
+ target.adjustBrainLoss(1)
+ if(100 to INFINITY)
+ target << "Your entire broken soul and being is engulfed in corruption and flames as your mind shatters away into nothing."
+ target.hallucination += 5000
+ target.apply_effect(15, STUTTER)
+ target.adjustBrainLoss(rand(1,5))
+ initial_message = 1
+ if (target.species && (target.species.flags & NO_PAIN))
+ target.visible_message("The markings below [target] glow a bloody red.")
+ else
+ target.visible_message("[target] writhes in pain as the markings below \him glow a bloody red.", "AAAAAAHHHH!", "You hear an anguished scream.")
+ if(!waiting_for_input[target]) //so we don't spam them with dialogs if they hesitate
+ waiting_for_input[target] = 1
+
+ if(!is_convertable_to_cult(target.mind) || jobban_isbanned(target, "cultist"))//putting jobban check here because is_convertable uses mind as argument
+ //waiting_for_input ensures this is only shown once, so they basically auto-resist from here on out. They still need to find a way to get off the freaking rune if they don't want to burn to death, though.
+ target << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root."
+ target << "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs."
+
+ else spawn()
+ var/choice = alert(target,"Do you want to join the cult?","Submit to Nar'Sie","Resist","Submit")
+ waiting_for_input[target] = 0
+ if(choice == "Submit") //choosing 'Resist' does nothing of course.
+ ticker.mode.add_cultist(target.mind)
+ target.mind.special_role = "Cultist"
+ target << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root."
+ target << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back."
+ converting -= target
+ target.hallucination = 0 //sudden clarity
+
+ sleep(100) //proc once every 10 seconds
+ return 1
/////////////////////////////////////////FOURTH RUNE
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 1a20fd29efe..bb997733625 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -158,7 +158,7 @@
for(var/mob/living/silicon/ai/O in living_mob_list)
if(!O.client) continue
if(U.name == "Unknown") O << "[U] holds \a [itemname] up to one of your cameras ..."
- else O << "[U] holds \a [itemname] up to one of your cameras ..."
+ else O << "[U] holds \a [itemname] up to one of your cameras ..."
O << browse(text("[][]", itemname, info), text("window=[]", itemname))
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index e341a8fc7f4..222975316f6 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -5,26 +5,32 @@
icon = 'icons/obj/holosign.dmi'
icon_state = "sign_off"
layer = 4
+ idle_power_usage = 2
var/lit = 0
var/id = null
var/on_icon = "sign_on"
- proc/toggle()
- if (stat & (BROKEN|NOPOWER))
- return
- lit = !lit
- update_icon()
-
+/obj/machinery/holosign/proc/toggle()
+ if (stat & (BROKEN|NOPOWER))
+ return
+ lit = !lit
+ use_power = lit ? 1 : 0
update_icon()
- if (!lit)
- icon_state = "sign_off"
- else
- icon_state = on_icon
- power_change()
- if (stat & NOPOWER)
- lit = 0
- update_icon()
+/obj/machinery/holosign/process()
+ return
+
+/obj/machinery/holosign/update_icon()
+ if (!lit)
+ icon_state = "sign_off"
+ else
+ icon_state = on_icon
+
+/obj/machinery/holosign/power_change()
+ if (stat & NOPOWER)
+ lit = 0
+ use_power = 0
+ update_icon()
/obj/machinery/holosign/surgery
name = "surgery holosign"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 14c70df7921..6b079ef1acb 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -669,6 +669,17 @@ var/list/admin_verbs_mentor = list(
log_admin("[key_name(usr)] used 'kill air'.")
message_admins("\blue [key_name_admin(usr)] used 'kill air'.", 1)
+/client/proc/readmin_self()
+ set name = "Re-Admin self"
+ set category = "Admin"
+
+ if(deadmin_holder)
+ deadmin_holder.reassociate()
+ log_admin("[src] re-admined themself.")
+ message_admins("[src] re-admined themself.", 1)
+ src << "You now have the keys to control the planet, or atleast a small space station"
+ verbs -= /client/proc/readmin_self
+
/client/proc/deadmin_self()
set name = "De-admin self"
set category = "Admin"
@@ -679,6 +690,7 @@ var/list/admin_verbs_mentor = list(
message_admins("[src] deadmined themself.", 1)
deadmin()
src << "You are now a normal player."
+ verbs |= /client/proc/readmin_self
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggle_log_hrefs()
diff --git a/code/modules/admin/holder2.dm b/code/modules/admin/holder2.dm
index f5e2ac61cd3..d1cc15b0fe1 100644
--- a/code/modules/admin/holder2.dm
+++ b/code/modules/admin/holder2.dm
@@ -34,8 +34,16 @@ var/list/admin_datums = list()
if(owner)
admins -= owner
owner.remove_admin_verbs()
+ owner.deadmin_holder = owner.holder
owner.holder = null
- owner = null
+
+/datum/admins/proc/reassociate()
+ if(owner)
+ admins += owner
+ owner.holder = src
+ owner.deadmin_holder = null
+ owner.add_admin_verbs()
+
/*
checks if usr is an admin with at least ONE of the flags in rights_required. (Note, they don't need all the flags)
@@ -82,8 +90,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
/client/proc/deadmin()
- admin_datums -= ckey
if(holder)
holder.disassociate()
- del(holder)
+ //del(holder)
return 1
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 81f53ec4d27..1155882b82e 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -3,6 +3,7 @@
//ADMIN THINGS//
////////////////
var/datum/admins/holder = null
+ var/datum/admins/deadmin_holder = null
var/buildmode = 0
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
diff --git a/code/modules/events/event_manager.dm b/code/modules/events/event_manager.dm
index 806e9a331e4..85ee89a89ab 100644
--- a/code/modules/events/event_manager.dm
+++ b/code/modules/events/event_manager.dm
@@ -32,7 +32,7 @@
EC.process()
/datum/event_manager/proc/event_complete(var/datum/event/E)
- if(!E.event_meta) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
+ if(!E.event_meta || !E.severity) // datum/event is used here and there for random reasons, maintaining "backwards compatibility"
log_debug("Event of '[E.type]' with missing meta-data has completed.")
return
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 69faad2d8d5..15ad0b6bfd8 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -109,11 +109,11 @@ Please contact me on #coderbus IRC. ~Carn x
#define DAMAGE_LAYER 2
#define SURGERY_LEVEL 3 //bs12 specific.
#define UNIFORM_LAYER 4
-#define TAIL_LAYER 5 //bs12 specific. this hack is probably gonna come back to haunt me
-#define ID_LAYER 6
-#define SHOES_LAYER 7
-#define GLOVES_LAYER 8
-#define SUIT_LAYER 9
+#define ID_LAYER 5
+#define SHOES_LAYER 6
+#define GLOVES_LAYER 7
+#define SUIT_LAYER 8
+#define TAIL_LAYER 9 //bs12 specific. this hack is probably gonna come back to haunt me
#define GLASSES_LAYER 10
#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 12
@@ -920,7 +920,7 @@ proc/get_damage_icon_part(damage_state, body_part)
/mob/living/carbon/human/update_fire(var/update_icons=1)
overlays_standing[FIRE_LAYER] = null
if(on_fire)
- overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=-FIRE_LAYER)
+ overlays_standing[FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"=FIRE_LAYER)
if(update_icons) update_icons()
@@ -974,12 +974,12 @@ proc/get_damage_icon_part(damage_state, body_part)
#undef DAMAGE_LAYER
#undef SURGERY_LEVEL
#undef UNIFORM_LAYER
-#undef TAIL_LAYER
#undef ID_LAYER
#undef SHOES_LAYER
#undef GLOVES_LAYER
#undef EARS_LAYER
#undef SUIT_LAYER
+#undef TAIL_LAYER
#undef GLASSES_LAYER
#undef FACEMASK_LAYER
#undef BELT_LAYER
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 720abe8e2ad..61959ab49c5 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -858,13 +858,15 @@ note dizziness decrements automatically in the mob's Life() proc.
canmove = 1
pixel_y = V.mob_offset_y
else if(buckled)
- if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
- if (!buckled.buckle_movable)
- anchored = 1
- canmove = 0
- else
- anchored = 0
- canmove = 1
+ anchored = 1
+ canmove = 0
+ if(istype(buckled))
+ if(buckled.buckle_lying != -1)
+ lying = buckled.buckle_lying
+ if(buckled.buckle_movable)
+ anchored = 0
+ canmove = 1
+
else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH))
lying = 1
canmove = 0
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 1bf0e17e57e..47c3bb0f6cb 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -121,7 +121,7 @@
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null
- var/obj/structure/bed/buckled = null//Living
+ var/obj/buckled = null//Living
var/obj/item/l_hand = null//Living
var/obj/item/r_hand = null//Living
var/obj/item/weapon/back = null//Human/Monkey
diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm
index 0a588e9b51a..2c86343515b 100644
--- a/code/modules/nano/nanoui.dm
+++ b/code/modules/nano/nanoui.dm
@@ -392,6 +392,9 @@ nanoui is used to open and update nano browser uis
* @return nothing
*/
/datum/nanoui/proc/open()
+ if(!user.client)
+ return
+
var/window_size = ""
if (width && height)
window_size = "size=[width]x[height];"
diff --git a/code/modules/organs/blood.dm b/code/modules/organs/blood.dm
index ac9b3131cd5..b04d631046d 100644
--- a/code/modules/organs/blood.dm
+++ b/code/modules/organs/blood.dm
@@ -97,7 +97,7 @@ var/const/BLOOD_VOLUME_SURVIVE = 122
if(!pale)
pale = 1
update_body()
- eye_blurry += 6
+ eye_blurry = max(eye_blurry,6)
if(oxyloss < 50)
oxyloss += 10
oxyloss += 1
@@ -329,4 +329,4 @@ proc/blood_splatter(var/target,var/datum/reagent/blood/source,var/large)
if(source.data["virus2"])
B.virus2 = virus_copylist(source.data["virus2"])
- return B
\ No newline at end of file
+ return B
diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm
index af2b9f93682..8575d637545 100644
--- a/code/modules/projectiles/guns/projectile/automatic.dm
+++ b/code/modules/projectiles/guns/projectile/automatic.dm
@@ -87,7 +87,7 @@
/obj/item/weapon/gun/projectile/automatic/z8
name = "\improper Z8 Bulldog"
- desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds and has an underslung grenade launcher. Makes you feel like a space marine when you hold it."
+ desc = "An older model bullpup carbine, made by the now defunct Zendai Foundries. Uses armor piercing 5.56mm rounds. Makes you feel like a space marine when you hold it."
icon_state = "carbine"
item_state = "shotgun"
w_class = 4
diff --git a/code/modules/virus2/helpers.dm b/code/modules/virus2/helpers.dm
index a9ffedbca11..feb7aec6a63 100644
--- a/code/modules/virus2/helpers.dm
+++ b/code/modules/virus2/helpers.dm
@@ -11,16 +11,17 @@ proc/infection_check(var/mob/living/carbon/M, var/vector = "Airborne")
if(M.internal)
score = 6 //not breathing infected air helps greatly
var/obj/item/I = M.wear_mask
-
+
//masks provide a small bonus and can replace overall bio protection
- score = max(score, round(0.06*I.armor["bio"]))
- if (istype(I, /obj/item/clothing/mask))
- score += 1 //this should be added after
-
+ if(I)
+ score = max(score, round(0.06*I.armor["bio"]))
+ if (istype(I, /obj/item/clothing/mask))
+ score += 1 //this should be added after
+
if("Contact")
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
-
+
//gloves provide a larger bonus
if (istype(H.gloves, /obj/item/clothing/gloves))
score += 2
@@ -45,12 +46,12 @@ proc/infection_check(var/mob/living/carbon/M, var/vector = "Airborne")
return 0
var/protection = M.getarmor(null, "bio") //gets the full body bio armour value, weighted by body part coverage.
-
+
if (vector == "Airborne")
var/obj/item/I = M.wear_mask
if (istype(I))
protection = max(protection, round(0.06*I.armor["bio"]))
-
+
return prob(protection)
//Checks if table-passing table can reach target (5 tile radius)
@@ -134,7 +135,7 @@ proc/airborne_can_reach(turf/source, turf/target)
// log_debug("Attempting virus [ID]")
var/datum/disease2/disease/V = virus2[ID]
if(V.spreadtype != vector) continue
-
+
//It's hard to get other people sick if you're in an airtight suit.
if(!infection_spreading_check(src, V.spreadtype)) continue
diff --git a/code/stylesheet.dm b/code/stylesheet.dm
index 5bb538a3dc7..ea4ac29fc3a 100644
--- a/code/stylesheet.dm
+++ b/code/stylesheet.dm
@@ -70,12 +70,13 @@ h1.alert, h2.alert {color: #000000;}
.disarm {color: #990000;}
.passive {color: #660000;}
-.danger {color: #ff0000; font-weight: bold;}
-.warning {color: #ff0000; font-style: italic;}
+.danger {color: #ff0000; font-weight: bold;}
+.warning {color: #ff0000; font-style: italic;}
.rose {color: #ff5050;}
.info {color: #0000CC;}
.notice {color: #000099;}
.alium {color: #00ff00;}
+.cult {color: #800080; font-weight: bold; font-style: italic;}
/* Languages */