Merge pull request #895 from tigercat2000/okayletstrysomethingslightlydifferent

LINDA
This commit is contained in:
ZomgPonies
2015-04-30 13:18:48 -04:00
126 changed files with 3153 additions and 4869 deletions
-2
View File
@@ -129,8 +129,6 @@ var/list/admin_verbs_server = list(
var/list/admin_verbs_debug = list(
/client/proc/cmd_admin_list_open_jobs,
/client/proc/Debug2,
/client/proc/kill_air,
/client/proc/ZASSettings,
/client/proc/cmd_debug_make_powernets,
/client/proc/debug_controller,
/client/proc/cmd_debug_mob_lists,
-12
View File
@@ -3048,18 +3048,6 @@
src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
src.access_news_network()
else if(href_list["vsc"])
if(check_rights(R_ADMIN|R_SERVER))
if(href_list["vsc"] == "airflow")
vsc.ChangeSettingsDialog(usr,vsc.settings)
if(href_list["vsc"] == "plasma")
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
// zas_settings.ChangeSettingsDialog(usr,zas_settings.settings)
if(href_list["vsc"] == "default")
vsc.SetDefault(usr)
// zas_settings.SetDefault(usr)
// player info stuff
if(href_list["add_player_info"])
var/key = href_list["add_player_info"]
var/add = input("Add Player Info") as null|text
+19
View File
@@ -1,3 +1,22 @@
/client/proc/air_status(turf/target as turf)
set category = "Debug"
set name = "Display Air Status"
if(!isturf(target))
return
var/datum/gas_mixture/GM = target.return_air()
var/burning = 0
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
if(T.active_hotspot)
burning = 1
usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
for(var/datum/gas/trace_gas in GM.trace_gases)
usr << "[trace_gas.type]: [trace_gas.moles]"
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/fix_next_move()
set category = "Debug"
set name = "Unfreeze Everyone"
-4
View File
@@ -143,10 +143,6 @@ var/intercom_range_display_status = 0
src.verbs += /client/proc/print_jobban_old
src.verbs += /client/proc/print_jobban_old_filter
src.verbs += /client/proc/forceEvent
src.verbs += /client/proc/Zone_Info
src.verbs += /client/proc/Test_ZAS_Connection
src.verbs += /client/proc/ZoneTick
//src.verbs += /client/proc/TestZASRebuild
//src.verbs += /client/proc/cmd_admin_rejuvenate
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+3 -1
View File
@@ -156,6 +156,7 @@
ground_zero.assume_air(air_contents)
ground_zero.hotspot_expose(1000, 125)
air_update_turf()
if(master)
del(master)
del(src)
@@ -165,4 +166,5 @@
var/turf/simulated/T = get_turf(src)
if(!T)
return
T.assume_air(removed)
T.assume_air(removed)
air_update_turf()
+1
View File
@@ -7,3 +7,4 @@
else
biomass_infestation()
spacevines_spawned = 1
v
-4
View File
@@ -20,8 +20,6 @@
opacity = 1
var/health = 50
autoignition_temperature = AUTOIGNITION_WOOD
/obj/structure/bookcase/initialize()
for(var/obj/item/I in loc)
if(istype(I, /obj/item/weapon/book))
@@ -151,8 +149,6 @@
w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever)
attack_verb = list("bashed", "whacked", "educated")
autoignition_temperature = AUTOIGNITION_PAPER
var/dat // Actual page content
var/due_date = 0 // Game time in 1/10th seconds
var/author // Who wrote the thing, can be changed by pen or PC. It is not automatically assigned
@@ -152,6 +152,7 @@
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
return
/mob/living/carbon/alien/IsAdvancedToolUser()
return has_fine_manipulation
@@ -20,7 +20,7 @@
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
if(mob_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe()
@@ -65,6 +65,7 @@
update_fire()
/mob/living/carbon/alien/humanoid/update_hud()
//TODO
if (client)
@@ -17,7 +17,7 @@
amount_grown++
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
if(mob_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
spawn(0) breathe()
else //Still give containing object the chance to interact
+1 -1
View File
@@ -116,7 +116,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
if(air_master.current_cycle%3==1)
if(mob_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -65,7 +65,7 @@ var/const/MAX_ACTIVE_TIME = 400
Die()
return
/obj/item/clothing/mask/facehugger/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
Die()
return
+6 -1
View File
@@ -439,7 +439,12 @@ mob/living
item.throw_at(target, item.throw_range, item.throw_speed, src)
/*
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
src.IgniteMob()
bodytemperature = max(bodytemperature, BODYTEMP_HEAT_DAMAGE_LIMIT+10)
*/
/mob/living/carbon/can_use_hands()
if(handcuffed)
return 0
@@ -226,7 +226,6 @@
usr << "<span class='deadsay'>[t_He] has a pulse!</span>"
msg += "<span class='warning'>"
if(fire_stacks > 0)
msg += "[t_He] [t_is] covered in something flammable.\n"
if(fire_stacks < 0)
@@ -82,5 +82,5 @@
var/frozen = 0 //used for preventing attacks on admin-frozen people
fire_dmi = 'icons/mob/OnFire.dmi'
fire_sprite = "Standing"
var/fire_dmi = 'icons/mob/OnFire.dmi'
var/fire_sprite = "Standing"
+5 -11
View File
@@ -74,7 +74,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
//No need to update all of these procs if the guy is dead.
if(stat != DEAD && !in_stasis)
if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
if(mob_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath
breathe() //Only try to take a breath every 4 ticks, unless suffocating
else //Still give containing object the chance to interact
@@ -371,7 +371,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
breath = loc.remove_air(breath_moles)
if(!is_lung_ruptured())
if(!breath || breath.total_moles < BREATH_MOLES / 5 || breath.total_moles > BREATH_MOLES * 5)
if(!breath || breath.total_moles() < BREATH_MOLES / 5 || breath.total_moles() > BREATH_MOLES * 5)
if(prob(5))
rupture_lung()
@@ -382,8 +382,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
handle_breath(breath)
if(species.name=="Plasmaman")
if(species.name=="Plasmaman") //this is stupid as fuck
// Check if we're wearing our biosuit and mask.
if (!istype(wear_suit,/obj/item/clothing/suit/space/eva/plasmaman) || !istype(head,/obj/item/clothing/head/helmet/space/eva/plasmaman))
//testing("Plasmaman [src] leakin'. coverflags=[cover_flags]")
@@ -548,6 +547,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
return
//END FIRE CODE
/*
proc/adjust_body_temperature(current, loc_temp, boost)
var/temperature = current
@@ -728,12 +728,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
alien = species.reagent_tag
reagents.metabolize(src,alien)
var/total_plasmaloss = 0
for(var/obj/item/I in src)
if(I.contaminated)
total_plasmaloss += vsc.plc.CONTAMINATION_LOSS
if(!(status_flags & GODMODE)) adjustToxLoss(total_plasmaloss)
if(status_flags & GODMODE) return 0 //godmode
if(species.flags & REQUIRE_LIGHT)
@@ -1418,7 +1412,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
stomach_contents.Remove(M)
del(M)
continue
if(air_master.current_cycle%3==1)
if(mob_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
@@ -460,16 +460,13 @@ proc/get_damage_icon_part(damage_state, body_part)
if(update_icons) update_icons()
/mob/living/carbon/human/update_fire()
remove_overlay(FIRE_LAYER)
if(on_fire)
overlays_standing[FIRE_LAYER] = image("icon"=fire_dmi, "icon_state"=fire_sprite, "layer"=-FIRE_LAYER)
else
overlays_standing[FIRE_LAYER] = null
apply_overlay(FIRE_LAYER)
/* --------------------------------------- */
//For legacy support.
/mob/living/carbon/human/regenerate_icons()
@@ -25,7 +25,7 @@
if (stat != DEAD)
if(!istype(src,/mob/living/carbon/monkey/diona)) //still breathing
//First, resolve location and get a breath
if(air_master.current_cycle%4==2)
if(mob_master.current_cycle%4==2)
//Only try to take a breath every 4 seconds, unless suffocating
breathe()
else //Still give containing object the chance to interact
@@ -266,7 +266,7 @@
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles == 0))
if(!breath || (breath.total_moles() == 0))
adjustOxyLoss(7)
oxygen_alert = max(oxygen_alert, 1)
@@ -660,4 +660,4 @@
return
adjustFireLoss(6)
return
//END FIRE CODE
//END FIRE CODE
@@ -221,6 +221,7 @@
if(H.reagents)
H.reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
H.toxins_alert = max(H.toxins_alert, 1)
else if(O2_pp > vox_oxygen_max && name == "Vox") //Oxygen is toxic to vox.
var/ratio = (breath.oxygen/vox_oxygen_max) * 1000
H.adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
+2 -1
View File
@@ -544,7 +544,6 @@
for(var/mob/O in viewers(usr, null))
O.show_message(text("\red <B>[] resists!</B>", L), 1)
//unbuckling yourself
if(L.buckled && (L.last_special <= world.time) )
if(iscarbon(L))
@@ -638,6 +637,7 @@
//breaking out of handcuffs
else if(iscarbon(L))
var/mob/living/carbon/CM = L
if(CM.on_fire && CM.canmove)
CM.fire_stacks -= 5
CM.weakened = max(CM.weakened, 3)//We dont check for CANWEAKEN, I don't care how immune to weakening you are, if you're rolling on the ground, you're busy.
@@ -651,6 +651,7 @@
"<span class='notice'>You extinguish yourself.</span>")
ExtinguishMob()
return
if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time))
CM.changeNext_move(CLICK_CD_BREAKOUT)
CM.last_special = world.time + CLICK_CD_BREAKOUT
+22 -22
View File
@@ -199,29 +199,9 @@
return
//This is called when the mob is thrown into a dense turf
/mob/living/proc/turf_collision(var/turf/T, var/speed)
src.take_organ_damage(speed*5)
/mob/living/proc/near_wall(var/direction,var/distance=1)
var/turf/T = get_step(get_turf(src),direction)
var/turf/last_turf = src.loc
var/i = 1
while(i>0 && i<=distance)
if(T.density) //Turf is a wall!
return last_turf
i++
last_turf = T
T = get_step(T,direction)
return 0
// End BS12 momentum-transfer code.
//Mobs on Fire
/mob/living/proc/IgniteMob()
if(fire_stacks > 0)
if(fire_stacks > 0 && !on_fire)
on_fire = 1
src.AddLuminosity(3)
update_fire()
@@ -237,7 +217,7 @@
return
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
fire_stacks = Clamp(fire_stacks + add_fire_stacks, min = -20, max = 20)
/mob/living/proc/handle_fire()
if(fire_stacks < 0)
@@ -258,6 +238,26 @@
//Mobs on Fire end
//This is called when the mob is thrown into a dense turf
/mob/living/proc/turf_collision(var/turf/T, var/speed)
src.take_organ_damage(speed*5)
/mob/living/proc/near_wall(var/direction,var/distance=1)
var/turf/T = get_step(get_turf(src),direction)
var/turf/last_turf = src.loc
var/i = 1
while(i>0 && i<=distance)
if(T.density) //Turf is a wall!
return last_turf
i++
last_turf = T
T = get_step(T,direction)
return 0
// End BS12 momentum-transfer code.
/mob/living/proc/grabbedby(mob/living/carbon/user,var/supress_message = 0)
if(user == src || anchored)
return 0
+4 -2
View File
@@ -36,9 +36,11 @@
var/cameraFollow = null
var/tod = null // Time of death
var/update_slimes = 1
on_fire = 0 //The "Are we on fire?" var
var/on_fire = 0 //The "Are we on fire?" var
var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20
var/update_slimes = 1
var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death.
var/implanting = 0 //Used for the mind-slave implant
var/silent = null //Can't talk. Value goes down every life proc.
@@ -49,8 +49,7 @@
// DOORS
// Simply updates the visibility of the area when it opens/closes/destroyed.
/obj/machinery/door/update_nearby_tiles(need_rebuild)
. = ..(need_rebuild)
/obj/machinery/door/proc/update_freelok_sight()
// Glass door glass = 1
// don't check then?
if(!glass && cameranet)
@@ -419,7 +419,7 @@
data["temperature"] = round(env.temperature)
data["temperatureC"] = round(env.temperature-T0C)
var/t_moles = env.total_moles
var/t_moles = env.total_moles()
var/gases[0]
if(t_moles)
var/n2[0]
@@ -50,4 +50,4 @@
msg += "\nIt is [pose]"
usr << msg
return
return
@@ -366,4 +366,4 @@
if(!on_fire) //Silicons don't gain stacks from hotspots, but hotspots can ignite them
IgniteMob()
//Robots on fire
//Robots on fire
-2
View File
@@ -6,8 +6,6 @@
w_class = 2
pressure_resistance = 2
autoignition_temperature = 522 // Kelvin
/obj/item/weapon/folder/blue
desc = "A blue folder."
icon_state = "folder_blue"
+2 -2
View File
@@ -10,7 +10,7 @@
pressure_resistance = 10
var/amount = 30 //How much paper is in the bin.
var/list/papers = new/list() //List of papers put in the bin for reference.
/*
autoignition_temperature = 519.15 // Kelvin
/obj/item/weapon/paper_bin/ignite(var/temperature)
@@ -24,7 +24,7 @@
papers=0
amount=0
update_icon()
*///LINDA shit figure out later
/obj/item/weapon/paper_bin/MouseDrop(atom/over_object)
var/mob/M = usr
if(M.restrained() || M.stat || !Adjacent(M))
+1 -1
View File
@@ -579,7 +579,7 @@
// called when on fire
/obj/machinery/light/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C
broken()
+1 -1
View File
@@ -32,7 +32,7 @@ var/global/list/rad_collectors = list()
P.air_contents.toxins = 0
eject()
else
P.air_contents.adjust(tx = -0.001*drainratio)
P.air_contents.toxins -= 0.001*drainratio
return
@@ -128,7 +128,7 @@
if(!tank || !..()) return //Only do this on a successful shot.
var/lost_gas_amount = tank.air_contents.total_moles*(pressure_setting/100)
var/lost_gas_amount = tank.air_contents.total_moles()*(pressure_setting/100)
var/datum/gas_mixture/removed = tank.air_contents.remove(lost_gas_amount)
user.loc.assume_air(removed)
@@ -104,7 +104,7 @@
/obj/item/projectile/bullet/incendiary/shell/Move()
..()
var/turf/location = get_turf(src)
new/obj/fire(location)
new/obj/effect/hotspot(location)
location.hotspot_expose(700, 50, 1)
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
+7 -7
View File
@@ -223,7 +223,6 @@ datum
reaction_turf(var/turf/simulated/T, var/volume)
if (!istype(T)) return
var/CT = cooling_temperature
src = null
if(volume >= 3)
if(T.wet >= 1) return
@@ -245,10 +244,10 @@ datum
for(var/mob/living/carbon/slime/M in T)
M.apply_water()
var/hotspot = (locate(/obj/fire) in T)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0)
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
qdel(hotspot)
@@ -257,13 +256,13 @@ datum
reaction_obj(var/obj/O, var/volume)
src = null
var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/fire) in T)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
del(hotspot)
qdel(hotspot)
if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/monkeycube))
var/obj/item/weapon/reagent_containers/food/snacks/monkeycube/cube = O
if(!cube.wrapped)
@@ -1135,6 +1134,7 @@ datum
M.adjustToxLoss(3*REM)
..()
return
reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume)//Splashing people with plasma is stronger than fuel!
if(!istype(M, /mob/living))
return
@@ -1767,13 +1767,13 @@ datum
if(T.wet_overlay)
T.overlays -= T.wet_overlay
T.wet_overlay = null
var/hotspot = (locate(/obj/fire) in T)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot)
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
lowertemp.react()
T.assume_air(lowertemp)
del(hotspot)
qdel(hotspot)
enzyme
name = "Denatured Enzyme"
+5 -11
View File
@@ -644,19 +644,13 @@ datum
required_container = /obj/item/slime_extract/orange
required_other = 1
on_reaction(var/datum/reagents/holder)
for(var/mob/O in viewers(get_turf_loc(holder.my_atom), null))
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
for(var/mob/O in viewers(get_turf(holder.my_atom), null))
O.show_message(text("\red The slime extract begins to vibrate violently !"), 1)
sleep(50)
var/turf/location = get_turf(holder.my_atom.loc)
for(var/turf/simulated/floor/target_tile in range(0,location))
var/datum/gas_mixture/napalm = new
napalm.toxins = 25
napalm.temperature = 1400
target_tile.assume_air(napalm)
spawn (0) target_tile.hotspot_expose(700, 400)
var/turf/simulated/T = get_turf(holder.my_atom)
if(istype(T))
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 50)
//Yellow
slimeoverload
+1 -1
View File
@@ -90,7 +90,7 @@ datum/reagent/crank/addiction_act_stage4(var/mob/living/M as mob)
/datum/chemical_reaction/crank/on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/fire(turf)
new /obj/effect/hotspot(turf)
explosion(T,0,0,2)
return
+5 -5
View File
@@ -45,7 +45,7 @@
/datum/chemical_reaction/clf3/on_reaction(var/datum/reagents/holder, var/created_volume)
var/turf/T = get_turf(holder.my_atom)
for(var/turf/turf in range(1,T))
new /obj/fire(turf)
new /obj/effect/hotspot(turf)
return
/datum/reagent/clf3/reaction_turf(var/turf/simulated/T, var/volume)
@@ -58,7 +58,7 @@
if(prob(volume/10))
F.make_plating()
if(istype(F, /turf/simulated/floor/))
new /obj/fire(F)
new /obj/effect/hotspot(F)
if(istype(T, /turf/simulated/wall/))
var/turf/simulated/wall/W = T
if(prob(volume/10))
@@ -415,7 +415,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
return
var/turf/simulated/T = get_turf(holder.my_atom)
for(var/turf/simulated/turf in range(created_volume/10,T))
new /obj/fire(turf)
new /obj/effect/hotspot(turf)
return
/datum/reagent/phlogiston/on_mob_life(var/mob/living/M as mob)
@@ -558,7 +558,7 @@ datum/reagent/firefighting_foam/reaction_turf(var/turf/simulated/T, var/volume)
src = null
if(!istype(T, /turf/space))
new /obj/effect/decal/cleanable/flour/foam(T) //foam mess; clears up quickly.
var/hotspot = (locate(/obj/fire) in T)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-(CT*1000),lowertemp.temperature / CT) ,0)
@@ -570,7 +570,7 @@ datum/reagent/firefighting_foam/reaction_turf(var/turf/simulated/T, var/volume)
datum/reagent/firefighting_foam/reaction_obj(var/obj/O, var/volume)
src = null
var/turf/T = get_turf(O)
var/hotspot = (locate(/obj/fire) in T)
var/hotspot = (locate(/obj/effect/hotspot) in T)
if(hotspot && !istype(T, /turf/space))
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
lowertemp.temperature = max( min(lowertemp.temperature-2000,lowertemp.temperature / 2) ,0)
+1
View File
@@ -405,6 +405,7 @@
//Actually transfer the gas
var/datum/gas_mixture/removed = env.remove(transfer_moles)
air_contents.merge(removed)
air_update_turf()
// if full enough, switch to ready mode
+7 -6
View File
@@ -117,21 +117,22 @@
removed.temperature = min((removed.temperature*heat_capacity + heating_power)/heat_capacity, 1000)
env.merge(removed)
air_update_turf()
/obj/machinery/r_n_d/server/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if (disabled)
return
if (shocked)
shock(user,50)
if(istype(O, /obj/item/weapon/screwdriver))
if(istype(O, /obj/item/weapon/screwdriver))
default_deconstruction_screwdriver(user, "server_o", "server")
return 1
if(exchange_parts(user, O))
return 1
if (panel_open)
if(istype(O, /obj/item/weapon/crowbar))
griefProtection()
@@ -141,7 +142,7 @@
/obj/machinery/r_n_d/server/attack_hand(mob/user as mob)
if (disabled)
return
if (shocked)
shock(user,50)
return
@@ -22,5 +22,5 @@
/datum/artifact_effect/gasco2/DoEffectAura()
if(holder)
var/datum/gas_mixture/env = holder.loc.return_air()
if(env && env.total_moles < max_pressure)
if(env && env.total_moles() < max_pressure)
env.carbon_dioxide += pick(0, 0, 0.1, rand())
@@ -19,5 +19,5 @@
/datum/artifact_effect/gasnitro/DoEffectAura()
if(holder)
var/datum/gas_mixture/env = holder.loc.return_air()
if(env && env.total_moles < max_pressure)
if(env && env.total_moles() < max_pressure)
env.nitrogen += pick(0, 0, 0.1, rand())
@@ -19,5 +19,5 @@
/datum/artifact_effect/gasoxy/DoEffectAura()
if(holder)
var/datum/gas_mixture/env = holder.loc.return_air()
if(env && env.total_moles < max_pressure)
if(env && env.total_moles() < max_pressure)
env.oxygen += pick(0, 0, 0.1, rand())
@@ -19,5 +19,5 @@
/datum/artifact_effect/gasplasma/DoEffectAura()
if(holder)
var/datum/gas_mixture/env = holder.loc.return_air()
if(env && env.total_moles < max_pressure)
if(env && env.total_moles() < max_pressure)
env.toxins += pick(0, 0, 0.1, rand())
@@ -23,7 +23,7 @@
/datum/artifact_effect/gassleeping/DoEffectAura()
if(holder)
var/datum/gas_mixture/env = holder.loc.return_air()
if(env && env.total_moles < max_pressure)
if(env && env.total_moles() < max_pressure)
var/datum/gas/sleeping_agent/trace_gas = new
env.trace_gases += trace_gas
trace_gas.moles = pick(0, 0, 0.1, rand())
+44 -68
View File
@@ -155,84 +155,67 @@
if(grav_pulling)
supermatter_pull()
//Ok, get the air from the turf
var/datum/gas_mixture/removed = null
var/datum/gas_mixture/env = null
//Ok, get the air from the turf
var/datum/gas_mixture/env = L.return_air()
//ensure that damage doesn't increase too quickly due to super high temperatures resulting from no coolant, for example. We dont want the SM exploding before anyone can react.
//We want the cap to scale linearly with power (and explosion_point). Let's aim for a cap of 5 at power = 900 (based on testing, equals roughly 5% per SM alert announcement).
var/damage_inc_limit = (power/900)*(explosion_point/1000)*DAMAGE_RATE_LIMIT
//Remove gas from surrounding area
var/datum/gas_mixture/removed = env.remove(gasefficency * env.total_moles())
if(!istype(L, /turf/space))
env = L.return_air()
removed = env.remove(gasefficency * env.total_moles) //Remove gas from surrounding area
if(!removed || !removed.total_moles())
damage += max((power-1600)/10, 0)
power = min(power, 1600)
return 1
if(!env || !removed || !removed.total_moles)
damage += max(((power-(1600*POWER_FACTOR)))/10, 0) //exciting the supermatter in a vacuum means the internal energy is mostly locked inside.
else if (grav_pulling) //If supermatter is detonating, remove all air from the zone
env.remove(env.total_moles)
damage_archived = damage
damage = max( damage + ( (removed.temperature - 800) / 150 ) , 0 )
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
var/temp_factor = 50
if(oxygen > 0.8)
// with a perfect gas mix, make the power less based on heat
icon_state = "[base_icon_state]_glow"
else
damage_archived = damage
// in normal mode, base the produced energy around the heat
temp_factor = 30
icon_state = base_icon_state
damage = max( damage + min( ( (removed.temperature - 800) / 150 ), damage_inc_limit ) , 0 )
//Ok, 100% oxygen atmosphere = best reaction
//Maxes out at 100% oxygen pressure
oxygen = max(min((removed.oxygen - (removed.nitrogen * NITROGEN_RETARDATION_FACTOR)) / MOLES_CELLSTANDARD, 1), 0)
power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
var/temp_factor = 100
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
if(oxygen > 0.8)
// with a perfect gas mix, make the power less based on heat
icon_state = "[base_icon_state]_glow"
else
// in normal mode, base the produced energy around the heat
temp_factor = 60
icon_state = base_icon_state
var/device_energy = power * REACTION_POWER_MODIFIER
power = max( (removed.temperature * temp_factor / T0C) * oxygen + power, 0) //Total laser power plus an overload
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//We've generated power, now let's transfer it to the collectors for storing/usage
transfer_energy()
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.temperature += (device_energy / THERMAL_RELEASE_MODIFIER)
var/device_energy = power * REACTION_POWER_MODIFIER
removed.temperature = max(0, min(removed.temperature, 2500))
//To figure out how much temperature to add each tick, consider that at one atmosphere's worth
//of pure oxygen, with all four lasers firing at standard energy and no N2 present, at room temperature
//that the device energy is around 2140. At that stage, we don't want too much heat to be put out
//Since the core is effectively "cold"
//Calculate how much gas to release
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
//Also keep in mind we are only adding this temperature to (efficiency)% of the one tile the rock
//is on. An increase of 4*C @ 25% efficiency here results in an increase of 1*C / (#tilesincore) overall.
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
var/thermal_power = THERMAL_RELEASE_MODIFIER
//This shouldn't be necessary. If the number of moles is low, then heat_capacity should be tiny.
//if(removed.total_moles < 35) thermal_power += 750 //If you don't add coolant, you are going to have a bad time.
removed.temperature += ((device_energy * thermal_power) / removed.heat_capacity())
removed.temperature = max(0, min(removed.temperature, 10000))
//Calculate how much gas to release
removed.toxins += max(device_energy / PLASMA_RELEASE_MODIFIER, 0)
removed.oxygen += max((device_energy + removed.temperature - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
removed.update_values()
env.merge(removed)
env.merge(removed)
for(var/mob/living/carbon/human/l in view(src, min(7, round(power ** 0.25)))) // If they can see it without mesons on. Bad on them.
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1,get_dist(l, src)) ) ) )
l.hallucination = max(0, min(200, l.hallucination + power * config_hallucination_power * sqrt( 1 / max(1, get_dist(l, src)) ) ) )
//adjusted range so that a power of 600 (pretty high) results in 8 tiles, roughly the distance from the core to the engine monitoring room.
//at power of 1210 this becomes 9 tiles --> increases very very slowly.
for(var/mob/living/l in range(src, round((power / 0.146484375) ** 0.25)))
var/rads = (power / 10) * sqrt( 1 / get_dist(l, src) )
l.apply_effect(rads, IRRADIATE)
for(var/mob/living/l in range(src, round((power / 100) ** 0.25)))
var/rads = (power / 10) * sqrt( 1 / max(get_dist(l, src),1) )
l.apply_effect(irradiate=rads)
power -= (power/500)**3 //energy losses due to radiation
power -= (power/500)**3
return 1
@@ -354,11 +337,4 @@
if(defer_powernet_rebuild != 2)
defer_powernet_rebuild = 0
return
/obj/machinery/power/supermatter/GotoAirflowDest(n) //Supermatter not pushed around by airflow
return
/obj/machinery/power/supermatter/RepelAirflowDest(n)
return
return