mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Fix a bunch of runtimes
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user