Fix a bunch of runtimes

This commit is contained in:
Markolie
2015-02-09 04:03:20 +01:00
parent 58323be9ad
commit d10451c567
14 changed files with 54 additions and 39 deletions
+1 -1
View File
@@ -506,7 +506,7 @@
return
if(user.restrained() || user.stat || user.weakened || user.stunned || user.paralysis || user.resting) //are you cuffed, dying, lying, stunned or other
return
if(O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
if(get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)) // is the mob anchored, too far away from you, or are you too far away from the source
return
if(!ismob(O)) //humans only
return
+2
View File
@@ -1231,6 +1231,8 @@
/////////////////////////
/obj/mecha/proc/operation_allowed(mob/living/carbon/human/H)
if(!ishuman(H))
return 0
for(var/ID in list(H.get_active_hand(), H.wear_id, H.belt))
if(src.check_access(ID,src.operation_req_access))
return 1
+1 -1
View File
@@ -91,7 +91,7 @@
const_holder.icon_state = "ripley0"
const_holder.density = 1
const_holder.overlays.len = 0
qdel(src)
del(src)
return
+4 -4
View File
@@ -42,8 +42,8 @@
/turf/simulated/Entered(atom/A, atom/OL)
if (istype(A,/mob/living/carbon))
var/mob/living/carbon/M = A
if (istype(A,/mob/living/carbon/human))
var/mob/living/carbon/human/M = A
if(M.lying) return
if(prob(80))
dirt++
@@ -121,7 +121,7 @@
switch (src.wet)
if(1)
if(istype(M, /mob/living/carbon/human)) // Added check since monkeys don't have shoes
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M:shoes.flags&NOSLIP))
if ((M.m_intent == "run") && !(istype(M:shoes, /obj/item/clothing/shoes) && M.shoes.flags&NOSLIP))
M.stop_pulling()
step(M, M.dir)
M << "\blue You slipped on the wet floor!"
@@ -131,7 +131,7 @@
else
M.inertia_dir = 0
return
else if(!istype(M, (/mob/living/carbon/slime || /mob/living/carbon/human/slime)) || (M:species.bodyflags & FEET_NOSLIP))
else if(!istype(M, (/mob/living/carbon/human/slime)) || (M.species.bodyflags & FEET_NOSLIP))
if (M.m_intent == "run")
M.stop_pulling()
step(M, M.dir)
+1 -1
View File
@@ -387,7 +387,7 @@ BLIND // can't see anything
if (!(src.loc == usr))
return
if (!( usr.restrained() ) && !( usr.stat ))
if (!( usr.restrained() ) && !( usr.stat ) && ( over_object ))
switch(over_object.name)
if("r_hand")
usr.u_equip(src)
+5 -11
View File
@@ -1,20 +1,13 @@
/turf/simulated/wall
datum/event/wallrot
severity = 1
datum/event/wallrot/setup()
announceWhen = rand(0, 300)
endWhen = announceWhen + 1
severity = rand(5, 10)
datum/event/wallrot/announce()
command_alert("Harmful fungi detected on station. Station structures may be contaminated.", "Biohazard Alert")
datum/event/wallrot/start()
spawn()
var/turf/center = null
var/turf/simulated/wall/center = null
// 100 attempts
for(var/i=0, i<100, i++)
@@ -24,14 +17,15 @@ datum/event/wallrot/start()
if(center)
// Make sure at least one piece of wall rots!
center:rot()
center.rot()
// Have a chance to rot lots of other walls.
var/rotcount = 0
var/actual_severity = severity * rand(5, 10)
for(var/turf/simulated/wall/W in range(5, center)) if(prob(50))
W:rot()
W.rot()
rotcount++
// Only rot up to severity walls
if(rotcount >= severity)
if(rotcount >= actual_severity)
break
@@ -231,6 +231,9 @@ var/const/MAX_ACTIVE_TIME = 400
return
/proc/CanHug(var/mob/M)
if(!M || !ismob(M))
return 0
if(M.stat == DEAD)
return 0
@@ -1159,11 +1159,16 @@
/mob/living/carbon/human/proc/is_lung_ruptured()
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
if(!L)
return 0
return L.is_bruised()
/mob/living/carbon/human/proc/rupture_lung()
var/datum/organ/internal/lungs/L = internal_organs_by_name["lungs"]
if(!L)
return 0
if(!L.is_bruised())
src.custom_pain("You feel a stabbing pain in your chest!", 1)
L.damage = L.min_bruised_damage
+7 -1
View File
@@ -292,6 +292,7 @@
A.loc = src
update_icon()
update_gunlight(user)
verbs += /obj/item/weapon/gun/proc/toggle_gunlight
if(istype(A, /obj/item/weapon/screwdriver))
if(F)
if(user.l_hand != src && user.r_hand != src)
@@ -304,13 +305,18 @@
update_gunlight(user)
S.update_brightness(user)
update_icon()
verbs -= /obj/item/weapon/gun/proc/toggle_gunlight
..()
return
/obj/item/weapon/gun/verb/toggle_gunlight()
/obj/item/weapon/gun/proc/toggle_gunlight()
set name = "Toggle Gunlight"
set category = "Object"
set desc = "Click to toggle your weapon's attached flashlight."
if(!F)
return
var/mob/living/carbon/human/user = usr
if(!isturf(user.loc))
user << "You cannot turn the light on while in this [user.loc]."
+1 -1
View File
@@ -398,7 +398,7 @@ datum
return 1
check_gofast(var/mob/M)
if(istype(M, /mob))
if(M && istype(M, /mob))
if(M.reagents.has_reagent("hyperzine")||M.reagents.has_reagent("nuka_cola"))
return 1
else
+10 -9
View File
@@ -2581,15 +2581,16 @@ datum
return
Del()
if (istype(holder.my_atom,/mob/living))
var/mob/living/M as mob
var/to_remove = 0
if (holder.has_reagent("anti_toxin"))
to_remove = min(holder.get_reagent_amount("anti_toxin"),data)
holder.remove_reagent("anti_toxin", to_remove, 0)
data -= to_remove
if(M)
M.adjustToxLoss((data-1)*rand(2,4))
if(holder)
if (istype(holder.my_atom,/mob/living))
var/mob/living/M as mob
var/to_remove = 0
if (holder.has_reagent("anti_toxin"))
to_remove = min(holder.get_reagent_amount("anti_toxin"),data)
holder.remove_reagent("anti_toxin", to_remove, 0)
data -= to_remove
if(M)
M.adjustToxLoss((data-1)*rand(2,4))
..()
psilocybin
+4 -3
View File
@@ -199,8 +199,9 @@ Note: Must be placed west/left of and R&D console to function.
busy = 0
src.updateUsrDialog()
src.overlays += "protolathe_[stack.name]"
sleep(10)
src.overlays -= "protolathe_[stack.name]"
if(stack)
src.overlays += "protolathe_[stack.name]"
sleep(10)
src.overlays -= "protolathe_[stack.name]"
return
@@ -66,8 +66,9 @@
/obj/structure/boulder/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/device/core_sampler))
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
if(geological_data)
src.geological_data.artifact_distance = rand(-100,100) / 100
src.geological_data.artifact_id = artifact_find.artifact_id
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
@@ -544,12 +544,14 @@
if(talkative)
new_item.talking_atom = new()
talking_atom.holder_atom = new_item
talking_atom.init()
if(talking_atom)
talking_atom.holder_atom = new_item
talking_atom.init()
del(src)
else if(talkative)
src.talking_atom = new()
talking_atom.holder_atom = src
talking_atom.init()
if(talking_atom)
talking_atom.holder_atom = src
talking_atom.init()