Fixes camera mobs becoming contaminated and other tweaks (#31731)

This commit is contained in:
Emmett Gaines
2017-10-14 18:39:51 -04:00
committed by CitadelStationBot
parent b200389630
commit 24b9d4b9f4
20 changed files with 45 additions and 39 deletions
+6 -3
View File
@@ -6,12 +6,15 @@
/datum/component/radioactive
dupe_mode = COMPONENT_DUPE_UNIQUE
var/source
var/hl3_release_date //the half-life measured in ticks
var/strength
var/can_contaminate
/datum/component/radioactive/Initialize(_strength=0, _half_life=RAD_HALF_LIFE, _can_contaminate=TRUE)
/datum/component/radioactive/Initialize(_strength=0, _source, _half_life=RAD_HALF_LIFE, _can_contaminate=TRUE)
strength = _strength
source = _source
hl3_release_date = _half_life
can_contaminate = _can_contaminate
@@ -31,7 +34,7 @@
return ..()
/datum/component/radioactive/process()
radiation_pulse(get_turf(parent),strength,1,FALSE,can_contaminate)
radiation_pulse(parent,strength,1,FALSE,can_contaminate)
if(hl3_release_date && prob(50))
strength -= strength / hl3_release_date
@@ -64,7 +67,7 @@
to_chat(user, out.Join())
/datum/component/radioactive/proc/rad_attack(atom/movable/target, mob/living/user)
radiation_pulse(get_turf(target), strength/20)
radiation_pulse(parent, strength/20)
target.rad_act(strength/2)
#undef RAD_AMOUNT_LOW
+7 -4
View File
@@ -1,4 +1,5 @@
/datum/radiation_wave
var/source
var/turf/master_turf //The center of the wave
var/steps=0 //How far we've moved
var/intensity //How strong it was originaly
@@ -7,8 +8,9 @@
var/list/__dirs //The directions to the side of the wave, stored for easy looping
var/can_contaminate
/datum/radiation_wave/New(turf/place, dir, _intensity=0, _range_modifier=RAD_DISTANCE_COEFFICIENT, _can_contaminate=TRUE)
master_turf = place
/datum/radiation_wave/New(atom/_source, dir, _intensity=0, _range_modifier=RAD_DISTANCE_COEFFICIENT, _can_contaminate=TRUE)
source = _source
master_turf = get_turf(_source)
move_dir = dir
__dirs = list()
@@ -87,7 +89,7 @@
continue
thing.rad_act(strength)
var/static/list/blacklisted = typecacheof(list(/turf))
var/static/list/blacklisted = typecacheof(list(/turf, /obj/structure/cable, /obj/machinery/atmospherics))
if(!can_contaminate || blacklisted[thing.type])
continue
if(prob((strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1/(steps*range_modifier), 1))) // Only stronk rads get to have little baby rads
@@ -95,4 +97,5 @@
if(insulation && insulation.contamination_proof)
continue
else
thing.AddComponent(/datum/component/radioactive, (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT * min(1/(steps*range_modifier), 1))
var/rad_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT * min(1/(steps*range_modifier), 1)
thing.AddComponent(/datum/component/radioactive, rad_strength, source)