mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixed a bunch of the runtime errors cropping up in the server logs.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@175 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -569,7 +569,8 @@ datum
|
|||||||
if(istype(O,/obj/decal/cleanable))
|
if(istype(O,/obj/decal/cleanable))
|
||||||
del(O)
|
del(O)
|
||||||
else
|
else
|
||||||
O.clean_blood()
|
if (O)
|
||||||
|
O.clean_blood()
|
||||||
reaction_turf(var/turf/T, var/volume)
|
reaction_turf(var/turf/T, var/volume)
|
||||||
T.overlays = null
|
T.overlays = null
|
||||||
T.clean_blood()
|
T.clean_blood()
|
||||||
|
|||||||
@@ -250,6 +250,7 @@
|
|||||||
O.show_message(text("\red [] was hit by the syringe!", M), 1)
|
O.show_message(text("\red [] was hit by the syringe!", M), 1)
|
||||||
|
|
||||||
del(D)
|
del(D)
|
||||||
|
return
|
||||||
|
|
||||||
for(var/atom/A in D.loc)
|
for(var/atom/A in D.loc)
|
||||||
if(A == user) continue
|
if(A == user) continue
|
||||||
|
|||||||
@@ -442,9 +442,9 @@
|
|||||||
relaymove(mob/user as mob)
|
relaymove(mob/user as mob)
|
||||||
if (user.stat)
|
if (user.stat)
|
||||||
return
|
return
|
||||||
|
if (src.loc)
|
||||||
for (var/mob/M in hearers(src.loc.loc))
|
for (var/mob/M in hearers(src.loc.loc))
|
||||||
M << "<FONT size=[max(0, 5 - get_dist(src, M))]>CLONG, clong!</FONT>"
|
M << "<FONT size=[max(0, 5 - get_dist(src, M))]>CLONG, clong!</FONT>"
|
||||||
|
|
||||||
playsound(src.loc, 'clang.ogg', 50, 0, 0)
|
playsound(src.loc, 'clang.ogg', 50, 0, 0)
|
||||||
|
|
||||||
|
|||||||
@@ -867,13 +867,14 @@
|
|||||||
var/newblock
|
var/newblock
|
||||||
var/tstructure2
|
var/tstructure2
|
||||||
var/oldblock
|
var/oldblock
|
||||||
block = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),src.subblock,1)
|
if (src.connected.occupant)
|
||||||
src.delete = 1
|
block = getblock(getblock(src.connected.occupant.dna.struc_enzymes,src.strucblock,3),src.subblock,1)
|
||||||
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
|
src.delete = 1
|
||||||
usr << browse(temphtml, "window=scannernew;size=550x650")
|
src.temphtml = text("Working ... Please wait ([] Seconds)", src.radduration)
|
||||||
onclose(usr, "scannernew")
|
usr << browse(temphtml, "window=scannernew;size=550x650")
|
||||||
sleep(10*src.radduration)
|
onclose(usr, "scannernew")
|
||||||
if (!src.connected.occupant)
|
sleep(10*src.radduration)
|
||||||
|
else
|
||||||
temphtml = null
|
temphtml = null
|
||||||
delete = 0
|
delete = 0
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||||
var/temperature_resistance = 1000 + T0C
|
var/temperature_resistance = 1000 + T0C
|
||||||
volume = 1000
|
volume = 1000
|
||||||
|
var/throwforce = 0
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
/obj/machinery/portable_atmospherics/canister/sleeping_agent
|
||||||
name = "Canister: \[N2O\]"
|
name = "Canister: \[N2O\]"
|
||||||
|
|||||||
@@ -44,11 +44,12 @@
|
|||||||
else if (O.g_amt || O.m_amt)
|
else if (O.g_amt || O.m_amt)
|
||||||
spawn(16) {
|
spawn(16) {
|
||||||
flick("autolathe_c",src)
|
flick("autolathe_c",src)
|
||||||
if(O.g_amt) // Added null checks to avoid runtime errors when an item doesn't have an expected variable -- TLE
|
if(O)
|
||||||
src.g_amount += O.g_amt
|
if(O.g_amt) // Added null checks to avoid runtime errors when an item doesn't have an expected variable -- TLE
|
||||||
if(O.m_amt)
|
src.g_amount += O.g_amt
|
||||||
src.m_amount += O.m_amt
|
if(O.m_amt)
|
||||||
del O
|
src.m_amount += O.m_amt
|
||||||
|
del O
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
|
user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
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)
|
||||||
@@ -83,11 +84,12 @@
|
|||||||
if(P:amount >= 2)
|
if(P:amount >= 2)
|
||||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
P:amount -= 2
|
if (P)
|
||||||
if(!P:amount) del(P)
|
P:amount -= 2
|
||||||
user << "\blue You put in the glass panel."
|
if(!P:amount) del(P)
|
||||||
src.state = 4
|
user << "\blue You put in the glass panel."
|
||||||
src.icon_state = "4"
|
src.state = 4
|
||||||
|
src.icon_state = "4"
|
||||||
|
|
||||||
if(istype(P, /obj/item/weapon/aiModule/asimov))
|
if(istype(P, /obj/item/weapon/aiModule/asimov))
|
||||||
src.laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
|
src.laws.add_inherent_law("You may not injure a human being or, through inaction, allow a human being to come to harm.")
|
||||||
|
|||||||
@@ -169,11 +169,12 @@
|
|||||||
if(P:amount >= 2)
|
if(P:amount >= 2)
|
||||||
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
|
||||||
if(do_after(user, 20))
|
if(do_after(user, 20))
|
||||||
P:amount -= 2
|
if(P)
|
||||||
if(!P:amount) del(P)
|
P:amount -= 2
|
||||||
user << "\blue You put in the glass panel."
|
if(!P:amount) del(P)
|
||||||
src.state = 4
|
user << "\blue You put in the glass panel."
|
||||||
src.icon_state = "4"
|
src.state = 4
|
||||||
|
src.icon_state = "4"
|
||||||
if(4)
|
if(4)
|
||||||
if(istype(P, /obj/item/weapon/crowbar))
|
if(istype(P, /obj/item/weapon/crowbar))
|
||||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||||
|
|||||||
@@ -162,7 +162,8 @@
|
|||||||
if(R)
|
if(R)
|
||||||
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
|
var/choice = input("Are you certain you wish to detonate [R.name]?") in list("Confirm", "Abort")
|
||||||
if(choice == "Confirm")
|
if(choice == "Confirm")
|
||||||
R.self_destruct()
|
if(R)
|
||||||
|
R.self_destruct()
|
||||||
|
|
||||||
src.add_fingerprint(usr)
|
src.add_fingerprint(usr)
|
||||||
src.updateUsrDialog()
|
src.updateUsrDialog()
|
||||||
|
|||||||
@@ -13,18 +13,19 @@
|
|||||||
if (src.metal_amount < 150000.0)
|
if (src.metal_amount < 150000.0)
|
||||||
var/count = 0
|
var/count = 0
|
||||||
spawn(15)
|
spawn(15)
|
||||||
if(!O:amount)
|
if(O)
|
||||||
return
|
if(!O:amount)
|
||||||
while(metal_amount < 150000 && O:amount)
|
return
|
||||||
src.metal_amount += O:height * O:width * O:length * 100000.0
|
while(metal_amount < 150000 && O:amount)
|
||||||
O:amount--
|
src.metal_amount += O:height * O:width * O:length * 100000.0
|
||||||
count++
|
O:amount--
|
||||||
|
count++
|
||||||
|
|
||||||
if (O:amount < 1)
|
if (O:amount < 1)
|
||||||
del(O)
|
del(O)
|
||||||
|
|
||||||
user << "You insert [count] metal sheet\s into the fabricator."
|
user << "You insert [count] metal sheet\s into the fabricator."
|
||||||
updateDialog()
|
updateDialog()
|
||||||
else
|
else
|
||||||
user << "The robot part maker is full. Please remove metal from the robot part maker in order to insert more."
|
user << "The robot part maker is full. Please remove metal from the robot part maker in order to insert more."
|
||||||
|
|
||||||
|
|||||||
@@ -660,7 +660,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f
|
|||||||
var/obj/item/weapon/book/b = new(src.loc)
|
var/obj/item/weapon/book/b = new(src.loc)
|
||||||
b.dat = O:info
|
b.dat = O:info
|
||||||
b.name = "Print Job #" + "[rand(100, 999)]"
|
b.name = "Print Job #" + "[rand(100, 999)]"
|
||||||
b.icon_state = "book" + rand(1,7)
|
b.icon_state = "book[rand(1,7)]"
|
||||||
del(O)
|
del(O)
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
@@ -219,8 +219,9 @@
|
|||||||
return safe.attackby(W, user)
|
return safe.attackby(W, user)
|
||||||
if ((!( shielded ) || !( W.flags ) & 32))
|
if ((!( shielded ) || !( W.flags ) & 32))
|
||||||
spawn( 0 )
|
spawn( 0 )
|
||||||
W.attack(src, user)
|
if (W)
|
||||||
return
|
W.attack(src, user)
|
||||||
|
return
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -128,8 +128,9 @@
|
|||||||
O.invisibility = 0
|
O.invisibility = 0
|
||||||
O.name = "Cyborg"
|
O.name = "Cyborg"
|
||||||
O.real_name = "Cyborg"
|
O.real_name = "Cyborg"
|
||||||
O.lastKnownIP = src.brain.owner.client.address
|
|
||||||
if (src.brain.owner.client)
|
if (src.brain.owner.client)
|
||||||
|
O.lastKnownIP = src.brain.owner.client.address
|
||||||
src.brain.owner.client.mob = O
|
src.brain.owner.client.mob = O
|
||||||
else
|
else
|
||||||
for(var/mob/dead/observer/G in world)
|
for(var/mob/dead/observer/G in world)
|
||||||
|
|||||||
@@ -130,7 +130,8 @@
|
|||||||
user.show_message("\blue The timer is now secured!", 1)
|
user.show_message("\blue The timer is now secured!", 1)
|
||||||
else
|
else
|
||||||
user.show_message("\blue The timer is now unsecured!", 1)
|
user.show_message("\blue The timer is now unsecured!", 1)
|
||||||
src.part2.status = src.status
|
if (src.part2)
|
||||||
|
src.part2.status = src.status
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -605,10 +605,11 @@ turf/simulated/floor/proc/update_icon()
|
|||||||
if (C:amount >= 2)
|
if (C:amount >= 2)
|
||||||
user << "\blue Reinforcing the floor..."
|
user << "\blue Reinforcing the floor..."
|
||||||
if(do_after(user, 30))
|
if(do_after(user, 30))
|
||||||
ReplaceWithEngineFloor()
|
if (C)
|
||||||
C:amount -= 2
|
ReplaceWithEngineFloor()
|
||||||
if (C:amount <= 0) del(C) //wtf
|
C:amount -= 2
|
||||||
playsound(src.loc, 'Deconstruct.ogg', 80, 1)
|
if (C:amount <= 0) del(C) //wtf
|
||||||
|
playsound(src.loc, 'Deconstruct.ogg', 80, 1)
|
||||||
else
|
else
|
||||||
user << "\red You need more rods."
|
user << "\red You need more rods."
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -168,9 +168,10 @@
|
|||||||
break
|
break
|
||||||
if(clear)
|
if(clear)
|
||||||
L+=T
|
L+=T
|
||||||
|
if (L.len)
|
||||||
usr.loc = pick(L)
|
usr.loc = pick(L)
|
||||||
|
else
|
||||||
|
usr << "Teleporting to that area doesn't seem to be working currently. But at least now it tells you that."
|
||||||
|
|
||||||
var/list/karma_spenders = list()
|
var/list/karma_spenders = list()
|
||||||
|
|
||||||
|
|||||||
@@ -1004,15 +1004,16 @@
|
|||||||
if (istype(src.wear_suit, /obj/item/clothing/suit))
|
if (istype(src.wear_suit, /obj/item/clothing/suit))
|
||||||
var/t1 = src.wear_suit.icon_state
|
var/t1 = src.wear_suit.icon_state
|
||||||
src.overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
|
src.overlays += image("icon" = 'suit.dmi', "icon_state" = text("[][]", t1, (!( src.lying ) ? null : "2")), "layer" = MOB_LAYER)
|
||||||
if (src.wear_suit.blood_DNA)
|
if (src.wear_suit)
|
||||||
var/icon/stain_icon = null
|
if (src.wear_suit.blood_DNA)
|
||||||
if (istype(src.wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat || /obj/item/clothing/suit/armor/a_i_a_ptank))
|
var/icon/stain_icon = null
|
||||||
stain_icon = icon('blood.dmi', "armorblood[!src.lying ? "" : "2"]")
|
if (istype(src.wear_suit, /obj/item/clothing/suit/armor/vest || /obj/item/clothing/suit/wcoat || /obj/item/clothing/suit/armor/a_i_a_ptank))
|
||||||
else if (istype(src.wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat))
|
stain_icon = icon('blood.dmi', "armorblood[!src.lying ? "" : "2"]")
|
||||||
stain_icon = icon('blood.dmi', "coatblood[!src.lying ? "" : "2"]")
|
else if (istype(src.wear_suit, /obj/item/clothing/suit/det_suit || /obj/item/clothing/suit/labcoat))
|
||||||
else
|
stain_icon = icon('blood.dmi', "coatblood[!src.lying ? "" : "2"]")
|
||||||
stain_icon = icon('blood.dmi', "suitblood[!src.lying ? "" : "2"]")
|
else
|
||||||
src.overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
stain_icon = icon('blood.dmi', "suitblood[!src.lying ? "" : "2"]")
|
||||||
|
src.overlays += image("icon" = stain_icon, "layer" = MOB_LAYER)
|
||||||
src.wear_suit.screen_loc = ui_oclothing
|
src.wear_suit.screen_loc = ui_oclothing
|
||||||
if (istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket))
|
if (istype(src.wear_suit, /obj/item/clothing/suit/straight_jacket))
|
||||||
if (src.handcuffed)
|
if (src.handcuffed)
|
||||||
|
|||||||
@@ -4,8 +4,9 @@
|
|||||||
spawn( 0 )
|
spawn( 0 )
|
||||||
O.mode = 0
|
O.mode = 0
|
||||||
if(!isturf(src.loc))
|
if(!isturf(src.loc))
|
||||||
src.client.eye = src.loc
|
if (src.client)
|
||||||
src.client.perspective = EYE_PERSPECTIVE
|
src.client.eye = src.loc
|
||||||
|
src.client.perspective = EYE_PERSPECTIVE
|
||||||
if (src.stat == 2)
|
if (src.stat == 2)
|
||||||
src.verbs += /mob/proc/ghostize
|
src.verbs += /mob/proc/ghostize
|
||||||
return
|
return
|
||||||
@@ -1403,11 +1403,12 @@
|
|||||||
M << "\red Admin PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
M << "\red Admin PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
||||||
usr << "\blue Admin PM to-<b>[key_name(M, usr, 1)]</b>: [t]"
|
usr << "\blue Admin PM to-<b>[key_name(M, usr, 1)]</b>: [t]"
|
||||||
else
|
else
|
||||||
if (M.client && M.client.holder)
|
if (M)
|
||||||
M << "\blue Reply PM from-<b>[key_name(usr, M, 1)]</b>: [t]"
|
if (M.client && M.client.holder)
|
||||||
else
|
M << "\blue Reply PM from-<b>[key_name(usr, M, 1)]</b>: [t]"
|
||||||
M << "\red Reply PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
else
|
||||||
usr << "\blue Reply PM to-<b>[key_name(M, usr, 0)]</b>: [t]"
|
M << "\red Reply PM from-<b>[key_name(usr, M, 0)]</b>: [t]"
|
||||||
|
usr << "\blue Reply PM to-<b>[key_name(M, usr, 0)]</b>: [t]"
|
||||||
|
|
||||||
log_admin("PM: [key_name(usr)]->[key_name(M)] : [t]")
|
log_admin("PM: [key_name(usr)]->[key_name(M)] : [t]")
|
||||||
|
|
||||||
@@ -1868,7 +1869,8 @@
|
|||||||
|
|
||||||
newmob = new/mob/dead/observer(src)
|
newmob = new/mob/dead/observer(src)
|
||||||
src:client:mob = newmob
|
src:client:mob = newmob
|
||||||
src.mind.transfer_to(newmob)
|
if (src.mind)
|
||||||
|
src.mind.transfer_to(newmob)
|
||||||
|
|
||||||
var/virus = src.virus
|
var/virus = src.virus
|
||||||
if (istype(src, /mob/living/silicon))
|
if (istype(src, /mob/living/silicon))
|
||||||
|
|||||||
@@ -11,10 +11,11 @@
|
|||||||
|
|
||||||
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
|
||||||
..()
|
..()
|
||||||
src.add_fingerprint(user)
|
if (W)
|
||||||
src.health -= W.force
|
src.add_fingerprint(user)
|
||||||
src.healthcheck()
|
src.health -= W.force
|
||||||
return
|
src.healthcheck()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/machinery/power/solar/blob_act()
|
/obj/machinery/power/solar/blob_act()
|
||||||
src.health--
|
src.health--
|
||||||
|
|||||||
Reference in New Issue
Block a user