Merge branch 'master' of https://github.com/PolarisSS13/Polaris into virologyfixes

This commit is contained in:
Cerebulon
2018-02-07 03:40:06 +00:00
191 changed files with 2301 additions and 996 deletions
+2 -1
View File
@@ -101,7 +101,8 @@ var/list/admin_verbs_admin = list(
/client/proc/toggle_attack_logs,
/datum/admins/proc/paralyze_mob,
/client/proc/fixatmos,
/datum/admins/proc/sendFax
/datum/admins/proc/sendFax,
/client/proc/despawn_player
)
var/list/admin_verbs_ban = list(
+11
View File
@@ -1864,6 +1864,17 @@
show_player_panel(M)
else if(href_list["cryoplayer"])
if(!check_rights(R_ADMIN)) return
var/mob/M = locate(href_list["cryoplayer"])
if(!istype(M))
to_chat(usr,"<span class='warning'>Mob doesn't exist!</span>")
return
var/client/C = usr.client
C.despawn_player(M)
// player info stuff
if(href_list["add_player_info"])
@@ -41,7 +41,12 @@
if(!map)
return
template = map_templates[map]
if(template.width > world.maxx || template.height > world.maxy)
if(alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!","Cancel","Yes") == "Cancel")
to_chat(usr,"Template placement aborted.")
return
if(alert(usr,"Confirm map load.", "Template Confirm","No","Yes") == "Yes")
if(template.load_new_z())
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].</span>")
+60
View File
@@ -935,3 +935,63 @@ Traitors and the like can also be revived with the previous role mostly intact.
usr << "Random events disabled"
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/despawn_player(var/mob/M in living_mob_list)
set name = "Cryo Player"
set category = "Admin"
set desc = "Removes a player from the round as if they'd cryo'd."
set popup_menu = FALSE
if(!check_rights(R_ADMIN))
return
if(!M)
return
var/confirm = alert("Are you sure you want to cryo [M]?","Confirmation","No","Yes")
if(confirm == "No")
return
var/list/human_cryopods = list()
var/list/robot_cryopods = list()
for(var/obj/machinery/cryopod/CP in machines)
if(!CP.control_computer)
continue //Broken pod w/o computer, move on.
var/listname = "[CP.name] ([CP.x],[CP.y],[CP.z])"
if(istype(CP,/obj/machinery/cryopod/robot))
robot_cryopods[listname] = CP
else
human_cryopods[listname] = CP
//Gotta log this up here before they get ghostized and lose their key or anything.
log_and_message_admins("[key_name(src)] admin cryo'd [key_name(M)].")
feedback_add_details("admin_verb","ACRYO") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(ishuman(M))
var/obj/machinery/cryopod/CP = human_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in human_cryopods]
if(!CP)
return
M.ghostize()
CP.despawn_occupant(M)
return
else if(issilicon(M))
if(isAI(M))
var/mob/living/silicon/ai/ai = M
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(ai.loc)
global_announcer.autosay("[ai] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
ai.clear_client()
return
else
var/obj/machinery/cryopod/robot/CP = robot_cryopods[input(usr,"Select a cryopod to use","Cryopod Choice") as null|anything in robot_cryopods]
if(!CP)
return
M.ghostize()
CP.despawn_occupant(M)
return
else if(isliving(M))
M.ghostize()
qdel(M) //Bye
+3 -1
View File
@@ -24,9 +24,12 @@
var/corpseidaccess = null //This is for access. See access.dm for which jobs give what access. Again, put in quotes. Use "Captain" if you want it to be all access.
var/corpseidicon = null //For setting it to be a gold, silver, CentCom etc ID
var/species = "Human"
delete_me = TRUE
/obj/effect/landmark/corpse/initialize()
..()
createCorpse()
return INITIALIZE_HINT_QDEL
/obj/effect/landmark/corpse/proc/createCorpse() //Creates a mob and checks for gear in each slot before attempting to equip it.
var/mob/living/carbon/human/M = new /mob/living/carbon/human (src.loc)
@@ -76,7 +79,6 @@
W.assignment = corpseidjob
M.set_id_info(W)
M.equip_to_slot_or_del(W, slot_wear_id)
qdel(src)
+4 -3
View File
@@ -10,9 +10,9 @@
/obj/machinery/gateway/initialize()
update_icon()
if(dir == 2)
if(dir == SOUTH)
density = 0
. = ..()
/obj/machinery/gateway/update_icon()
if(active)
@@ -38,7 +38,7 @@
update_icon()
wait = world.time + config.gateway_delay //+ thirty minutes default
awaygate = locate(/obj/machinery/gateway/centeraway)
. = ..()
/obj/machinery/gateway/centerstation/update_icon()
if(active)
@@ -152,6 +152,7 @@ obj/machinery/gateway/centerstation/process()
/obj/machinery/gateway/centeraway/initialize()
update_icon()
stationgate = locate(/obj/machinery/gateway/centerstation)
. = ..()
/obj/machinery/gateway/centeraway/update_icon()
+2 -1
View File
@@ -6,6 +6,7 @@
var/loot = "" //a list of possible items to spawn- a string of paths
/obj/effect/spawner/lootdrop/initialize()
..()
var/list/things = params2list(loot)
if(things && things.len)
@@ -21,4 +22,4 @@
continue
new loot_path(get_turf(src))
qdel(src)
return INITIALIZE_HINT_QDEL
+2 -2
View File
@@ -782,7 +782,7 @@ obj/item/clothing/suit/storage/toggle/peacoat
hooded = TRUE
hoodtype = /obj/item/clothing/head/hood/explorer
siemens_coefficient = 0.9
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 50, bio = 100, rad = 50) // Inferior to sec vests in bullet/laser but better for environmental protection.
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35) // Inferior to sec vests in bullet/laser but better for environmental protection.
allowed = list(
/obj/item/device/flashlight,
/obj/item/weapon/gun,
@@ -807,7 +807,7 @@ obj/item/clothing/suit/storage/toggle/peacoat
flags_inv = HIDEEARS | BLOCKHAIR
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
siemens_coefficient = 0.9
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 50, bio = 100, rad = 50)
armor = list(melee = 30, bullet = 20, laser = 20, energy = 20, bomb = 35, bio = 75, rad = 35)
/obj/item/clothing/suit/varsity
name = "black varsity jacket"
+3 -3
View File
@@ -26,13 +26,13 @@
var/rng = rand(1,5)
switch(rng)
if(1)
msg = "A combat drone wing operating near various asteroids in the Kara subsystem has failed to return from a anti-piracy sweep. If any are sighted, \
msg = "A combat drone wing operating in close orbit above Sif has failed to return from a anti-piracy sweep. If any are sighted, \
approach with caution."
if(2)
msg = "Contact has been lost with a combat drone wing operating out in the asteroid field near Kara. If any are sighted in the area, approach with \
msg = "Contact has been lost with a combat drone wing in Sif orbit. If any are sighted in the area, approach with \
caution."
if(3)
msg = "Unidentified hackers have targeted a combat drone wing deployed in the Kara subsystem. If any are sighted in the area, approach with caution."
msg = "Unidentified hackers have targeted a combat drone wing deployed around Sif. If any are sighted in the area, approach with caution."
if(4)
msg = "A passing derelict ship's drone defense systems have just activated. If any are sighted in the area, use caution."
if(5)
+2 -5
View File
@@ -13,10 +13,7 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/initialize()
update_seed()
..()
/obj/item/seeds/New()
..()
. = ..()
//Grabs the appropriate seed datum from the global list.
/obj/item/seeds/proc/update_seed()
@@ -79,7 +76,7 @@ var/global/list/plant_seed_sprites = list()
/obj/item/seeds/random/initialize()
seed = plant_controller.create_random_seed()
seed_type = seed.name
update_seed()
. = ..()
/obj/item/seeds/replicapod
seed_type = "diona"
+3 -3
View File
@@ -27,7 +27,7 @@
use_power = 1
idle_power_usage = 100
var/initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction
var/seeds_initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction
var/list/datum/seed_pile/piles = list()
var/list/starting_seeds = list()
var/list/scanner = list() // What properties we can view
@@ -135,7 +135,7 @@
if (..())
return
if (!initialized)
if (!seeds_initialized)
for(var/typepath in starting_seeds)
var/amount = starting_seeds[typepath]
if(isnull(amount)) amount = 1
@@ -143,7 +143,7 @@
for (var/i = 1 to amount)
var/O = new typepath
add(O)
initialized = 1
seeds_initialized = 1
var/dat = "<center><h1>Seed storage contents</h1></center>"
if (piles.len == 0)
+6 -3
View File
@@ -165,16 +165,19 @@
nymph.visible_message("<font color='blue'><b>[nymph]</b> rolls around in [src] for a bit.</font>","<font color='blue'>You roll around in [src] for a bit.</font>")
return
/obj/machinery/portable_atmospherics/hydroponics/New()
..()
/obj/machinery/portable_atmospherics/hydroponics/initialize()
. = ..()
temp_chem_holder = new()
temp_chem_holder.create_reagents(10)
create_reagents(200)
if(mechanical)
connect()
update_icon()
return INITIALIZE_HINT_LATELOAD
/obj/machinery/portable_atmospherics/hydroponics/initialize()
// Give the seeds time to initialize itself
/obj/machinery/portable_atmospherics/hydroponics/LateInitialize()
. = ..()
var/obj/item/seeds/S = locate() in loc
if(S)
plant_seeds(S)
@@ -20,7 +20,7 @@
can_clone = TRUE
/obj/item/device/integrated_circuit_printer/initialize()
..()
. = ..()
if(!recipe_list.len)
// Unfortunately this needed a lot of loops, but it should only be run once at init.
@@ -335,7 +335,7 @@
var/datum/radio_frequency/radio_connection
/obj/item/integrated_circuit/input/signaler/initialize()
..()
. = ..()
set_frequency(frequency)
// Set the pins so when someone sees them, they won't show as null
set_pin_data(IC_INPUT, 1, frequency)
+1
View File
@@ -20,6 +20,7 @@
opacity = 1
/obj/structure/bookcase/initialize()
. = ..()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/book))
I.loc = src
+6 -1
View File
@@ -10,7 +10,7 @@
//invisibility = INVISIBILITY_LIGHTING
color = LIGHTING_BASE_MATRIX
icon_state = "light1"
auto_init = 0 // doesn't need special init
//auto_init = 0 // doesn't need special init
blend_mode = BLEND_OVERLAY
var/lum_r = 0
@@ -19,6 +19,11 @@
var/needs_update = FALSE
/atom/movable/lighting_overlay/initialize()
// doesn't need special init
initialized = TRUE
return INITIALIZE_HINT_NORMAL
/atom/movable/lighting_overlay/New(var/atom/loc, var/no_update = FALSE)
. = ..()
verbs.Cut()
+1 -1
View File
@@ -9,7 +9,7 @@
/obj/item/weapon/book/codex/initialize()
tree = new(src, root_type)
..()
. = ..()
/obj/item/weapon/book/codex/attack_self(mob/user)
if(!tree)
+15 -1
View File
@@ -5,6 +5,7 @@
articles. You are encouraged to check back frequently."
children = list(
/datum/lore/codex/page/article1,
/datum/lore/codex/page/article2,
/datum/lore/codex/page/about_news,
)
@@ -31,4 +32,17 @@
<br></br>\
The bill passed fairly quietly this afternoon, owing to the closed nature of the Bicamarial. A post-facto Occulum poll of voting-age\
VGA citizens suggest that fully 80% of them did not even know what a Promethean was prior to the most recent general election. A\
follow-up poll indicates that an appreciable number of Sivians do not support the framework's current implementation."
follow-up poll indicates that an appreciable number of Sivians do not support the framework's current implementation."
/datum/lore/codex/page/article2
name = "2/3/62-- Corporate Coup on Aetolus"
data = "A recent incident aboard the NRS Prometheus issued in a major change in the leadership of the Promethean homeworld. During \
a late-night meeting of the Nanotrasen Board of Trustees, several high-ranking personnel, including Head of Research Naomi Harper,\
announced their intention to assume direct control of Nanotrasen facilities in the system. It is known that several dissenting \
members of the board were shot to death by Promethean test subjects. Our information comes from a survivor of the coup, who for \
reasons of security has chosen to remain annonymous. All outbound shipments affiliated with Nanotrasen have ceased.\
<br><br>\
While neither Grayson Manufacturies nor Nanotrasen have made an official statement, Nanotrasen CEO Albary Moravec has called the \
incident \"shocking, if the allegations are to be believed\" and has assured shareholders that Nanotrasen will respond to the \
incident with as much force as it warrents.<br><br>Requests for a statement directed to the Board of Trustees or Dr. Harper were \
not responded to. Free Traders are recommended to stay clear of the region until the situation resolves itself."
+34 -53
View File
@@ -44,70 +44,52 @@ var/list/global/map_templates = list()
return bounds
/datum/map_template/proc/initTemplateBounds(var/list/bounds)
var/list/obj/machinery/atmospherics/atmos_machines = list()
if (SSatoms.initialized == INITIALIZATION_INSSATOMS)
return // let proper initialisation handle it later
var/list/atom/atoms = list()
var/list/area/areas = list()
// var/list/turf/turfs = list()
for(var/L in block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ])))
var/list/obj/structure/cable/cables = list()
var/list/obj/machinery/atmospherics/atmos_machines = list()
var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
for(var/L in turfs)
var/turf/B = L
atoms += B
areas |= B.loc
for(var/A in B)
atoms += A
// turfs += B
areas |= get_area(B)
if(istype(A, /obj/machinery/atmospherics))
if(istype(A, /obj/structure/cable))
cables += A
else if(istype(A, /obj/machinery/atmospherics))
atmos_machines += A
atoms |= areas
var/i = 0
// Apparently when areas get initialize()'d they initialize their turfs as well.
// If this is ever changed, uncomment the block of code below.
// admin_notice("<span class='danger'>Initializing newly created simulated turfs in submap.</span>", R_DEBUG)
// for(var/turf/simulated/T in turfs)
// T.initialize()
// i++
// admin_notice("<span class='danger'>[i] turf\s initialized.</span>", R_DEBUG)
// i = 0
SScreation.initialize_late_atoms()
admin_notice("<span class='danger'>Initializing newly created area(s) in submap.</span>", R_DEBUG)
for(var/area/A in areas)
A.initialize()
i++
admin_notice("<span class='danger'>[i] area\s initialized.</span>", R_DEBUG)
i = 0
admin_notice("<span class='danger'>Initializing newly created atom(s) in submap.</span>", R_DEBUG)
SSatoms.InitializeAtoms(atoms)
admin_notice("<span class='danger'>Initializing atmos pipenets and machinery in submap.</span>", R_DEBUG)
for(var/obj/machinery/atmospherics/machine in atmos_machines)
machine.atmos_init()
i++
for(var/obj/machinery/atmospherics/machine in atmos_machines)
machine.build_network()
for(var/obj/machinery/atmospherics/unary/U in machines)
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
var/obj/machinery/atmospherics/unary/vent_pump/T = U
T.broadcast_status()
else if(istype(U, /obj/machinery/atmospherics/unary/vent_scrubber))
var/obj/machinery/atmospherics/unary/vent_scrubber/T = U
T.broadcast_status()
admin_notice("<span class='danger'>[i] pipe\s initialized.</span>", R_DEBUG)
SSmachines.setup_atmos_machinery(atmos_machines)
admin_notice("<span class='danger'>Rebuilding powernets due to submap creation.</span>", R_DEBUG)
SSmachines.makepowernets()
SSmachines.setup_powernets_for_cables(cables)
// Ensure all machines in loaded areas get notified of power status
for(var/I in areas)
var/area/A = I
A.power_change()
admin_notice("<span class='danger'>Submap initializations finished.</span>", R_DEBUG)
/datum/map_template/proc/load_new_z()
var/x = round(world.maxx/2)
var/y = round(world.maxy/2)
/datum/map_template/proc/load_new_z(var/centered = FALSE)
var/x = 1
var/y = 1
var/list/bounds = maploader.load_map(file(mappath), x, y)
if(centered)
x = round((world.maxx - width)/2)
y = round((world.maxy - height)/2)
var/list/bounds = maploader.load_map(file(mappath), x, y, no_changeturf = TRUE)
if(!bounds)
return FALSE
@@ -118,7 +100,7 @@ var/list/global/map_templates = list()
log_game("Z-level [name] loaded at at [x],[y],[world.maxz]")
return TRUE
/datum/map_template/proc/load(turf/T, centered = FALSE, dont_init = FALSE)
/datum/map_template/proc/load(turf/T, centered = FALSE)
var/old_T = T
if(centered)
T = locate(T.x - round(width/2) , T.y - round(height/2) , T.z)
@@ -140,8 +122,7 @@ var/list/global/map_templates = list()
// repopulate_sorted_areas()
//initialize things that are normally initialized after map load
if(!dont_init)
initTemplateBounds(bounds)
initTemplateBounds(bounds)
log_game("[name] loaded at at [T.x],[T.y],[T.z]")
loaded++
@@ -256,7 +237,7 @@ var/list/global/map_templates = list()
admin_notice("Submap \"[chosen_template.name]\" placed at ([T.x], [T.y], [T.z])", R_DEBUG)
// Do loading here.
chosen_template.load(T, centered = TRUE, dont_init = TRUE) // This is run before the main map's initialization routine, so that can initilize our submaps for us instead.
chosen_template.load(T, centered = TRUE) // This is run before the main map's initialization routine, so that can initilize our submaps for us instead.
CHECK_TICK
+4 -4
View File
@@ -304,7 +304,7 @@ var/global/use_preloader = FALSE
first_turf_index++
//turn off base new Initialization until the whole thing is loaded
SScreation.StartLoadingMap()
SSatoms.map_loader_begin()
//instanciate the first /turf
var/turf/T
if(members[first_turf_index] != /turf/template_noop)
@@ -323,7 +323,7 @@ var/global/use_preloader = FALSE
for(index in 1 to first_turf_index-1)
instance_atom(members[index],members_attributes[index],crds,no_changeturf)
//Restore initialization to the previous value
SScreation.StopLoadingMap()
SSatoms.map_loader_stop()
////////////////
//Helpers procs
@@ -344,9 +344,9 @@ var/global/use_preloader = FALSE
//custom CHECK_TICK here because we don't want things created while we're sleeping to not initialize
if(TICK_CHECK)
SScreation.StopLoadingMap()
SSatoms.map_loader_stop()
stoplag()
SScreation.StartLoadingMap()
SSatoms.map_loader_begin()
/dmm_suite/proc/create_atom(path, crds)
set waitfor = FALSE
@@ -94,6 +94,13 @@
apply_colour = 1
no_variants = FALSE
/obj/item/stack/material/lead
name = "lead"
icon_state = "sheet-adamantine"
default_type = "lead"
apply_colour = 1
no_variants = TRUE
/obj/item/stack/material/sandstone
name = "sandstone brick"
icon_state = "sheet-sandstone"
+28 -3
View File
@@ -99,6 +99,7 @@ var/list/name_to_material
var/conductivity = null // How conductive the material is. Iron acts as the baseline, at 10.
var/list/composite_material // If set, object matter var will be a list containing these values.
var/luminescence
var/radiation_resistance = 20 // Radiation resistance, used in calculating how much radiation a material absorbs. Equivlent to weight, but does not affect weaponry.
// Placeholder vars for the time being, todo properly integrate windows/light tiles/rods.
var/created_window
@@ -236,6 +237,7 @@ var/list/name_to_material
weight = 22
stack_origin_tech = list(TECH_MATERIAL = 5)
door_icon_base = "stone"
radiation_resistance = 80 //dense, so it's okay-ish as rad shielding.
/material/diamond
name = "diamond"
@@ -261,6 +263,7 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 4)
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
radiation_resistance = 120 //gold is dense.
/material/gold/bronze //placeholder for ashtrays
name = "bronze"
@@ -276,7 +279,7 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 3)
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
radiation_resistance = 22
//R-UST port
/material/supermatter
name = "supermatter"
@@ -337,6 +340,7 @@ var/list/name_to_material
door_icon_base = "stone"
sheet_singular_name = "brick"
sheet_plural_name = "bricks"
radiation_resistance = 22
/material/stone/marble
name = "marble"
@@ -345,6 +349,7 @@ var/list/name_to_material
hardness = 100
integrity = 201 //hack to stop kitchen benches being flippable, todo: refactor into weight system
stack_type = /obj/item/stack/material/marble
radiation_resistance = 26
/material/steel
name = DEFAULT_WALL_MATERIAL
@@ -391,6 +396,7 @@ var/list/name_to_material
conductivity = 13 // For the purposes of balance.
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list(DEFAULT_WALL_MATERIAL = SHEET_MATERIAL_AMOUNT, "platinum" = SHEET_MATERIAL_AMOUNT) //todo
radiation_resistance = 60 //Plasteel is presumably dense and is the dominant material used in the engine. Still not great.
// Very rare alloy that is reflective, should be used sparingly.
/material/durasteel
@@ -408,6 +414,7 @@ var/list/name_to_material
reflectivity = 0.7 // Not a perfect mirror, but close.
stack_origin_tech = list(TECH_MATERIAL = 8)
composite_material = list("plasteel" = SHEET_MATERIAL_AMOUNT, "diamond" = SHEET_MATERIAL_AMOUNT) //shrug
radiation_resistance = 120 //it reflects XRAY LASERS.
/material/plasteel/titanium
name = "titanium"
@@ -436,6 +443,7 @@ var/list/name_to_material
window_options = list("One Direction" = 1, "Full Window" = 4, "Windoor" = 2)
created_window = /obj/structure/window/basic
rod_product = /obj/item/stack/material/glass/reinforced
radiation_resistance = 15
/material/glass/build_windows(var/mob/living/user, var/obj/item/stack/used_stack)
@@ -527,6 +535,7 @@ var/list/name_to_material
created_window = /obj/structure/window/reinforced
wire_product = null
rod_product = null
radiation_resistance = 30
/material/glass/phoron
name = "borosilicate glass"
@@ -554,6 +563,7 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 2)
composite_material = list() //todo
rod_product = null
radiation_resistance = 30
/material/plastic
name = "plastic"
@@ -568,6 +578,7 @@ var/list/name_to_material
conductivity = 2 // For the sake of material armor diversity, we're gonna pretend this plastic is a good insulator.
melting_point = T0C+371 //assuming heat resistant plastic
stack_origin_tech = list(TECH_MATERIAL = 3)
radiation_resistance = 12
/material/plastic/holographic
name = "holoplastic"
@@ -618,6 +629,7 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 2)
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
radiation_resistance = 27
/material/iron
name = "iron"
@@ -627,6 +639,17 @@ var/list/name_to_material
conductivity = 10
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
radiation_resistance = 22
/material/lead
name = "lead"
stack_type = /obj/item/stack/material/lead
icon_colour = "#273956"
weight = 35
conductivity = 10
sheet_singular_name = "ingot"
sheet_plural_name = "ingots"
radiation_resistance = 350 //actual radiation shielding, yay...
// Adminspawn only, do not let anyone get this.
/material/alienalloy
@@ -640,6 +663,7 @@ var/list/name_to_material
hardness = 500
weight = 500
protectiveness = 80 // 80%
radiation_resistance = 500
// Likewise.
/material/alienalloy/elevatorium
@@ -697,6 +721,7 @@ var/list/name_to_material
destruction_desc = "splinters"
sheet_singular_name = "plank"
sheet_plural_name = "planks"
radiation_resistance = 18
/material/wood/log
name = MAT_LOG
@@ -739,7 +764,7 @@ var/list/name_to_material
stack_origin_tech = list(TECH_MATERIAL = 1)
door_icon_base = "wood"
destruction_desc = "crumples"
radiation_resistance = 1
/material/snow
name = MAT_SNOW
stack_type = /obj/item/stack/material/snow
@@ -756,7 +781,7 @@ var/list/name_to_material
destruction_desc = "crumples"
sheet_singular_name = "pile"
sheet_plural_name = "pile" //Just a bigger pile
radiation_resistance = 1
/material/cloth //todo
name = "cloth"
stack_origin_tech = list(TECH_MATERIAL = 2)
+7 -1
View File
@@ -97,10 +97,16 @@ var/list/mining_overlay_cache = list()
return
/turf/simulated/mineral/initialize()
. = ..()
if(prob(20))
overlay_detail = "asteroid[rand(0,9)]"
update_icon(1)
return density && mineral
if(density && mineral)
. = INITIALIZE_HINT_LATELOAD
/turf/simulated/mineral/LateInitialize()
if(density && mineral)
MineralSpread()
/turf/simulated/mineral/update_icon(var/update_neighbors)
+5 -2
View File
@@ -204,8 +204,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
resting = 1
var/turf/location = get_turf(src)
message_admins("[key_name_admin(usr)] has ghosted. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)")
log_game("[key_name_admin(usr)] has ghosted.")
var/special_role = check_special_role()
if(!istype(loc,/obj/machinery/cryopod))
log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
else if(special_role)
log_and_message_admins("has ghosted in cryo as [special_role]. (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[location.x];Y=[location.y];Z=[location.z]'>JMP</a>)",usr)
var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
if(ghost)
ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly.
+1 -1
View File
@@ -51,7 +51,7 @@
// Make sure mapped in units start turned on.
/mob/living/bot/initialize()
..()
. = ..()
if(on)
turn_on() // Update lights and other stuff
@@ -219,7 +219,7 @@
speak_chance = 5
speak = list("Shuhn","Shrunnph?","Shunpf")
emote_see = list("scratches the ground","shakes out it's mane","tinkles gently")
emote_see = list("scratches the ground","shakes out its mane","clinks gently as it moves")
/mob/living/simple_animal/yithian
name = "yithian"
@@ -63,7 +63,7 @@
// Pickup loot
/mob/living/simple_animal/hostile/mimic/crate/initialize()
..()
. = ..()
for(var/obj/item/I in loc)
I.forceMove(src)
@@ -27,7 +27,7 @@
icon_dead = "rainbow baby slime dead"
/mob/living/simple_animal/slime/science/initialize()
..()
. = ..()
overlays.Cut()
overlays += "aslime-:33"
-4
View File
@@ -217,8 +217,4 @@
var/seedarkness = 1 //Determines mob's ability to see shadows. 1 = Normal vision, 0 = darkvision
// Falling things
var/hovering = FALSE // Is the mob floating or flying in some way? If so, don't fall normally. //Not implemented yet, idea is to let them ignore terrain slowdown and falling down floors
var/softfall = FALSE // Is the mob able to lessen their impact upon falling?
var/parachuting = FALSE // Is the mob able to jump out of planes and survive? Don't check this directly outside of CanParachute().
var/get_rig_stats = 0 //Moved from computer.dm
+1
View File
@@ -19,6 +19,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
icon_state = pick(using_map.lobby_screens)
else
icon_state = known_icon_states[1]
. = ..()
/mob/new_player
var/client/my_client // Need to keep track of this ourselves, since by the time Logout() is called the client has already been nulled
+62 -69
View File
@@ -347,9 +347,12 @@
/atom/movable/proc/fall_impact(var/atom/hit_atom, var/damage_min = 0, var/damage_max = 10, var/silent = FALSE, var/planetary = FALSE)
if(!silent)
visible_message("\The [src] falls from above and slams into \the [hit_atom]!", "You hear something slam into \the [hit_atom].")
for(var/atom/movable/A in src.contents)
A.fall_impact(hit_atom, damage_min, damage_max, silent = TRUE)
// Take damage from falling and hitting the ground
/mob/living/fall_impact(var/turf/landing, var/damage_min = 0, var/damage_max = 30, var/silent = FALSE, var/planetary = FALSE)
/mob/living/fall_impact(var/atom/hit_atom, var/damage_min = 0, var/damage_max = 10, var/silent = FALSE, var/planetary = FALSE)
var/turf/landing = get_turf(hit_atom)
if(planetary && src.CanParachute())
if(!silent)
visible_message("<span class='warning'>\The [src] glides in from above and lands on \the [landing]!</span>", \
@@ -376,60 +379,32 @@
"You hear something slam into \the [landing].")
playsound(loc, "punch", 25, 1, -1)
if(planetary) //Since the planetary fall damage is calibrated for humans, we need to up this a bit
damage_min *= 2
damage_max *= 2
adjustBruteLoss(rand(damage_min, damage_max))
return
return
/mob/living/carbon/human/fall_impact(var/turf/landing, var/damage_min = 0, var/damage_max = 10, var/silent = FALSE, var/planetary = FALSE)
if(planetary && src.CanParachute())
if(!silent)
visible_message("<span class='warning'>\The [src] glides in from above and lands on \the [landing]!</span>", \
"<span class='danger'>You land on \the [landing]!</span>", \
"You hear something land \the [landing].")
return
else if(!planetary && src.softfall) // Falling one floor and falling one atmosphere are very different things
if(!silent)
visible_message("<span class='warning'>\The [src] falls from above and lands on \the [landing]!</span>", \
"<span class='danger'>You land on \the [landing]!</span>", \
"You hear something land \the [landing].")
return
else
if(!silent)
if(planetary)
visible_message("<span class='danger'><font size='3'>\A [src] falls out of the sky and crashes into \the [landing]!</font></span>", \
"<span class='danger'><font size='3'> You fall out of the skiy and crash into \the [landing]!</font></span>", \
"You hear something slam into \the [landing].")
var/turf/T = get_turf(landing)
explosion(T, 0, 1, 2)
else
visible_message("<span class='warning'>\The [src] falls from above and slams into \the [landing]!</span>", \
"<span class='danger'>You fall off and hit \the [landing]!</span>", \
"You hear something slam into \the [landing].")
playsound(loc, "punch", 25, 1, -1)
// Because wounds heal rather quickly, 10 should be enough to discourage jumping off but not be enough to ruin you, at least for the first time.
apply_damage(rand(damage_min, damage_max), BRUTE, BP_HEAD)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_TORSO)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_GROIN)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_L_LEG)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_R_LEG)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_L_FOOT)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_R_FOOT)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_L_ARM)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_R_ARM)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_L_HAND)
apply_damage(rand(damage_min, damage_max), BRUTE, BP_R_HAND)
// Because wounds heal rather quickly, 10 (the default for this proc) should be enough to discourage jumping off but not be enough to ruin you, at least for the first time.
// Hits 10 times, because apparently targeting individual limbs lets certain species survive the fall from atmosphere
for(var/i = 1 to 10)
adjustBruteLoss(rand(damage_min, damage_max))
Weaken(4)
updatehealth()
return
return
//Checks if the mob is allowed to survive a fall from space
/mob/living/proc/CanParachute()
//Using /atom/movable instead of /obj/item because I'm not sure what all humans can pick up or wear
/atom/movable
var/parachute = FALSE // Is this thing a parachute itself?
var/hovering = FALSE // Is the thing floating or flying in some way? If so, don't fall normally. //Not implemented yet, idea is to let mobs/mechs ignore terrain slowdown and falling down floors
var/softfall = FALSE // Is the thing able to lessen their impact upon falling?
var/parachuting = FALSE // Is the thing able to jump out of planes and survive? Don't check this directly outside of CanParachute().
/atom/movable/proc/isParachute()
return parachute
//This is what makes the parachute items know they've been used.
//I made it /atom/movable so it can be retooled for other things (mobs, mechs, etc), though it's only currently called in human/CanParachute().
/atom/movable/proc/handleParachute()
return
//Checks if the thing is allowed to survive a fall from space
/atom/movable/proc/CanParachute()
return parachuting
//For humans, this needs to be a wee bit more complicated
@@ -454,19 +429,6 @@
else
return parachuting
//For human falling code
//Using /obj instead of /obj/item because I'm not sure what all humans can pick up or wear
/obj
var/parachute = FALSE
/obj/proc/isParachute()
return parachute
//This is what makes the parachute items know they've been used.
//I made it /atom/movable so it can be retooled for other things (mobs, mechs, etc), though it's only currently called in human/CanParachute().
/atom/movable/proc/handleParachute()
return
//Mech Code
/obj/mecha/handle_fall(var/turf/landing)
// First things first, break any lattice
@@ -480,18 +442,49 @@
return ..()
/obj/mecha/fall_impact(var/atom/hit_atom, var/damage_min = 15, var/damage_max = 30, var/silent = FALSE, var/planetary = FALSE)
// Tell the pilot that they just dropped down with a superheavy mecha.
if(occupant)
to_chat(occupant, "<span class='warning'>\The [src] crashed down onto \the [hit_atom]!</span>")
// Anything on the same tile as the landing tile is gonna have a bad day.
for(var/mob/living/L in hit_atom.contents)
L.visible_message("<span class='danger'>\The [src] crushes \the [L] as it lands on them!</span>")
L.adjustBruteLoss(rand(70, 100))
L.Weaken(8)
// Now to hurt the mech.
take_damage(rand(damage_min, damage_max))
var/turf/landing = get_turf(hit_atom)
if(planetary && src.CanParachute())
if(!silent)
visible_message("<span class='warning'>\The [src] glides in from above and lands on \the [landing]!</span>", \
"<span class='danger'>You land on \the [landing]!</span>", \
"You hear something land \the [landing].")
return
else if(!planetary && src.softfall) // Falling one floor and falling one atmosphere are very different things
if(!silent)
visible_message("<span class='warning'>\The [src] falls from above and lands on \the [landing]!</span>", \
"<span class='danger'>You land on \the [landing]!</span>", \
"You hear something land \the [landing].")
return
else
if(!silent)
if(planetary)
visible_message("<span class='danger'><font size='3'>\A [src] falls out of the sky and crashes into \the [landing]!</font></span>", \
"<span class='danger'><font size='3'> You fall out of the skiy and crash into \the [landing]!</font></span>", \
"You hear something slam into \the [landing].")
var/turf/T = get_turf(landing)
explosion(T, 0, 1, 2)
else
visible_message("<span class='warning'>\The [src] falls from above and slams into \the [landing]!</span>", \
"<span class='danger'>You fall off and hit \the [landing]!</span>", \
"You hear something slam into \the [landing].")
playsound(loc, "punch", 25, 1, -1)
// Now to hurt everything in the mech (if the fall is planetary, the mech blows up, so we do this first)
for(var/atom/movable/A in src.contents)
A.fall_impact(hit_atom, damage_min, damage_max, silent = TRUE)
// And now the Mech
if(!planetary)
take_damage(rand(damage_min, damage_max))
else
qdel(src)
// And hurt the floor.
if(istype(hit_atom, /turf/simulated/floor))
@@ -61,12 +61,6 @@
add_turf(T)
open_space_initialised = TRUE
/turf/simulated/open/initialize()
. = ..()
if(open_space_initialised)
// log_debug("[src] ([x],[y],[z]) queued for update for initialize()")
OS_controller.add_turf(src)
/turf/Entered(atom/movable/AM)
. = ..()
if(open_space_initialised && !AM.invisibility && isobj(AM))
+2
View File
@@ -18,6 +18,7 @@
var/const/climb_time = 2 SECONDS
/obj/structure/ladder/initialize()
. = ..()
// the upper will connect to the lower
if(allowed_directions & DOWN) //we only want to do the top one, as it will initialize the ones before it.
for(var/obj/structure/ladder/L in GetBelow(src))
@@ -131,6 +132,7 @@
anchored = 1
/obj/structure/stairs/initialize()
. = ..()
for(var/turf/turf in locs)
var/turf/simulated/open/above = GetAbove(turf)
if(!above)
+1 -1
View File
@@ -34,7 +34,7 @@
update()
/turf/simulated/open/initialize()
..()
. = ..()
ASSERT(HasBelow(z))
update()
+1 -1
View File
@@ -10,7 +10,7 @@
unacidable = 1
density = 0
opacity = 0 // Don't trigger lighting recalcs gah! TODO - consider multi-z lighting.
auto_init = FALSE // We do not need to be initialize()d
//auto_init = FALSE // We do not need to be initialize()d
var/mob/owner = null // What we are a shadow of.
/mob/zshadow/can_fall()
+2 -1
View File
@@ -323,7 +323,8 @@
// sync the organ's damage with its wounds
src.update_damages()
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
if(owner)
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
//If limb took enough damage, try to cut or tear it off
if(owner && loc == owner && !is_stump())
@@ -9,6 +9,7 @@
var/obj/effect/map/ship/linked
/obj/machinery/computer/engines/initialize()
. = ..()
linked = map_sectors["[z]"]
if (linked)
if (!linked.eng_control)
@@ -11,6 +11,7 @@
var/dy //coordinates
/obj/machinery/computer/helm/initialize()
. = ..()
linked = map_sectors["[z]"]
if (linked)
if(!linked.nav_control)
@@ -9,7 +9,7 @@
var/obj/effect/map/home //current destination
/obj/machinery/computer/shuttle_control/explore/initialize()
..()
. = ..()
home = map_sectors["[z]"]
shuttle_tag = "[shuttle_tag]-[z]"
if(!shuttle_controller.shuttles[shuttle_tag])
@@ -54,7 +54,7 @@
var/datum/ship_engine/thermal/controller
/obj/machinery/atmospherics/unary/engine/initialize()
..()
. = ..()
controller = new(src)
/obj/machinery/atmospherics/unary/engine/Destroy()
+1
View File
@@ -15,6 +15,7 @@
var/obj/machinery/computer/engines/eng_control
/obj/effect/map/ship/initialize()
. = ..()
for(var/obj/machinery/computer/engines/E in machines)
if (E.z == map_z)
eng_control = E
+1
View File
@@ -29,6 +29,7 @@
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/paper) || istype(I, /obj/item/weapon/folder) || istype(I, /obj/item/weapon/photo) || istype(I, /obj/item/weapon/paper_bundle))
I.loc = src
. = ..()
/obj/structure/filingcabinet/attackby(obj/item/P as obj, mob/user as mob)
if(istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/folder) || istype(P, /obj/item/weapon/photo) || istype(P, /obj/item/weapon/paper_bundle))
+1 -1
View File
@@ -21,7 +21,7 @@
charge_amount = 20
/obj/item/weapon/cell/device/weapon/empty/initialize()
..()
. = ..()
charge = 0
update_icon()
+1 -1
View File
@@ -77,7 +77,7 @@ var/list/fusion_cores = list()
if(owned_field)
icon_state = "core0"
if(force_rupture || owned_field.plasma_temperature > 1000)
owned_field.Rupture()
owned_field.MRC()
else
owned_field.RadiateAll()
qdel(owned_field)
+161 -32
View File
@@ -1,6 +1,7 @@
#define FUSION_ENERGY_PER_K 20
#define FUSION_MAX_ENVIRO_HEAT 5000 //raise this if you want the reactor to dump more energy into the atmosphere
#define PLASMA_TEMP_RADIATION_DIVISIOR 15 //radiation divisior. plasma temp / divisor = radiation.
#define PLASMA_TEMP_RADIATION_DIVISIOR 20 //radiation divisior. plasma temp / divisor = radiation.
/obj/effect/fusion_em_field
name = "electromagnetic field"
@@ -19,6 +20,8 @@
var/tick_instability = 0
var/percent_unstable = 0
var/stable = 1
var/id_tag
var/critical = 0
var/obj/machinery/power/fusion_core/owned_core
var/list/dormant_reactant_quantities = list()
@@ -31,7 +34,8 @@
/obj/structure/cable,
/obj/machinery/atmospherics,
/obj/machinery/air_sensor,
/mob/observer/dead
/mob/observer/dead,
/obj/machinery/power/hydromagnetic_trap
)
var/light_min_range = 2
@@ -52,7 +56,7 @@
owned_core = new_owned_core
if(!owned_core)
qdel(src)
id_tag = owned_core.id_tag
//create the gimmicky things to handle field collisions
var/obj/effect/fusion_particle_catcher/catcher
@@ -194,37 +198,46 @@
if(percent_unstable >= 1)
owned_core.Shutdown(force_rupture=1)
else
if(percent_unstable > 0.5 && prob(percent_unstable*100))
if(percent_unstable > 0.1 && prob(percent_unstable*100))
if(plasma_temperature < 2000)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
else
var/flare
var/fuel_loss
var/rupture
if(percent_unstable < 0.2)
if(percent_unstable > 0.2)
visible_message("<span class='danger'>\The [src] ripples uneasily, like a disturbed pond.</span>")
fuel_loss = prob(5)
flare = prob(50)
else if(percent_unstable < 0.9)
flare = prob(25)
else if(percent_unstable > 0.5)
visible_message("<span class='danger'>\The [src] undulates violently, shedding plumes of plasma!</span>")
flare = prob(50)
fuel_loss = prob(20)
rupture = prob(5)
else
else if(percent_unstable > 0.8)
visible_message("<span class='danger'>\The [src] is wracked by a series of horrendous distortions, buckling and twisting like a living thing!</span>")
flare = 1
fuel_loss = prob(50)
rupture = prob(25)
if(rupture)
owned_core.Shutdown(force_rupture=1)
if(prob(80))
MagneticQuench()
return
else if(prob(15))
MRC()
return
else if(prob(5))
QuantumFluxCascade()
return
else if(prob(5))
BluespaceQuenchEvent()
return
else
var/lost_plasma = (plasma_temperature*percent_unstable)
radiation += lost_plasma
if(flare)
radiation += plasma_temperature/2
plasma_temperature -= lost_plasma
spawn(1)
emflare()
if(fuel_loss)
for(var/particle in dormant_reactant_quantities)
var/lost_fuel = dormant_reactant_quantities[particle]*percent_unstable
@@ -234,17 +247,19 @@
dormant_reactant_quantities.Remove(particle)
Radiate()
return
/obj/effect/fusion_em_field/proc/Rupture()
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
sleep(5)
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
RadiateAll()
explosion(get_turf(owned_core),-1,-1,8,10) // Blow out all the windows.
return
/*/obj/effect/fusion_em_field/proc/CheckCriticality()
if (plasma_temperature > 70000)
critical += 0.2
else if (instability > 0.45)
critical += 0.6
if(critical >= 25 && prob(percent_unstable*100))
if (critical >= 90)
visible_message("<span class='danger'>\The [src] rumbles and quivers violently, threatening to break free!</span>")
else if(critical >= 50)
visible_message("<span class='danger'>\The [src] rumbles and quivers energetically, the walls distorting slightly.</span>")
else if(critical >= 25)
visible_message("<span class='danger'>\The [src] rumbles and quivers slightly, vibrating the deck.</span>")
*/
/obj/effect/fusion_em_field/proc/ChangeFieldStrength(var/new_strength)
var/calc_size = 1
if(new_strength <= 50)
@@ -490,19 +505,19 @@
//All procs below this point are called in _core.dm, starting at line 41.
//Stability monitoring. Gives radio annoucements if field stability is below 80%
/obj/effect/fusion_em_field/proc/stability_monitor()
var/warnpoint = 0.10
var/warnpoint = 0.10 //start warning at 10% instability
var/warnmessage = "Warning! Field unstable! Instability at [percent_unstable * 100]%, plasma temperature at [plasma_temperature + 295]k."
var/stablemessage = "Containment field returning to stable conditions."
if(percent_unstable >= warnpoint)
if(percent_unstable >= warnpoint) //we're unstable, start warning engineering
global_announcer.autosay(warnmessage, "Field Stability Monitor", "Engineering")
stable = 0
sleep(20 SECONDS)
return
if(percent_unstable < warnpoint && stable == 0)
stable = 0 //we know we're not stable, so let's not state the safe message.
sleep(20)
return
if(percent_unstable < warnpoint && stable == 0) //The field is stable again. Let's set our safe variable and state the safe message.
global_announcer.autosay(stablemessage, "Field Stability Monitor", "Engineering")
stable = 1
return
return
//Reaction radiation is fairly buggy and there's at least three procs dealing with radiation here, this is to ensure constant radiation output.
/obj/effect/fusion_em_field/proc/radiation_scale()
@@ -513,7 +528,8 @@
if(owned_core && owned_core.loc)
var/datum/gas_mixture/environment = owned_core.loc.return_air()
if(environment && environment.temperature < (T0C+FUSION_MAX_ENVIRO_HEAT))
environment.add_thermal_energy(plasma_temperature*20000)
environment.add_thermal_energy(plasma_temperature*5000)
check_instability()
//Temperature changes depending on color.
/obj/effect/fusion_em_field/proc/temp_color()
@@ -538,8 +554,121 @@
light_max_range = 5
light_max_power = 5
return
//moved the flare to a proc for various reasons. Called on line 225.
/obj/effect/fusion_em_field/proc/emflare()
radiation += plasma_temperature/2
light_color = "#ff0000"
light_max_power = 30
light_min_power = 30
light_min_range = 30
light_max_range = 30
visible_message("<span class='danger'>\The [src] flares to eye-searing brightness!</span>")
sleep(60)
temp_color()
//plasma_temperature -= lost_plasma
return
//Rupture() is no longer the end all be all. Fear the magnetic resonance cascade and quantum flux cascade
/obj/effect/fusion_em_field/proc/Rupture()
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
RadiateAll()
var/list/things_in_range = range(10, owned_core)
var/list/turfs_in_range = list()
var/turf/T
for (T in things_in_range)
turfs_in_range.Add(T)
explosion(pick(things_in_range), -1, 5, 5, 5)
empulse(pick(things_in_range), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
spawn(25)
explosion(pick(things_in_range), -1, 5, 5, 5)
spawn(25)
explosion(pick(things_in_range), -1, 5, 5, 5)
spawn(25)
explosion(pick(things_in_range), -1, 5, 5, 5)
spawn(10)
explosion(pick(things_in_range), -1, 5, 5, 5)
spawn(10)
explosion(pick(things_in_range), -1, 5, 5, 5)
spawn(10)
explosion(pick(things_in_range), -1, 5, 5, 5)
return
/obj/effect/fusion_em_field/proc/MRC() //spews electromagnetic pulses in an area around the core.
visible_message("<span class='danger'>\The [src] glows an extremely bright pink and flares out of existance!</span>")
global_announcer.autosay("Warning! Magnetic Resonance Cascade detected! Brace for electronic system distruption.", "Field Stability Monitor")
set_light(15, 15, "#ff00d8")
var/list/things_in_range = range(15, owned_core)
var/list/turfs_in_range = list()
var/turf/T
for (T in things_in_range)
turfs_in_range.Add(T)
for(var/loopcount = 1 to 10)
spawn(200)
empulse(pick(things_in_range), 10, 15)
Destroy()
return
/obj/effect/fusion_em_field/proc/QuantumFluxCascade() //spews hot phoron and oxygen in a radius around the RUST. Will probably set fire to things
global_announcer.autosay("Warning! Quantum fluxuation detected! Flammable gas release expected.", "Field Stability Monitor")
var/list/things_in_range = range(15, owned_core)
var/list/turfs_in_range = list()
var/turf/T
for (T in things_in_range)
turfs_in_range.Add(T)
for(var/loopcount = 1 to 10)
var/turf/TT = get_turf(pick(turfs_in_range))
if(istype(TT))
var/datum/gas_mixture/plasma = new
plasma.adjust_gas("oxygen", (size*100), 0)
plasma.adjust_gas("phoron", (size*100), 0)
plasma.temperature = (plasma_temperature/2)
plasma.update_values()
TT.assume_air(plasma)
TT.hotspot_expose(plasma_temperature)
plasma = null
Destroy()
return
/obj/effect/fusion_em_field/proc/MagneticQuench() //standard hard shutdown. dumps hot oxygen/phoron into the core's area and releases an EMP in the area around the core.
global_announcer.autosay("Warning! Magnetic Quench event detected, engaging hard shutdown.", "Field Stability Monitor")
empulse(owned_core, 10, 15)
var/turf/TT = get_turf(owned_core)
if(istype(TT))
var/datum/gas_mixture/plasma = new
plasma.adjust_gas("oxygen", (size*100), 0)
plasma.adjust_gas("phoron", (size*100), 0)
plasma.temperature = (plasma_temperature/2)
plasma.update_values()
TT.assume_air(plasma)
TT.hotspot_expose(plasma_temperature)
plasma = null
Destroy()
owned_core.Shutdown()
return
/obj/effect/fusion_em_field/proc/BluespaceQuenchEvent() //!!FUN!! causes a number of explosions in an area around the core. Will likely destory or heavily damage the reactor.
visible_message("<span class='danger'>\The [src] shudders like a dying animal before flaring to eye-searing brightness and rupturing!</span>")
set_light(15, 15, "#CCCCFF")
empulse(get_turf(src), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
global_announcer.autosay("WARNING: FIELD RUPTURE IMMINENT!", "Containment Monitor")
RadiateAll()
var/list/things_in_range = range(10, owned_core)
var/list/turfs_in_range = list()
var/turf/T
for (T in things_in_range)
turfs_in_range.Add(T)
for(var/loopcount = 1 to 10)
explosion(pick(things_in_range), -1, 5, 5, 5)
empulse(pick(things_in_range), ceil(plasma_temperature/1000), ceil(plasma_temperature/300))
Destroy()
owned_core.Shutdown()
return
#undef FUSION_HEAT_CAP
#undef FUSION_MAX_ENVIRO_HEAT
#undef PLASMA_TEMP_RADIATION_DIVISIOR
@@ -117,7 +117,7 @@ proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
var/turf/origin = get_turf(holder)
holder.Rupture()
qdel(holder)
var/radiation_level = rand(100, 200)
var/radiation_level = 200
// Copied from the SM for proof of concept. //Not any more --Cirra //Use the whole z proc --Leshana
radiation_repository.z_radiate(locate(1, 1, holder.z), radiation_level, 1)
@@ -141,7 +141,6 @@ proc/get_fusion_reaction(var/p_react, var/s_react, var/m_energy)
return 1
// High end reactions.
/decl/fusion_reaction/boron_hydrogen
p_react = "boron"
+11 -1
View File
@@ -5,4 +5,14 @@
description = "A colorless, odorless, tasteless and generally inert gas used in fusion reactors. Non-radioactive."
id = "helium-3"
reagent_state = GAS
color = "#808080"
color = "#808080"
/obj/structure/reagent_dispensers/he3
name = "fueltank"
desc = "A fueltank."
icon = 'icons/obj/objects.dmi'
icon_state = "weldtank"
amount_per_transfer_from_this = 10
New()
..()
reagents.add_reagent("helium-3",1000)
+54
View File
@@ -0,0 +1,54 @@
#define ENERGY_PER_K 20
#define MINIMUM_PLASMA_TEMPERATURE 10000
/obj/machinery/power/hydromagnetic_trap
name = "\improper hydromagnetic trap"
desc = "A device for extracting power from high-energy plasma in toroidal fields."
icon = 'icons/obj/machines/power/fusion.dmi'
icon_state = "mag_trap0"
anchored = 1
var/list/things_in_range = list()//what is in a radius of us?
var/list/fields_in_range = list()//What EM fields are in that radius?
var/list/active_field = list()//Our active field.
var/active = 0 //are we even on?
var/id_tag //needed for !!rasins!!
/obj/machinery/power/hydromagnetic_trap/process()
if(!powernet && anchored == 1)
return
spawn(1)
Active()
Search()
/obj/machinery/power/hydromagnetic_trap/proc/Search()//let's not have +100 instances of the same field in active_field.
things_in_range = range(7, src)
var/obj/effect/fusion_em_field/FFF
for (FFF in things_in_range)
fields_in_range.Add(FFF)
for (FFF in fields_in_range)
if (active_field.len > 0)
return
else if (active_field.len == 0)
Link()
return
/obj/machinery/power/hydromagnetic_trap/proc/Link() //discover our EM field
var/obj/effect/fusion_em_field/FFF
for(FFF in fields_in_range)
if (FFF.id_tag != id_tag)
return
active_field += FFF
active = 1
return
/obj/machinery/power/hydromagnetic_trap/proc/Active()//POWERRRRR
var/obj/effect/fusion_em_field/FF
if (active == 0)
return
for (FF in active_field)
if (FF.plasma_temperature >= MINIMUM_PLASMA_TEMPERATURE)
icon_state = "mag_trap1"
add_avail(ENERGY_PER_K * FF.plasma_temperature)
if (FF.plasma_temperature <= MINIMUM_PLASMA_TEMPERATURE)
icon_state = "mag_trap0"
return
+1 -1
View File
@@ -111,7 +111,7 @@
var/overheating = 0 //if this gets high enough the generator explodes
/obj/machinery/power/port_gen/pacman/initialize()
..()
. = ..()
if(anchored)
connect_to_network()
@@ -53,7 +53,7 @@
if(isliving(user))
hasShocked = 1
var/shock_damage = min(rand(30,40),rand(30,40))
user.electrocute_act(shock_damage, src)
user.electrocute_act(shock_damage, src, 1, BP_TORSO)
var/atom/target = get_edge_target_turf(user, get_dir(src, get_step_away(user, src)))
user.throw_at(target, 200, 4)
@@ -61,7 +61,6 @@
sleep(20)
hasShocked = 0
return
/obj/machinery/containment_field/proc/set_master(var/master1,var/master2)
if(!master1 || !master2)
+1 -1
View File
@@ -42,7 +42,7 @@
return 1
/obj/machinery/power/emitter/initialize()
..()
. = ..()
if(state == 2 && anchored)
connect_to_network()
+1 -1
View File
@@ -348,7 +348,7 @@ var/list/solars_list = list()
/obj/machinery/power/solar_control/initialize()
..()
. = ..()
if(!powernet) return
set_panels(cdir)
connect_to_network()
+1 -1
View File
@@ -285,7 +285,7 @@
else if(closest_mob)
var/shock_damage = Clamp(round(power/400), 10, 90) + rand(-5, 5)
closest_mob.electrocute_act(shock_damage, source, 1/*, tesla_shock = 1, stun = stun_mobs*/)
closest_mob.electrocute_act(shock_damage, source, 1, ran_zone())
if(issilicon(closest_mob))
var/mob/living/silicon/S = closest_mob
if(stun_mobs)
@@ -25,6 +25,16 @@
charge_cost = 480
projectile_type = /obj/item/projectile/ion
/obj/item/weapon/gun/energy/phasegun
name = "phase pistol"
desc = "The NT Mk26 EW Apollo is an energy handgun, specifically designed for use against wildlife."
icon_state = "phase"
item_state = "taser" //I don't have an in-hand sprite, taser will be fine
slot_flags = SLOT_BELT|SLOT_HOLSTER
charge_cost = 300
projectile_type = /obj/item/projectile/energy/phase
/obj/item/weapon/gun/energy/decloner
name = "biological demolecularisor"
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
@@ -0,0 +1,174 @@
//This will likely drive me insane, but fuck it. Let's give it a shot. -k22
//This was heavily assisted by MoondancerPony
/obj/item/weapon/gun/energy/modular
name = "modular weapon"
desc = "You shouldn't be seeing this. Contact your local time-police station."
icon_state = "mod_pistol"
cell_type = /obj/item/weapon/cell/device/weapon
charge_cost = 120
var/max_components = 3 //How many components we can hold.
var/capacitor_rating = 0 //How good are the capacitors inside us?
var/laser_rating = 0 //How good are the lasers inside of us?
var/manipulator_rating = 0 //How good are the manipulators inside us?
var/assembled = 1 //Are we closed up?
var/max_burst_size = 5 //Don't let our maximum burst size get too high.
var/list/guncomponents = list() //Generate our list of components.
var/accepted_components = list(
/obj/item/weapon/stock_parts/capacitor/,
/obj/item/weapon/stock_parts/capacitor/adv,
/obj/item/weapon/stock_parts/capacitor/super,
/obj/item/weapon/stock_parts/micro_laser/,
/obj/item/weapon/stock_parts/micro_laser/high,
/obj/item/weapon/stock_parts/micro_laser/ultra,
/obj/item/weapon/stock_parts/manipulator/,
/obj/item/weapon/stock_parts/manipulator/nano,
/obj/item/weapon/stock_parts/manipulator/pico,
)
//Excessively long because it won't accept subtypes for some reason!
/obj/item/weapon/gun/energy/modular/New() //Initialize our components.
..()
guncomponents = list()
guncomponents += new /obj/item/weapon/stock_parts/capacitor
guncomponents += new /obj/item/weapon/stock_parts/micro_laser
guncomponents += new /obj/item/weapon/stock_parts/manipulator
CheckParts()
FireModeModify()
/obj/item/weapon/gun/energy/modular/proc/CheckParts() //What parts do we have inside us, and how good are they?
capacitor_rating = 0
laser_rating = 0
manipulator_rating = 0
for(var/obj/item/weapon/stock_parts/capacitor/CA in guncomponents)
capacitor_rating += CA.rating
for(var/obj/item/weapon/stock_parts/micro_laser/ML in guncomponents)
laser_rating += ML.rating
for(var/obj/item/weapon/stock_parts/manipulator/MA in guncomponents)
manipulator_rating += MA.rating
FireModeModify()
/obj/item/weapon/gun/energy/modular/attackby(obj/item/O, mob/user)
if(istype(O, /obj/item/weapon/screwdriver))
to_chat(user, "<span class='notice'>You [assembled ? "disassemble" : "assemble"] the gun.</span>")
assembled = !assembled
playsound(src, O.usesound, 50, 1)
return
if(istype(O, /obj/item/weapon/crowbar))
if(assembled == 1)
to_chat(user, "<span class='warning'>Disassemble the [src] first!</span>")
return
for(var/obj/item/I in guncomponents)
to_chat(user, "<span class='notice'>You remove the gun's components.</span>")
playsound(src, O.usesound, 50, 1)
I.forceMove(get_turf(src))
guncomponents.Remove(I)
CheckParts()
return
//Someone's attacking us, and it's not anything we have a special case for (i.e. a tool)
..()
if(assembled) // can't put anything in
return
if(!(O.type in accepted_components))//check if we can accept it
to_chat(user, "<span class='warning'>You can't add this to [src]!</span>")
return
if(guncomponents.len >= max_components) //We have too many componenets and can't fit more.
to_chat(user, "<span class='warning'>You can't add any more components!</span>")
return
if(istype(O, /obj/item/weapon/stock_parts/capacitor) && capacitor_rating == 5)
to_chat(user, "<span class='warning'>You can't add any more capacitors!</span>")
return
user.drop_item()
guncomponents += O
O.forceMove(src)
to_chat(user, "<span class='notice'>You add a component to the [src]</span>")
CheckParts()
/obj/item/weapon/gun/energy/modular/proc/FireModeModify() //Check our laser, manipulator, and capacitor ratings, adjust stun and lethal firemodes depending on laser / manipulator rating and burst size depending on capacitors.
//check our lethal and stun ratings depending on laser and manipulator rating.
var/burstmode = capacitor_rating
var/beammode
var/beammode_lethal
var/chargecost
var/chargecost_lethal
if(laser_rating >= 15)
beammode_lethal = /obj/item/projectile/beam/sniper
beammode = /obj/item/projectile/beam/stun
chargecost = 300
chargecost_lethal = 600
else if(laser_rating >= 10)
beammode_lethal = /obj/item/projectile/beam/xray
beammode = /obj/item/projectile/beam/stun
chargecost = 300
chargecost_lethal = 200
else if(laser_rating == 8 && manipulator_rating == 5) //very specific set of combinations. No, you can't make a pulse rifle. Sorry research.
beammode_lethal = /obj/item/projectile/beam/heavylaser
beammode = /obj/item/projectile/beam/stun
chargecost = 300
chargecost_lethal = 600
else if(laser_rating >= 5)
beammode_lethal = /obj/item/projectile/beam/midlaser
beammode = /obj/item/projectile/beam/stun/med
chargecost = 180
chargecost_lethal = 240
else if(laser_rating < 5)
beammode_lethal = /obj/item/projectile/beam/weaklaser
beammode = /obj/item/projectile/beam/stun/weak
chargecost = 100
chargecost_lethal = 200
firemodes = list(
new /datum/firemode(src, list(mode_name="stun", projectile_type=beammode, fire_sound='sound/weapons/Taser.ogg', charge_cost = chargecost)),
new /datum/firemode(src, list(mode_name="lethal", projectile_type=beammode_lethal, fire_sound='sound/weapons/Laser.ogg', charge_cost = chargecost_lethal)),
new /datum/firemode(src, list(mode_name="[burstmode] shot stun", projectile_type=beammode, fire_sound='sound/weapons/Taser.ogg', charge_cost = chargecost, burst = burstmode)),
new /datum/firemode(src, list(mode_name="[burstmode] shot lethal", projectile_type=beammode_lethal, fire_sound='sound/weapons/Laser.ogg', charge_cost = chargecost_lethal, burst = burstmode)),
)
/obj/item/weapon/gun/energy/modular/load_ammo(var/obj/item/C, mob/user)
if(istype(C, cell_type))
if(self_recharge || battery_lock)
user << "<span class='notice'>[src] does not have a battery port.</span>"
return
var/obj/item/weapon/cell/P = C
if(power_supply)
user << "<span class='notice'>[src] already has a power cell.</span>"
else
user.visible_message("[user] is reloading [src].", "<span class='notice'>You start to insert [P] into [src].</span>")
if(do_after(user, 10))
user.remove_from_mob(P)
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
return
/obj/item/weapon/gun/energy/modular/pistol
name = "modular pistol"
icon_state = "mod_pistol"
max_components = 6
desc = "A bulky modular pistol frame. This only only accepts six parts."
origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 3)
burst_delay = 2
/obj/item/weapon/gun/energy/modular/carbine
name = "modular carbine"
icon_state = "mod_carbine"
max_components = 8
desc = "A modular version of the standard laser carbine. This one can hold 8 components."
origin_tech = list(TECH_COMBAT = 4, TECH_MAGNET = 3, TECH_MATERIAL = 3)
burst_delay = 2
/obj/item/weapon/gun/energy/modular/cannon
name = "modular cannon"
icon_state = "mod_cannon"
max_components = 14
desc = "Say hello, to my little friend!"
one_handed_penalty = 4 //dual wielding = no.
cell_type = /obj/item/weapon/cell //We're bigger. We can use much larger power cells.
origin_tech = list(TECH_COMBAT = 6, TECH_MAGNET = 6, TECH_MATERIAL = 5, TECH_BLUESPACE = 4) //its a damn cannon capable of holding a huge amount of parts.
burst_delay = 4 //preventing extreme silliness.
@@ -195,4 +195,10 @@
light_color = "#0000FF"
embed_chance = 0
muzzle_type = /obj/effect/projectile/pulse/muzzle
muzzle_type = /obj/effect/projectile/pulse/muzzle
/obj/item/projectile/energy/phase
kill_count = 4
damage = 5
SA_bonus_damage = 55 // 60 total on animals.
SA_vulnerability = SA_ANIMAL
+9
View File
@@ -491,6 +491,15 @@ other types of metals and chemistry for reagents).
build_path = /obj/item/roller/adv
sort_string = "MBBAF"
/datum/design/item/medical/enhanced_analyzer
name = "enhanced health analyzer"
desc = "A prototype version of the regular health analyzer, able to distinguish the location of more serious injuries as well as accurately determine radiation levels."
id = "advanced_analyzer"
req_tech = list(TECH_MAGNET = 5, TECH_BIO = 6)
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 1500)
build_path = /obj/item/device/healthanalyzer/advanced
sort_string = "MBBAG"
/datum/design/item/implant
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
+2 -1
View File
@@ -110,11 +110,12 @@ won't update every console in existence) but it's more of a hassle to do. Also,
files = new /datum/research(src) //Setup the research data holder.
if(!id)
for(var/obj/machinery/r_n_d/server/centcom/S in machines)
S.initialize()
S.update_connections()
break
/obj/machinery/computer/rdconsole/initialize()
SyncRDevices()
. = ..()
/obj/machinery/computer/rdconsole/attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
//Loading a disk into it.
+2 -3
View File
@@ -22,7 +22,6 @@
component_parts += new /obj/item/stack/cable_coil(src)
component_parts += new /obj/item/stack/cable_coil(src)
RefreshParts()
initialize();
/obj/machinery/r_n_d/server/Destroy()
griefProtection()
@@ -35,6 +34,7 @@
idle_power_usage /= max(1, tot_rating)
/obj/machinery/r_n_d/server/initialize()
. = ..()
if(!files)
files = new /datum/research(src)
var/list/temp_list
@@ -123,8 +123,7 @@
name = "Central R&D Database"
server_id = -1
/obj/machinery/r_n_d/server/centcom/initialize()
..()
/obj/machinery/r_n_d/server/centcom/proc/update_connections()
var/list/no_id_servers = list()
var/list/server_ids = list()
for(var/obj/machinery/r_n_d/server/S in machines)
+1 -1
View File
@@ -84,7 +84,7 @@
name = "escape pod berth controller"
/obj/machinery/embedded_controller/radio/simple_docking_controller/escape_pod_berth/initialize()
..()
. = ..()
docking_program = new/datum/computer/file/embedded_program/docking/simple/escape_pod(src)
program = docking_program
+3 -3
View File
@@ -1,5 +1,5 @@
//These lists are populated in /datum/shuttle_controller/New()
//Shuttle controller is instantiated in master_controller.dm.
//These lists are populated in /datum/controller/subsystem/shuttles/proc/setup_shuttle_docks()
//Shuttle subsystem is instantiated in shuttles.dm.
//shuttle moving state defines are in setup.dm
@@ -200,7 +200,7 @@
throwy = T.y
for(var/turf/T in dstturfs)
var/turf/D = locate(T.x, throwy - 1, 1)
var/turf/D = locate(T.x, throwy - 1, T.z)
for(var/atom/movable/AM as mob|obj in T)
AM.Move(D)
+88 -11
View File
@@ -128,6 +128,31 @@
icon_state = "flightcomp_center"
icon_keyboard = "flight_center_key"
icon_screen = "flight_center"
var/list/my_doors //Should be list("id_tag" = "Pretty Door Name", ...)
var/list/my_sensors //Should be list("id_tag" = "Pretty Sensor Name", ...)
/obj/machinery/computer/shuttle_control/web/initialize()
. = ..()
var/area/my_area = get_area(src)
if(my_doors)
var/list/find_doors = my_doors
my_doors = list()
for(var/obj/machinery/door/airlock/A in my_area)
if(A.id_tag in find_doors)
my_doors[find_doors[A.id_tag]] = A
find_doors -= A.id_tag
for(var/lost in find_doors)
log_debug("[my_area] shuttle computer couldn't find [lost] door!")
if(my_sensors)
var/list/find_sensors = my_sensors
my_sensors = list()
for(var/obj/machinery/shuttle_sensor/S in my_area)
if(S.id_tag in find_sensors)
my_sensors[find_sensors[S.id_tag]] = S
find_sensors -= S.id_tag
for(var/lost in find_sensors)
log_debug("[my_area] shuttle computer couldn't find [lost] sensor!")
// Fairly copypasta-y.
/obj/machinery/computer/shuttle_control/web/attack_hand(mob/user)
@@ -244,6 +269,21 @@
if(total_time) // Need to check or we might divide by zero.
percent_finished = (elapsed_time / total_time) * 100
var/list/doors = list()
if(my_doors)
for(var/doorname in my_doors)
var/obj/machinery/door/airlock/A = my_doors[doorname]
if(A)
doors[doorname] = list("bolted" = A.locked, "open" = !A.density)
var/list/sensors = list()
if(my_sensors)
for(var/sensorname in my_sensors)
var/obj/machinery/shuttle_sensor/S = my_sensors[sensorname]
if(S)
sensors[sensorname] = S.air_list()
data = list(
"shuttle_location" = shuttle_location,
"future_location" = future_location,
@@ -261,13 +301,15 @@
"cloaked" = shuttle.cloaked ? 1 : 0,
"can_autopilot" = shuttle.can_autopilot ? 1 : 0,
"autopilot" = shuttle.autopilot ? 1 : 0,
"can_rename" = shuttle.can_rename ? 1 : 0
"can_rename" = shuttle.can_rename ? 1 : 0,
"doors" = doors,
"sensors" = sensors
)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if(!ui)
ui = new(user, src, ui_key, "flight.tmpl", "[shuttle.visible_name] Flight Computer", 470, 500)
ui = new(user, src, ui_key, "flight.tmpl", "[shuttle.visible_name] Flight Computer", 500, 500)
ui.set_initial_data(data)
ui.open()
ui.set_auto_update(1)
@@ -384,18 +426,13 @@
/obj/shuttle_connector
name = "shuttle connector"
var/shuttle_name //Text name of the shuttle to connect to
var/start_time = 60 SECONDS //After round start (needs to be some time, to let other destinations set up)
var/list/destinations //Make sure this STARTS with a destination that builds a route to one that always exists as an anchor.
/obj/shuttle_connector/initialize()
. = ..()
SSshuttles.OnDocksInitialized(CALLBACK(src, .proc/setup_routes))
processing_objects += src
/obj/shuttle_connector/process()
if(world.time < start_time)
return
/obj/shuttle_connector/proc/setup_routes()
if(destinations && shuttle_name)
var/datum/shuttle/web_shuttle/ES = shuttle_controller.shuttles[shuttle_name]
var/datum/shuttle_web_master/WM = ES.web_master
@@ -408,6 +445,46 @@
var/travel_delay = D.routes_to_make[type_to_link]
D.link_destinations(WM.get_destination_by_type(type_to_link), D.preferred_interim_area, travel_delay)
processing_objects -= src
qdel(src)
//A sensor for detecting air outside shuttles! Handy, that.
/obj/machinery/shuttle_sensor
name = "environment sensor"
icon = 'icons/obj/airlock_machines.dmi'
icon_state = "airlock_sensor_standby"
var/id_tag
/obj/machinery/shuttle_sensor/process()
return PROCESS_KILL //nty
/obj/machinery/shuttle_sensor/proc/air_list()
. = list("reading" = FALSE)
var/turf/T = get_step(src,dir)
if(isnull(T))
return
var/list/aircontents
var/datum/gas_mixture/environment = T.return_air()
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles
if(total_moles)
var/o2_level = environment.gas["oxygen"]/total_moles
var/n2_level = environment.gas["nitrogen"]/total_moles
var/co2_level = environment.gas["carbon_dioxide"]/total_moles
var/phoron_level = environment.gas["phoron"]/total_moles
var/unknown_level = 1-(o2_level+n2_level+co2_level+phoron_level)
aircontents = list(\
"pressure" = "[round(pressure,0.1)]",\
"nitrogen" = "[round(n2_level*100,0.1)]",\
"oxygen" = "[round(o2_level*100,0.1)]",\
"carbon_dioxide" = "[round(co2_level*100,0.1)]",\
"phoron" = "[round(phoron_level*100,0.01)]",\
"other" = "[round(unknown_level, 0.01)]",\
"temp" = "[round(environment.temperature-T0C,0.1)]",\
"reading" = TRUE\
)
if(aircontents)
return aircontents
+1 -1
View File
@@ -58,7 +58,7 @@
take_damage(100)
/obj/structure/table/initialize()
..()
. = ..()
// One table per turf.
for(var/obj/structure/table/T in loc)
+1 -1
View File
@@ -23,7 +23,7 @@
..()
/obj/turbolift_map_holder/initialize()
. = ..()
// Create our system controller.
var/datum/turbolift/lift = new()
+1
View File
@@ -22,6 +22,7 @@
// Standard procs
//-------------------------------------------
/obj/vehicle/train/initialize()
. = ..()
for(var/obj/vehicle/train/T in orange(1, src))
latch(T)
@@ -8,7 +8,7 @@
var/obj/machinery/artifact/contained
/obj/structure/anomaly_container/initialize()
..()
. = ..()
var/obj/machinery/artifact/A = locate() in loc
if(A)
@@ -1,95 +0,0 @@
/datum/controller/game_controller
var/list/artifact_spawning_turfs = list()
var/list/digsite_spawning_turfs = list()
#define XENOARCH_SPAWN_CHANCE 0.5
#define DIGSITESIZE_LOWER 4
#define DIGSITESIZE_UPPER 12
#define ARTIFACTSPAWNNUM_LOWER 6
#define ARTIFACTSPAWNNUM_UPPER 12
/datum/controller/game_controller/proc/SetupXenoarch()
for(var/turf/simulated/mineral/M in world)
if(!M.density)
continue
if(isnull(M.geologic_data))
M.geologic_data = new /datum/geosample(M)
if(!prob(XENOARCH_SPAWN_CHANCE))
continue
var/farEnough = 1
for(var/A in digsite_spawning_turfs)
var/turf/T = A
if(T in range(5, M))
farEnough = 0
break
if(!farEnough)
continue
digsite_spawning_turfs.Add(M)
var/digsite = get_random_digsite_type()
var/target_digsite_size = rand(DIGSITESIZE_LOWER, DIGSITESIZE_UPPER)
var/list/processed_turfs = list()
var/list/turfs_to_process = list(M)
var/list/viable_adjacent_turfs = list()
if(target_digsite_size > 1)
for(var/turf/simulated/mineral/T in orange(2, M))
if(!T.density)
continue
if(T.finds)
continue
if(T in processed_turfs)
continue
viable_adjacent_turfs.Add(T)
target_digsite_size = min(target_digsite_size, viable_adjacent_turfs.len)
for(var/i = 1 to target_digsite_size)
turfs_to_process += pick_n_take(viable_adjacent_turfs)
while(turfs_to_process.len)
var/turf/simulated/mineral/archeo_turf = pop(turfs_to_process)
processed_turfs.Add(archeo_turf)
if(isnull(archeo_turf.finds))
archeo_turf.finds = list()
if(prob(50))
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 190)))
else if(prob(75))
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 90)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(110, 190)))
else
archeo_turf.finds.Add(new /datum/find(digsite, rand(10, 50)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(60, 140)))
archeo_turf.finds.Add(new /datum/find(digsite, rand(150, 190)))
//sometimes a find will be close enough to the surface to show
var/datum/find/F = archeo_turf.finds[1]
if(F.excavation_required <= F.view_range)
archeo_turf.archaeo_overlay = "overlay_archaeo[rand(1,3)]"
archeo_turf.update_icon()
//have a chance for an artifact to spawn here, but not in animal or plant digsites
if(isnull(M.artifact_find) && digsite != DIGSITE_GARDEN && digsite != DIGSITE_ANIMAL)
artifact_spawning_turfs.Add(archeo_turf)
//create artifact machinery
var/num_artifacts_spawn = rand(ARTIFACTSPAWNNUM_LOWER, ARTIFACTSPAWNNUM_UPPER)
while(artifact_spawning_turfs.len > num_artifacts_spawn)
pick_n_take(artifact_spawning_turfs)
var/list/artifacts_spawnturf_temp = artifact_spawning_turfs.Copy()
while(artifacts_spawnturf_temp.len > 0)
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
artifact_turf.artifact_find = new()
#undef XENOARCH_SPAWN_CHANCE
#undef DIGSITESIZE_LOWER
#undef DIGSITESIZE_UPPER
#undef ARTIFACTSPAWNNUM_LOWER
#undef ARTIFACTSPAWNNUM_UPPER
+3 -3
View File
@@ -70,15 +70,15 @@
artifact_distance = rand()
artifact_id = container.artifact_find.artifact_id
else
if(master_controller) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in master_controller.artifact_spawning_turfs)
if(SSxenoarch) //Sanity check due to runtimes ~Z
for(var/turf/simulated/mineral/T in SSxenoarch.artifact_spawning_turfs)
if(T.artifact_find)
var/cur_dist = get_dist(container, T) * 2
if( (artifact_distance < 0 || cur_dist < artifact_distance))
artifact_distance = cur_dist + rand() * 2 - 1
artifact_id = T.artifact_find.artifact_id
else
master_controller.artifact_spawning_turfs.Remove(T)
SSxenoarch.artifact_spawning_turfs.Remove(T)
/obj/item/device/core_sampler
name = "core sampler"
@@ -15,7 +15,7 @@
var/report_num = 0
/obj/machinery/artifact_analyser/initialize()
..()
. = ..()
reconnect_scanner()
/obj/machinery/artifact_analyser/proc/reconnect_scanner()
+5 -5
View File
@@ -57,8 +57,8 @@
var/nearestSimpleTargetDist = -1
var/turf/cur_turf = get_turf(src)
if(master_controller) //Sanity check due to runtimes ~Z
for(var/A in master_controller.artifact_spawning_turfs)
if(SSxenoarch) //Sanity check due to runtimes ~Z
for(var/A in SSxenoarch.artifact_spawning_turfs)
var/turf/simulated/mineral/T = A
if(T.density && T.artifact_find)
if(T.z == cur_turf.z)
@@ -67,9 +67,9 @@
nearestTargetDist = cur_dist + rand() * 2 - 1
nearestTargetId = T.artifact_find.artifact_id
else
master_controller.artifact_spawning_turfs.Remove(T)
SSxenoarch.artifact_spawning_turfs.Remove(T)
for(var/A in master_controller.digsite_spawning_turfs)
for(var/A in SSxenoarch.digsite_spawning_turfs)
var/turf/simulated/mineral/T = A
if(T.density && T.finds && T.finds.len)
if(T.z == cur_turf.z)
@@ -77,7 +77,7 @@
if(nearestSimpleTargetDist < 0 || cur_dist < nearestSimpleTargetDist)
nearestSimpleTargetDist = cur_dist + rand() * 2 - 1
else
master_controller.digsite_spawning_turfs.Remove(T)
SSxenoarch.digsite_spawning_turfs.Remove(T)
if(nearestTargetDist >= 0)
user << "Exotic energy detected on wavelength '[nearestTargetId]' in a radius of [nearestTargetDist]m[nearestSimpleTargetDist > 0 ? "; small anomaly detected in a radius of [nearestSimpleTargetDist]m" : ""]"