Another stack of runtime errors dealt with.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@260 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-10-10 05:36:31 +00:00
parent 5b6d51966f
commit 7391fac4e9
28 changed files with 234 additions and 424 deletions

View File

@@ -308,10 +308,11 @@
var/turf/T = M.loc var/turf/T = M.loc
var/holding = M.equipped() var/holding = M.equipped()
sleep(time) sleep(time)
if ((M.loc == T && M.equipped() == holding && !( M.stat ))) if(M)
return 1 if ((M.loc == T && M.equipped() == holding && !( M.stat )))
else return 1
return 0 else
return 0
/proc/hasvar(var/datum/A, var/varname) /proc/hasvar(var/datum/A, var/varname)
//Takes: Anything that could possibly have variables and a varname to check. //Takes: Anything that could possibly have variables and a varname to check.

View File

@@ -4,7 +4,7 @@
var/g_amt = 0 // glass var/g_amt = 0 // glass
var/w_amt = 0 // waster amounts var/w_amt = 0 // waster amounts
animate_movement = 2 animate_movement = 2
var/throwforce = 0
proc proc
handle_internal_lifeform(mob/lifeform_inside_me, breath_request) handle_internal_lifeform(mob/lifeform_inside_me, breath_request)
//Return: (NONSTANDARD) //Return: (NONSTANDARD)
@@ -243,7 +243,6 @@
var/force = null var/force = null
var/item_state = null var/item_state = null
var/damtype = "brute" var/damtype = "brute"
var/throwforce = 10
var/r_speed = 1.0 var/r_speed = 1.0
var/health = null var/health = null
var/burn_point = null var/burn_point = null

View File

@@ -880,42 +880,44 @@
delete = 0 delete = 0
return null return null
/// ///
if (prob((80 + (src.radduration / 2)))) if(src.connected.occupant)
if ((src.strucblock != 2 || src.strucblock != 12 || src.strucblock != 8 || src.strucblock || 10) && prob (20)) if (prob((80 + (src.radduration / 2))))
oldblock = src.strucblock if ((src.strucblock != 2 || src.strucblock != 12 || src.strucblock != 8 || src.strucblock || 10) && prob (20))
block = miniscramble(block, src.radstrength, src.radduration) oldblock = src.strucblock
newblock = null block = miniscramble(block, src.radstrength, src.radduration)
if (src.strucblock > 1 && src.strucblock < 5) newblock = null
src.strucblock++ if (src.strucblock > 1 && src.strucblock < 5)
else if (src.strucblock > 5 && src.strucblock < 14) src.strucblock++
src.strucblock-- else if (src.strucblock > 5 && src.strucblock < 14)
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) src.strucblock--
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 == 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 == 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 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)
tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3) 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
src.connected.occupant.dna.struc_enzymes = tstructure2 tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
domutcheck(src.connected.occupant,src.connected) src.connected.occupant.dna.struc_enzymes = tstructure2
src.connected.occupant.radiation += (src.radstrength+src.radduration) domutcheck(src.connected.occupant,src.connected)
src.strucblock = oldblock src.connected.occupant.radiation += (src.radstrength+src.radduration)
else src.strucblock = oldblock
else
// //
block = miniscramble(block, src.radstrength, src.radduration) block = miniscramble(block, src.radstrength, src.radduration)
newblock = null 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 == 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 == 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 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) tstructure2 = setblock(src.connected.occupant.dna.struc_enzymes, src.strucblock, newblock,3)
src.connected.occupant.dna.struc_enzymes = tstructure2 src.connected.occupant.dna.struc_enzymes = tstructure2
domutcheck(src.connected.occupant,src.connected) domutcheck(src.connected.occupant,src.connected)
src.connected.occupant.radiation += (src.radstrength+src.radduration) src.connected.occupant.radiation += (src.radstrength+src.radduration)
else
if (prob(80-src.radduration))
randmutb(src.connected.occupant)
domutcheck(src.connected.occupant,src.connected)
else else
randmuti(src.connected.occupant) if (prob(80-src.radduration))
updateappearance(src.connected.occupant,src.connected.occupant.dna.uni_identity) randmutb(src.connected.occupant)
src.connected.occupant.radiation += ((src.radstrength*2)+src.radduration) 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") dopage(src,"strucmenu")
src.delete = 0 src.delete = 0

View File

@@ -179,7 +179,8 @@
var/changelingwin = 1 var/changelingwin = 1
var/changeling_name var/changeling_name
var/totalabsorbed = 0 var/totalabsorbed = 0
totalabsorbed = changeling.current.absorbed_dna.len if (changeling.current)
totalabsorbed = changeling.current.absorbed_dna.len
if(changeling.current) if(changeling.current)
changeling_name = "[changeling.current.real_name] (played by [changeling.key])" changeling_name = "[changeling.current.real_name] (played by [changeling.key])"

View File

@@ -342,10 +342,12 @@
*/ */
// These reagents are copied from the sleepy-pen, testing for the changeling super-sting bio upgrade // These reagents are copied from the sleepy-pen, testing for the changeling super-sting bio upgrade
if (T.reagents)
T.reagents.add_reagent("stoxin", 100) T.reagents.add_reagent("stoxin", 100)
T.reagents.add_reagent("impedrezene", 100) T.reagents.add_reagent("impedrezene", 100)
T.reagents.add_reagent("cryptobiolin", 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 usr.verbs -= /client/proc/changeling_neurotoxic_sting
@@ -366,7 +368,11 @@
usr << "\blue We stealthily sting [T]." usr << "\blue We stealthily sting [T]."
spawn(50) //Give the changeling a chance to calmly walk away before the target FREAKS THE FUCK OUT 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) 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 usr.verbs -= /client/proc/changeling_hallucinogenic_sting

View File

@@ -54,10 +54,10 @@
/datum/game_mode/proc/equip_traitor(mob/living/carbon/human/traitor_mob) /datum/game_mode/proc/equip_traitor(mob/living/carbon/human/traitor_mob)
if (!istype(traitor_mob)) if (!istype(traitor_mob))
return return
if (traitor_mob.mind)
if (traitor_mob.mind.assigned_role == "Clown") 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 << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself."
traitor_mob.mutations &= ~16 traitor_mob.mutations &= ~16
// generate list of radio freqs // generate list of radio freqs
var/freq = 1441 var/freq = 1441
var/list/freqlist = list() var/list/freqlist = list()

View File

@@ -57,11 +57,12 @@ obj/hud/New(var/type = 0)
// if(mymob:w_radio) mymob:w_radio:screen_loc = ui_headset // if(mymob:w_radio) mymob:w_radio:screen_loc = ui_headset
if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses if(mymob:glasses) mymob:glasses:screen_loc = ui_glasses
else else
if(mymob:shoes) mymob:shoes:screen_loc = null if(istype(mymob, /mob/living/carbon/human))
if(mymob:gloves) mymob:gloves:screen_loc = null if(mymob:shoes) mymob:shoes:screen_loc = null
if(mymob:ears) mymob:ears: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: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 /obj/hud/var/show_otherinventory = 1

View File

@@ -7,7 +7,6 @@
var/volume = 0 var/volume = 0
var/destroyed = 0 var/destroyed = 0
var/throwforce = 0
var/maximum_pressure = 90*ONE_ATMOSPHERE var/maximum_pressure = 90*ONE_ATMOSPHERE

View File

@@ -8,7 +8,6 @@
var/datum/ai_laws/laws = new /datum/ai_laws/asimov var/datum/ai_laws/laws = new /datum/ai_laws/asimov
var/obj/item/weapon/circuitboard/circuit = null var/obj/item/weapon/circuitboard/circuit = null
var/obj/item/brain/brain = null var/obj/item/brain/brain = null
var/throwforce = 0
/obj/AIcore/attackby(obj/item/weapon/P as obj, mob/user as mob) /obj/AIcore/attackby(obj/item/weapon/P as obj, mob/user as mob)

View File

@@ -288,7 +288,8 @@ Pod/Blast Doors computer
t1 = input("Enter a custom job assignment.","Assignment") t1 = input("Enter a custom job assignment.","Assignment")
else else
src.modify.access = get_access(t1) src.modify.access = get_access(t1)
src.modify.assignment = t1 if (src.modify)
src.modify.assignment = t1
if (href_list["reg"]) if (href_list["reg"])
if (src.authenticated) if (src.authenticated)
var/t2 = src.modify var/t2 = src.modify

View File

@@ -32,15 +32,16 @@
user.visible_message("\red [user] starts to put [G.affecting] into the gibber!") user.visible_message("\red [user] starts to put [G.affecting] into the gibber!")
src.add_fingerprint(user) src.add_fingerprint(user)
sleep(30) sleep(30)
if(G.affecting) if(G)
user.visible_message("\red [user] stuffs [G.affecting] into the gibber!") if(G.affecting)
var/mob/M = G.affecting user.visible_message("\red [user] stuffs [G.affecting] into the gibber!")
if(M.client) var/mob/M = G.affecting
M.client.perspective = EYE_PERSPECTIVE if(M.client)
M.client.eye = src M.client.perspective = EYE_PERSPECTIVE
M.loc = src M.client.eye = src
src.occupant = M M.loc = src
del(G) src.occupant = M
del(G)
/obj/machinery/gibber/verb/eject() /obj/machinery/gibber/verb/eject()
set src in oview(1) set src in oview(1)

View File

@@ -272,7 +272,10 @@ Please clean it before use!</TT><BR>
V.show_message(text("\blue The microwave turns on.")) 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 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(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.egg_amount = 0 // If so remove all the eggs
src.flour_amount = 0 // And the flour src.flour_amount = 0 // And the flour
src.water_amount = 0 //And the water src.water_amount = 0 //And the water

View File

@@ -280,16 +280,17 @@
del(M) del(M)
else if (istype(M,/mob/living) && !(M:client)) // else if (istype(M,/mob/living) && !(M:client)) //
spawn(0) spawn(0)
var/i if(M)
M:stunned = 100 var/i
for(i=0, i<10, i++) M:stunned = 100
sleep(10) for(i=0, i<10, i++)
M:fireloss += 50 sleep(10)
new /obj/decal/ash(M:loc) M:fireloss += 50
for (var/obj/item/weapon/W in M) new /obj/decal/ash(M:loc)
if (prob(10)) for (var/obj/item/weapon/W in M)
W.loc = M:loc if (prob(10))
del(M) W.loc = M:loc
del(M)
for (var/mob/M in viewers(user)) for (var/mob/M in viewers(user))
M.show_message("\red You hear a roar as the crematorium activates.", 1) M.show_message("\red You hear a roar as the crematorium activates.", 1)
spawn(100) spawn(100)

View File

@@ -34,26 +34,15 @@ var/list/cultists = list()
..() ..()
return 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) attack_hand(mob/user as mob)
if(!cultists.Find(user)) if(!cultists.Find(user))
user << "You can't mouth the arcane scratchings without fumbling over them." user << "You can't mouth the arcane scratchings without fumbling over them."
return return
if(!word1 || !word2 || !word3 || prob(usr.brainloss)) if(!word1 || !word2 || !word3)
return fizzle() return fizzle()
if(word1 == "ire" && word2 == "ego") if(word1 == "ire" && word2 == "ego")
usr.say("Sas'so c'arta forbici!")
for(var/obj/rune/R in world) for(var/obj/rune/R in world)
if(R == src) if(R == src)
continue continue
@@ -64,19 +53,16 @@ var/list/cultists = list()
return return
return fizzle() return fizzle()
if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum") if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum")
usr.say("N'ath reth sh'yro eth d'raggathnor!")
for (var/mob/V in viewers(src)) 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) 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) new /obj/item/weapon/tome(src.loc)
del(src) del(src)
/*
/*
if(word1 == "ire" && word2 == "certum" && word3 == "jatkaa")
var/list/temprunes = list() var/list/temprunes = list()
var/list/runes = list() var/list/runes = list()
for(var/obj/rune/R in world) for(var/obj/rune/R in world)
if(istype(R, /obj/rune)) 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) runes.Add(R)
var/atom/a = get_turf_loc(R) var/atom/a = get_turf_loc(R)
temprunes.Add(a.loc) temprunes.Add(a.loc)
@@ -85,13 +71,13 @@ var/list/cultists = list()
return fizzle() return fizzle()
var/selection_position = temprunes.Find(chosen) var/selection_position = temprunes.Find(chosen)
var/obj/rune/chosenrune = runes[selection_position] var/obj/rune/chosenrune = runes[selection_position]
user.client.eye = chosenrune // user.client.eye = chosenrune
user:current = chosenrune user:current = chosenrune
user.reset_view(chosenrune) user.reset_view(chosenrune)
*/
return return
*/
if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego") if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego")
usr.say("Mah'weyh pleggh at e'ntrath!")
for(var/mob/M in src.loc) for(var/mob/M in src.loc)
if(cultists.Find(M)) if(cultists.Find(M))
return fizzle() return fizzle()
@@ -103,7 +89,6 @@ var/list/cultists = list()
M<< "<font color=\"purple\"><b><i>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.</b></i></font>" M<< "<font color=\"purple\"><b><i>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.</b></i></font>"
return return
if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego") if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego")
usr.say("Tok-lyr rqa'nap g'lt-ulotf!")
var/cultist_count = 0 var/cultist_count = 0
for(var/mob/M in orange(1,src)) for(var/mob/M in orange(1,src))
if(cultists.Find(M)) if(cultists.Find(M))
@@ -119,198 +104,9 @@ var/list/cultists = list()
return return
else else
return fizzle() 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 <B>*BZZZT*</B>"
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 <B>Your equipment malfunctions.</B>" //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 <B>Your thermals malfunction.</B>"
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 <B>Your jumpsuit malfunctions</B>"
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 <B>BZZZT</B>"
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 proc
fizzle() 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)) 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) 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 return
@@ -319,17 +115,13 @@ var/list/cultists = list()
if(word1 == "ire" && word2 == "ego") if(word1 == "ire" && word2 == "ego")
icon_state = "2" icon_state = "2"
return return
if(word1 == "jatkaa" && word2 == "veri" && word3 == "ego") if(word1 == "nahlizet" && word2 == "veri" && word3 == "certum")
icon_state = "3" icon_state = "3"
return return
if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego") if(word1 == "certum" && word2 == "jatkaa" && word3 == "ego")
icon_state = "3" icon_state = "3"
src.icon += rgb(100, 0 , 150) src.icon += rgb(100, 0 , 150)
return return
if(word1 == "nahlizet" && word2 == "ire" && word3 == "certum")
icon_state = "2"
src.icon += rgb(0, 50 , 0)
return
icon_state = "1" icon_state = "1"
@@ -343,37 +135,26 @@ var/list/cultists = list()
attack_self(mob/user as mob) attack_self(mob/user as mob)
if(cultists.Find(user)) if(cultists.Find(user))
var/C = 0 var/choice = input("Scribe a rune on the ground here?", "Rune Scribing") in list("Yes", "No")
for(var/obj/rune/N in world) if(choice == "No")
C++ return
if (C>=25) var/w1
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")) var/w2
if("Yes") var/w3
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/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa") var/list/words = list("ire", "ego", "nahlizet", "certum", "veri", "jatkaa")
var/w1 = input("Write your first rune:", "Rune Scribing") in words if(usr)
var/w2 = input("Write your second rune:", "Rune Scribing") in words w1 = input("Write your first rune:", "Rune Scribing") in words
var/w3 = input("Write your third 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)) 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) 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)
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()
return return
else else
user << "The book seems full of illegible scribbles. Is this a joke?" user << "The book seems full of illegible scribbles. Is this a joke?"
@@ -381,10 +162,7 @@ var/list/cultists = list()
examine() examine()
set src in usr set src in usr
if(!cultists.Find(usr)) usr << "An old, dusty tome with frayed edges and a sinister looking cover."
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."
/obj/item/weapon/paperscrap /obj/item/weapon/paperscrap

View File

@@ -79,8 +79,9 @@
if(href_list["open"]) if(href_list["open"])
toggle_valve() toggle_valve()
if(href_list["rem_device"]) if(href_list["rem_device"])
attached_device.loc = get_turf(src) if(attached_device)
attached_device = null attached_device.loc = get_turf(src)
attached_device = null
update_icon() update_icon()
if(href_list["device"]) if(href_list["device"])
attached_device.attack_self(usr) attached_device.attack_self(usr)

View File

@@ -1206,30 +1206,31 @@ Code:
else if (href_list["detonate"] && istype(src.cartridge, /obj/item/weapon/cartridge/syndicate)) else if (href_list["detonate"] && istype(src.cartridge, /obj/item/weapon/cartridge/syndicate))
var/obj/item/device/pda/P = locate(href_list["detonate"]) var/obj/item/device/pda/P = locate(href_list["detonate"])
if (!P.toff && src.cartridge:shock_charges > 0) if(P)
src.cartridge:shock_charges-- if (!P.toff && src.cartridge:shock_charges > 0)
src.cartridge:shock_charges--
var/difficulty = 0 var/difficulty = 0
if (!isnull(P.cartridge)) if (!isnull(P.cartridge))
difficulty += P.cartridge.access_medical difficulty += P.cartridge.access_medical
difficulty += P.cartridge.access_security difficulty += P.cartridge.access_security
difficulty += P.cartridge.access_engine difficulty += P.cartridge.access_engine
difficulty += P.cartridge.access_clown difficulty += P.cartridge.access_clown
difficulty += P.cartridge.access_janitor difficulty += P.cartridge.access_janitor
difficulty += P.cartridge.access_manifest * 2 difficulty += P.cartridge.access_manifest * 2
else else
difficulty += 2 difficulty += 2
if ((prob(difficulty * 12)) || (P.uplink)) if ((prob(difficulty * 12)) || (P.uplink))
usr.show_message("\red An error flashes on your [src].", 1) usr.show_message("\red An error flashes on your [src].", 1)
else if (prob(difficulty * 3)) else if (prob(difficulty * 3))
usr.show_message("\red Energy feeds back into your [src]!", 1) usr.show_message("\red Energy feeds back into your [src]!", 1)
src.explode() src.explode()
else else
usr.show_message("\blue Success!", 1) usr.show_message("\blue Success!", 1)
P.explode() P.explode()
src.updateUsrDialog() src.updateUsrDialog()
else if (href_list["sendhonk"] && istype(src.cartridge, /obj/item/weapon/cartridge/clown)) else if (href_list["sendhonk"] && istype(src.cartridge, /obj/item/weapon/cartridge/clown))
var/obj/item/device/pda/P = locate(href_list["sendhonk"]) var/obj/item/device/pda/P = locate(href_list["sendhonk"])

View File

@@ -71,9 +71,10 @@ MOP
for(var/mob/O in viewers(user, null)) for(var/mob/O in viewers(user, null))
O.show_message(text("\red <B>[user] begins to clean [A]</B>"), 1) O.show_message(text("\red <B>[user] begins to clean [A]</B>"), 1)
sleep(20) sleep(20)
user << "\blue You have finished mopping!" if(A)
var/turf/U = A.loc user << "\blue You have finished mopping!"
src.reagents.reaction(U) var/turf/U = A.loc
src.reagents.reaction(U)
if(A) del(A) if(A) del(A)
mopcount++ mopcount++

View File

@@ -92,15 +92,16 @@ obj/structure
if (src.icon_state == "reinforced") //Time to finalize! if (src.icon_state == "reinforced") //Time to finalize!
user << "\blue Now finalising reinforced wall." user << "\blue Now finalising reinforced wall."
sleep(50) sleep(50)
if(get_turf(user) == T) if(W)
user << "\blue Wall fully reinforced!" if(get_turf(user) == T)
var/turf/Tsrc = get_turf(src) user << "\blue Wall fully reinforced!"
Tsrc.ReplaceWithRWall() var/turf/Tsrc = get_turf(src)
W:amount-- Tsrc.ReplaceWithRWall()
if (W:amount <= 0) W:amount--
del(W) if (W:amount <= 0)
del(src) del(W)
return del(src)
return
else else
user << "\blue Now reinforcing girders" user << "\blue Now reinforcing girders"
sleep(60) sleep(60)

View File

@@ -434,11 +434,13 @@
return return
var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank( user ) var/obj/item/assembly/t_i_ptank/R = new /obj/item/assembly/t_i_ptank( user )
R.part1 = S.part1 R.part1 = S.part1
S.part1.loc = R if (S.part1)
S.part1.master = R S.part1.loc = R
S.part1.master = R
R.part2 = S.part2 R.part2 = S.part2
S.part2.loc = R if (S.part2)
S.part2.master = R S.part2.loc = R
S.part2.master = R
S.layer = initial(S.layer) S.layer = initial(S.layer)
if (user.client) if (user.client)
user.client.screen -= S user.client.screen -= S

View File

@@ -337,10 +337,10 @@
playsound(src.loc, 'Welder.ogg', 100, 1) playsound(src.loc, 'Welder.ogg', 100, 1)
sleep(100) sleep(100)
if (istype(src, /turf/simulated/wall))
if ((user.loc == T && user.equipped() == W)) if ((user.loc == T && user.equipped() == W))
user << "\blue You disassembled the outer wall plating." user << "\blue You disassembled the outer wall plating."
dismantle_wall() dismantle_wall()
else else
return attack_hand(user) return attack_hand(user)

View File

@@ -685,12 +685,13 @@ var/showadminmessages = 1
if(M.mind in current_mode.traitors) if(M.mind in current_mode.traitors)
var/datum/mind/antagonist = M.mind var/datum/mind/antagonist = M.mind
var/t = "" var/t = ""
for(var/datum/objective/OB in antagonist.objectives) if(antagonist)
t += "[OB.explanation_text]\n" for(var/datum/objective/OB in antagonist.objectives)
if(antagonist.objectives.len == 0) t += "[OB.explanation_text]\n"
t = "None defined." if(antagonist.objectives.len == 0)
alert("Is a Traitor. Objective(s):\n[t]", "[M.key]") t = "None defined."
return alert("Is a Traitor. Objective(s):\n[t]", "[M.key]")
return
//they're nothing so turn them into a traitor! //they're nothing so turn them into a traitor!
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai)) if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
@@ -1888,31 +1889,35 @@ var/showadminmessages = 1
if(!objective) if(!objective)
return return
if (istype(M, /mob/living/carbon/human)) if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/N = M if(M.mind)
ticker.mode.equip_traitor(N) var/mob/living/carbon/human/N = M
ticker.mode.equip_traitor(N)
ticker.mode.traitors += M.mind ticker.mode.traitors += M.mind
M.mind.special_role = "traitor"
var/datum/objective/custom_objective = new(objective) M.mind.special_role = "traitor"
custom_objective.owner = M.mind
M.mind.objectives += custom_objective
var/datum/objective/escape/escape_objective = new var/datum/objective/custom_objective = new(objective)
escape_objective.owner = M.mind custom_objective.owner = M.mind
M.mind.objectives += escape_objective M.mind.objectives += custom_objective
M << "<B>You are the traitor.</B>" var/datum/objective/escape/escape_objective = new
escape_objective.owner = M.mind
M.mind.objectives += escape_objective
var/obj_count = 1 M << "<B>You are the traitor.</B>"
for(var/datum/objective/OBJ in M.mind.objectives)
M << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]" var/obj_count = 1
obj_count++ for(var/datum/objective/OBJ in M.mind.objectives)
M << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
obj_count++
//to stop spamming during traitor all secret //to stop spamming during traitor all secret
if(mode) if(mode)
log_admin("[key_name(usr)] has made [key_name(M)] a traitor.") 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) 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)) else if (istype(M, /mob/living/silicon/ai))
ticker.mode.traitors += M.mind ticker.mode.traitors += M.mind
M.mind.special_role = "traitor" M.mind.special_role = "traitor"

View File

@@ -8,10 +8,11 @@ var
jobban_savebanfile() jobban_savebanfile()
/proc/jobban_isbanned(mob/M, rank) /proc/jobban_isbanned(mob/M, rank)
if (jobban_keylist.Find(text("[M.ckey] - [rank]"))) if(M)
return 1 if (jobban_keylist.Find(text("[M.ckey] - [rank]")))
else return 1
return 0 else
return 0
/proc/jobban_loadbanfile() /proc/jobban_loadbanfile()
var/savefile/S=new("data/job_full.ban") var/savefile/S=new("data/job_full.ban")

View File

@@ -77,7 +77,7 @@
usr.verbs -= /mob/dead/observer/proc/dead_tele usr.verbs -= /mob/dead/observer/proc/dead_tele
spawn(50) spawn(50)
usr.verbs += /mob/dead/observer/proc/dead_tele 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) switch (A)
if ("Engine") if ("Engine")
@@ -146,12 +146,6 @@
if(istype(B, /area/turret_protected/aisat)) if(istype(B, /area/turret_protected/aisat))
L += B L += B
A = pick(L) 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") if ("Thunderdome")
var/list/L = list() var/list/L = list()
for(var/area/B in world) for(var/area/B in world)

View File

@@ -2078,10 +2078,11 @@
if (istype(src.item, /obj/item)) if (istype(src.item, /obj/item))
src.source.drop_item() src.source.drop_item()
src.loc = src.target src.loc = src.target
src.item.layer = 20 if (src.item)
src.target.r_hand = src.item src.item.layer = 20
src.item.loc = src.target src.target.r_hand = src.item
src.item.add_fingerprint(src.target) src.item.loc = src.target
src.item.add_fingerprint(src.target)
if("uniform") if("uniform")
if (src.target.w_uniform) if (src.target.w_uniform)
var/obj/item/W = src.target.w_uniform var/obj/item/W = src.target.w_uniform
@@ -2232,19 +2233,20 @@
S.injest(src.target) S.injest(src.target)
if("dnainjector") if("dnainjector")
var/obj/item/weapon/dnainjector/S = src.item var/obj/item/weapon/dnainjector/S = src.item
src.item.add_fingerprint(src.source) if(src.item)
src.item:inject(src.target, null) src.item.add_fingerprint(src.source)
if (!( istype(S, /obj/item/weapon/dnainjector) )) src.item:inject(src.target, null)
//SN src = null if (!( istype(S, /obj/item/weapon/dnainjector) ))
del(src) //SN src = null
return del(src)
if (S.s_time >= world.time + 30) return
//SN src = null if (S.s_time >= world.time + 30)
del(src) //SN src = null
return del(src)
S.s_time = world.time return
for(var/mob/O in viewers(src.source, null)) S.s_time = world.time
O.show_message(text("\red [] injects [] with the DNA Injector!", src.source, src.target), 1) 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("pockets")
if (src.target.l_store) if (src.target.l_store)
var/obj/item/W = src.target.l_store var/obj/item/W = src.target.l_store

View File

@@ -164,8 +164,9 @@
breathe() 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/gas_mixture/environment = loc.return_air()
var/datum/air_group/breath var/datum/air_group/breath

View File

@@ -1091,7 +1091,8 @@
if (W) if (W)
W.layer = initial(W.layer) W.layer = initial(W.layer)
var/turf/T = get_turf(src.loc) var/turf/T = get_turf(src.loc)
T.Entered(W) if (T)
T.Entered(W)
return return
/mob/proc/reset_view(atom/A) /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 //we don't use message_admins here because the sender/receiver might get it too
for (var/mob/K in world) 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) if(K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>" K << "<b><font color='blue'>PM: [key_name(usr, K)]->[key_name(M, K)]:</b> \blue [t]</font>"
..() ..()

View File

@@ -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

View File

@@ -416,7 +416,6 @@
#include "code\game\objects\closets\secure\bar.dm" #include "code\game\objects\closets\secure\bar.dm"
#include "code\game\objects\closets\secure\brig.dm" #include "code\game\objects\closets\secure\brig.dm"
#include "code\game\objects\closets\secure\captain.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\courtroom.dm"
#include "code\game\objects\closets\secure\engineering.dm" #include "code\game\objects\closets\secure\engineering.dm"
#include "code\game\objects\closets\secure\medical.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.dm"
#include "code\modules\mob\living\silicon\robot\robot_modules.dm" #include "code\modules\mob\living\silicon\robot\robot_modules.dm"
#include "code\modules\mob\living\silicon\robot\say.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\new_player.dm"
#include "code\modules\mob\new_player\preferences.dm" #include "code\modules\mob\new_player\preferences.dm"
#include "code\modules\power\apc.dm" #include "code\modules\power\apc.dm"