Merge branch 'master' into upstream-merge-31601

This commit is contained in:
LetterJay
2017-10-14 10:17:16 -04:00
committed by GitHub
101 changed files with 4200 additions and 11173 deletions
+2
View File
@@ -28,10 +28,12 @@
#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity)
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color)
#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
+1
View File
@@ -61,6 +61,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define UNUSED_TRANSIT_TURF_1 2
#define CAN_BE_DIRTY_1 4 // If a turf can be made dirty at roundstart. This is also used in areas.
#define NO_DEATHRATTLE_1 16 // Do not notify deadchat about any deaths that occur on this turf.
#define NO_RUINS_1 32 //Blocks ruins spawning in the area
//#define CHECK_RICOCHET_1 32 //Same thing as atom flag.
/*
+45
View File
@@ -0,0 +1,45 @@
/*
These defines are the balancing points of various parts of the radiation system.
Changes here can have widespread effects: make sure you test well.
Ask ninjanomnom if they're around
*/
#define RAD_BACKGROUND_RADIATION 9 // How much radiation is harmless to a mob, this is also when radiation waves stop spreading
// WARNING: Lowering this value significantly increases SSradiation load
#define RAD_AMOUNT_LOW 50
#define RAD_AMOUNT_MEDIUM 200
#define RAD_AMOUNT_HIGH 500
#define RAD_AMOUNT_EXTREME 1000
// apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked)
#define RAD_MOB_COEFFICIENT 0.25 // Radiation applied is multiplied by this
#define RAD_LOSS_PER_TICK 1
#define RAD_TOX_COEFFICIENT 0.1 // Toxin damage per tick coefficient
#define RAD_MOB_SAFE 300 // How much stored radiation in a mob with no ill effects
#define RAD_MOB_KNOCKDOWN 1500 // How much stored radiation to start stunning
// If (mutate*2<knockdown) then monkeys will sometimes turn into gorillas before being knocked down
// otherwise they only turn into gorillas *after* being knocked down
#define RAD_MOB_MUTATE 800 // How much stored radiation to check for mutation
#define RAD_MOB_HAIRLOSS 500 // How much stored radiation to check for hair loss
#define RAD_KNOCKDOWN_TIME 200 // How much knockdown to apply
#define RAD_NO_INSULATION 1.0 // For things that shouldn't become irradiated for whatever reason
#define RAD_VERY_LIGHT_INSULATION 0.9 // What girders have
#define RAD_LIGHT_INSULATION 0.8
#define RAD_MEDIUM_INSULATION 0.7 // What common walls have
#define RAD_HEAVY_INSULATION 0.6 // What reinforced walls have
#define RAD_EXTREME_INSULATION 0.5 // What rad collectors have
#define RAD_FULL_INSULATION 0 // Unused
// WARNING: The deines below could have disastrous consequences if tweaked incorrectly. See: The great SM purge of Oct.6.2017
// contamination_chance = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_CHANCE_COEFFICIENT * min(1/(steps*RAD_DISTANCE_COEFFICIENT), 1))
// contamination_strength = (strength-RAD_MINIMUM_CONTAMINATION) * RAD_CONTAMINATION_STR_COEFFICIENT * min(1/(steps*RAD_DISTANCE_COEFFICIENT), 1)
#define RAD_MINIMUM_CONTAMINATION 300 // How strong does a radiation wave have to be to contaminate objects
#define RAD_CONTAMINATION_CHANCE_COEFFICIENT 0.0075 // Higher means higher strength scaling contamination chance
#define RAD_CONTAMINATION_STR_COEFFICIENT 0.5 // Higher means higher strength scaling contamination strength
#define RAD_DISTANCE_COEFFICIENT 1 // Lower means further rad spread
#define RAD_HALF_LIFE 150 // The half-life of contaminated objects
+2
View File
@@ -43,6 +43,8 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
/proc/Inverse(x)
return 1 / x
#define InverseSquareLaw(initial_strength,cur_distance,initial_distance) (initial_strength*(initial_distance**2/cur_distance**2))
/proc/IsAboutEqual(a, b, deviation = 0.1)
return abs(a - b) <= deviation
+35
View File
@@ -0,0 +1,35 @@
/proc/get_rad_contents(atom/location, list/output=list()) // A special GetAllContents that doesn't search past things with rad insulation
. = output
if(!location)
return
output += location
var/datum/component/rad_insulation/insulation = location.GetComponent(/datum/component/rad_insulation)
if(insulation && insulation.protects)
return
for(var/i in 1 to location.contents.len)
var/static/list/ignored_things = typecacheof(list(/mob/dead, /obj/effect, /obj/docking_port, /turf, /atom/movable/lighting_object))
var/atom/thing = location.contents[i]
if(ignored_things[thing.type])
continue
get_rad_contents(thing, output)
/proc/radiation_pulse(turf/epicenter, intensity, range_modifier, log=FALSE, can_contaminate=TRUE)
if(!SSradiation.can_fire)
return
for(var/dir in GLOB.cardinals)
new /datum/radiation_wave(epicenter, dir, intensity, range_modifier, can_contaminate)
var/list/things = get_rad_contents(epicenter) //copypasta because I don't want to put special code in waves to handle their origin
for(var/k in 1 to things.len)
var/atom/thing = things[k]
if(!thing)
continue
thing.rad_act(intensity)
if(log)
log_game("Radiation pulse with intensity:[intensity] and range modifier:[range_modifier] in area [epicenter.loc.name] ")
return TRUE
+4
View File
@@ -0,0 +1,4 @@
PROCESSING_SUBSYSTEM_DEF(radiation)
name = "Radiation"
flags = SS_NO_INIT | SS_BACKGROUND
priority = 25
+9
View File
@@ -0,0 +1,9 @@
/datum/component/rad_insulation // Yes, this really is just a component to add some vars
var/amount // Multiplier for radiation strength passing through
var/protects // Does this protect things in its contents from being affected?
var/contamination_proof // Can this object be contaminated?
/datum/component/rad_insulation/Initialize(_amount=RAD_MEDIUM_INSULATION, _protects=TRUE, _contamination_proof=TRUE)
amount = _amount
protects = _protects
contamination_proof = _contamination_proof
+73
View File
@@ -0,0 +1,73 @@
#define RAD_AMOUNT_LOW 50
#define RAD_AMOUNT_MEDIUM 200
#define RAD_AMOUNT_HIGH 500
#define RAD_AMOUNT_EXTREME 1000
/datum/component/radioactive
dupe_mode = COMPONENT_DUPE_UNIQUE
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)
strength = _strength
hl3_release_date = _half_life
can_contaminate = _can_contaminate
if(istype(parent, /atom))
RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/rad_examine)
if(istype(parent, /obj/item))
RegisterSignal(COMSIG_ITEM_ATTACK, .proc/rad_attack)
RegisterSignal(COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack)
else
CRASH("Something that wasn't an atom was given /datum/component/radioactive")
return
START_PROCESSING(SSradiation, src)
/datum/component/radioactive/Destroy()
STOP_PROCESSING(SSradiation, src)
return ..()
/datum/component/radioactive/process()
radiation_pulse(get_turf(parent),strength,1,FALSE,can_contaminate)
if(hl3_release_date && prob(50))
strength -= strength / hl3_release_date
if(strength <= RAD_BACKGROUND_RADIATION)
qdel(src)
/datum/component/radioactive/InheritComponent(datum/component/C, i_am_original)
if(!i_am_original)
return
if(!hl3_release_date) // Permanently radioactive things don't get to grow stronger
return
var/datum/component/radioactive/other = C
strength = max(strength, other.strength)
return
/datum/component/radioactive/proc/rad_examine(mob/user, atom/thing)
var/atom/master = parent
var/list/out = list()
if(get_dist(master, user) <= 1)
out += "The air around [master] feels warm"
switch(strength)
if(RAD_AMOUNT_LOW to RAD_AMOUNT_MEDIUM)
out += "[out ? " and it " : "[master] "]feels weird to look at."
if(RAD_AMOUNT_MEDIUM to RAD_AMOUNT_HIGH)
out += "[out ? " and it " : "[master] "]seems to be glowing a bit."
if(RAD_AMOUNT_HIGH to INFINITY) //At this level the object can contaminate other objects
out += "[out ? " and it " : "[master] "]hurts to look at."
else
out += "."
to_chat(user, out.Join())
/datum/component/radioactive/proc/rad_attack(atom/movable/target, mob/living/user)
radiation_pulse(get_turf(target), strength/20)
target.rad_act(strength/2)
#undef RAD_AMOUNT_LOW
#undef RAD_AMOUNT_MEDIUM
#undef RAD_AMOUNT_HIGH
#undef RAD_AMOUNT_EXTREME
+98
View File
@@ -0,0 +1,98 @@
/datum/radiation_wave
var/turf/master_turf //The center of the wave
var/steps=0 //How far we've moved
var/intensity //How strong it was originaly
var/range_modifier //Higher than 1 makes it drop off faster, 0.5 makes it drop off half etc
var/move_dir //The direction of movement
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
move_dir = dir
__dirs = list()
__dirs+=turn(dir, 90)
__dirs+=turn(dir, -90)
intensity = _intensity
range_modifier = _range_modifier
can_contaminate = _can_contaminate
START_PROCESSING(SSradiation, src)
/datum/radiation_wave/Destroy()
STOP_PROCESSING(SSradiation, src)
return ..()
/datum/radiation_wave/process()
master_turf = get_step(master_turf, move_dir)
steps++
var/list/atoms = get_rad_atoms()
var/strength
if(steps>1)
strength = InverseSquareLaw(intensity, max(range_modifier*steps, 1), 1)
else
strength = intensity
if(strength<RAD_BACKGROUND_RADIATION)
qdel(src)
return
radiate(atoms, Floor(strength))
check_obstructions(atoms) // reduce our overall strength if there are radiation insulators
/datum/radiation_wave/proc/get_rad_atoms()
var/list/atoms = list()
var/distance = steps
var/cmove_dir = move_dir
var/cmaster_turf = master_turf
if(cmove_dir == NORTH || cmove_dir == SOUTH)
distance-- //otherwise corners overlap
atoms += get_rad_contents(cmaster_turf)
var/turf/place
for(var/dir in __dirs) //There should be just 2 dirs in here, left and right of the direction of movement
place = cmaster_turf
for(var/i in 1 to distance)
place = get_step(place, dir)
atoms += get_rad_contents(place)
return atoms
/datum/radiation_wave/proc/check_obstructions(list/atoms)
var/width = steps
var/cmove_dir = move_dir
if(cmove_dir == NORTH || cmove_dir == SOUTH)
width--
width = 1+(2*width)
for(var/k in 1 to atoms.len)
var/atom/thing = atoms[k]
if(!thing)
continue
var/datum/component/rad_insulation/insulation = thing.GetComponent(/datum/component/rad_insulation)
if(!insulation)
continue
intensity = intensity*(1-((1-insulation.amount)/width)) // The further out the rad wave goes the less it's affected by insulation
/datum/radiation_wave/proc/radiate(list/atoms, strength)
for(var/k in 1 to atoms.len)
var/atom/thing = atoms[k]
if(!thing)
continue
thing.rad_act(strength)
var/static/list/blacklisted = typecacheof(list(/turf))
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
var/datum/component/rad_insulation/insulation = thing.GetComponent(/datum/component/rad_insulation)
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))
@@ -43,7 +43,7 @@
else
H.randmutg()
H.domutcheck()
L.rad_act(20,1)
L.rad_act(20)
/datum/weather/rad_storm/end()
if(..())
+4 -424
View File
@@ -1,3 +1,7 @@
/*
Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
*/
// Away Missions
/area/awaymission
@@ -5,19 +9,6 @@
icon_state = "away"
has_gravity = TRUE
/area/awaymission/example
name = "Strange Station"
icon_state = "away"
/area/awaymission/desert
name = "Mars"
icon_state = "away"
/area/awaymission/listeningpost
name = "Listening Post"
icon_state = "away"
requires_power = FALSE
/area/awaymission/beach
name = "Beach"
icon_state = "away"
@@ -30,414 +21,3 @@
name = "Super Secret Room"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = TRUE
//Research Base Areas//--
/area/awaymission/research
name = "Research Outpost"
icon_state = "away"
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/research/interior
name = "Research Inside"
requires_power = TRUE
icon_state = "away2"
/area/awaymission/research/interior/cryo
name = "Research Cryostasis Room"
icon_state = "medbay"
/area/awaymission/research/interior/clonestorage
name = "Research Clone Storage"
icon_state = "cloning"
/area/awaymission/research/interior/genetics
name = "Research Genetics Research"
icon_state = "genetics"
/area/awaymission/research/interior/engineering
name = "Research Engineering"
icon_state = "engine"
/area/awaymission/research/interior/security
name = "Research Security"
icon_state = "security"
/area/awaymission/research/interior/secure
name = "Research Secure Vault"
/area/awaymission/research/interior/maint
name = "Research Maintenance"
icon_state = "maintcentral"
/area/awaymission/research/interior/dorm
name = "Research Dorms"
icon_state = "Sleep"
/area/awaymission/research/interior/escapepods
name = "Research Escape Wing"
icon_state = "exit"
/area/awaymission/research/interior/gateway
name = "Research Gateway"
icon_state = "start"
/area/awaymission/research/interior/bathroom
name = "Research Bathrooms"
icon_state = "restrooms"
/area/awaymission/research/interior/medbay
name = "Research Medbay"
icon_state = "medbay"
/area/awaymission/research/exterior
name = "Research Exterior"
icon_state = "unknown"
//Challenge Areas
/area/awaymission/challenge/start
name = "Where Am I?"
icon_state = "away"
/area/awaymission/challenge/main
name = "Danger Room"
icon_state = "away1"
requires_power = FALSE
/area/awaymission/challenge/end
name = "Administration"
icon_state = "away2"
requires_power = FALSE
//centcomAway areas
/area/awaymission/centcomAway
name = "XCC-P5831"
icon_state = "away"
requires_power = FALSE
/area/awaymission/centcomAway/general
name = "XCC-P5831"
music = 'sound/ambience/ambigen3.ogg'
/area/awaymission/centcomAway/maint
name = "XCC-P5831 Maintenance"
icon_state = "away1"
music = 'sound/ambience/ambisin1.ogg'
/area/awaymission/centcomAway/thunderdome
name = "XCC-P5831 Thunderdome"
icon_state = "away2"
music = 'sound/ambience/ambisin2.ogg'
/area/awaymission/centcomAway/cafe
name = "XCC-P5831 Kitchen Arena"
icon_state = "away3"
music = 'sound/ambience/ambisin3.ogg'
/area/awaymission/centcomAway/courtroom
name = "XCC-P5831 Courtroom"
icon_state = "away4"
music = 'sound/ambience/ambisin4.ogg'
/area/awaymission/centcomAway/hangar
name = "XCC-P5831 Hangars"
icon_state = "away4"
music = 'sound/ambience/ambigen5.ogg'
/*Cabin areas*/
/area/awaymission/snowforest
name = "Snow Forest"
icon_state = "away"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/cabin
name = "Cabin"
icon_state = "away2"
requires_power = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowforest/lumbermill
name = "Lumbermill"
icon_state = "away3"
//Packer Ship Areas
/area/awaymission/BMPship
name = "BMP Asteroids"
icon_state = "away"
/area/awaymission/BMPship/Aft
name = "Aft Block"
icon_state = "away1"
requires_power = TRUE
/area/awaymission/BMPship/Midship
name = "Midship Block"
icon_state = "away2"
requires_power = TRUE
/area/awaymission/BMPship/Fore
name = "Fore Block"
icon_state = "away3"
requires_power = TRUE
//Academy Areas
/area/awaymission/academy
name = "Academy Asteroids"
icon_state = "away"
/area/awaymission/academy/headmaster
name = "Academy Fore Block"
icon_state = "away1"
/area/awaymission/academy/classrooms
name = "Academy Classroom Block"
icon_state = "away2"
/area/awaymission/academy/academyaft
name = "Academy Ship Aft Block"
icon_state = "away3"
/area/awaymission/academy/academygate
name = "Academy Gateway"
icon_state = "away4"
/area/awaymission/academy/academycellar
name = "Academy Cellar"
icon_state = "away4"
/area/awaymission/academy/academyengine
name = "Academy Engine"
icon_state = "away4"
//Wild West Areas
/area/awaymission/wwmines
name = "Wild West Mines"
icon_state = "away1"
requires_power = FALSE
/area/awaymission/wwgov
name = "Wild West Mansion"
icon_state = "away2"
requires_power = FALSE
/area/awaymission/wwrefine
name = "Wild West Refinery"
icon_state = "away3"
requires_power = FALSE
/area/awaymission/wwvault
name = "Wild West Vault"
icon_state = "away3"
/area/awaymission/wwvaultdoors
name = "Wild West Vault Doors" // this is to keep the vault area being entirely lit because of requires_power
icon_state = "away2"
requires_power = FALSE
/*
* Areas
*/
//Gateroom gets its own APC specifically for the gate
/area/awaymission/gateroom
//Library, medbay, storage room
/area/awaymission/southblock
//Arrivals, security, hydroponics, shuttles (since they dont move, they dont need specific areas)
/area/awaymission/arrivalblock
//Crew quarters, cafeteria, chapel
/area/awaymission/midblock
//engineering, bridge (not really north but it doesnt really need its own APC)
/area/awaymission/northblock
//That massive research room
/area/awaymission/research
//Syndicate shuttle
/area/awaymission/syndishuttle
//Spacebattle Areas
/area/awaymission/spacebattle
name = "Space Battle"
icon_state = "away"
requires_power = FALSE
/area/awaymission/spacebattle/cruiser
name = "Nanotrasen Cruiser"
/area/awaymission/spacebattle/syndicate1
name = "Syndicate Assault Ship 1"
/area/awaymission/spacebattle/syndicate2
name = "Syndicate Assault Ship 2"
/area/awaymission/spacebattle/syndicate3
name = "Syndicate Assault Ship 3"
/area/awaymission/spacebattle/syndicate4
name = "Syndicate War Sphere 1"
/area/awaymission/spacebattle/syndicate5
name = "Syndicate War Sphere 2"
/area/awaymission/spacebattle/syndicate6
name = "Syndicate War Sphere 3"
/area/awaymission/spacebattle/syndicate7
name = "Syndicate Fighter"
/area/awaymission/spacebattle/secret
name = "Hidden Chamber"
//Snow Valley Areas//--
/area/awaymission/snowdin
name = "Snowdin Tundra Plains"
icon_state = "away"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowdin/post
name = "Snowdin Outpost"
requires_power = TRUE
/area/awaymission/snowdin/igloo
name = "Snowdin Igloos"
icon_state = "away2"
/area/awaymission/snowdin/cave
name = "Snowdin Caves"
icon_state = "away2"
/area/awaymission/snowdin/base
name = "Snowdin Main Base"
icon_state = "away3"
requires_power = TRUE
/area/awaymission/snowdin/dungeon1
name = "Snowdin Depths"
icon_state = "away2"
/area/awaymission/snowdin/sekret
name = "Snowdin Operations"
icon_state = "away3"
requires_power = TRUE
/area/awaycontent
name = "space"
/area/awaycontent/a1
icon_state = "awaycontent1"
/area/awaycontent/a2
icon_state = "awaycontent2"
/area/awaycontent/a3
icon_state = "awaycontent3"
/area/awaycontent/a4
icon_state = "awaycontent4"
/area/awaycontent/a5
icon_state = "awaycontent5"
/area/awaycontent/a6
icon_state = "awaycontent6"
/area/awaycontent/a7
icon_state = "awaycontent7"
/area/awaycontent/a8
icon_state = "awaycontent8"
/area/awaycontent/a9
icon_state = "awaycontent9"
/area/awaycontent/a10
icon_state = "awaycontent10"
/area/awaycontent/a11
icon_state = "awaycontent11"
/area/awaycontent/a11
icon_state = "awaycontent12"
/area/awaycontent/a12
icon_state = "awaycontent13"
/area/awaycontent/a13
icon_state = "awaycontent14"
/area/awaycontent/a14
icon_state = "awaycontent14"
/area/awaycontent/a15
icon_state = "awaycontent15"
/area/awaycontent/a16
icon_state = "awaycontent16"
/area/awaycontent/a17
icon_state = "awaycontent17"
/area/awaycontent/a18
icon_state = "awaycontent18"
/area/awaycontent/a19
icon_state = "awaycontent19"
/area/awaycontent/a20
icon_state = "awaycontent20"
/area/awaycontent/a21
icon_state = "awaycontent21"
/area/awaycontent/a22
icon_state = "awaycontent22"
/area/awaycontent/a23
icon_state = "awaycontent23"
/area/awaycontent/a24
icon_state = "awaycontent24"
/area/awaycontent/a25
icon_state = "awaycontent25"
/area/awaycontent/a26
icon_state = "awaycontent26"
/area/awaycontent/a27
icon_state = "awaycontent27"
/area/awaycontent/a28
icon_state = "awaycontent28"
/area/awaycontent/a29
icon_state = "awaycontent29"
/area/awaycontent/a30
icon_state = "awaycontent30"
+10 -4
View File
@@ -75,12 +75,19 @@
if (opacity && isturf(loc))
var/turf/T = loc
T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways.
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
//called if Initialize returns INITIALIZE_HINT_LATELOAD
/atom/proc/LateInitialize()
return
// Put your AddComponent() calls here
/atom/proc/ComponentInitialize()
return
/atom/Destroy()
if(alternate_appearances)
for(var/K in alternate_appearances)
@@ -478,19 +485,18 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/acid_act(acidpwr, acid_volume)
SendSignal(COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume)
return
/atom/proc/emag_act()
SendSignal(COMSIG_ATOM_EMAG_ACT)
return
/atom/proc/rad_act(strength)
SendSignal(COMSIG_ATOM_RAD_ACT)
/atom/proc/narsie_act()
SendSignal(COMSIG_ATOM_NARSIE_ACT)
return
/atom/proc/ratvar_act()
SendSignal(COMSIG_ATOM_RATVAR_ACT)
return
/atom/proc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
return FALSE
+1 -1
View File
@@ -268,7 +268,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
..()
explosion(src.loc, 0, 0, 4, 3, 0)
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
radiation_pulse(get_turf(src), 2, 5, 50, 1)
radiation_pulse(get_turf(src), 500)
//Meaty Ore
/obj/effect/meteor/meaty
+3 -3
View File
@@ -9,7 +9,7 @@
#define RADIATION_DURATION_MAX 30
#define RADIATION_ACCURACY_MULTIPLIER 3 //larger is less accurate
#define RADIATION_IRRADIATION_MULTIPLIER 0.2 //multiplier for how much radiation a test subject recieves
#define RADIATION_IRRADIATION_MULTIPLIER 10 //multiplier for how much radiation a test subject recieves
#define SCANNER_ACTION_SE 1
#define SCANNER_ACTION_UI 2
@@ -91,7 +91,7 @@
occupant_status += "<span class='bad'>DEAD</span>"
occupant_status += "</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Health:</div><div class='progressBar'><div style='width: [viable_occupant.health]%;' class='progressFill good'></div></div><div class='statusValue'>[viable_occupant.health] %</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Radiation Level:</div><div class='progressBar'><div style='width: [viable_occupant.radiation]%;' class='progressFill bad'></div></div><div class='statusValue'>[viable_occupant.radiation] %</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Radiation Level:</div><div class='progressBar'><div style='width: [viable_occupant.radiation/(RAD_MOB_SAFE/100)]%;' class='progressFill bad'></div></div><div class='statusValue'>[viable_occupant.radiation/(RAD_MOB_SAFE/100)] %</div></div>"
var/rejuvenators = viable_occupant.reagents.get_reagent_amount("potass_iodide")
occupant_status += "<div class='line'><div class='statusLabel'>Rejuvenators:</div><div class='progressBar'><div style='width: [round((rejuvenators / REJUVENATORS_MAX) * 100)]%;' class='progressFill highlight'></div></div><div class='statusValue'>[rejuvenators] units</div></div>"
occupant_status += "<div class='line'><div class='statusLabel'>Unique Enzymes :</div><div class='statusValue'><span class='highlight'>[viable_occupant.dna.unique_enzymes]</span></div></div>"
@@ -536,7 +536,7 @@
var/list/buffer_slot = buffer[buffer_num]
var/mob/living/carbon/viable_occupant = get_viable_occupant()
if(istype(buffer_slot))
viable_occupant.radiation += rand(10/(connected.damage_coeff ** 2),25/(connected.damage_coeff ** 2))
viable_occupant.radiation += rand(100/(connected.damage_coeff ** 2),250/(connected.damage_coeff ** 2))
//15 and 40 are just magic numbers that were here before so i didnt touch them, they are initial boundaries of damage
//Each laser level reduces damage by lvl^2, so no effect on 1 lvl, 4 times less damage on 2 and 9 times less damage on 3
//Numbers are this high because other way upgrading laser is just not worth the hassle, and i cant think of anything better to inmrove
+5 -2
View File
@@ -141,9 +141,12 @@
diag_hud.add_to_hud(src)
diag_hud_set_electrified()
update_icon()
/obj/machinery/door/airlock/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION)
/obj/machinery/door/airlock/proc/update_other_id()
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
if(A.closeOtherId == closeOtherId && A != src)
@@ -274,7 +277,7 @@
var/image/electrocution_skeleton_anim = image('icons/mob/human.dmi', user, icon_state = "electrocuted_base", layer=ABOVE_MOB_LAYER)
shock_image.color = rgb(0,0,0)
shock_image.override = TRUE
electrocution_skeleton_anim.appearance_flags = RESET_COLOR
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART
to_chat(user, "<span class='userdanger'>You feel a powerful shock course through your body!</span>")
if(user.client)
+1 -1
View File
@@ -180,7 +180,7 @@
..()
/obj/machinery/door/airlock/uranium/proc/radiate()
radiation_pulse(get_turf(src), 3, 3, 15, 0)
radiation_pulse(get_turf(src), 150)
return
/obj/machinery/door/airlock/plasma
@@ -474,7 +474,7 @@
fuel_per_cycle_idle = 10
fuel_per_cycle_active = 30
power_per_cycle = 50
var/rad_per_cycle = 0.3
var/rad_per_cycle = 3
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/generator_init()
fuel = new /obj/item/stack/sheet/mineral/uranium(src)
@@ -485,4 +485,4 @@
/obj/item/mecha_parts/mecha_equipment/generator/nuclear/process()
if(..())
radiation_pulse(get_turf(src), 2, 7, rad_per_cycle, 1)
radiation_pulse(get_turf(src), rad_per_cycle)
@@ -17,7 +17,7 @@
var/direct = pick(GLOB.alldirs)
var/steps_amt = pick(1;25,2;50,3,4;200)
for(var/j in 1 to steps_amt)
addtimer(CALLBACK(src, .proc/_step, expl, direct), j)
addtimer(CALLBACK(GLOBAL_PROC, .proc/_step, expl, direct), j)
/obj/effect/explosion
name = "fire"
+108 -35
View File
@@ -1,8 +1,12 @@
#define RAD_LEVEL_NORMAL 10
#define RAD_LEVEL_MODERATE 30
#define RAD_LEVEL_HIGH 75
#define RAD_LEVEL_VERY_HIGH 125
#define RAD_LEVEL_CRITICAL 200
#define RAD_LEVEL_NORMAL 9
#define RAD_LEVEL_MODERATE 100
#define RAD_LEVEL_HIGH 400
#define RAD_LEVEL_VERY_HIGH 800
#define RAD_LEVEL_CRITICAL 1500
#define RAD_MEASURE_SMOOTHING 5
#define RAD_GRACE_PERIOD 2
/obj/item/device/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis
name = "geiger counter"
@@ -14,25 +18,56 @@
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
materials = list(MAT_METAL = 150, MAT_GLASS = 150)
var/scanning = 0
var/radiation_count = 0
/obj/item/device/geiger_counter/New()
..()
var/muted = TRUE
var/danger = 0
var/grace = RAD_GRACE_PERIOD
var/static/list/sounds = list( //hah, static. get it?
list('sound/items/geiger/low1.ogg'=1, 'sound/items/geiger/low2.ogg'=1, 'sound/items/geiger/low3.ogg'=1, 'sound/items/geiger/low4.ogg'=1),
list('sound/items/geiger/med1.ogg'=1, 'sound/items/geiger/med2.ogg'=1, 'sound/items/geiger/med3.ogg'=1, 'sound/items/geiger/med4.ogg'=1),
list('sound/items/geiger/high1.ogg'=1, 'sound/items/geiger/high2.ogg'=1, 'sound/items/geiger/high3.ogg'=1, 'sound/items/geiger/high4.ogg'=1),
list('sound/items/geiger/ext1.ogg'=1, 'sound/items/geiger/ext2.ogg'=1, 'sound/items/geiger/ext3.ogg'=1, 'sound/items/geiger/ext4.ogg'=1)
)
var/scanning = FALSE
var/radiation_count = 0
var/current_tick_amount = 0
var/last_tick_amount = 0
var/fail_to_receive = 0
var/current_warning = 1
/obj/item/device/geiger_counter/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
soundLoop()
/obj/item/device/geiger_counter/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/device/geiger_counter/process()
if(emagged)
if(radiation_count < 20)
radiation_count++
return 0
if(radiation_count > 0)
radiation_count--
update_icon()
update_icon()
if(!scanning)
current_tick_amount = 0
return
radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING
radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING
if(current_tick_amount)
grace = RAD_GRACE_PERIOD
last_tick_amount = current_tick_amount
else if(!emagged)
grace--
if(grace <= 0)
radiation_count = 0
update_sound()
current_tick_amount = 0
/obj/item/device/geiger_counter/examine(mob/user)
..()
@@ -56,6 +91,8 @@
if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
to_chat(user, "<span class='boldannounce'>Ambient radiation levels above critical level!</span>")
to_chat(user, "<span class='notice'>The last radiation amount detected was [last_tick_amount]</span>")
/obj/item/device/geiger_counter/update_icon()
if(!scanning)
icon_state = "geiger_off"
@@ -78,24 +115,43 @@
icon_state = "geiger_on_5"
..()
/obj/item/device/geiger_counter/rad_act(amount)
if(!amount && scanning)
return 0
if(emagged)
amount = Clamp(amount, 0, 25) //Emagged geiger counters can only accept 25 radiation at a time
radiation_count += amount
if(isliving(loc))
var/mob/living/M = loc
if(!emagged)
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] RADIATION PULSE DETECTED.</span>")
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] Severity: [amount]</span>")
/obj/item/device/geiger_counter/proc/update_sound()
switch(radiation_count)
if(RAD_BACKGROUND_RADIATION to RAD_LEVEL_MODERATE)
danger = 1
if(RAD_LEVEL_MODERATE to RAD_LEVEL_VERY_HIGH)
danger = 2
if(RAD_LEVEL_VERY_HIGH to RAD_LEVEL_CRITICAL)
danger = 3
if(RAD_LEVEL_CRITICAL to INFINITY)
danger = 4
else
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] !@%$AT!(N P!LS! D/TEC?ED.</span>")
to_chat(M, "<span class='boldannounce'>[icon2html(src, M)] &!F2rity: <=[amount]#1</span>")
danger = 0
if(!danger)
muted = TRUE
else if(muted)
muted = FALSE
soundLoop()
/obj/item/device/geiger_counter/proc/soundLoop()
if(muted || !danger)
return
playsound(src, pickweight(sounds[danger]), 25)
addtimer(CALLBACK(src, .proc/soundLoop), 2)
/obj/item/device/geiger_counter/rad_act(amount)
if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
return
current_tick_amount += amount
update_icon()
/obj/item/device/geiger_counter/attack_self(mob/user)
scanning = !scanning
if(!scanning)
muted = TRUE
else
muted = FALSE
soundLoop()
update_icon()
to_chat(user, "<span class='notice'>[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].</span>")
@@ -103,12 +159,7 @@
if(user.a_intent == INTENT_HELP)
if(!emagged)
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='notice'>You scan [M]'s radiation levels with [src]...</span>")
if(!M.radiation)
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
return 1
else
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].</span>")
return 1
addtimer(CALLBACK(src, .proc/scan, M, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
else
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='danger'>You project [src]'s stored radiation into [M]'s body!</span>")
M.rad_act(radiation_count)
@@ -116,6 +167,28 @@
return 1
..()
/obj/item/device/geiger_counter/proc/scan(atom/A, mob/user)
var/rad_strength = 0
for(var/i in get_rad_contents(A)) // Yes it's intentional that you can't detect radioactive things under rad protection. Gives traitors a way to hide their glowing green rocks.
var/atom/thing = i
if(!thing)
continue
var/datum/component/radioactive/radiation = thing.GetComponent(/datum/component/radioactive)
if(radiation)
rad_strength += radiation.strength
if(isliving(A))
var/mob/living/M = A
if(!M.radiation)
to_chat(user, "<span class='notice'>[icon2html(src, user)] Radiation levels within normal boundaries.</span>")
else
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].</span>")
if(rad_strength)
to_chat(user, "<span class='boldannounce'>[icon2html(src, user)] Subject has irradiated objects on them. Radioactive strength: [rad_strength]</span>")
else
to_chat(user, "<span class='notice'>[icon2html(src, user)] Subject is free of radioactive contamination.</span>")
/obj/item/device/geiger_counter/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/screwdriver) && emagged)
if(scanning)
@@ -1,53 +1,53 @@
/obj/item/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos"
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion
name = "HE Grenade"
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
icon_state = "concussion"
origin_tech = "materials=3;magnets=4;syndicate=2"
/obj/item/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion/frag
name = "frag grenade"
desc = "Fire in the hole."
icon_state = "frag"
/obj/item/grenade/gluon
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
name = "gluon frag grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "bluefrag"
item_state = "flashbang"
var/freeze_range = 4
var/rad_damage = 35
var/stamina_damage = 30
/obj/item/grenade/gluon/prime()
update_mob()
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage)
for(var/turf/T in view(freeze_range,loc))
if(isfloorturf(T))
var/turf/open/floor/F = T
F.wet = TURF_WET_PERMAFROST
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
for(var/mob/living/carbon/L in T)
L.adjustStaminaLoss(stamina_damage)
L.bodytemperature -= 230
qdel(src)
/obj/item/grenade/syndieminibomb
desc = "A syndicate manufactured explosive used to sow destruction and chaos."
name = "syndicate minibomb"
icon = 'icons/obj/grenade.dmi'
icon_state = "syndicate"
item_state = "flashbang"
origin_tech = "materials=3;magnets=4;syndicate=3"
/obj/item/grenade/syndieminibomb/prime()
update_mob()
explosion(src.loc,1,2,4,flame_range = 2)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion
name = "HE Grenade"
desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction."
icon_state = "concussion"
origin_tech = "materials=3;magnets=4;syndicate=2"
/obj/item/grenade/syndieminibomb/concussion/prime()
update_mob()
explosion(src.loc,0,2,3,flame_range = 3)
qdel(src)
/obj/item/grenade/syndieminibomb/concussion/frag
name = "frag grenade"
desc = "Fire in the hole."
icon_state = "frag"
/obj/item/grenade/gluon
desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors."
name = "gluon frag grenade"
icon = 'icons/obj/grenade.dmi'
icon_state = "bluefrag"
item_state = "flashbang"
var/freeze_range = 4
var/rad_damage = 350
var/stamina_damage = 30
/obj/item/grenade/gluon/prime()
update_mob()
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
radiation_pulse(get_turf(src), rad_damage)
for(var/turf/T in view(freeze_range,loc))
if(isfloorturf(T))
var/turf/open/floor/F = T
F.wet = TURF_WET_PERMAFROST
addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100))
for(var/mob/living/carbon/L in T)
L.adjustStaminaLoss(stamina_damage)
L.bodytemperature -= 230
qdel(src)
+4 -4
View File
@@ -33,7 +33,7 @@
if(cooldown < world.time - 60)
cooldown = world.time
flick(pulseicon, src)
radiation_pulse(get_turf(src), 1, 4, 40, 1)
radiation_pulse(get_turf(src), 400, 2)
//nuke core box, for carrying the core
/obj/item/nuke_core_container
@@ -140,7 +140,7 @@
return
else
to_chat(user, "<span class='notice'>As it touches \the [src], both \the [src] and \the [W] burst into dust!</span>")
radiation_pulse(get_turf(user), 1, 2, 10, 1)
radiation_pulse(get_turf(user), 100)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
qdel(W)
qdel(src)
@@ -151,7 +151,7 @@
return FALSE
var/mob/ded = user
to_chat(user, "<span class='warning'>You reach for the supermatter sliver with your hands. That was dumb.</span>")
radiation_pulse(get_turf(user), 2, 4, 50, 1)
radiation_pulse(get_turf(user), 500, 2)
playsound(get_turf(user), 'sound/effects/supermatter.ogg', 50, 1)
ded.dust()
@@ -240,7 +240,7 @@
user.visible_message("<span class='danger'>As [user] touches \the [AM] with \a [src], silence fills the room...</span>",\
"<span class='userdanger'>You touch \the [AM] with \the [src], and everything suddenly goes silent.</span>\n<span class='notice'>\The [AM] flashes into dust, and soon as you can register this, you do as well.</span>",\
"<span class='italics'>Everything suddenly goes silent.</span>")
radiation_pulse(get_turf(user), 2, 4, 50, 1)
radiation_pulse(get_turf(user), 500, 2)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
user.dust()
icon_state = "supermatter_tongs"
+8 -4
View File
@@ -29,9 +29,13 @@
can_be_unanchored = FALSE
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/falsewall/New(loc)
..()
air_update_turf(1)
/obj/structure/falsewall/Initialize()
. = ..()
air_update_turf(TRUE)
/obj/structure/falsewall/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION)
/obj/structure/falsewall/Destroy()
density = FALSE
@@ -195,7 +199,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
radiation_pulse(get_turf(src), 0, 3, 15, 1)
radiation_pulse(get_turf(src), 150)
for(var/turf/closed/wall/mineral/uranium/T in orange(1,src))
T.radiate()
last_event = world.time
+4
View File
@@ -10,6 +10,10 @@
var/can_displace = TRUE //If the girder can be moved around by wrenching it
max_integrity = 200
/obj/structure/girder/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION)
/obj/structure/girder/examine(mob/user)
. = ..()
switch(state)
+4
View File
@@ -17,6 +17,10 @@
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
/obj/structure/grille/examine(mob/user)
..()
if(anchored)
+4
View File
@@ -61,6 +61,10 @@
/obj/structure/holosign/barrier/engineering
icon_state = "holosign_engi"
/obj/structure/holosign/barrier/engineering/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_LIGHT_INSULATION)
/obj/structure/holosign/barrier/atmos
name = "holo firelock"
desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects from passing through, gas is kept out."
+30 -3
View File
@@ -22,10 +22,13 @@
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
CanAtmosPass = ATMOS_PASS_DENSITY
/obj/structure/mineral_door/New(location)
..()
/obj/structure/mineral_door/Initialize()
. = ..()
initial_state = icon_state
air_update_turf(1)
air_update_turf(TRUE)
/obj/structure/mineral_door/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION)
/obj/structure/mineral_door/Destroy()
density = FALSE
@@ -151,11 +154,17 @@
sheetType = /obj/item/stack/sheet/mineral/silver
max_integrity = 300
/obj/structure/mineral_door/silver/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION)
/obj/structure/mineral_door/gold
name = "gold door"
icon_state = "gold"
sheetType = /obj/item/stack/sheet/mineral/gold
/obj/structure/mineral_door/gold/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION)
/obj/structure/mineral_door/uranium
name = "uranium door"
icon_state = "uranium"
@@ -163,6 +172,9 @@
max_integrity = 300
light_range = 2
/obj/structure/mineral_door/uranium/ComponentInitialize()
return
/obj/structure/mineral_door/sandstone
name = "sandstone door"
icon_state = "sandstone"
@@ -172,6 +184,9 @@
/obj/structure/mineral_door/transparent
opacity = FALSE
/obj/structure/mineral_door/transparent/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION)
/obj/structure/mineral_door/transparent/Close()
..()
set_opacity(FALSE)
@@ -181,6 +196,9 @@
icon_state = "plasma"
sheetType = /obj/item/stack/sheet/mineral/plasma
/obj/structure/mineral_door/transparent/plasma/ComponentInitialize()
return
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user, params)
if(W.is_hot())
var/turf/T = get_turf(src)
@@ -204,6 +222,9 @@
sheetType = /obj/item/stack/sheet/mineral/diamond
max_integrity = 1000
/obj/structure/mineral_door/transparent/diamond/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION)
/obj/structure/mineral_door/wood
name = "wood door"
icon_state = "wood"
@@ -213,6 +234,9 @@
resistance_flags = FLAMMABLE
max_integrity = 200
/obj/structure/mineral_door/wood/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION)
/obj/structure/mineral_door/paperframe
name = "paper frame door"
icon_state = "paperframe"
@@ -227,6 +251,9 @@
. = ..()
queue_smooth_neighbors(src)
/obj/structure/mineral_door/paperframe/ComponentInitialize()
return
/obj/structure/mineral_door/paperframe/Destroy()
queue_smooth_neighbors(src)
return ..()
+4
View File
@@ -8,6 +8,10 @@
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
var/buildable_sign = 1 //unwrenchable and modifiable
/obj/structure/sign/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) // Since this is on a wall if it becomes irradiated it will smuggle the radiation past the wall
/obj/structure/sign/basic
name = "blank sign"
desc = "How can signs be real if our eyes aren't real?"
+1 -1
View File
@@ -131,7 +131,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
radiation_pulse(get_turf(src), 3, 3, 12, 0)
radiation_pulse(get_turf(src), 30)
last_event = world.time
active = null
return
+10
View File
@@ -78,6 +78,10 @@
real_explosion_block = explosion_block
explosion_block = EXPLOSION_BLOCK_PROC
/obj/structure/window/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION, TRUE, FALSE)
/obj/structure/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
switch(the_rcd.mode)
if(RCD_DECONSTRUCT)
@@ -432,6 +436,9 @@
explosion_block = 1
glass_type = /obj/item/stack/sheet/rglass
/obj/structure/window/reinforced/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION, TRUE, FALSE)
/obj/structure/window/reinforced/spawner/east
dir = EAST
@@ -455,6 +462,9 @@
explosion_block = 1
glass_type = /obj/item/stack/sheet/plasmaglass
/obj/structure/window/plasma/ComponentInitialize()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE)
/obj/structure/window/plasma/spawner/east
dir = EAST
+4
View File
@@ -5,6 +5,10 @@
density = TRUE
blocks_air = 1
/turf/closed/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION)
/turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
@@ -206,7 +206,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
radiation_pulse(get_turf(src), 3, 3, 1, 0)
radiation_pulse(get_turf(src), 10)
for(var/turf/open/floor/mineral/uranium/T in orange(1,src))
T.radiate()
last_event = world.time
@@ -193,7 +193,7 @@
var/list/L = list(45)
if(IsOdd(dir2angle(dir))) // We're going at an angle and we want thick angled tunnels.
L -= 45
L += -45
// Expand the edges of our tunnel
for(var/edge_angle in L)
@@ -70,7 +70,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
radiation_pulse(get_turf(src), 3, 3, 4, 0)
radiation_pulse(get_turf(src), 40)
for(var/turf/closed/wall/mineral/uranium/T in orange(1,src))
T.radiate()
last_event = world.time
@@ -13,6 +13,10 @@
girder_type = /obj/structure/girder/reinforced
explosion_block = 2
/turf/closed/wall/r_wall/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION)
/turf/closed/wall/r_wall/deconstruction_hints(mob/user)
switch(d_state)
if(INTACT)
+2
View File
@@ -44,6 +44,8 @@
if (opacity)
has_opaque_atom = TRUE
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
/turf/open/space/attack_ghost(mob/dead/observer/user)
+3
View File
@@ -56,6 +56,9 @@
if (opacity)
has_opaque_atom = TRUE
ComponentInitialize()
return INITIALIZE_HINT_NORMAL
/turf/proc/Initalize_Atmos(times_fired)
+1 -2
View File
@@ -116,11 +116,10 @@ GLOBAL_PROTECT(security_mode)
/world/Topic(T, addr, master, key)
var/static/list/topic_handlers = TopicHandlers()
var/list/input = params2list(T)
var/datum/world_topic/handler
for(var/I in topic_handlers)
if(input[I])
if(I in input)
handler = topic_handlers[I]
break
+3 -3
View File
@@ -34,11 +34,11 @@
to_chat(user, "<span class='notice'>You disassemble [src].</span>")
bombassembly.loc = user.loc
bombassembly.forceMove(user.drop_location())
bombassembly.master = null
bombassembly = null
bombtank.loc = user.loc
bombtank.forceMove(user.drop_location())
bombtank.master = null
bombtank = null
@@ -55,7 +55,7 @@
..()
/obj/item/device/onetankbomb/attack_self(mob/user) //pressing the bomb accesses its assembly
bombassembly.attack_self(user, 1)
bombassembly.attack_self(user, TRUE)
add_fingerprint(user)
return
@@ -48,6 +48,10 @@ Pipelines + Other Objects -> Pipe network
SSair.atmos_machinery += src
SetInitDirections()
/obj/machinery/atmospherics/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) //This would be a bad idea
/obj/machinery/atmospherics/Destroy()
for(DEVICE_TYPE_LOOP)
nullifyNode(I)
@@ -1,4 +1,34 @@
//Academy Areas
/area/awaymission/academy
name = "Academy Asteroids"
icon_state = "away"
/area/awaymission/academy/headmaster
name = "Academy Fore Block"
icon_state = "away1"
/area/awaymission/academy/classrooms
name = "Academy Classroom Block"
icon_state = "away2"
/area/awaymission/academy/academyaft
name = "Academy Ship Aft Block"
icon_state = "away3"
/area/awaymission/academy/academygate
name = "Academy Gateway"
icon_state = "away4"
/area/awaymission/academy/academycellar
name = "Academy Cellar"
icon_state = "away4"
/area/awaymission/academy/academyengine
name = "Academy Engine"
icon_state = "away4"
//Academy Items
/obj/item/paper/fluff/awaymissions/academy/console_maint
@@ -1,4 +1,21 @@
/*Cabin areas*/
/area/awaymission/snowforest
name = "Snow Forest"
icon_state = "away"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/cabin
name = "Cabin"
icon_state = "away2"
requires_power = TRUE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowforest/lumbermill
name = "Lumbermill"
icon_state = "away3"
/obj/structure/firepit
name = "firepit"
desc = "warm and toasty"
@@ -1,3 +1,33 @@
//Areas
/area/awaymission/caves/BMP_asteroid
name = "\improper BMP Asteroid Level 1"
icon_state = "awaycontent1"
/area/awaymission/caves/BMP_asteroid/level_two
name = "\improper BMP Asteroid Level 2"
icon_state = "awaycontent2"
/area/awaymission/caves/BMP_asteroid/level_three
name = "\improper BMP Asteroid Level 3"
icon_state = "awaycontent3"
/area/awaymission/caves/BMP_asteroid/level_four
name = "\improper BMP Asteroid Level 4"
icon_state = "awaycontent4"
/area/awaymission/caves/research
name = "Research Outpost"
icon_state = "awaycontent5"
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/caves/northblock //engineering, bridge (not really north but it doesnt really need its own APC)
/area/awaymission/caves/listeningpost
name = "Listening Post"
icon_state = "awaycontent6"
requires_power = FALSE
//caves papers
/obj/item/paper/crumpled/awaymissions/caves/unsafe_area
@@ -1,29 +1,63 @@
//centcomAway items
//centcomAway areas
/area/awaymission/centcomAway
name = "XCC-P5831"
icon_state = "away"
requires_power = FALSE
/area/awaymission/centcomAway/general
name = "XCC-P5831"
music = 'sound/ambience/ambigen3.ogg'
/area/awaymission/centcomAway/maint
name = "XCC-P5831 Maintenance"
icon_state = "away1"
music = 'sound/ambience/ambisin1.ogg'
/area/awaymission/centcomAway/thunderdome
name = "XCC-P5831 Thunderdome"
icon_state = "away2"
music = 'sound/ambience/ambisin2.ogg'
/area/awaymission/centcomAway/cafe
name = "XCC-P5831 Kitchen Arena"
icon_state = "away3"
music = 'sound/ambience/ambisin3.ogg'
/area/awaymission/centcomAway/courtroom
name = "XCC-P5831 Courtroom"
icon_state = "away4"
music = 'sound/ambience/ambisin4.ogg'
/area/awaymission/centcomAway/hangar
name = "XCC-P5831 Hangars"
icon_state = "away4"
music = 'sound/ambience/ambigen5.ogg'
//centcomAway items
/obj/item/paper/pamphlet/centcom/visitor_info
name = "Visitor Info Pamphlet"
info = "<b> XCC-P5831 Visitor Information </b><br>\
Greetings, visitor, to XCC-P5831! As you may know, this outpost was once \
used as Nanotrasen's CENTRAL COMMAND STATION, organizing and coordinating company \
projects across the vastness of space. <br>\
Since the completion of the much more efficient CC-A5831 on March 8, 2553, XCC-P5831 no longer \
acts as NT's base of operations but still plays a very important role its corporate affairs; \
serving as a supply and repair depot, as well as being host to its most important legal proceedings\
and the thrilling pay-per-view broadcasts of <i>PLASTEEL CHEF</i> and <i>THUNDERDOME LIVE</i>.<br> \
We hope you enjoy your stay!"
name = "Visitor Info Pamphlet"
info = "<b> XCC-P5831 Visitor Information </b><br>\
Greetings, visitor, to XCC-P5831! As you may know, this outpost was once \
used as Nanotrasen's CENTRAL COMMAND STATION, organizing and coordinating company \
projects across the vastness of space. <br>\
Since the completion of the much more efficient CC-A5831 on March 8, 2553, XCC-P5831 no longer \
acts as NT's base of operations but still plays a very important role its corporate affairs; \
serving as a supply and repair depot, as well as being host to its most important legal proceedings\
and the thrilling pay-per-view broadcasts of <i>PLASTEEL CHEF</i> and <i>THUNDERDOME LIVE</i>.<br> \
We hope you enjoy your stay!"
/obj/item/paper/fluff/awaymissions/centcom/gateway_memo
name = "Memo to XCC-P5831 QM"
info = "<b>From: XCC-P5831 Management Office</b><br>\
<b>To: Rolf Ingram, XCC-P5831 Quartermaster</b><br>\
Hey, Rolf, once you pack that gateway into the ferry hangar, <i>make absolutely sure</i> \
to deactivate it! As you may know, SS13 has recently got its network up and running, \
which means that until we get this gate shipped off to the next colonization staging \
area, they'll be able to hop straight in here if its hooked up on our end.<br>\
Obviously, that's something I'd very much rather avoid. Our forensics and medical \
teams never did figure out what happened that last time... and I can't wrap my head \
around it myself. Why would a shuttle full of evacuees all snap and beat each other \
to death the moment they reached safety?<br>\
- D. Cereza"
name = "Memo to XCC-P5831 QM"
info = "<b>From: XCC-P5831 Management Office</b><br>\
<b>To: Rolf Ingram, XCC-P5831 Quartermaster</b><br>\
Hey, Rolf, once you pack that gateway into the ferry hangar, <i>make absolutely sure</i> \
to deactivate it! As you may know, SS13 has recently got its network up and running, \
which means that until we get this gate shipped off to the next colonization staging \
area, they'll be able to hop straight in here if its hooked up on our end.<br>\
Obviously, that's something I'd very much rather avoid. Our forensics and medical \
teams never did figure out what happened that last time... and I can't wrap my head \
around it myself. Why would a shuttle full of evacuees all snap and beat each other \
to death the moment they reached safety?<br>\
- D. Cereza"
@@ -1,3 +1,19 @@
//Challenge Areas
/area/awaymission/challenge/start
name = "Where Am I?"
icon_state = "away"
/area/awaymission/challenge/main
name = "Danger Room"
icon_state = "away1"
requires_power = FALSE
/area/awaymission/challenge/end
name = "Administration"
icon_state = "away2"
requires_power = FALSE
/obj/machinery/power/emitter/energycannon
name = "Energy Cannon"
@@ -1,4 +1,43 @@
/////////// moonoutpost19 papers
// moonoutpost19
//Areas
/area/awaymission/moonoutpost19
name = "space"
icon_state = "awaycontent1"
/area/awaymission/moonoutpost19/arrivals
name = "MO19 Arrivals"
icon_state = "awaycontent2"
/area/awaymission/moonoutpost19/research
name = "MO19 Research"
icon_state = "awaycontent3"
/area/awaymission/moonoutpost19/syndicate
name = "Syndicate Outpost"
icon_state = "awaycontent4"
/area/awaymission/moonoutpost19/main
name = "Khonsu 19"
always_unpowered = TRUE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
poweralm = FALSE
ambientsounds = list('sound/ambience/ambimine.ogg')
icon_state = "awaycontent5"
/area/awaymission/moonoutpost19/hive
name = "The Hive"
always_unpowered = FALSE
has_gravity = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
poweralm = FALSE
icon_state = "awaycontent6"
//Papers
/obj/item/paper/crumpled/awaymissions/moonoutpost19/hastey_note
name = "Hastily Written Note"
@@ -1,3 +1,67 @@
//Research Base Areas//--
/area/awaymission/research
name = "Research Outpost"
icon_state = "away"
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/research/interior
name = "Research Inside"
requires_power = TRUE
icon_state = "away2"
/area/awaymission/research/interior/cryo
name = "Research Cryostasis Room"
icon_state = "medbay"
/area/awaymission/research/interior/clonestorage
name = "Research Clone Storage"
icon_state = "cloning"
/area/awaymission/research/interior/genetics
name = "Research Genetics Research"
icon_state = "genetics"
/area/awaymission/research/interior/engineering
name = "Research Engineering"
icon_state = "engine"
/area/awaymission/research/interior/security
name = "Research Security"
icon_state = "security"
/area/awaymission/research/interior/secure
name = "Research Secure Vault"
/area/awaymission/research/interior/maint
name = "Research Maintenance"
icon_state = "maintcentral"
/area/awaymission/research/interior/dorm
name = "Research Dorms"
icon_state = "Sleep"
/area/awaymission/research/interior/escapepods
name = "Research Escape Wing"
icon_state = "exit"
/area/awaymission/research/interior/gateway
name = "Research Gateway"
icon_state = "start"
/area/awaymission/research/interior/bathroom
name = "Research Bathrooms"
icon_state = "restrooms"
/area/awaymission/research/interior/medbay
name = "Research Medbay"
icon_state = "medbay"
/area/awaymission/research/exterior
name = "Research Exterior"
icon_state = "unknown"
//research papers
/obj/item/paper/crumpled/awaymissions/research/sensitive_info
@@ -1,3 +1,40 @@
//Snow Valley Areas//--
/area/awaymission/snowdin
name = "Snowdin Tundra Plains"
icon_state = "awaycontent1"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowdin/post
name = "Snowdin Outpost"
requires_power = TRUE
icon_state = "awaycontent2"
/area/awaymission/snowdin/igloo
name = "Snowdin Igloos"
icon_state = "awaycontent3"
/area/awaymission/snowdin/cave
name = "Snowdin Caves"
icon_state = "awaycontent4"
/area/awaymission/snowdin/base
name = "Snowdin Main Base"
icon_state = "awaycontent5"
requires_power = TRUE
/area/awaymission/snowdin/dungeon1
name = "Snowdin Depths"
icon_state = "awaycontent6"
/area/awaymission/snowdin/sekret
name = "Snowdin Operations"
icon_state = "awaycontent7"
requires_power = TRUE
/////////// papers
/obj/item/paper/crumpled/ruins/snowdin/snowdingatewaynotice
@@ -0,0 +1,42 @@
//Spacebattle Areas
/area/awaymission/spacebattle
name = "Space Battle"
icon_state = "awaycontent1"
requires_power = FALSE
/area/awaymission/spacebattle/cruiser
name = "Nanotrasen Cruiser"
icon_state = "awaycontent2"
/area/awaymission/spacebattle/syndicate1
name = "Syndicate Assault Ship 1"
icon_state = "awaycontent3"
/area/awaymission/spacebattle/syndicate2
name = "Syndicate Assault Ship 2"
icon_state = "awaycontent4"
/area/awaymission/spacebattle/syndicate3
name = "Syndicate Assault Ship 3"
icon_state = "awaycontent5"
/area/awaymission/spacebattle/syndicate4
name = "Syndicate War Sphere 1"
icon_state = "awaycontent6"
/area/awaymission/spacebattle/syndicate5
name = "Syndicate War Sphere 2"
icon_state = "awaycontent7"
/area/awaymission/spacebattle/syndicate6
name = "Syndicate War Sphere 3"
icon_state = "awaycontent8"
/area/awaymission/spacebattle/syndicate7
name = "Syndicate Fighter"
icon_state = "awaycontent9"
/area/awaymission/spacebattle/secret
name = "Hidden Chamber"
icon_state = "awaycontent10"
@@ -0,0 +1,39 @@
// undergroundoutpost45
//Areas
/area/awaymission/undergroundoutpost45
name = "space"
icon_state = "awaycontent1"
/area/awaymission/undergroundoutpost45/central
name = "UO45 Central Hall"
icon_state = "awaycontent2"
/area/awaymission/undergroundoutpost45/crew_quarters
name = "UO45 Crew Quarters"
icon_state = "awaycontent3"
/area/awaymission/undergroundoutpost45/engineering
name = "UO45 Engineering"
icon_state = "awaycontent4"
/area/awaymission/undergroundoutpost45/mining
name = "UO45 Mining"
icon_state = "awaycontent5"
/area/awaymission/undergroundoutpost45/research
name = "UO45 Research"
icon_state = "awaycontent6"
/area/awaymission/undergroundoutpost45/gateway
name = "UO45 Gateway"
icon_state = "awaycontent7"
/area/awaymission/undergroundoutpost45/caves
name = "UO45 Caves"
icon_state = "awaycontent8"
always_unpowered = TRUE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
poweralm = FALSE
@@ -4,6 +4,33 @@
* Meat Grinder
*/
//Areas
/area/awaymission/wildwest/mines
name = "Wild West Mines"
icon_state = "away1"
requires_power = FALSE
/area/awaymission/wildwest/gov
name = "Wild West Mansion"
icon_state = "away2"
requires_power = FALSE
/area/awaymission/wildwest/refine
name = "Wild West Refinery"
icon_state = "away3"
requires_power = FALSE
/area/awaymission/wildwest/vault
name = "Wild West Vault"
icon_state = "away3"
/area/awaymission/wildwest/vaultdoors
name = "Wild West Vault Doors" // this is to keep the vault area being entirely lit because of requires_power
icon_state = "away2"
requires_power = FALSE
////////// wildwest papers
/obj/item/paper/fluff/awaymissions/wildwest/grinder
+2 -1
View File
@@ -51,7 +51,8 @@
/obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity)
..()
display_visor_message("Radiation pulse detected! Magnitude: <span class='green'>[severity]</span> RADs.")
if(severity > RAD_AMOUNT_EXTREME)
display_visor_message("Radiation pulse detected! Magnitude: <span class='green'>[severity]</span> RADs.")
/obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity)
..()
+10
View File
@@ -116,6 +116,10 @@
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
resistance_flags = 0
/obj/item/clothing/head/radiation/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE)
/obj/item/clothing/suit/radiation
name = "radiation suit"
desc = "A suit that protects against radiation. The label reads, 'Made with lead. Please do not consume insulation.'"
@@ -133,3 +137,9 @@
equip_delay_other = 60
flags_inv = HIDEJUMPSUIT
resistance_flags = 0
/obj/item/clothing/suit/radiation/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE)
// Just don't want things to be irradiated inside this
// Except things on the mob aren't even inside the suit so ehhhhhh
+2
View File
@@ -23,6 +23,8 @@
if (l_color != NONSENSICAL_VALUE)
light_color = l_color
SendSignal(COMSIG_ATOM_SET_LIGHT, l_range, l_power, l_color)
update_light()
#undef NONSENSICAL_VALUE
+106 -108
View File
@@ -1,108 +1,106 @@
/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins)
if(!z_levels || !z_levels.len)
WARNING("No Z levels provided - Not generating ruins")
return
for(var/zl in z_levels)
var/turf/T = locate(1, 1, zl)
if(!T)
WARNING("Z level [zl] does not exist - Not generating ruins")
return
var/overall_sanity = 100
var/list/ruins = potentialRuins.Copy()
var/is_picking = FALSE
var/last_checked_ruin_index = 0
while(budget > 0 && overall_sanity > 0)
// Pick a ruin
var/datum/map_template/ruin/ruin = null
if(ruins && ruins.len)
last_checked_ruin_index++ //ruins with no cost come first in the ruin list, so they'll get picked really often
if(is_picking)
ruin = ruins[pick(ruins)]
else
var/ruin_key = ruins[last_checked_ruin_index] //get the ruin's key via index
ruin = ruins[ruin_key] //use that key to get the ruin datum itself
if(ruin.cost >= 0) //if it has a non-negative cost, cancel out and pick another, to ensure true randomness
is_picking = TRUE
ruin = ruins[pick(ruins)]
else
log_world("Ruin loader had no ruins to pick from with [budget] left to spend.")
break
// Can we afford it
if(ruin.cost > budget)
overall_sanity--
continue
// If so, try to place it
var/sanity = 100
// And if we can't fit it anywhere, give up, try again
while(sanity > 0)
sanity--
var/width_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(ruin.width / 2)
var/height_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(ruin.height / 2)
var/z_level = pick(z_levels)
var/turf/T = locate(rand(width_border, world.maxx - width_border), rand(height_border, world.maxy - height_border), z_level)
var/valid = TRUE
for(var/turf/check in ruin.get_affected_turfs(T,1))
var/area/new_area = get_area(check)
if(!(istype(new_area, whitelist)))
valid = FALSE
break
if(!valid)
continue
log_world("Ruin \"[ruin.name]\" placed at ([T.x], [T.y], [T.z])")
var/obj/effect/ruin_loader/R = new /obj/effect/ruin_loader(T)
R.Load(ruins,ruin)
if(ruin.cost >= 0)
budget -= ruin.cost
if(!ruin.allow_duplicates)
for(var/m in ruins)
var/datum/map_template/ruin/ruin_to_remove = ruins[m]
if(ruin_to_remove.id == ruin.id) //remove all ruins with the same ID, to make sure that ruins with multiple variants work properly
ruins -= ruin_to_remove.name
last_checked_ruin_index--
break
if(!overall_sanity)
log_world("Ruin loader gave up with [budget] left to spend.")
/obj/effect/ruin_loader
name = "random ruin"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
invisibility = 0
/obj/effect/ruin_loader/proc/Load(list/potentialRuins, datum/map_template/template)
var/list/possible_ruins = list()
for(var/A in potentialRuins)
var/datum/map_template/T = potentialRuins[A]
if(!T.loaded)
possible_ruins += T
if(!template && possible_ruins.len)
template = safepick(possible_ruins)
if(!template)
return FALSE
var/turf/central_turf = get_turf(src)
for(var/i in template.get_affected_turfs(central_turf, 1))
var/turf/T = i
for(var/mob/living/simple_animal/monster in T)
qdel(monster)
for(var/obj/structure/flora/ash/plant in T)
qdel(plant)
template.load(central_turf,centered = TRUE)
template.loaded++
var/datum/map_template/ruin = template
if(istype(ruin))
new /obj/effect/landmark/ruin(central_turf, ruin)
qdel(src)
return TRUE
/proc/seedRuins(list/z_levels = null, budget = 0, whitelist = /area/space, list/potentialRuins)
if(!z_levels || !z_levels.len)
WARNING("No Z levels provided - Not generating ruins")
return
for(var/zl in z_levels)
var/turf/T = locate(1, 1, zl)
if(!T)
WARNING("Z level [zl] does not exist - Not generating ruins")
return
var/overall_sanity = 100
var/list/ruins = potentialRuins.Copy()
var/is_picking = FALSE
var/last_checked_ruin_index = 0
while(budget > 0 && overall_sanity > 0)
// Pick a ruin
var/datum/map_template/ruin/ruin = null
if(ruins && ruins.len)
last_checked_ruin_index++ //ruins with no cost come first in the ruin list, so they'll get picked really often
if(is_picking)
ruin = ruins[pick(ruins)]
else
var/ruin_key = ruins[last_checked_ruin_index] //get the ruin's key via index
ruin = ruins[ruin_key] //use that key to get the ruin datum itself
if(ruin.cost >= 0) //if it has a non-negative cost, cancel out and pick another, to ensure true randomness
is_picking = TRUE
ruin = ruins[pick(ruins)]
else
log_world("Ruin loader had no ruins to pick from with [budget] left to spend.")
break
// Can we afford it
if(ruin.cost > budget)
overall_sanity--
continue
// If so, try to place it
var/sanity = 100
// And if we can't fit it anywhere, give up, try again
while(sanity > 0)
sanity--
var/width_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(ruin.width / 2)
var/height_border = TRANSITIONEDGE + SPACERUIN_MAP_EDGE_PAD + round(ruin.height / 2)
var/z_level = pick(z_levels)
var/turf/T = locate(rand(width_border, world.maxx - width_border), rand(height_border, world.maxy - height_border), z_level)
var/valid = TRUE
for(var/turf/check in ruin.get_affected_turfs(T,1))
var/area/new_area = get_area(check)
if(!(istype(new_area, whitelist)) || check.flags_1 & NO_RUINS_1)
valid = FALSE
break
if(!valid)
continue
log_world("Ruin \"[ruin.name]\" placed at ([T.x], [T.y], [T.z])")
var/obj/effect/ruin_loader/R = new /obj/effect/ruin_loader(T)
R.Load(ruins,ruin)
if(ruin.cost >= 0)
budget -= ruin.cost
if(!ruin.allow_duplicates)
for(var/m in ruins)
var/datum/map_template/ruin/ruin_to_remove = ruins[m]
if(ruin_to_remove.id == ruin.id) //remove all ruins with the same ID, to make sure that ruins with multiple variants work properly
ruins -= ruin_to_remove.name
last_checked_ruin_index--
break
if(!overall_sanity)
log_world("Ruin loader gave up with [budget] left to spend.")
/obj/effect/ruin_loader
name = "random ruin"
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "syndballoon"
invisibility = 0
/obj/effect/ruin_loader/proc/Load(list/potentialRuins, datum/map_template/template)
var/list/possible_ruins = list()
for(var/A in potentialRuins)
var/datum/map_template/T = potentialRuins[A]
if(!T.loaded)
possible_ruins += T
if(!template && possible_ruins.len)
template = safepick(possible_ruins)
if(!template)
return FALSE
var/turf/central_turf = get_turf(src)
for(var/i in template.get_affected_turfs(central_turf, 1))
var/turf/T = i
for(var/mob/living/simple_animal/monster in T)
qdel(monster)
for(var/obj/structure/flora/ash/plant in T)
qdel(plant)
template.load(central_turf,centered = TRUE)
template.loaded++
var/datum/map_template/ruin = template
if(istype(ruin))
new /obj/effect/landmark/ruin(central_turf, ruin)
qdel(src)
return TRUE
@@ -24,6 +24,9 @@
loc = pick(GLOB.newplayer_start)
else
loc = locate(1,1,1)
ComponentInitialize()
. = ..()
/mob/dead/new_player/prepare_huds()
@@ -710,7 +710,7 @@
var/static/mutable_appearance/electrocution_skeleton_anim
if(!electrocution_skeleton_anim)
electrocution_skeleton_anim = mutable_appearance(icon, "electrocuted_base")
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR
electrocution_skeleton_anim.appearance_flags |= RESET_COLOR|KEEP_APART
add_overlay(electrocution_skeleton_anim)
addtimer(CALLBACK(src, .proc/end_electrocution_animation, electrocution_skeleton_anim), anim_duration)
@@ -265,7 +265,6 @@
//delete all equipment without dropping anything
/mob/living/carbon/human/proc/delete_equipment()
for(var/slot in get_all_slots())//order matters, dependant slots go first
var/obj/item/I = get_item_by_slot(slot)
qdel(I)
qdel(slot)
for(var/obj/item/I in held_items)
qdel(I)
qdel(I)
+22 -27
View File
@@ -1135,36 +1135,31 @@
return 0
/datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/H)
. = FALSE
var/radiation = H.radiation
if(!(RADIMMUNE in species_traits))
if(H.radiation)
if (H.radiation > 100)
if(!H.IsKnockdown())
H.emote("collapse")
H.Knockdown(200)
to_chat(H, "<span class='danger'>You feel weak.</span>")
switch(H.radiation)
if(50 to 75)
if(prob(5))
if(!H.IsKnockdown())
H.emote("collapse")
H.Knockdown(60)
to_chat(H, "<span class='danger'>You feel weak.</span>")
if(RADIMMUNE in species_traits)
radiation = 0
return TRUE
if(prob(15))
if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits))
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
if(radiation > RAD_MOB_KNOCKDOWN)
if(!H.IsKnockdown())
H.emote("collapse")
H.Knockdown(RAD_KNOCKDOWN_TIME)
to_chat(H, "<span class='danger'>You feel weak.</span>")
if(radiation > RAD_MOB_MUTATE)
if(prob(1))
to_chat(H, "<span class='danger'>You mutate!</span>")
H.randmutb()
H.emote("gasp")
H.domutcheck()
if(75 to 100)
if(prob(1))
to_chat(H, "<span class='danger'>You mutate!</span>")
H.randmutb()
H.emote("gasp")
H.domutcheck()
return 0
H.radiation = 0
return 1
if(radiation > RAD_MOB_HAIRLOSS)
if(prob(15))
if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits))
to_chat(H, "<span class='danger'>Your hair starts to fall out in clumps...</span>")
addtimer(CALLBACK(src, .proc/go_bald, H), 50)
/datum/species/proc/go_bald(mob/living/carbon/human/H)
if(QDELETED(H)) //may be called from a timer
@@ -295,7 +295,7 @@
if(!active)
if(world.time > last_event+30)
active = 1
radiation_pulse(get_turf(H), 3, 3, 5, 0)
radiation_pulse(get_turf(H), 50)
last_event = world.time
active = null
..()
+3 -18
View File
@@ -280,24 +280,9 @@
HM.force_lose(src)
dna.temporary_mutations.Remove(mut)
if(radiation)
radiation = Clamp(radiation, 0, 100)
switch(radiation)
if(0 to 50)
radiation = max(radiation-1,0)
if(prob(25))
adjustToxLoss(1)
if(50 to 75)
radiation = max(radiation-2,0)
adjustToxLoss(1)
if(prob(5))
radiation = max(radiation-5,0)
if(75 to 100)
radiation = max(radiation-3,0)
adjustToxLoss(3)
radiation -= min(radiation, RAD_LOSS_PER_TICK)
if(radiation > RAD_MOB_SAFE)
adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT)
/mob/living/carbon/handle_stomach()
set waitfor = 0
+12 -21
View File
@@ -23,32 +23,23 @@
walk_to(src,0)
/mob/living/carbon/monkey/handle_mutations_and_radiation()
if (radiation)
if (radiation > 100)
if(radiation)
if(radiation > RAD_MOB_KNOCKDOWN)
if(!IsKnockdown())
emote("collapse")
Knockdown(200)
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(radiation > 30 && prob((radiation - 30) * (radiation - 30) * 0.0002))
gorillize()
return
switch(radiation)
if(radiation > RAD_MOB_MUTATE)
if(prob(1))
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb()
emote("gasp")
domutcheck()
if(50 to 75)
if(prob(5))
if(!IsKnockdown())
emote("collapse")
Knockdown(60)
to_chat(src, "<span class='danger'>You feel weak.</span>")
if(75 to 100)
if(prob(1))
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb()
emote("gasp")
domutcheck()
..()
if(radiation > RAD_MOB_MUTATE * 2 && prob(50))
gorillize()
return
return ..()
/mob/living/carbon/monkey/handle_breath_temperature(datum/gas_mixture/breath)
if(abs(310.15 - breath.temperature) > 50)
+10
View File
@@ -885,6 +885,16 @@
G.Recall()
to_chat(G, "<span class='holoparasite'>Your summoner has changed form!</span>")
/mob/living/rad_act(amount)
amount = max(amount-RAD_BACKGROUND_RADIATION, 0)
if(amount)
var/blocked = getarmor(null, "rad")
apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked)
if(amount > RAD_AMOUNT_EXTREME)
apply_damage((amount-RAD_AMOUNT_EXTREME)/RAD_AMOUNT_EXTREME, BURN, null, blocked)
/mob/living/proc/fakefireextinguish()
return
+1 -1
View File
@@ -363,7 +363,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
/obj/machinery/gravity_generator/main/proc/pulse_radiation()
radiation_pulse(get_turf(src), 3, 7, 20)
radiation_pulse(get_turf(src), 200)
// Shake everyone on the z level to let them know that gravity was enagaged/disenagaged.
/obj/machinery/gravity_generator/main/proc/shake_everyone()
+1 -1
View File
@@ -28,7 +28,7 @@
..()
add_avail(power_gen)
if(panel_open && irradiate)
radiation_pulse(get_turf(src), 2, 3, 6) // Weak but noticeable.
radiation_pulse(get_turf(src), 60)
/obj/machinery/power/rtg/RefreshParts()
var/part_level = 0
+16 -15
View File
@@ -1,5 +1,7 @@
GLOBAL_LIST_EMPTY(rad_collectors)
// last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT
#define RAD_COLLECTOR_EFFICIENCY 80 // radiation needs to be over this amount to get power
#define RAD_COLLECTOR_COEFFICIENT 100
#define RAD_COLLECTOR_STORED_OUT 0.04 // (this*100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source
/obj/machinery/power/rad_collector
name = "Radiation Collector Array"
@@ -21,12 +23,11 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/anchored
anchored = TRUE
/obj/machinery/power/rad_collector/Initialize()
/obj/machinery/power/rad_collector/ComponentInitialize()
. = ..()
GLOB.rad_collectors += src
AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION, FALSE, FALSE)
/obj/machinery/power/rad_collector/Destroy()
GLOB.rad_collectors -= src
return ..()
/obj/machinery/power/rad_collector/process()
@@ -37,8 +38,10 @@ GLOBAL_LIST_EMPTY(rad_collectors)
else
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= 0.001*drainratio
loaded_tank.air_contents.garbage_collect()
return
var/power_produced = min(last_power, (last_power*RAD_COLLECTOR_STORED_OUT)+1000) //Produces at least 1000 watts if it has more than that stored
add_avail(power_produced)
last_power-=power_produced
/obj/machinery/power/rad_collector/attack_hand(mob/user)
if(..())
@@ -137,15 +140,9 @@ GLOBAL_LIST_EMPTY(rad_collectors)
else
update_icons()
/obj/machinery/power/rad_collector/proc/receive_pulse(pulse_strength)
if(loaded_tank && active)
var/power_produced = loaded_tank.air_contents.gases[/datum/gas/plasma] ? loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] : 0
power_produced *= pulse_strength*10
add_avail(power_produced)
last_power = power_produced
return
return
/obj/machinery/power/rad_collector/rad_act(pulse_strength)
if(loaded_tank && active && pulse_strength > RAD_COLLECTOR_EFFICIENCY)
last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT
/obj/machinery/power/rad_collector/proc/update_icons()
cut_overlays()
@@ -167,3 +164,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
flick("ca_deactive", src)
update_icons()
return
#undef RAD_COLLECTOR_EFFICIENCY
#undef RAD_COLLECTOR_COEFFICIENT
#undef RAD_COLLECTOR_STORED_OUT
+2 -12
View File
@@ -114,7 +114,7 @@
/obj/singularity/process()
if(current_size >= STAGE_TWO)
move()
pulse()
radiation_pulse(get_turf(src), energy, 0.5)
if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit
event()
eat()
@@ -385,14 +385,10 @@
/obj/singularity/proc/toxmob()
var/toxrange = 10
var/radiation = 15
var/radiationmin = 3
if (energy>200)
radiation += round((energy-150)/10,1)
radiationmin = round((radiation/5),1)
for(var/mob/living/M in view(toxrange, src.loc))
M.rad_act(rand(radiationmin,radiation))
radiation_pulse(get_turf(src), radiation)
/obj/singularity/proc/combust_mobs()
@@ -428,12 +424,6 @@
empulse(src, 8, 10)
return
/obj/singularity/proc/pulse()
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)
if(R.z == z && get_dist(R, src) <= 15) // Better than using orange() every process
R.receive_pulse(energy)
/obj/singularity/singularity_act()
var/gain = (energy/2)
var/dist = max((current_size - 2),1)
@@ -331,8 +331,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
if(prob(50))
radiation_pulse(get_turf(src), power * (1 + power_transmission_bonus/10 * freon_transmit_modifier))
var/device_energy = power * REACTION_POWER_MODIFIER
@@ -527,11 +527,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
Consume(nom)
/obj/machinery/power/supermatter_shard/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)
if(R.z == z && get_dist(R, src) <= 15) //Better than using orange() every process
R.receive_pulse(power * (1 + power_transmission_bonus)/10 * freon_transmit_modifier)
/obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params)
if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user))
return
@@ -550,7 +545,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
Consume(W)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
radiation_pulse(get_turf(src), 1, 1, 150, 1)
radiation_pulse(get_turf(src), 150, 4)
/obj/machinery/power/supermatter_shard/CollidedWith(atom/movable/AM)
@@ -584,7 +579,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
matter_power += 200
//Some poor sod got eaten, go ahead and irradiate people nearby.
radiation_pulse(get_turf(src), 4, 10, 500, 1)
radiation_pulse(get_turf(src), 3000, 2, TRUE)
for(var/mob/living/L in range(10))
investigate_log("has irradiated [L] after consuming [AM].", INVESTIGATE_SUPERMATTER)
if(L in view())
@@ -454,7 +454,7 @@
/datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M)
if(M.radiation > 0)
M.radiation--
M.radiation-=2
..()
/datum/reagent/medicine/pen_acid
@@ -466,11 +466,8 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
/datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M)
if(M.radiation > 0)
M.radiation -= 4
M.radiation -= min(M.radiation, 8)
M.adjustToxLoss(-2*REM, 0)
if(M.radiation < 0)
M.radiation = 0
for(var/datum/reagent/R in M.reagents.reagent_list)
if(R != src)
M.reagents.remove_reagent(R.id,2)
@@ -15,6 +15,10 @@
var/tomail = 0 //changes if contains wrapped package
var/hasmob = 0 //If it contains a mob
/obj/structure/disposalholder/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
/obj/structure/disposalholder/Destroy()
qdel(gas)
active = 0
@@ -176,6 +180,9 @@
if("pipe-j2s")
stored.ptype = DISP_SORTJUNCTION_FLIP
/obj/structure/disposalpipe/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
// pipe is deleted
// ensure if holder is present, it is expelled
@@ -639,6 +646,7 @@
/obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
if(make_from)
setDir(make_from.dir)
make_from.loc = src
@@ -652,6 +660,10 @@
if(trunk)
trunk.linked = src // link the pipe trunk to self
/obj/structure/disposaloutlet/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
/obj/structure/disposaloutlet/Destroy()
if(trunk)
trunk.linked = null
+7 -4
View File
@@ -27,6 +27,7 @@
/obj/machinery/disposal/Initialize(mapload, obj/structure/disposalconstruct/make_from)
. = ..()
if(make_from)
setDir(make_from.dir)
make_from.loc = 0
@@ -40,6 +41,12 @@
//gas.volume = 1.05 * CELLSTANDARD
update_icon()
return INITIALIZE_HINT_LATELOAD //we need turfs to have air
/obj/machinery/disposal/ComponentInitialize()
. = ..()
AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION)
/obj/machinery/disposal/proc/trunk_check()
trunk = locate() in loc
if(!trunk)
@@ -62,10 +69,6 @@
if(current_size >= STAGE_FIVE)
deconstruct()
/obj/machinery/disposal/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD //we need turfs to have air
/obj/machinery/disposal/LateInitialize()
//this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
var/atom/L = loc
+1 -1
View File
@@ -255,7 +255,7 @@
ejectItem()
else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff))
visible_message("<span class='danger'>[src] malfunctions, melting [exp_on] and leaking radiation!</span>")
radiation_pulse(get_turf(src), 1, 1, 25, 1)
radiation_pulse(get_turf(src), 50)
ejectItem(TRUE)
else if(prob(EFFECT_PROB_LOW-badThingCoeff))
visible_message("<span class='warning'>[src] malfunctions, spewing toxic waste!</span>")
@@ -1,4 +1,29 @@
/////////// crashedship items
// crashedship / packer ship
//Areas
/area/awaymission/BMPship
name = "BMP Asteroids"
icon_state = "away"
/area/awaymission/BMPship/Aft
name = "Aft Block"
icon_state = "away1"
requires_power = TRUE
/area/awaymission/BMPship/Midship
name = "Midship Block"
icon_state = "away2"
requires_power = TRUE
/area/awaymission/BMPship/Fore
name = "Fore Block"
icon_state = "away3"
requires_power = TRUE
// crashedship items
/obj/item/paper/fluff/ruins/crashedship/scribbled
name = "scribbled note"
@@ -1,5 +1,9 @@
/////////// listening station
/area/ruin/space/has_grav/powered/listeningstation
name = "Listening Post"
icon_state = "away"
/obj/item/paper/fluff/ruins/listeningstation/reports
info = "Nothing of interest to report."
+5 -1
View File
@@ -192,7 +192,7 @@
var/last_dock_time
/obj/docking_port/stationary/Initialize()
/obj/docking_port/stationary/Initialize(mapload)
. = ..()
SSshuttle.stationary += src
if(!id)
@@ -201,6 +201,10 @@
name = "dock[SSshuttle.stationary.len]"
baseturf_cache = typecacheof(baseturf_type)
if(mapload)
for(var/turf/T in return_turfs())
T.flags_1 |= NO_RUINS_1
#ifdef DOCKING_PORT_HIGHLIGHT
highlight("#f00")
#endif