diff --git a/code/WorkInProgress/KeelinsStuff.dm b/code/WorkInProgress/KeelinsStuff.dm
index 6aedd62708..170b7c244c 100644
--- a/code/WorkInProgress/KeelinsStuff.dm
+++ b/code/WorkInProgress/KeelinsStuff.dm
@@ -308,10 +308,11 @@
var/turf/T = M.loc
var/holding = M.equipped()
sleep(time)
- if ((M.loc == T && M.equipped() == holding && !( M.stat )))
- return 1
- else
- return 0
+ if(M)
+ if ((M.loc == T && M.equipped() == holding && !( M.stat )))
+ return 1
+ else
+ return 0
/proc/hasvar(var/datum/A, var/varname)
//Takes: Anything that could possibly have variables and a varname to check.
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 7094066fc6..4822df51ca 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -4,7 +4,7 @@
var/g_amt = 0 // glass
var/w_amt = 0 // waster amounts
animate_movement = 2
-
+ var/throwforce = 0
proc
handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
//Return: (NONSTANDARD)
@@ -243,7 +243,6 @@
var/force = null
var/item_state = null
var/damtype = "brute"
- var/throwforce = 10
var/r_speed = 1.0
var/health = null
var/burn_point = null
diff --git a/code/game/dna.dm b/code/game/dna.dm
index 17df988a7b..96f69f1db9 100644
--- a/code/game/dna.dm
+++ b/code/game/dna.dm
@@ -880,42 +880,44 @@
delete = 0
return null
///
- if (prob((80 + (src.radduration / 2))))
- if ((src.strucblock != 2 || src.strucblock != 12 || src.strucblock != 8 || src.strucblock || 10) && prob (20))
- oldblock = src.strucblock
- block = miniscramble(block, src.radstrength, src.radduration)
- newblock = null
- if (src.strucblock > 1 && src.strucblock < 5)
- src.strucblock++
- else if (src.strucblock > 5 && src.strucblock < 14)
- src.strucblock--
- if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
- if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
- if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + block
- tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
- src.connected.occupant.dna.struc_enzymes = tstructure2
- domutcheck(src.connected.occupant,src.connected)
- src.connected.occupant.radiation += (src.radstrength+src.radduration)
- src.strucblock = oldblock
- else
+ if(src.connected.occupant)
+ if (prob((80 + (src.radduration / 2))))
+ if ((src.strucblock != 2 || src.strucblock != 12 || src.strucblock != 8 || src.strucblock || 10) && prob (20))
+ oldblock = src.strucblock
+ block = miniscramble(block, src.radstrength, src.radduration)
+ newblock = null
+ if (src.strucblock > 1 && src.strucblock < 5)
+ src.strucblock++
+ else if (src.strucblock > 5 && src.strucblock < 14)
+ src.strucblock--
+ if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
+ if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
+ if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + block
+ tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
+ src.connected.occupant.dna.struc_enzymes = tstructure2
+ domutcheck(src.connected.occupant,src.connected)
+ src.connected.occupant.radiation += (src.radstrength+src.radduration)
+ src.strucblock = oldblock
+ else
//
- block = miniscramble(block, src.radstrength, src.radduration)
- newblock = null
- if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
- if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
- if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + block
- tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
- src.connected.occupant.dna.struc_enzymes = tstructure2
- domutcheck(src.connected.occupant,src.connected)
- src.connected.occupant.radiation += (src.radstrength+src.radduration)
- else
- if (prob(80-src.radduration))
- randmutb(src.connected.occupant)
- domutcheck(src.connected.occupant,src.connected)
+ block = miniscramble(block, src.radstrength, src.radduration)
+ newblock = null
+ if (src.subblock == 1) newblock = block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
+ if (src.subblock == 2) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + block + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),3,1)
+ if (src.subblock == 3) newblock = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),1,1) + getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),2,1) + block
+ tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
+ src.connected.occupant.dna.struc_enzymes = tstructure2
+ domutcheck(src.connected.occupant,src.connected)
+ src.connected.occupant.radiation += (src.radstrength+src.radduration)
else
- randmuti(src.connected.occupant)
- updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
- src.connected.occupant.radiation += ((src.radstrength*2)+src.radduration)
+ if (prob(80-src.radduration))
+ randmutb(src.connected.occupant)
+ domutcheck(src.connected.occupant,src.connected)
+ else
+ randmuti(src.connected.occupant)
+ updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity)
+ src.connected.occupant.radiation += ((src.radstrength*2)+src.radduration)
+
///
dopage(src,"strucmenu")
src.delete = 0
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index f995a95053..e6626edac4 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -179,7 +179,8 @@
var/changelingwin = 1
var/changeling_name
var/totalabsorbed = 0
- totalabsorbed = changeling.current.absorbed_dna.len
+ if (changeling.current)
+ totalabsorbed = changeling.current.absorbed_dna.len
if(changeling.current)
changeling_name = "[changeling.current.real_name] (played by [changeling.key])"
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index e4689a1ac4..367a7d13e3 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -342,10 +342,12 @@
*/
// These reagents are copied from the sleepy-pen, testing for the changeling super-sting bio upgrade
-
- T.reagents.add_reagent("stoxin", 100)
- T.reagents.add_reagent("impedrezene", 100)
- T.reagents.add_reagent("cryptobiolin", 100)
+ if (T.reagents)
+ T.reagents.add_reagent("stoxin", 100)
+ T.reagents.add_reagent("impedrezene", 100)
+ T.reagents.add_reagent("cryptobiolin", 100)
+ else
+ usr << "This is a debug message you are getting because you have attempted to sting something that lacks a reagent container. Bug the guy that did the changeling code until he fixes it."
usr.verbs -= /client/proc/changeling_neurotoxic_sting
@@ -366,7 +368,11 @@
usr << "\blue We stealthily sting [T]."
spawn(50) //Give the changeling a chance to calmly walk away before the target FREAKS THE FUCK OUT
+ if (T.reagents)
T.reagents.add_reagent("space_drugs", 5)
+ else
+ usr << "This is a debug message you are getting because you have attempted to sting something that lacks a reagent container. Bug the guy that did the changeling code until he fixes it."
+
usr.verbs -= /client/proc/changeling_hallucinogenic_sting
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 9aa271949a..5db6ebd781 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -54,10 +54,10 @@
/datum/game_mode/proc/equip_traitor(mob/living/carbon/human/traitor_mob)
if (!istype(traitor_mob))
return
-
- if (traitor_mob.mind.assigned_role == "Clown")
- traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
- traitor_mob.mutations &= ~16
+ if (traitor_mob.mind)
+ if (traitor_mob.mind.assigned_role == "Clown")
+ traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
+ traitor_mob.mutations &= ~16
// generate list of radio freqs
var/freq = 1441
var/list/freqlist = list()
diff --git a/code/game/hud.dm b/code/game/hud.dm
index 23ca85cb60..176ddf0999 100644
--- a/code/game/hud.dm
+++ b/code/game/hud.dm
@@ -57,11 +57,12 @@ obj/hud/New(var/type = 0)
// if(mymob:w_radio) mymob:w_radio:screen_loc = ui_headset
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
else
- if(mymob:shoes) mymob:shoes:screen_loc = null
- if(mymob:gloves) mymob:gloves:screen_loc = null
- if(mymob:ears) mymob:ears:screen_loc = null
+ if(istype(mymob, /mob/living/carbon/human))
+ if(mymob:shoes) mymob:shoes:screen_loc = null
+ if(mymob:gloves) mymob:gloves:screen_loc = null
+ if(mymob:ears) mymob:ears:screen_loc = null
// if(mymob:w_radio) mymob:w_radio:screen_loc = null
- if(mymob:glasses) mymob:glasses:screen_loc = null
+ if(mymob:glasses) mymob:glasses:screen_loc = null
/obj/hud/var/show_otherinventory = 1
diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm
index c7207123d6..3c9872d266 100644
--- a/code/game/machinery/atmoalter/portable_atmospherics.dm
+++ b/code/game/machinery/atmoalter/portable_atmospherics.dm
@@ -7,7 +7,6 @@
var/volume = 0
var/destroyed = 0
- var/throwforce = 0
var/maximum_pressure = 90*ONE_ATMOSPHERE
diff --git a/code/game/machinery/computer/AIcore.dm b/code/game/machinery/computer/AIcore.dm
index 1fc6b93a31..1351175728 100644
--- a/code/game/machinery/computer/AIcore.dm
+++ b/code/game/machinery/computer/AIcore.dm
@@ -8,7 +8,6 @@
var/datum/ai_laws/laws = new /datum/ai_laws/asimov
var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/brain/brain = null
- var/throwforce = 0
/obj/AIcore/attackby(obj/item/weapon/P as obj, mob/user as mob)
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index c3982f53f0..01fdc2ebd0 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -288,7 +288,8 @@ Pod/Blast Doors computer
t1 = input("Enter a custom job assignment.","Assignment")
else
src.modify.access = get_access(t1)
- src.modify.assignment = t1
+ if (src.modify)
+ src.modify.assignment = t1
if (href_list["reg"])
if (src.authenticated)
var/t2 = src.modify
diff --git a/code/game/machinery/gibber.dm b/code/game/machinery/gibber.dm
index 81eabed6b9..4e4d00595d 100644
--- a/code/game/machinery/gibber.dm
+++ b/code/game/machinery/gibber.dm
@@ -32,15 +32,16 @@
user.visible_message("\red [user] starts to put [G.affecting] into the gibber!")
src.add_fingerprint(user)
sleep(30)
- if(G.affecting)
- user.visible_message("\red [user] stuffs [G.affecting] into the gibber!")
- var/mob/M = G.affecting
- if(M.client)
- M.client.perspective = EYE_PERSPECTIVE
- M.client.eye = src
- M.loc = src
- src.occupant = M
- del(G)
+ if(G)
+ if(G.affecting)
+ user.visible_message("\red [user] stuffs [G.affecting] into the gibber!")
+ var/mob/M = G.affecting
+ if(M.client)
+ M.client.perspective = EYE_PERSPECTIVE
+ M.client.eye = src
+ M.loc = src
+ src.occupant = M
+ del(G)
/obj/machinery/gibber/verb/eject()
set src in oview(1)
diff --git a/code/game/machinery/microwave.dm b/code/game/machinery/microwave.dm
index b3c1aa129b..5d4e0323cc 100644
--- a/code/game/machinery/microwave.dm
+++ b/code/game/machinery/microwave.dm
@@ -272,7 +272,10 @@ Please clean it before use!
V.show_message(text("\blue The microwave turns on."))
for(var/datum/recipe/R in src.available_recipes) //Look through the recipe list we made above
if(src.egg_amount == R.egg_amount && src.flour_amount == R.flour_amount && src.monkeymeat_amount == R.monkeymeat_amount && src.humanmeat_amount == R.humanmeat_amount && src.donkpocket_amount == R.donkpocket_amount && src.xenomeat_amount == R.xenomeat_amount) // Check if it's an accepted recipe
- if(R.extra_item == null || src.extra_item.type == R.extra_item) // Just in case the recipe doesn't have an extra item in it
+ var/thing
+ if(src.extra_item)
+ if (src.extra_item.type == R.extra_item) thing = 1
+ if(R.extra_item == null || thing) // Just in case the recipe doesn't have an extra item in it
src.egg_amount = 0 // If so remove all the eggs
src.flour_amount = 0 // And the flour
src.water_amount = 0 //And the water
diff --git a/code/game/machinery/morgue.dm b/code/game/machinery/morgue.dm
index 5906754bcd..3cdd88b526 100644
--- a/code/game/machinery/morgue.dm
+++ b/code/game/machinery/morgue.dm
@@ -280,16 +280,17 @@
del(M)
else if (istype(M,/mob/living) && !(M:client)) //
spawn(0)
- var/i
- M:stunned = 100
- for(i=0, i<10, i++)
- sleep(10)
- M:fireloss += 50
- new /obj/decal/ash(M:loc)
- for (var/obj/item/weapon/W in M)
- if (prob(10))
- W.loc = M:loc
- del(M)
+ if(M)
+ var/i
+ M:stunned = 100
+ for(i=0, i<10, i++)
+ sleep(10)
+ M:fireloss += 50
+ new /obj/decal/ash(M:loc)
+ for (var/obj/item/weapon/W in M)
+ if (prob(10))
+ W.loc = M:loc
+ del(M)
for (var/mob/M in viewers(user))
M.show_message("\red You hear a roar as the crematorium activates.", 1)
spawn(100)
diff --git a/code/game/magic/ritual.dm b/code/game/magic/ritual.dm
index d74e013a9a..e8430c2801 100644
--- a/code/game/magic/ritual.dm
+++ b/code/game/magic/ritual.dm
@@ -34,26 +34,15 @@ var/list/cultists = list()
..()
return
- attackby(I as obj, user as mob)
- if(istype(I, /obj/item/weapon/tome) && cultists.Find(user))
- user << "You retrace your steps, carefully undoing the lines of the rune."
- del(src)
- return
- else if(istype(I, /obj/item/weapon/storage/bible) && usr.mind && (usr.mind.assigned_role == "Chaplain"))
- user << "\blue You banish the vile magic with the blessing of God!"
- del(src)
- return
- return
+
attack_hand(mob/user as mob)
if(!cultists.Find(user))
user << "You can't mouth the arcane scratchings without fumbling over them."
return
- if(!word1 || !word2 || !word3 || prob(usr.brainloss))
+ if(!word1 || !word2 || !word3)
return fizzle()
-
if(word1 == "ire" && word2 == "ego")
- usr.say("Sas'so c'arta forbici!")
for(var/obj/rune/R in world)
if(R == src)
continue
@@ -64,19 +53,16 @@ var/list/cultists = list()
return
return fizzle()
if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum")
- usr.say("N'ath reth sh'yro eth d'raggathnor!")
for (var/mob/V in viewers(src))
V.show_message("\red There's a flash of red light. The rune disappears, and in its place a book lies", 3, "\red You hear a pop and smell ozone.", 2)
new /obj/item/weapon/tome(src.loc)
del(src)
-
-/*
- if(word1 == "ire" && word2 == "certum" && word3 == "jatkaa")
+ /*
var/list/temprunes = list()
var/list/runes = list()
for(var/obj/rune/R in world)
if(istype(R, /obj/rune))
- if(R.word1 == "ire" && R.word2 == "certum" && R.word3 == "jatkaa")
+ if(R.word1 == "nahlizet" && R.word2 == "veri" && R.word3 == "certum")
runes.Add(R)
var/atom/a = get_turf_loc(R)
temprunes.Add(a.loc)
@@ -85,13 +71,13 @@ var/list/cultists = list()
return fizzle()
var/selection_position = temprunes.Find(chosen)
var/obj/rune/chosenrune = runes[selection_position]
- user.client.eye = chosenrune
+// user.client.eye = chosenrune
user:current = chosenrune
user.reset_view(chosenrune)
-*/
+
return
+ */
if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego")
- usr.say("Mah'weyh pleggh at e'ntrath!")
for(var/mob/M in src.loc)
if(cultists.Find(M))
return fizzle()
@@ -103,7 +89,6 @@ var/list/cultists = list()
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
if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego")
- usr.say("Tok-lyr rqa'nap g'lt-ulotf!")
var/cultist_count = 0
for(var/mob/M in orange(1,src))
if(cultists.Find(M))
@@ -119,198 +104,9 @@ var/list/cultists = list()
return
else
return fizzle()
- if(word1 == "nahlizet" && word2 == "ire" && word3 == "certum")
- usr.say("ta'gh fara'qha fel d'amar det!")
- playsound(src.loc, 'Welder2.ogg', 25, 1)
- var/turf/T = get_turf(src)
- if(T)
- T.hotspot_expose(700,125)
-
- var/rune = src // detaching the proc - in theory
- src = null
-
- var/obj/overlay/pulse = new/obj/overlay ( T )
- pulse.icon = 'effects.dmi'
- pulse.icon_state = "emppulse"
- pulse.name = "emp pulse"
- pulse.anchored = 1
- spawn(20)
- del(pulse)
-
- for(var/obj/item/weapon/W in range(world.view-1, T))
-
- if (istype(W, /obj/item/assembly/m_i_ptank) || istype(W, /obj/item/assembly/r_i_ptank) || istype(W, /obj/item/assembly/t_i_ptank))
-
- var/fuckthis
- if(istype(W:part1,/obj/item/weapon/tank/plasma))
- fuckthis = W:part1
- fuckthis:ignite()
- if(istype(W:part2,/obj/item/weapon/tank/plasma))
- fuckthis = W:part2
- fuckthis:ignite()
- if(istype(W:part3,/obj/item/weapon/tank/plasma))
- fuckthis = W:part3
- fuckthis:ignite()
-
-
- for(var/mob/living/M in viewers(world.view-1, T))
-
- if(!istype(M, /mob/living)) continue
-
- if (istype(M, /mob/living/silicon))
- M.fireloss += 25
- flick("noise", M:flash)
- M << "\red *BZZZT*"
- M << "\red Warning: Electromagnetic pulse detected."
- if(istype(M, /mob/living/silicon/ai))
- if (prob(30))
- switch(pick(1,2,3)) //Add Random laws.
- if(1)
- M:cancel_camera()
- if(2)
- M:lockdown()
- if(3)
- M:ai_call_shuttle()
- continue
-
-
- M << "\red Your equipment malfunctions." //Yeah, i realise that this WILL
- //show if theyre not carrying anything
- //that is affected. lazy.
- if (locate(/obj/item/weapon/cloaking_device, M))
- for(var/obj/item/weapon/cloaking_device/S in M)
- S.active = 0
- S.icon_state = "shield0"
-
- if (locate(/obj/item/weapon/gun/energy, M))
- for(var/obj/item/weapon/gun/energy/G in M)
- G.charges = 0
- G.update_icon()
-
- if ((istype(M, /mob/living/carbon/human)) && (istype(M:glasses, /obj/item/clothing/glasses/thermal)))
- M << "\red Your thermals malfunction."
- M.eye_blind = 3
- M.eye_blurry = 5
- M.disabilities |= 1
- spawn(100)
- M.disabilities &= ~1
-
- if (locate(/obj/item/device/radio, M))
- for(var/obj/item/device/radio/R in M) //Add something for the intercoms.
- R.broadcasting = 0
- R.listening = 0
-
- if (locate(/obj/item/device/flash, M))
- for(var/obj/item/device/flash/F in M) //Add something for the intercoms.
- F.attack_self()
-
- if (locate(/obj/item/weapon/baton, M))
- for(var/obj/item/weapon/baton/B in M) //Add something for the intercoms.
- B.charges = 0
-
- if(locate(/obj/item/clothing/under/chameleon, M))
- for(var/obj/item/clothing/under/chameleon/C in M) //Add something for the intercoms.
- M << "\red Your jumpsuit malfunctions"
- C.name = "psychedelic"
- C.desc = "Groovy!"
- C.icon_state = "psyche"
- C.color = "psyche"
- spawn(200)
- C.name = "Black Jumpsuit"
- C.icon_state = "bl_suit"
- C.color = "black"
- C.desc = null
-
- M << "\red BZZZT"
-
-
- for(var/obj/machinery/A in range(world.view-1, T))
- A.use_power(7500)
-
- var/obj/overlay/pulse2 = new/obj/overlay ( A.loc )
- pulse2.icon = 'effects.dmi'
- pulse2.icon_state = "empdisable"
- pulse2.name = "emp sparks"
- pulse2.anchored = 1
- pulse2.dir = pick(cardinal)
-
- spawn(10)
- del(pulse2)
-
- if(istype(A, /obj/machinery/turret))
- A:enabled = 0
- A:lasers = 0
- A:power_change()
-
- if(istype(A, /obj/machinery/computer) && prob(20))
- A:set_broken()
-
- if(istype(A, /obj/machinery/firealarm) && prob(50))
- A:alarm()
-
- if(istype(A, /obj/machinery/power/smes))
- A:online = 0
- A:charging = 0
- A:output = 0
- A:charge -= 1e6
- if (A:charge < 0)
- A:charge = 0
- spawn(100)
- A:output = initial(A:output)
- A:charging = initial(A:charging)
- A:online = initial(A:online)
-
- if(istype(A, /obj/machinery/door))
- if(prob(20) && (istype(A,/obj/machinery/door/airlock) || istype(A,/obj/machinery/door/window)) )
- A:open()
- if(prob(40))
- if(A:secondsElectrified != 0) continue
- A:secondsElectrified = -1
- spawn(300)
- A:secondsElectrified = 0
-
- if(istype(A, /obj/machinery/power/apc))
- if(A:cell)
- A:cell:charge -= 1000
- if (A:cell:charge < 0)
- A:cell:charge = 0
- A:lighting = 0
- A:equipment = 0
- A:environ = 0
- spawn(600)
- A:equipment = 3
- A:environ = 3
-
- if(istype(A, /obj/machinery/camera))
- A.icon_state = "cameraemp"
- A:network = null //Not the best way but it will do. I think.
- spawn(900)
- A:network = initial(A:network)
- A:icon_state = initial(A:icon_state)
- for(var/mob/living/silicon/ai/O in world)
- if (O.current == A)
- O.cancel_camera()
- O << "Your connection to the camera has been lost."
- for(var/mob/O in world)
- if (istype(O.machine, /obj/machinery/computer/security))
- var/obj/machinery/computer/security/S = O.machine
- if (S.current == A)
- O.machine = null
- S.current = null
- O.reset_view(null)
- O << "The screen bursts into static."
-
- if(istype(A, /obj/machinery/clonepod))
- A:malfunction()
- del(rune)
- return
- else
- return fizzle()
-
proc
fizzle()
- usr.say(pick("B'ADMINES SP'WNIN SH'T","IC'IN O'OC","RO'SHA'M I'SA GRI'FF'N ME'AI","TOX'IN'S O'NM FI'RAH","IA BL'AME TOX'IN'S","FIR'A NON'AN RE'SONA","A'OI I'RS ROUA'GE","LE'OAN JU'STA SP'A'C Z'EE SH'EF","IA PT'WOBEA'RD, IA A'DMI'NEH'LP"))
for (var/mob/V in viewers(src))
V.show_message("\red The markings pulse with a small burst of light, then fall dark.", 3, "\red You hear a faint fizzle.", 2)
return
@@ -319,17 +115,13 @@ var/list/cultists = list()
if(word1 == "ire" && word2 == "ego")
icon_state = "2"
return
- if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego")
+ if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum")
icon_state = "3"
return
if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego")
icon_state = "3"
src.icon += rgb(100, 0 , 150)
return
- if(word1 == "nahlizet" && word2 == "ire" && word3 == "certum")
- icon_state = "2"
- src.icon += rgb(0, 50 , 0)
- return
icon_state = "1"
@@ -343,37 +135,26 @@ var/list/cultists = list()
attack_self(mob/user as mob)
if(cultists.Find(user))
- var/C = 0
- for(var/obj/rune/N in world)
- C++
- if (C>=25)
- switch(alert("The cloth of reality can't take that much of a strain. By creating another rune, you risk locally tearing reality apart, which would prove fatal to you. Do you still wish to scribe the rune?",,"Yes","No"))
- if("Yes")
- if(prob(C*5-100))
- usr.emote("scream")
- user << "\red A tear momentarily appears in reality. Before it closes, you catch a glimpse of that which lies beyond. That proves to be too much for your mind."
- usr.gib(1)
- return
- if("No")
- return
- else
- if(alert("Scribe a rune?",,"Yes","No")=="No")
- return
+ var/choice = input("Scribe a rune on the ground here?", "Rune Scribing") in list("Yes", "No")
+ if(choice == "No")
+ return
+ var/w1
+ var/w2
+ var/w3
var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa")
- var/w1 = input("Write your first rune:", "Rune Scribing") in words
- var/w2 = input("Write your second rune:", "Rune Scribing") in words
- var/w3 = input("Write your third rune:", "Rune Scribing") in words
+ if(usr)
+ w1 = input("Write your first rune:", "Rune Scribing") in words
+ if(usr)
+ w2 = input("Write your second rune:", "Rune Scribing") in words
+ if(usr)
+ w3 = input("Write your third rune:", "Rune Scribing") in words
+ var/obj/rune/R = new /obj/rune(user.loc)
+ R.word1 = w1
+ R.word2 = w2
+ R.word3 = w3
+ R.check_icon()
for (var/mob/V in viewers(src))
- V.show_message("\red [user] slices open a finger and begins to chant and paint symbols on the floor.", 3, "\red You hear chanting.", 2)
- user << "\red You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world."
- user.bruteloss += 1
- if(do_after(user, 50))
- var/obj/rune/R = new /obj/rune(user.loc)
- user << "\red You finish drawing the arcane markings of the Geometer."
- R.word1 = w1
- R.word2 = w2
- R.word3 = w3
- R.check_icon()
+ V.show_message("\red [user] slices open a finger and paints symbols on the floor.", 3, "\red You hear someone drawing on a surface.", 2)
return
else
user << "The book seems full of illegible scribbles. Is this a joke?"
@@ -381,10 +162,7 @@ var/list/cultists = list()
examine()
set src in usr
- if(!cultists.Find(usr))
- usr << "An old, dusty tome with frayed edges and a sinister looking cover."
- else
- usr << "The scriptures of Nar-Sie, The One Who Sees, The Geometer of Blood. Contains the details of every ritual his followers could think of. Most of these are useless, though."
+ usr << "An old, dusty tome with frayed edges and a sinister looking cover."
/obj/item/weapon/paperscrap
diff --git a/code/game/objects/assemblies.dm b/code/game/objects/assemblies.dm
index 4159a799e7..c79e60282f 100644
--- a/code/game/objects/assemblies.dm
+++ b/code/game/objects/assemblies.dm
@@ -79,8 +79,9 @@
if(href_list["open"])
toggle_valve()
if(href_list["rem_device"])
- attached_device.loc = get_turf(src)
- attached_device = null
+ if(attached_device)
+ attached_device.loc = get_turf(src)
+ attached_device = null
update_icon()
if(href_list["device"])
attached_device.attack_self(usr)
diff --git a/code/game/objects/devices/PDA.dm b/code/game/objects/devices/PDA.dm
index 1a315e6a83..914e5a36c2 100644
--- a/code/game/objects/devices/PDA.dm
+++ b/code/game/objects/devices/PDA.dm
@@ -1206,30 +1206,31 @@ Code:
else if (href_list["detonate"] && istype(src.cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["detonate"])
- if (!P.toff && src.cartridge:shock_charges > 0)
- src.cartridge:shock_charges--
+ if(P)
+ if (!P.toff && src.cartridge:shock_charges > 0)
+ src.cartridge:shock_charges--
- var/difficulty = 0
+ var/difficulty = 0
- if (!isnull(P.cartridge))
- difficulty += P.cartridge.access_medical
- difficulty += P.cartridge.access_security
- difficulty += P.cartridge.access_engine
- difficulty += P.cartridge.access_clown
- difficulty += P.cartridge.access_janitor
- difficulty += P.cartridge.access_manifest * 2
- else
- difficulty += 2
+ if (!isnull(P.cartridge))
+ difficulty += P.cartridge.access_medical
+ difficulty += P.cartridge.access_security
+ difficulty += P.cartridge.access_engine
+ difficulty += P.cartridge.access_clown
+ difficulty += P.cartridge.access_janitor
+ difficulty += P.cartridge.access_manifest * 2
+ else
+ difficulty += 2
- if ((prob(difficulty * 12)) || (P.uplink))
- usr.show_message("\red An error flashes on your [src].", 1)
- else if (prob(difficulty * 3))
- usr.show_message("\red Energy feeds back into your [src]!", 1)
- src.explode()
- else
- usr.show_message("\blue Success!", 1)
- P.explode()
- src.updateUsrDialog()
+ if ((prob(difficulty * 12)) || (P.uplink))
+ usr.show_message("\red An error flashes on your [src].", 1)
+ else if (prob(difficulty * 3))
+ usr.show_message("\red Energy feeds back into your [src]!", 1)
+ src.explode()
+ else
+ usr.show_message("\blue Success!", 1)
+ P.explode()
+ src.updateUsrDialog()
else if (href_list["sendhonk"] && istype(src.cartridge, /obj/item/weapon/cartridge/clown))
var/obj/item/device/pda/P = locate(href_list["sendhonk"])
diff --git a/code/game/objects/items/weapons/mops_cleaners.dm b/code/game/objects/items/weapons/mops_cleaners.dm
index 6b8feb86b8..0011f96b01 100644
--- a/code/game/objects/items/weapons/mops_cleaners.dm
+++ b/code/game/objects/items/weapons/mops_cleaners.dm
@@ -71,9 +71,10 @@ MOP
for(var/mob/O in viewers(user, null))
O.show_message(text("\red [user] begins to clean [A]"), 1)
sleep(20)
- user << "\blue You have finished mopping!"
- var/turf/U = A.loc
- src.reagents.reaction(U)
+ if(A)
+ user << "\blue You have finished mopping!"
+ var/turf/U = A.loc
+ src.reagents.reaction(U)
if(A) del(A)
mopcount++
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index 8b08cfc4ee..584daaa4e4 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -92,15 +92,16 @@ obj/structure
if (src.icon_state == "reinforced") //Time to finalize!
user << "\blue Now finalising reinforced wall."
sleep(50)
- if(get_turf(user) == T)
- user << "\blue Wall fully reinforced!"
- var/turf/Tsrc = get_turf(src)
- Tsrc.ReplaceWithRWall()
- W:amount--
- if (W:amount <= 0)
- del(W)
- del(src)
- return
+ if(W)
+ if(get_turf(user) == T)
+ user << "\blue Wall fully reinforced!"
+ var/turf/Tsrc = get_turf(src)
+ Tsrc.ReplaceWithRWall()
+ W:amount--
+ if (W:amount <= 0)
+ del(W)
+ del(src)
+ return
else
user << "\blue Now reinforcing girders"
sleep(60)
diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm
index 86b48d364c..42f7439df2 100644
--- a/code/game/objects/tank.dm
+++ b/code/game/objects/tank.dm
@@ -434,11 +434,13 @@
return
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank( user )
R.part1 = S.part1
- S.part1.loc = R
- S.part1.master = R
+ if (S.part1)
+ S.part1.loc = R
+ S.part1.master = R
R.part2 = S.part2
- S.part2.loc = R
- S.part2.master = R
+ if (S.part2)
+ S.part2.loc = R
+ S.part2.master = R
S.layer = initial(S.layer)
if (user.client)
user.client.screen -= S
diff --git a/code/game/turf.dm b/code/game/turf.dm
index e20a9b6e40..e0b880a855 100644
--- a/code/game/turf.dm
+++ b/code/game/turf.dm
@@ -337,10 +337,10 @@
playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100)
-
- if ((user.loc == T && user.equipped() == W))
- user << "\blue You disassembled the outer wall plating."
- dismantle_wall()
+ if (istype(src, /turf/simulated/wall))
+ if ((user.loc == T && user.equipped() == W))
+ user << "\blue You disassembled the outer wall plating."
+ dismantle_wall()
else
return attack_hand(user)
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index 68627c0567..563de932a8 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -685,12 +685,13 @@ var/showadminmessages = 1
if(M.mind in current_mode.traitors)
var/datum/mind/antagonist = M.mind
var/t = ""
- for(var/datum/objective/OB in antagonist.objectives)
- t += "[OB.explanation_text]\n"
- if(antagonist.objectives.len == 0)
- t = "None defined."
- alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
- return
+ if(antagonist)
+ for(var/datum/objective/OB in antagonist.objectives)
+ t += "[OB.explanation_text]\n"
+ if(antagonist.objectives.len == 0)
+ t = "None defined."
+ alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
+ return
//they're nothing so turn them into a traitor!
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
@@ -1888,31 +1889,35 @@ var/showadminmessages = 1
if(!objective)
return
if (istype(M, /mob/living/carbon/human))
- var/mob/living/carbon/human/N = M
- ticker.mode.equip_traitor(N)
+ if(M.mind)
+ var/mob/living/carbon/human/N = M
+ ticker.mode.equip_traitor(N)
- ticker.mode.traitors += M.mind
- M.mind.special_role = "traitor"
+ ticker.mode.traitors += M.mind
- var/datum/objective/custom_objective = new(objective)
- custom_objective.owner = M.mind
- M.mind.objectives += custom_objective
+ M.mind.special_role = "traitor"
- var/datum/objective/escape/escape_objective = new
- escape_objective.owner = M.mind
- M.mind.objectives += escape_objective
+ var/datum/objective/custom_objective = new(objective)
+ custom_objective.owner = M.mind
+ M.mind.objectives += custom_objective
- M << "You are the traitor."
+ var/datum/objective/escape/escape_objective = new
+ escape_objective.owner = M.mind
+ M.mind.objectives += escape_objective
- var/obj_count = 1
- for(var/datum/objective/OBJ in M.mind.objectives)
- M << "Objective #[obj_count]: [OBJ.explanation_text]"
- obj_count++
+ M << "You are the traitor."
+
+ var/obj_count = 1
+ for(var/datum/objective/OBJ in M.mind.objectives)
+ M << "Objective #[obj_count]: [OBJ.explanation_text]"
+ obj_count++
//to stop spamming during traitor all secret
- if(mode)
- log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
- message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
+ if(mode)
+ log_admin("[key_name(usr)] has made [key_name(M)] a traitor.")
+ message_admins("\blue [key_name_admin(usr)] has made [key_name_admin(M)] a traitor. Objective is: [objective]", 1)
+ else
+ usr << "This guy doesn't have a mind datum, traitoring him doesn't work right."
else if (istype(M, /mob/living/silicon/ai))
ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"
diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm
index 42358e9beb..9d51e12e9d 100644
--- a/code/modules/admin/banjob.dm
+++ b/code/modules/admin/banjob.dm
@@ -8,10 +8,11 @@ var
jobban_savebanfile()
/proc/jobban_isbanned(mob/M, rank)
- if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
- return 1
- else
- return 0
+ if(M)
+ if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
+ return 1
+ else
+ return 0
/proc/jobban_loadbanfile()
var/savefile/S=new("data/job_full.ban")
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 7a2117d107..93f248c9ae 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -77,7 +77,7 @@
usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(50)
usr.verbs += /mob/dead/observer/proc/dead_tele
- A = input("Area to jump to", "BOOYEA", A) in list("Engine","Hallways","Toxins","Storage","Maintenance","Crew Quarters","Medical","Security","Chapel","Bridge","Prison","AI Satellite","Thunderdome")
+ A = input("Area to jump to", "BOOYEA", A) in list("Engine","Hallways","Toxins","Storage","Maintenance","Crew Quarters","Medical","Security","Chapel","Bridge","AI Satellite","Thunderdome")
switch (A)
if ("Engine")
@@ -146,12 +146,6 @@
if(istype(B, /area/turret_protected/aisat))
L += B
A = pick(L)
- if ("Prison")
- var/list/L = list()
- for(var/area/B in world)
- if(istype(B, /area/prison/control))
- L += B
- A = pick(L)
if ("Thunderdome")
var/list/L = list()
for(var/area/B in world)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 3ac2277a59..164dcf4dd2 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -2078,10 +2078,11 @@
if (istype(src.item, /obj/item))
src.source.drop_item()
src.loc = src.target
- src.item.layer = 20
- src.target.r_hand = src.item
- src.item.loc = src.target
- src.item.add_fingerprint(src.target)
+ if (src.item)
+ src.item.layer = 20
+ src.target.r_hand = src.item
+ src.item.loc = src.target
+ src.item.add_fingerprint(src.target)
if("uniform")
if (src.target.w_uniform)
var/obj/item/W = src.target.w_uniform
@@ -2232,19 +2233,20 @@
S.injest(src.target)
if("dnainjector")
var/obj/item/weapon/dnainjector/S = src.item
- src.item.add_fingerprint(src.source)
- src.item:inject(src.target, null)
- if (!( istype(S, /obj/item/weapon/dnainjector) ))
- //SN src = null
- del(src)
- return
- if (S.s_time >= world.time + 30)
- //SN src = null
- del(src)
- return
- S.s_time = world.time
- for(var/mob/O in viewers(src.source, null))
- O.show_message(text("\red [] injects [] with the DNA Injector!", src.source, src.target), 1)
+ if(src.item)
+ src.item.add_fingerprint(src.source)
+ src.item:inject(src.target, null)
+ if (!( istype(S, /obj/item/weapon/dnainjector) ))
+ //SN src = null
+ del(src)
+ return
+ if (S.s_time >= world.time + 30)
+ //SN src = null
+ del(src)
+ return
+ S.s_time = world.time
+ for(var/mob/O in viewers(src.source, null))
+ O.show_message(text("\red [] injects [] with the DNA Injector!", src.source, src.target), 1)
if("pockets")
if (src.target.l_store)
var/obj/item/W = src.target.l_store
diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm
index e6a1d7b7a3..f1630e182a 100644
--- a/code/modules/mob/living/carbon/monkey/life.dm
+++ b/code/modules/mob/living/carbon/monkey/life.dm
@@ -164,8 +164,9 @@
breathe()
+ if(src.reagents)
- if(src.reagents.has_reagent("lexorin")) return
+ if(src.reagents.has_reagent("lexorin")) return
var/datum/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 90f8793438..c35d09a786 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -1091,7 +1091,8 @@
if (W)
W.layer = initial(W.layer)
var/turf/T = get_turf(src.loc)
- T.Entered(W)
+ if (T)
+ T.Entered(W)
return
/mob/proc/reset_view(atom/A)
@@ -1438,7 +1439,7 @@
//we don't use message_admins here because the sender/receiver might get it too
for (var/mob/K in world)
- if(K)
+ if(K && usr)
if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "PM: [key_name(usr, K)]->[key_name(M, K)]: \blue [t]"
..()
diff --git a/code/modules/mob/new_player/hud.dm b/code/modules/mob/new_player/hud.dm
new file mode 100644
index 0000000000..6df982d16d
--- /dev/null
+++ b/code/modules/mob/new_player/hud.dm
@@ -0,0 +1,8 @@
+/obj/hud/proc/unplayer_hud()
+ src.station_explosion = new src.h_type( src )
+ src.station_explosion.icon = 'station_explosion.dmi'
+ src.station_explosion.icon_state = "start"
+ src.station_explosion.layer = 20
+ src.station_explosion.mouse_opacity = 0
+ src.station_explosion.screen_loc = "1,3"
+ return
\ No newline at end of file
diff --git a/goonstation.dme b/goonstation.dme
index 1c134081f6..f1e65b591c 100644
--- a/goonstation.dme
+++ b/goonstation.dme
@@ -416,7 +416,6 @@
#include "code\game\objects\closets\secure\bar.dm"
#include "code\game\objects\closets\secure\brig.dm"
#include "code\game\objects\closets\secure\captain.dm"
-#include "code\game\objects\closets\secure\chemlocker.dm"
#include "code\game\objects\closets\secure\courtroom.dm"
#include "code\game\objects\closets\secure\engineering.dm"
#include "code\game\objects\closets\secure\medical.dm"
@@ -596,6 +595,7 @@
#include "code\modules\mob\living\silicon\robot\robot.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\say.dm"
+#include "code\modules\mob\new_player\hud.dm"
#include "code\modules\mob\new_player\new_player.dm"
#include "code\modules\mob\new_player\preferences.dm"
#include "code\modules\power\apc.dm"