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

This commit is contained in:
Anewbe
2018-02-05 00:53:33 -06:00
40 changed files with 1000 additions and 201 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
@@ -8,6 +8,11 @@
display_name = "clipboard"
path = /obj/item/weapon/clipboard
/datum/gear/utility/tts_device
display_name = "text to speech device"
path = /obj/item/device/text_to_speech
cost = 3 //Not extremely expensive, but it's useful for mute chracters.
/datum/gear/utility/communicator
display_name = "communicator selection"
path = /obj/item/device/communicator
@@ -29,7 +34,7 @@
display_name = "the traveler's guide to vir"
path = /obj/item/weapon/book/codex/lore/vir
cost = 0
/datum/gear/utility/news
display_name = "daedalus pocket newscaster"
path = /obj/item/weapon/book/codex/lore/news
+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."
+10 -5
View File
@@ -103,18 +103,23 @@ var/list/global/map_templates = list()
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/dont_init = 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
// repopulate_sorted_areas()
//initialize things that are normally initialized after map load
initTemplateBounds(bounds)
if(!dont_init)
initTemplateBounds(bounds)
log_game("Z-level [name] loaded at at [x],[y],[world.maxz]")
return TRUE
@@ -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)
+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.
@@ -1347,9 +1347,9 @@
if(..(slipped_on,stun_duration))
return 1
/mob/living/carbon/human/proc/undislocate()
/mob/living/carbon/human/proc/relocate()
set category = "Object"
set name = "Undislocate Joint"
set name = "Relocate Joint"
set desc = "Pop a joint back into place. Extremely painful."
set src in view(1)
@@ -1397,7 +1397,7 @@
else
U << "<span class='danger'>You pop [S]'s [current_limb.joint] back in!</span>"
S << "<span class='danger'>[U] pops your [current_limb.joint] back in!</span>"
current_limb.undislocate()
current_limb.relocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/Target = null)
if(W in organs)
+3 -3
View File
@@ -193,9 +193,9 @@
dislocated = 1
if(owner)
owner.verbs |= /mob/living/carbon/human/proc/undislocate
owner.verbs |= /mob/living/carbon/human/proc/relocate
/obj/item/organ/external/proc/undislocate()
/obj/item/organ/external/proc/relocate()
if(dislocated == -1)
return
@@ -207,7 +207,7 @@
for(var/obj/item/organ/external/limb in owner.organs)
if(limb.dislocated == 1)
return
owner.verbs -= /mob/living/carbon/human/proc/undislocate
owner.verbs -= /mob/living/carbon/human/proc/relocate
/obj/item/organ/external/update_health()
damage = min(max_damage, (brute_dam + burn_dam))
+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
@@ -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
@@ -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)
@@ -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.
+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)
+86 -2
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)
@@ -411,3 +453,45 @@
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