Merge branch 'master' into upstream-merge-31599

This commit is contained in:
LetterJay
2017-10-12 11:00:37 -04:00
committed by GitHub
100 changed files with 1598 additions and 1196 deletions
+3 -2
View File
@@ -434,7 +434,7 @@
output += "<th width='15%'><b>OPTIONS</b></th>"
output += "</tr>"
var/limit = " LIMIT [bansperpage * page], [bansperpage]"
var/datum/DBQuery/query_search_bans = SSdbcore.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
var/datum/DBQuery/query_search_bans = SSdbcore.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, round_id FROM [format_table_name("ban")] WHERE 1 [playersearch] [adminsearch] ORDER BY bantime DESC[limit]")
if(!query_search_bans.warn_execute())
return
@@ -452,6 +452,7 @@
var/unbanckey = query_search_bans.item[11]
var/unbantime = query_search_bans.item[12]
var/edits = query_search_bans.item[13]
var/round_id = query_search_bans.item[14]
var/lcolor = blcolor
var/dcolor = bdcolor
@@ -477,7 +478,7 @@
output += "<tr bgcolor='[dcolor]'>"
output += "<td align='center'>[typedesc]</td>"
output += "<td align='center'><b>[ckey]</b></td>"
output += "<td align='center'>[bantime]</td>"
output += "<td align='center'>[bantime] (Round ID: [round_id])</td>"
output += "<td align='center'><b>[ackey]</b></td>"
output += "<td align='center'>[(unbanned) ? "" : "<b><a href=\"byond://?src=\ref[src];[HrefToken()];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
output += "</tr>"
+2 -2
View File
@@ -49,8 +49,8 @@
admin_only = TRUE
/datum/server_tools_command/namecheck/Run(sender, params)
log_admin("IRC Name Check: [sender] on [params]")
message_admins("IRC name checking on [params] from [sender]")
log_admin("Chat Name Check: [sender] on [params]")
message_admins("Name checking [params] from [sender]")
return keywords_lookup(params, 1)
/datum/server_tools_command/adminwho
+2 -2
View File
@@ -715,8 +715,8 @@ GLOBAL_PROTECT(LastAdminCalledProc)
if(Rad.anchored)
if(!Rad.loaded_tank)
var/obj/item/tank/internals/plasma/Plasma = new/obj/item/tank/internals/plasma(Rad)
ASSERT_GAS("plasma", Plasma.air_contents)
Plasma.air_contents.gases["plasma"][MOLES] = 70
ASSERT_GAS(/datum/gas/plasma, Plasma.air_contents)
Plasma.air_contents.gases[/datum/gas/plasma][MOLES] = 70
Rad.drainratio = 0
Rad.loaded_tank = Plasma
Plasma.loc = Rad
+6 -8
View File
@@ -433,12 +433,13 @@ GLOBAL_PROTECT(VVpixelmovement)
to_chat(src, "Variable appears to be <b>[uppertext(default)]</b>.")
to_chat(src, "Variable contains: [L[index]]")
to_chat(src, "Variable contains: [variable]")
if(default == VV_NUM)
var/dir_text = ""
if(dir < 0 && dir < 16)
if(dir & 1)
var/tdir = variable
if(tdir > 0 && tdir < 16)
if(tdir & 1)
dir_text += "NORTH"
if(dir & 2)
dir_text += "SOUTH"
@@ -450,11 +451,8 @@ GLOBAL_PROTECT(VVpixelmovement)
if(dir_text)
to_chat(usr, "If a direction, direction is: [dir_text]")
var/original_var
if(assoc)
original_var = L[assoc_key]
else
original_var = L[index]
var/original_var = variable
if (O)
L = L.Copy()
var/class
+2 -1
View File
@@ -382,7 +382,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
switch(new_character.mind.special_role)
if("Wizard")
new_character.forceMove(pick(GLOB.wizardstart))
SSticker.mode.equip_wizard(new_character)
var/datum/antagonist/wizard/A = new_character.mind.has_antag_datum(/datum/antagonist/wizard,TRUE)
A.equip_wizard()
if("Syndicate")
new_character.forceMove(pick(GLOB.nukeop_start))
call(/datum/game_mode/proc/equip_syndicate)(new_character)
+3 -7
View File
@@ -51,10 +51,6 @@
GLOB.bombers += "[key_name(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
message_admins("[key_name_admin(user)] welded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]")
to_chat(user, "<span class='notice'>A pressure hole has been bored to [bombtank] valve. \The [bombtank] can now be ignited.</span>")
else
status = FALSE
GLOB.bombers += "[key_name(user)] unwelded a single tank bomb. Temp: [bombtank.air_contents.temperature-T0C]"
to_chat(user, "<span class='notice'>The hole has been closed.</span>")
add_fingerprint(user)
..()
@@ -107,8 +103,8 @@
return
/obj/item/tank/proc/ignite() //This happens when a bomb is told to explode
air_contents.assert_gases("plasma", "o2")
var/fuel_moles = air_contents.gases["plasma"][MOLES] + air_contents.gases["o2"][MOLES]/6
air_contents.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
var/fuel_moles = air_contents.gases[/datum/gas/plasma][MOLES] + air_contents.gases[/datum/gas/oxygen][MOLES]/6
air_contents.garbage_collect()
var/strength = 1
@@ -164,4 +160,4 @@
if(!T)
return
T.assume_air(removed)
air_update_turf()
air_update_turf()
@@ -12,8 +12,8 @@
if(!air_contents)
return 0
var/oxy = air_contents.gases["o2"] ? air_contents.gases["o2"][MOLES] : 0
var/tox = air_contents.gases["plasma"] ? air_contents.gases["plasma"][MOLES] : 0
var/oxy = air_contents.gases[/datum/gas/oxygen] ? air_contents.gases[/datum/gas/oxygen][MOLES] : 0
var/tox = air_contents.gases[/datum/gas/plasma] ? air_contents.gases[/datum/gas/plasma][MOLES] : 0
if(active_hotspot)
if(soh)
@@ -112,7 +112,7 @@
qdel(src)
return
if(!(location.air) || !location.air.gases["plasma"] || !location.air.gases["o2"] || location.air.gases["plasma"][MOLES] < 0.5 || location.air.gases["o2"][MOLES] < 0.5)
if(!(location.air) || !location.air.gases[/datum/gas/plasma] || !location.air.gases[/datum/gas/oxygen] || location.air.gases[/datum/gas/plasma][MOLES] < 0.5 || location.air.gases[/datum/gas/oxygen][MOLES] < 0.5)
qdel(src)
return
@@ -268,8 +268,11 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
gas -= "TEMP"
gases.Cut()
for(var/id in gas)
ADD_GAS(id, gases)
gases[id][MOLES] = text2num(gas[id])
var/path = id
if(!ispath(path))
path = gas_id2path(path) //a lot of these strings can't have embedded expressions (especially for mappers), so support for IDs needs to stick around
ADD_GAS(path, gases)
gases[path][MOLES] = text2num(gas[id])
return 1
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
@@ -1,9 +1,9 @@
GLOBAL_LIST_INIT(hardcoded_gases, list("o2","n2","co2","plasma")) //the main four gases, which were at one time hardcoded
GLOBAL_LIST_INIT(hardcoded_gases, list(/datum/gas/oxygen, /datum/gas/nitrogen, /datum/gas/carbon_dioxide, /datum/gas/plasma)) //the main four gases, which were at one time hardcoded
/proc/meta_gas_list()
. = new /list
for(var/gas_path in subtypesof(/datum/gas))
var/list/gas_info = new(5)
. = subtypesof(/datum/gas)
for(var/gas_path in .)
var/list/gas_info = new(6)
var/datum/gas/gas = gas_path
gas_info[META_GAS_SPECIFIC_HEAT] = initial(gas.specific_heat)
@@ -12,7 +12,14 @@ GLOBAL_LIST_INIT(hardcoded_gases, list("o2","n2","co2","plasma")) //the main fou
if(initial(gas.moles_visible) != null)
gas_info[META_GAS_OVERLAY] = new /obj/effect/overlay/gas(initial(gas.gas_overlay))
gas_info[META_GAS_DANGER] = initial(gas.dangerous)
.[initial(gas.id)] = gas_info
gas_info[META_GAS_ID] = initial(gas.id)
.[gas_path] = gas_info
/proc/gas_id2path(id)
var/meta_gas = meta_gas_list()
for(var/path in meta_gas)
if(meta_gas[path][META_GAS_ID] == id)
return path
/*||||||||||||||/----------\||||||||||||||*\
||||||||||||||||[GAS DATUMS]||||||||||||||||
@@ -69,8 +69,8 @@
/datum/gas_mixture/immutable/cloner/garbage_collect()
..()
ADD_GAS("n2", gases)
gases["n2"][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
ADD_GAS(/datum/gas/nitrogen, gases)
gases[/datum/gas/nitrogen][MOLES] = MOLES_O2STANDARD + MOLES_N2STANDARD
/datum/gas_mixture/immutable/cloner/heat_capacity()
return (MOLES_O2STANDARD + MOLES_N2STANDARD)*20 //specific heat of nitrogen is 20
@@ -44,21 +44,21 @@
/datum/gas_reaction/agent_b/init_reqs()
min_requirements = list(
"TEMP" = 900,
"agent_b" = MINIMUM_HEAT_CAPACITY,
"plasma" = MINIMUM_HEAT_CAPACITY,
"co2" = MINIMUM_HEAT_CAPACITY
/datum/gas/oxygen_agent_b = MINIMUM_HEAT_CAPACITY,
/datum/gas/plasma = MINIMUM_HEAT_CAPACITY,
/datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY
)
/datum/gas_reaction/agent_b/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/reaction_rate = min(cached_gases["co2"][MOLES]*0.75, cached_gases["plasma"][MOLES]*0.25, cached_gases["agent_b"][MOLES]*0.05)
var/reaction_rate = min(cached_gases[/datum/gas/carbon_dioxide][MOLES]*0.75, cached_gases[/datum/gas/plasma][MOLES]*0.25, cached_gases[/datum/gas/oxygen_agent_b][MOLES]*0.05)
cached_gases["co2"][MOLES] -= reaction_rate
cached_gases["agent_b"][MOLES] -= reaction_rate*0.05
cached_gases[/datum/gas/carbon_dioxide][MOLES] -= reaction_rate
cached_gases[/datum/gas/oxygen_agent_b][MOLES] -= reaction_rate*0.05
ASSERT_GAS("o2", air) //only need to assert oxygen, as this reaction doesn't occur without the other gases existing
cached_gases["o2"][MOLES] += reaction_rate
ASSERT_GAS(/datum/gas/oxygen, air) //only need to assert oxygen, as this reaction doesn't occur without the other gases existing
cached_gases[/datum/gas/oxygen][MOLES] += reaction_rate
air.temperature -= (reaction_rate*20000)/air.heat_capacity()
@@ -71,7 +71,7 @@
id = "freon"
/datum/gas_reaction/freon/init_reqs()
min_requirements = list("freon" = MOLES_PLASMA_VISIBLE)
min_requirements = list(/datum/gas/freon = MOLES_PLASMA_VISIBLE)
/datum/gas_reaction/freon/react(datum/gas_mixture/air, turf/open/location)
. = NO_REACTION
@@ -85,12 +85,12 @@
id = "vapor"
/datum/gas_reaction/water_vapor/init_reqs()
min_requirements = list("water_vapor" = MOLES_PLASMA_VISIBLE)
min_requirements = list(/datum/gas/water_vapor = MOLES_PLASMA_VISIBLE)
/datum/gas_reaction/water_vapor/react(datum/gas_mixture/air, turf/open/location)
. = NO_REACTION
if(location && location.water_vapor_gas_act())
air.gases["water_vapor"][MOLES] -= MOLES_PLASMA_VISIBLE
air.gases[/datum/gas/water_vapor][MOLES] -= MOLES_PLASMA_VISIBLE
. = REACTING
//fire: combustion of plasma and volatile fuel (treated as hydrocarbons). creates hotspots. exothermic
@@ -111,28 +111,28 @@
cached_results[id] = 0
//General volatile gas burn
if(cached_gases["v_fuel"] && cached_gases["v_fuel"][MOLES])
if(cached_gases[/datum/gas/volatile_fuel] && cached_gases[/datum/gas/volatile_fuel][MOLES])
var/burned_fuel
if(!cached_gases["o2"])
if(!cached_gases[/datum/gas/oxygen])
burned_fuel = 0
else if(cached_gases["o2"][MOLES] < cached_gases["v_fuel"][MOLES])
burned_fuel = cached_gases["o2"][MOLES]
cached_gases["v_fuel"][MOLES] -= burned_fuel
cached_gases["o2"][MOLES] = 0
else if(cached_gases[/datum/gas/oxygen][MOLES] < cached_gases[/datum/gas/volatile_fuel][MOLES])
burned_fuel = cached_gases[/datum/gas/oxygen][MOLES]
cached_gases[/datum/gas/volatile_fuel][MOLES] -= burned_fuel
cached_gases[/datum/gas/oxygen][MOLES] = 0
else
burned_fuel = cached_gases["v_fuel"][MOLES]
cached_gases["o2"][MOLES] -= cached_gases["v_fuel"][MOLES]
burned_fuel = cached_gases[/datum/gas/volatile_fuel][MOLES]
cached_gases[/datum/gas/oxygen][MOLES] -= cached_gases[/datum/gas/volatile_fuel][MOLES]
if(burned_fuel)
energy_released += FIRE_CARBON_ENERGY_RELEASED * burned_fuel
ASSERT_GAS("co2", air)
cached_gases["co2"][MOLES] += burned_fuel
ASSERT_GAS(/datum/gas/carbon_dioxide, air)
cached_gases[/datum/gas/carbon_dioxide][MOLES] += burned_fuel
cached_results[id] += burned_fuel
//Handle plasma burning
if(cached_gases["plasma"] && cached_gases["plasma"][MOLES] > MINIMUM_HEAT_CAPACITY)
if(cached_gases[/datum/gas/plasma] && cached_gases[/datum/gas/plasma][MOLES] > MINIMUM_HEAT_CAPACITY)
var/plasma_burn_rate = 0
var/oxygen_burn_rate = 0
//more plasma released at higher temperatures
@@ -142,17 +142,17 @@
else
temperature_scale = (temperature-PLASMA_MINIMUM_BURN_TEMPERATURE)/(PLASMA_UPPER_TEMPERATURE-PLASMA_MINIMUM_BURN_TEMPERATURE)
if(temperature_scale > 0)
ASSERT_GAS("o2", air)
ASSERT_GAS(/datum/gas/oxygen, air)
oxygen_burn_rate = OXYGEN_BURN_RATE_BASE - temperature_scale
if(cached_gases["o2"][MOLES] > cached_gases["plasma"][MOLES]*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (cached_gases["plasma"][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
if(cached_gases[/datum/gas/oxygen][MOLES] > cached_gases[/datum/gas/plasma][MOLES]*PLASMA_OXYGEN_FULLBURN)
plasma_burn_rate = (cached_gases[/datum/gas/plasma][MOLES]*temperature_scale)/PLASMA_BURN_RATE_DELTA
else
plasma_burn_rate = (temperature_scale*(cached_gases["o2"][MOLES]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
plasma_burn_rate = (temperature_scale*(cached_gases[/datum/gas/oxygen][MOLES]/PLASMA_OXYGEN_FULLBURN))/PLASMA_BURN_RATE_DELTA
if(plasma_burn_rate > MINIMUM_HEAT_CAPACITY)
ASSERT_GAS("co2", air)
cached_gases["plasma"][MOLES] = QUANTIZE(cached_gases["plasma"][MOLES] - plasma_burn_rate)
cached_gases["o2"][MOLES] = QUANTIZE(cached_gases["o2"][MOLES] - (plasma_burn_rate * oxygen_burn_rate))
cached_gases["co2"][MOLES] += plasma_burn_rate
ASSERT_GAS(/datum/gas/carbon_dioxide, air)
cached_gases[/datum/gas/plasma][MOLES] = QUANTIZE(cached_gases[/datum/gas/plasma][MOLES] - plasma_burn_rate)
cached_gases[/datum/gas/oxygen][MOLES] = QUANTIZE(cached_gases[/datum/gas/oxygen][MOLES] - (plasma_burn_rate * oxygen_burn_rate))
cached_gases[/datum/gas/carbon_dioxide][MOLES] += plasma_burn_rate
energy_released += FIRE_PLASMA_ENERGY_RELEASED * (plasma_burn_rate)
@@ -185,36 +185,36 @@
/datum/gas_reaction/fusion/init_reqs()
min_requirements = list(
"ENER" = PLASMA_BINDING_ENERGY * 10,
"plasma" = MINIMUM_HEAT_CAPACITY,
"co2" = MINIMUM_HEAT_CAPACITY
/datum/gas/plasma = MINIMUM_HEAT_CAPACITY,
/datum/gas/carbon_dioxide = MINIMUM_HEAT_CAPACITY
)
/datum/gas_reaction/fusion/react(datum/gas_mixture/air)
var/list/cached_gases = air.gases
var/temperature = air.temperature
if((cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD)
if((cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES])/air.total_moles() < FUSION_PURITY_THRESHOLD)
//Fusion wont occur if the level of impurities is too high.
return NO_REACTION
var/old_heat_capacity = air.heat_capacity()
var/carbon_efficency = min(cached_gases["plasma"][MOLES]/cached_gases["co2"][MOLES],MAX_CARBON_EFFICENCY)
var/carbon_efficency = min(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/carbon_dioxide][MOLES],MAX_CARBON_EFFICENCY)
var/reaction_energy = THERMAL_ENERGY(air)
var/moles_impurities = air.total_moles()-(cached_gases["plasma"][MOLES]+cached_gases["co2"][MOLES])
var/moles_impurities = air.total_moles()-(cached_gases[/datum/gas/plasma][MOLES]+cached_gases[/datum/gas/carbon_dioxide][MOLES])
var/plasma_fused = (PLASMA_FUSED_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/carbon_catalyzed = (CARBON_CATALYST_COEFFICENT*carbon_efficency)*(temperature/PLASMA_BINDING_ENERGY)
var/oxygen_added = carbon_catalyzed
var/nitrogen_added = (plasma_fused-oxygen_added)-(THERMAL_ENERGY(air)/PLASMA_BINDING_ENERGY)
reaction_energy = max(reaction_energy+((carbon_efficency*cached_gases["plasma"][MOLES])/((moles_impurities/carbon_efficency)+2)*10)+((plasma_fused/(moles_impurities/carbon_efficency))*PLASMA_BINDING_ENERGY),0)
reaction_energy = max(reaction_energy+((carbon_efficency*cached_gases[/datum/gas/plasma][MOLES])/((moles_impurities/carbon_efficency)+2)*10)+((plasma_fused/(moles_impurities/carbon_efficency))*PLASMA_BINDING_ENERGY),0)
air.assert_gases("o2", "n2")
air.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
cached_gases["plasma"][MOLES] -= plasma_fused
cached_gases["co2"][MOLES] -= carbon_catalyzed
cached_gases["o2"][MOLES] += oxygen_added
cached_gases["n2"][MOLES] += nitrogen_added
cached_gases[/datum/gas/plasma][MOLES] -= plasma_fused
cached_gases[/datum/gas/carbon_dioxide][MOLES] -= carbon_catalyzed
cached_gases[/datum/gas/oxygen][MOLES] += oxygen_added
cached_gases[/datum/gas/nitrogen][MOLES] += nitrogen_added
if(reaction_energy > 0)
var/new_heat_capacity = air.heat_capacity()
+31 -31
View File
@@ -73,44 +73,44 @@
var/datum/radio_frequency/radio_connection
var/list/TLV = list( // Breathable air.
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), // K
"o2" = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
"n2" = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
"co2" = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
"plasma" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"n2o" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"bz" = new/datum/tlv(-1, -1, 0.2, 0.5),
"freon" = new/datum/tlv(-1, -1, 0.2, 0.5),
"water_vapor" = new/datum/tlv(-1, -1, 0.2, 0.5)
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), // K
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
/datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5)
)
/obj/machinery/airalarm/server // No checks here.
TLV = list(
"pressure" = new/datum/tlv(-1, -1, -1, -1),
"temperature" = new/datum/tlv(-1, -1, -1, -1),
"o2" = new/datum/tlv(-1, -1, -1, -1),
"n2" = new/datum/tlv(-1, -1, -1, -1),
"co2" = new/datum/tlv(-1, -1, -1, -1),
"plasma" = new/datum/tlv(-1, -1, -1, -1),
"n2o" = new/datum/tlv(-1, -1, -1, -1),
"bz" = new/datum/tlv(-1, -1, -1, -1),
"freon" = new/datum/tlv(-1, -1, -1, -1),
"water_vapor" = new/datum/tlv(-1, -1, -1, -1)
"pressure" = new/datum/tlv(-1, -1, -1, -1),
"temperature" = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/oxygen = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/nitrogen = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/plasma = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/bz = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/freon = new/datum/tlv(-1, -1, -1, -1),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, -1, -1)
)
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
TLV = list(
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(200,210,273.15,283.15), // K
"o2" = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
"n2" = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
"co2" = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
"plasma" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"n2o" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"bz" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"freon" = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
"water_vapor" = new/datum/tlv(-1, -1, 0.2, 0.5)
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
"temperature" = new/datum/tlv(200,210,273.15,283.15), // K
/datum/gas/oxygen = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
/datum/gas/nitrogen = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
/datum/gas/carbon_dioxide = new/datum/tlv(-1, -1, 5, 10), // Partial pressure, kpa
/datum/gas/plasma = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/nitrous_oxide = new/datum/tlv(-1, -1, 0.2, 0.5), // Partial pressure, kpa
/datum/gas/bz = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/freon = new/datum/tlv(-1, -1, 0.2, 0.5),
/datum/gas/water_vapor = new/datum/tlv(-1, -1, 0.2, 0.5)
)
/obj/machinery/airalarm/engine
@@ -760,4 +760,4 @@
#undef AALARM_MODE_SIPHON
#undef AALARM_MODE_CONTAMINATED
#undef AALARM_MODE_REFILL
#undef AALARM_REPORT_TIMEOUT
#undef AALARM_REPORT_TIMEOUT
@@ -187,7 +187,7 @@
if(reagent_transfer == 0) // Magically transfer reagents. Because cryo magic.
beaker.reagents.trans_to(occupant, 1, 10 * efficiency) // Transfer reagents, multiplied because cryo magic.
beaker.reagents.reaction(occupant, VAPOR)
air1.gases["o2"][MOLES] -= 2 / efficiency // Lets use gas for this.
air1.gases[/datum/gas/oxygen][MOLES] -= 2 / efficiency //Let's use gas for this
if(++reagent_transfer >= 10 * efficiency) // Throttle reagent transfer (higher efficiency will transfer the same amount but consume less from the beaker).
reagent_transfer = 0
@@ -201,7 +201,7 @@
var/datum/gas_mixture/air1 = AIR1
if(!NODE1 || !AIR1 || !air1.gases.len || air1.gases["o2"][MOLES] < 5) // Turn off if the machine won't work.
if(!NODE1 || !AIR1 || !air1.gases.len || air1.gases[/datum/gas/oxygen][MOLES] < 5) // Turn off if the machine won't work.
on = FALSE
update_icon()
return
@@ -221,7 +221,7 @@
air1.temperature = max(air1.temperature - heat / air_heat_capacity, TCMB)
mob_occupant.bodytemperature = max(mob_occupant.bodytemperature + heat / heat_capacity, TCMB)
air1.gases["o2"][MOLES] -= 0.5 / efficiency // Magically consume gas? Why not, we run on cryo magic.
air1.gases[/datum/gas/oxygen][MOLES] -= 0.5 / efficiency // Magically consume gas? Why not, we run on cryo magic.
/obj/machinery/atmospherics/components/unary/cryo_cell/power_change()
..()
@@ -49,8 +49,8 @@
var/added_oxygen = oxygen_content - total_moles
air_contents.temperature = (current_heat_capacity*air_contents.temperature + 20*added_oxygen*T0C)/(current_heat_capacity+20*added_oxygen)
ASSERT_GAS("o2", air_contents)
air_contents.gases["o2"][MOLES] += added_oxygen
ASSERT_GAS(/datum/gas/oxygen, air_contents)
air_contents.gases[/datum/gas/oxygen][MOLES] += added_oxygen
update_parents()
@@ -21,23 +21,23 @@
name = "[name] ([air_contents.gases[gas_type][GAS_META][META_GAS_NAME]])"
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
gas_type = "co2"
gas_type = /datum/gas/carbon_dioxide
/obj/machinery/atmospherics/components/unary/tank/toxins
icon_state = "orange"
gas_type = "plasma"
gas_type = /datum/gas/plasma
/obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b
icon_state = "orange_2"
gas_type = "agent_b"
gas_type = /datum/gas/oxygen_agent_b
/obj/machinery/atmospherics/components/unary/tank/oxygen
icon_state = "blue"
gas_type = "o2"
gas_type = /datum/gas/oxygen
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
gas_type = "n2"
gas_type = /datum/gas/nitrogen
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
@@ -46,6 +46,6 @@
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.assert_gases("o2", "n2")
air_contents.gases["o2"][MOLES] = AIR_CONTENTS * 0.2
air_contents.gases["n2"][MOLES] = AIR_CONTENTS * 0.8
air_contents.assert_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
air_contents.gases[/datum/gas/oxygen][MOLES] = AIR_CONTENTS * 0.2
air_contents.gases[/datum/gas/nitrogen][MOLES] = AIR_CONTENTS * 0.8
@@ -174,7 +174,7 @@
if(scrubbing & SCRUBBING)
var/should_we_scrub = FALSE
for(var/id in env_gases)
if(id == "n2" || id == "o2")
if(id == /datum/gas/nitrogen || id == /datum/gas/oxygen)
continue
if(env_gases[id][MOLES])
should_we_scrub = TRUE
@@ -194,40 +194,40 @@
var/list/filtered_gases = filtered_out.gases
filtered_out.temperature = removed.temperature
if(scrub_Toxins && removed_gases["plasma"])
ADD_GAS("plasma", filtered_out.gases)
filtered_gases["plasma"][MOLES] = removed_gases["plasma"][MOLES]
removed.gases["plasma"][MOLES] = 0
if(scrub_Toxins && removed_gases[/datum/gas/plasma])
ADD_GAS(/datum/gas/plasma, filtered_out.gases)
filtered_gases[/datum/gas/plasma][MOLES] = removed_gases[/datum/gas/plasma][MOLES]
removed_gases[/datum/gas/plasma][MOLES] = 0
if(scrub_CO2 && removed_gases["co2"])
ADD_GAS("co2", filtered_out.gases)
filtered_gases["co2"][MOLES] = removed_gases["co2"][MOLES]
removed_gases["co2"][MOLES] = 0
if(scrub_CO2 && removed_gases[/datum/gas/carbon_dioxide])
ADD_GAS(/datum/gas/carbon_dioxide, filtered_out.gases)
filtered_gases[/datum/gas/carbon_dioxide][MOLES] = removed_gases[/datum/gas/carbon_dioxide][MOLES]
removed_gases[/datum/gas/carbon_dioxide][MOLES] = 0
if(removed_gases["agent_b"])
ADD_GAS("agent_b", filtered_out.gases)
filtered_gases["agent_b"][MOLES] = removed_gases["agent_b"][MOLES]
removed_gases["agent_b"][MOLES] = 0
if(removed_gases[/datum/gas/oxygen_agent_b])
ADD_GAS(/datum/gas/oxygen_agent_b, filtered_out.gases)
filtered_gases[/datum/gas/oxygen_agent_b][MOLES] = removed_gases[/datum/gas/oxygen_agent_b][MOLES]
removed_gases[/datum/gas/oxygen_agent_b][MOLES] = 0
if(scrub_N2O && removed_gases["n2o"])
ADD_GAS("n2o", filtered_out.gases)
filtered_gases["n2o"][MOLES] = removed_gases["n2o"][MOLES]
removed_gases["n2o"][MOLES] = 0
if(scrub_N2O && removed_gases[/datum/gas/nitrous_oxide])
ADD_GAS(/datum/gas/nitrous_oxide, filtered_out.gases)
filtered_gases[/datum/gas/nitrous_oxide][MOLES] = removed_gases[/datum/gas/nitrous_oxide][MOLES]
removed_gases[/datum/gas/nitrous_oxide][MOLES] = 0
if(scrub_BZ && removed_gases["bz"])
ADD_GAS("bz", filtered_out.gases)
filtered_gases["bz"][MOLES] = removed_gases["bz"][MOLES]
removed_gases["bz"][MOLES] = 0
if(scrub_BZ && removed_gases[/datum/gas/bz])
ADD_GAS(/datum/gas/bz, filtered_out.gases)
filtered_gases[/datum/gas/bz][MOLES] = removed_gases[/datum/gas/bz][MOLES]
removed_gases[/datum/gas/bz][MOLES] = 0
if(scrub_Freon && removed_gases["freon"])
ADD_GAS("freon", filtered_out.gases)
filtered_gases["freon"][MOLES] = removed_gases["freon"][MOLES]
removed_gases["freon"][MOLES] = 0
if(scrub_Freon && removed_gases[/datum/gas/freon])
ADD_GAS(/datum/gas/freon, filtered_out.gases)
filtered_gases[/datum/gas/freon][MOLES] = removed_gases[/datum/gas/freon][MOLES]
removed_gases[/datum/gas/freon][MOLES] = 0
if(scrub_WaterVapor && removed_gases["water_vapor"])
ADD_GAS("water_vapor", filtered_out.gases)
filtered_gases["water_vapor"][MOLES] = removed_gases["water_vapor"][MOLES]
removed_gases["water_vapor"][MOLES] = 0
if(scrub_WaterVapor && removed_gases[/datum/gas/water_vapor])
ADD_GAS(/datum/gas/water_vapor, filtered_out.gases)
filtered_gases[/datum/gas/water_vapor][MOLES] = removed_gases[/datum/gas/water_vapor][MOLES]
removed_gases[/datum/gas/water_vapor][MOLES] = 0
removed.garbage_collect()
@@ -146,49 +146,49 @@
/obj/machinery/atmospherics/miner/n2o
name = "\improper N2O Gas Miner"
overlay_color = "#FFCCCC"
spawn_id = "n2o"
spawn_id = /datum/gas/nitrous_oxide
/obj/machinery/atmospherics/miner/nitrogen
name = "\improper N2 Gas Miner"
overlay_color = "#CCFFCC"
spawn_id = "n2"
spawn_id = /datum/gas/nitrogen
/obj/machinery/atmospherics/miner/oxygen
name = "\improper O2 Gas Miner"
overlay_color = "#007FFF"
spawn_id = "o2"
spawn_id = /datum/gas/oxygen
/obj/machinery/atmospherics/miner/toxins
name = "\improper Plasma Gas Miner"
overlay_color = "#FF0000"
spawn_id = "plasma"
spawn_id = /datum/gas/plasma
/obj/machinery/atmospherics/miner/carbon_dioxide
name = "\improper CO2 Gas Miner"
overlay_color = "#CDCDCD"
spawn_id = "co2"
spawn_id = /datum/gas/carbon_dioxide
/obj/machinery/atmospherics/miner/bz
name = "\improper BZ Gas Miner"
overlay_color = "#FAFF00"
spawn_id = "bz"
spawn_id = /datum/gas/bz
/obj/machinery/atmospherics/miner/freon
name = "\improper Freon Gas Miner"
overlay_color = "#00FFE5"
spawn_id = "freon"
spawn_id = /datum/gas/freon
/obj/machinery/atmospherics/miner/volatile_fuel
name = "\improper Volatile Fuel Gas Miner"
overlay_color = "#564040"
spawn_id = "v_fuel"
spawn_id = /datum/gas/volatile_fuel
/obj/machinery/atmospherics/miner/agent_b
name = "\improper Agent B Gas Miner"
overlay_color = "#E81E24"
spawn_id = "agent_b"
spawn_id = /datum/gas/oxygen_agent_b
/obj/machinery/atmospherics/miner/water_vapor
name = "\improper Water Vapor Gas Miner"
overlay_color = "#99928E"
spawn_id = "water_vapor"
spawn_id = /datum/gas/water_vapor
@@ -12,7 +12,7 @@
volume = 1000
var/filled = 0.5
var/gas_type = ""
var/gas_type
var/release_pressure = ONE_ATMOSPHERE
var/can_max_release_pressure = (ONE_ATMOSPHERE * 10)
var/can_min_release_pressure = (ONE_ATMOSPHERE / 10)
@@ -59,42 +59,42 @@
name = "n2 canister"
desc = "Nitrogen gas. Reportedly useful for something."
icon_state = "red"
gas_type = "n2"
gas_type = /datum/gas/nitrogen
/obj/machinery/portable_atmospherics/canister/oxygen
name = "o2 canister"
desc = "Oxygen. Necessary for human life."
icon_state = "blue"
gas_type = "o2"
gas_type = /datum/gas/oxygen
/obj/machinery/portable_atmospherics/canister/carbon_dioxide
name = "co2 canister"
desc = "Carbon dioxide. What the fuck is carbon dioxide?"
icon_state = "black"
gas_type = "co2"
gas_type = /datum/gas/carbon_dioxide
/obj/machinery/portable_atmospherics/canister/toxins
name = "plasma canister"
desc = "Plasma gas. The reason YOU are here. Highly toxic."
icon_state = "orange"
gas_type = "plasma"
gas_type = /datum/gas/plasma
/obj/machinery/portable_atmospherics/canister/agent_b
name = "agent b canister"
desc = "Oxygen Agent B. You're not quite sure what it does."
gas_type = "agent_b"
gas_type = /datum/gas/oxygen_agent_b
/obj/machinery/portable_atmospherics/canister/bz
name = "BZ canister"
desc = "BZ, a powerful hallucinogenic nerve agent."
icon_state = "purple"
gas_type = "bz"
gas_type = /datum/gas/bz
/obj/machinery/portable_atmospherics/canister/nitrous_oxide
name = "n2o canister"
desc = "Nitrous oxide gas. Known to cause drowsiness."
icon_state = "redws"
gas_type = "n2o"
gas_type = /datum/gas/nitrous_oxide
/obj/machinery/portable_atmospherics/canister/air
name = "air canister"
@@ -105,14 +105,14 @@
name = "freon canister"
desc = "Freon. Great for the atmosphere!"
icon_state = "freon"
gas_type = "freon"
gas_type = /datum/gas/freon
starter_temp = 120
/obj/machinery/portable_atmospherics/canister/water_vapor
name = "water vapor canister"
desc = "Water Vapor. We get it, you vape."
icon_state = "water_vapor"
gas_type = "water_vapor"
gas_type = /datum/gas/water_vapor
filled = 1
/obj/machinery/portable_atmospherics/canister/proc/get_time_left()
@@ -148,7 +148,7 @@
name = "prototype canister"
desc = "A prototype canister for a prototype bike, what could go wrong?"
icon_state = "proto"
gas_type = "o2"
gas_type = /datum/gas/oxygen
filled = 1
release_pressure = ONE_ATMOSPHERE*2
@@ -181,9 +181,9 @@
if(starter_temp)
air_contents.temperature = starter_temp
/obj/machinery/portable_atmospherics/canister/air/create_gas()
air_contents.add_gases("o2","n2")
air_contents.gases["o2"][MOLES] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
air_contents.gases["n2"][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
air_contents.add_gases(/datum/gas/oxygen, /datum/gas/nitrogen)
air_contents.gases[/datum/gas/oxygen][MOLES] = (O2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
air_contents.gases[/datum/gas/nitrogen][MOLES] = (N2STANDARD * maximum_pressure * filled) * air_contents.volume / (R_IDEAL_GAS_EQUATION * air_contents.temperature)
#define HOLDING 1
#define CONNECTED 2
@@ -99,8 +99,8 @@
if("power")
on = !on
if(on && !holding)
var/plasma = air_contents.gases["plasma"]
var/n2o = air_contents.gases["n2o"]
var/plasma = air_contents.gases[/datum/gas/plasma]
var/n2o = air_contents.gases[/datum/gas/nitrous_oxide]
if(n2o || plasma)
var/area/A = get_area(src)
message_admins("[ADMIN_LOOKUPFLW(usr)] turned on a pump that contains [n2o ? "N2O" : ""][n2o && plasma ? " & " : ""][plasma ? "Plasma" : ""] at [A][ADMIN_JMP(src)]")
@@ -138,4 +138,4 @@
holding.loc = get_turf(src)
holding = null
. = TRUE
update_icon()
update_icon()
@@ -7,7 +7,7 @@
var/volume_rate = 1000
volume = 1000
var/list/scrubbing = list("plasma", "co2", "n2o", "agent_b", "bz", "freon", "water_vapor")
var/list/scrubbing = list(/datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/oxygen_agent_b, /datum/gas/bz, /datum/gas/freon, /datum/gas/water_vapor)
/obj/machinery/portable_atmospherics/scrubber/Destroy()
var/turf/T = get_turf(src)
@@ -108,27 +108,12 @@
/obj/structure/academy_wizard_spawner/proc/summon_wizard()
var/turf/T = src.loc
var/mob/living/carbon/human/wizbody = new(T)
wizbody.equipOutfit(/datum/outfit/wizard/academy)
var/obj/item/implant/exile/Implant = new/obj/item/implant/exile(wizbody)
Implant.implant(wizbody)
wizbody.faction |= "wizard"
wizbody.real_name = "Academy Teacher"
wizbody.name = "Academy Teacher"
var/datum/mind/wizmind = new /datum/mind()
wizmind.name = "Wizard Defender"
wizbody.fully_replace_character_name("Academy Teacher")
wizbody.mind_initialize()
var/datum/mind/wizmind = wizbody.mind
wizmind.special_role = "Academy Defender"
var/datum/objective/O = new("Protect Wizard Academy from the intruders")
wizmind.objectives += O
wizmind.transfer_to(wizbody)
SSticker.mode.wizards |= wizmind
wizmind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt)
wizmind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile)
wizmind.AddSpell(new /obj/effect/proc_holder/spell/aimed/fireball)
wizmind.add_antag_datum(/datum/antagonist/wizard/academy)
current_wizard = wizbody
give_control()
+14
View File
@@ -265,6 +265,20 @@
back = /obj/item/storage/backpack
backpack_contents = list(/obj/item/storage/box=1)
/datum/outfit/wizard/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/spellbook/S = locate() in H.held_items
if(S)
S.owner = H
/datum/outfit/wizard/apprentice
name = "Wizard Apprentice"
r_hand = null
l_hand = null
r_pocket = /obj/item/teleportation_scroll/apprentice
/datum/outfit/wizard/red
name = "Red Wizard"
+8 -8
View File
@@ -167,9 +167,9 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
if(!GM.gases["o2"])
if(!GM.gases[/datum/gas/oxygen])
return
GM.gases["o2"][MOLES] -= severity * holder.energy
GM.gases[/datum/gas/oxygen][MOLES] -= severity * holder.energy
GM.garbage_collect()
/datum/spacevine_mutation/nitro_eater
@@ -182,9 +182,9 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
if(!GM.gases["n2"])
if(!GM.gases[/datum/gas/nitrogen])
return
GM.gases["n2"][MOLES] -= severity * holder.energy
GM.gases[/datum/gas/nitrogen][MOLES] -= severity * holder.energy
GM.garbage_collect()
/datum/spacevine_mutation/carbondioxide_eater
@@ -197,9 +197,9 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
if(!GM.gases["co2"])
if(!GM.gases[/datum/gas/carbon_dioxide])
return
GM.gases["co2"][MOLES] -= severity * holder.energy
GM.gases[/datum/gas/carbon_dioxide][MOLES] -= severity * holder.energy
GM.garbage_collect()
/datum/spacevine_mutation/plasma_eater
@@ -212,9 +212,9 @@
var/turf/open/floor/T = holder.loc
if(istype(T))
var/datum/gas_mixture/GM = T.air
if(!GM.gases["plasma"])
if(!GM.gases[/datum/gas/plasma])
return
GM.gases["plasma"][MOLES] -= severity * holder.energy
GM.gases[/datum/gas/plasma][MOLES] -= severity * holder.energy
GM.garbage_collect()
/datum/spacevine_mutation/thorns
+1 -1
View File
@@ -40,7 +40,7 @@
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(ruins_spaceworthiness && !(H.z in GLOB.station_z_levels) || isspaceturf(H.loc) || isplasmaman(H))
continue //#savetheminers
if(ruins_wizard_loadout && H.mind && ((H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices)))
if(ruins_wizard_loadout && iswizard(H))
continue
if(item_set == "catgirls2015") //Wizard code means never having to say you're sorry
H.gender = FEMALE
+11 -28
View File
@@ -24,35 +24,18 @@
I.name = I.dna.real_name
I.updateappearance(mutcolor_update=1)
I.domutcheck()
if(W.ears)
I.equip_to_slot_or_del(new W.ears.type, slot_ears)
if(W.w_uniform)
I.equip_to_slot_or_del(new W.w_uniform.type , slot_w_uniform)
if(W.shoes)
I.equip_to_slot_or_del(new W.shoes.type, slot_shoes)
if(W.wear_suit)
I.equip_to_slot_or_del(new W.wear_suit.type, slot_wear_suit)
if(W.head)
I.equip_to_slot_or_del(new W.head.type, slot_head)
if(W.back)
I.equip_to_slot_or_del(new W.back.type, slot_back)
I.key = C.key
//Operation: Fuck off and scare people
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(null))
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(null))
I.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null))
var/datum/antagonist/wizard/master = M.has_antag_datum(/datum/antagonist/wizard)
if(!master.wiz_team)
master.create_wiz_team()
var/datum/antagonist/wizard/apprentice/imposter = new(I.mind)
imposter.master = M
imposter.wiz_team = master.wiz_team
master.wiz_team += imposter
I.mind.add_antag_datum(imposter)
//Remove if possible
SSticker.mode.apprentices += I.mind
I.mind.special_role = "imposter"
var/datum/objective/protect/protect_objective = new /datum/objective/protect
protect_objective.owner = I.mind
protect_objective.target = W.mind
protect_objective.explanation_text = "Protect [W.real_name], the wizard."
I.mind.objectives += protect_objective
SSticker.mode.update_wiz_icons_added(I.mind)
I.log_message("<font color='red'>Is an imposter!</font>", INDIVIDUAL_ATTACK_LOG)
to_chat(I, "<B>You are an imposter! Trick and confuse the crew to misdirect malice from your handsome original!</B>")
//
I.log_message("<font color='red'>Is an imposter!</font>", INDIVIDUAL_ATTACK_LOG) //?
SEND_SOUND(I, sound('sound/effects/magic.ogg'))
+1 -1
View File
@@ -82,7 +82,7 @@
var/list/mobs = list()
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
if(H.stat || !H.mind || (H.mind in SSticker.mode.wizards) || (H.mind in SSticker.mode.apprentices))
if(H.stat || !H.mind || iswizard(H))
continue //the wizard(s) are spared on this one
mobs += H
+5
View File
@@ -38,10 +38,13 @@
user.visible_message("<B>[user]</B> laughs so hard they begin to suffocate!")
return (OXYLOSS)
//Banana Peel
/obj/item/grown/bananapeel
seed = /obj/item/seeds/banana
name = "banana peel"
desc = "A peel from a banana."
lefthand_file = 'icons/mob/inhands/misc/food_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/food_righthand.dmi'
icon_state = "banana_peel"
item_state = "banana_peel"
w_class = WEIGHT_CLASS_TINY
@@ -81,6 +84,7 @@
name = "mimana peel"
desc = "A mimana peel."
icon_state = "mimana_peel"
item_state = "mimana_peel"
// Bluespace Banana
/obj/item/seeds/banana/bluespace
@@ -100,6 +104,7 @@
seed = /obj/item/seeds/banana/bluespace
name = "bluespace banana"
icon_state = "banana_blue"
item_state = "bluespace_peel"
trash = /obj/item/grown/bananapeel/bluespace
filling_color = "#0000FF"
origin_tech = "biotech=3;bluespace=5"
+2 -2
View File
@@ -181,8 +181,8 @@
if(isopenturf(loc))
var/turf/open/O = loc
if(O.air)
var/G = O.air.gases
if(G["o2"][MOLES] > 13)
var/loc_gases = O.air.gases
if(loc_gases[/datum/gas/oxygen][MOLES] > 13)
return 1
return 0
@@ -375,7 +375,7 @@
if(GLOB.highlander)
to_chat(humanc, "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>")
humanc.make_scottish()
if(prob(2) && !issilicon(humanc) && !jobban_isbanned(humanc.mind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in humanc.client.prefs.be_special)
if(prob(5) && !issilicon(humanc) && !jobban_isbanned(humanc.mind, "Syndicate") && GLOB.miscreants_allowed && ROLE_MISCREANT in humanc.client.prefs.be_special)
SSticker.generate_miscreant_objectives(humanc.mind)
else
if(CONFIG_GET(flag/allow_crew_objectives))
@@ -597,14 +597,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
target.faction = list("neutral")
return 1
/proc/show_server_hop_transfer_screen(expected_key)
//only show it to incoming ghosts
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == expected_key)
if(O.client)
new /obj/screen/splash(O.client, TRUE)
break
//this is a mob verb instead of atom for performance reasons
//see /mob/verb/examinate() in mob.dm for more info
//overriden here and in /mob/living for different point span classes and sanity checks
+54 -54
View File
@@ -1,54 +1,54 @@
/mob/living/carbon/alien/Life()
findQueen()
return..()
/mob/living/carbon/alien/check_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/tox_detect_threshold = 0.02
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
var/list/breath_gases = breath.gases
breath.assert_gases("plasma", "o2")
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath_gases["plasma"][MOLES]/breath.total_moles())*breath_pressure
if(Toxins_pp > tox_detect_threshold) // Detect toxins in air
adjustPlasma(breath_gases["plasma"][MOLES]*250)
throw_alert("alien_tox", /obj/screen/alert/alien_tox)
toxins_used = breath_gases["plasma"][MOLES]
else
clear_alert("alien_tox")
//Breathe in toxins and out oxygen
breath_gases["plasma"][MOLES] -= toxins_used
breath_gases["o2"][MOLES] += toxins_used
breath.garbage_collect()
//BREATH TEMPERATURE
handle_breath_temperature(breath)
/mob/living/carbon/alien/handle_status_effects()
..()
//natural reduction of movement delay due to stun.
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
/mob/living/carbon/alien/handle_changeling()
return
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
if(..())
return
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
return
/mob/living/carbon/alien/Life()
findQueen()
return..()
/mob/living/carbon/alien/check_breath(datum/gas_mixture/breath)
if(status_flags & GODMODE)
return
if(!breath || (breath.total_moles() == 0))
//Aliens breathe in vaccuum
return 0
var/toxins_used = 0
var/tox_detect_threshold = 0.02
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
var/list/breath_gases = breath.gases
breath.assert_gases(/datum/gas/plasma, /datum/gas/oxygen)
//Partial pressure of the toxins in our breath
var/Toxins_pp = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure
if(Toxins_pp > tox_detect_threshold) // Detect toxins in air
adjustPlasma(breath_gases[/datum/gas/plasma][MOLES]*250)
throw_alert("alien_tox", /obj/screen/alert/alien_tox)
toxins_used = breath_gases[/datum/gas/plasma][MOLES]
else
clear_alert("alien_tox")
//Breathe in toxins and out oxygen
breath_gases[/datum/gas/plasma][MOLES] -= toxins_used
breath_gases[/datum/gas/oxygen][MOLES] += toxins_used
breath.garbage_collect()
//BREATH TEMPERATURE
handle_breath_temperature(breath)
/mob/living/carbon/alien/handle_status_effects()
..()
//natural reduction of movement delay due to stun.
if(move_delay_add > 0)
move_delay_add = max(0, move_delay_add - rand(1, 2))
/mob/living/carbon/alien/handle_changeling()
return
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
if(..())
return
bodytemperature += BODYTEMP_HEATING_MAX //If you're on fire, you heat up!
return
@@ -26,7 +26,7 @@
if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed)
if(environment)
if(environment.total_moles())
if(environment.gases["o2"] && (environment.gases["o2"][MOLES]) >= 1) //Same threshhold that extinguishes fire
if(environment.gases[/datum/gas/oxygen] && (environment.gases[/datum/gas/oxygen][MOLES]) >= 1) //Same threshhold that extinguishes fire
H.adjust_fire_stacks(0.5)
if(!H.on_fire && H.fire_stacks > 0)
H.visible_message("<span class='danger'>[H]'s body reacts with the atmosphere and bursts into flames!</span>","<span class='userdanger'>Your body reacts with the atmosphere and bursts into flame!</span>")
+13 -14
View File
@@ -132,11 +132,10 @@
var/breath_pressure = (breath.total_moles()*R_IDEAL_GAS_EQUATION*breath.temperature)/BREATH_VOLUME
var/list/breath_gases = breath.gases
breath.assert_gases("o2","plasma","co2","n2o", "bz")
var/O2_partialpressure = (breath_gases["o2"][MOLES]/breath.total_moles())*breath_pressure
var/Toxins_partialpressure = (breath_gases["plasma"][MOLES]/breath.total_moles())*breath_pressure
var/CO2_partialpressure = (breath_gases["co2"][MOLES]/breath.total_moles())*breath_pressure
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz)
var/O2_partialpressure = (breath_gases[/datum/gas/oxygen][MOLES]/breath.total_moles())*breath_pressure
var/Toxins_partialpressure = (breath_gases[/datum/gas/plasma][MOLES]/breath.total_moles())*breath_pressure
var/CO2_partialpressure = (breath_gases[/datum/gas/carbon_dioxide][MOLES]/breath.total_moles())*breath_pressure
//OXYGEN
@@ -147,7 +146,7 @@
var/ratio = 1 - O2_partialpressure/safe_oxy_min
adjustOxyLoss(min(5*ratio, 3))
failed_last_breath = 1
oxygen_used = breath_gases["o2"][MOLES]*ratio
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]*ratio
else
adjustOxyLoss(3)
failed_last_breath = 1
@@ -157,11 +156,11 @@
failed_last_breath = 0
if(health >= HEALTH_THRESHOLD_CRIT)
adjustOxyLoss(-5)
oxygen_used = breath_gases["o2"][MOLES]
oxygen_used = breath_gases[/datum/gas/oxygen][MOLES]
clear_alert("not_enough_oxy")
breath_gases["o2"][MOLES] -= oxygen_used
breath_gases["co2"][MOLES] += oxygen_used
breath_gases[/datum/gas/oxygen][MOLES] -= oxygen_used
breath_gases[/datum/gas/carbon_dioxide][MOLES] += oxygen_used
//CARBON DIOXIDE
if(CO2_partialpressure > safe_co2_max)
@@ -180,15 +179,15 @@
//TOXINS/PLASMA
if(Toxins_partialpressure > safe_tox_max)
var/ratio = (breath_gases["plasma"][MOLES]/safe_tox_max) * 10
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_tox_max) * 10
adjustToxLoss(Clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
clear_alert("too_much_tox")
//NITROUS OXIDE
if(breath_gases["n2o"])
var/SA_partialpressure = (breath_gases["n2o"][MOLES]/breath.total_moles())*breath_pressure
if(breath_gases[/datum/gas/nitrous_oxide])
var/SA_partialpressure = (breath_gases[/datum/gas/nitrous_oxide][MOLES]/breath.total_moles())*breath_pressure
if(SA_partialpressure > SA_para_min)
Unconscious(60)
if(SA_partialpressure > SA_sleep_min)
@@ -198,8 +197,8 @@
emote(pick("giggle","laugh"))
//BZ (Facepunch port of their Agent B)
if(breath_gases["bz"])
var/bz_partialpressure = (breath_gases["bz"][MOLES]/breath.total_moles())*breath_pressure
if(breath_gases[/datum/gas/bz])
var/bz_partialpressure = (breath_gases[/datum/gas/bz][MOLES]/breath.total_moles())*breath_pressure
if(bz_partialpressure > 1)
hallucination += 20
else if(bz_partialpressure > 0.01)
+1 -3
View File
@@ -92,7 +92,7 @@
ExtinguishMob()
return
var/datum/gas_mixture/G = loc.return_air() // Check if we're standing in an oxygenless environment
if(!G.gases["o2"] || G.gases["o2"][MOLES] < 1)
if(!G.gases[/datum/gas/oxygen] || G.gases[/datum/gas/oxygen][MOLES] < 1)
ExtinguishMob() //If there's no oxygen in the tile we're on, put out the fire
return
var/turf/location = get_turf(src)
@@ -123,5 +123,3 @@
/mob/living/proc/update_damage_hud()
return
@@ -206,7 +206,8 @@
if(A && isturf(A.loc))
var/atom/movable/AM = A
if(istype(AM, /obj/effect/decal/cleanable))
qdel(AM)
for(var/obj/effect/decal/cleanable/C in A.loc)
qdel(C)
anchored = FALSE
target = null
@@ -1,81 +1,101 @@
/mob/living/simple_animal/hostile/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
butcher_results = list(/obj/item/reagent_containers/food/snacks/carpmeat = 2)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "hits"
emote_taunt = list("gnashes")
taunt_chance = 30
speed = 0
maxHealth = 25
health = 25
devourable = TRUE
no_vore = FALSE
harm_intent_damage = 8
obj_damage = 50
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("gnashes")
//Space carp aren't affected by cold.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
faction = list("carp")
movement_type = FLYING
pressure_resistance = 200
gold_core_spawnable = 1
/mob/living/simple_animal/hostile/carp/Process_Spacemove(movement_dir = 0)
return 1 //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/hostile/carp/AttackingTarget()
. = ..()
if(. && ishuman(target))
var/mob/living/carbon/human/H = target
H.adjustStaminaLoss(8)
/mob/living/simple_animal/hostile/carp/holocarp
icon_state = "holocarp"
icon_living = "holocarp"
maxbodytemp = INFINITY
gold_core_spawnable = 0
del_on_death = 1
/mob/living/simple_animal/hostile/carp/megacarp
icon = 'icons/mob/broadMobs.dmi'
name = "Mega Space Carp"
desc = "A ferocious, fang bearing creature that resembles a shark. This one seems especially ticked off."
icon_state = "megacarp"
icon_living = "megacarp"
icon_dead = "megacarp_dead"
icon_gib = "megacarp_gib"
maxHealth = 65
health = 65
pixel_x = -16
mob_size = MOB_SIZE_LARGE
obj_damage = 80
melee_damage_lower = 20
melee_damage_upper = 20
/mob/living/simple_animal/hostile/carp/cayenne
name = "Cayenne"
desc = "A failed Syndicate experiment in weaponized space carp technology, it now serves as a lovable mascot."
gender = FEMALE
speak_emote = list("squeaks")
gold_core_spawnable = 0
faction = list("syndicate")
AIStatus = AI_OFF
#define REGENERATION_DELAY 60 // After taking damage, how long it takes for automatic regeneration to begin for megacarps (ty robustin!)
/mob/living/simple_animal/hostile/carp
name = "space carp"
desc = "A ferocious, fang-bearing creature that resembles a fish."
icon_state = "carp"
icon_living = "carp"
icon_dead = "carp_dead"
icon_gib = "carp_gib"
speak_chance = 0
turns_per_move = 5
butcher_results = list(/obj/item/reagent_containers/food/snacks/carpmeat = 2)
response_help = "pets"
response_disarm = "gently pushes aside"
response_harm = "hits"
emote_taunt = list("gnashes")
taunt_chance = 30
speed = 0
maxHealth = 25
health = 25
harm_intent_damage = 8
obj_damage = 50
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("gnashes")
//Space carp aren't affected by cold.
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 1500
faction = list("carp")
movement_type = FLYING
pressure_resistance = 200
gold_core_spawnable = 1
/mob/living/simple_animal/hostile/carp/Process_Spacemove(movement_dir = 0)
return 1 //No drifting in space for space carp! //original comments do not steal
/mob/living/simple_animal/hostile/carp/AttackingTarget()
. = ..()
if(. && ishuman(target))
var/mob/living/carbon/human/H = target
H.adjustStaminaLoss(8)
/mob/living/simple_animal/hostile/carp/holocarp
icon_state = "holocarp"
icon_living = "holocarp"
maxbodytemp = INFINITY
gold_core_spawnable = 0
del_on_death = 1
/mob/living/simple_animal/hostile/carp/megacarp
icon = 'icons/mob/broadMobs.dmi'
name = "Mega Space Carp"
desc = "A ferocious, fang bearing creature that resembles a shark. This one seems especially ticked off."
icon_state = "megacarp"
icon_living = "megacarp"
icon_dead = "megacarp_dead"
icon_gib = "megacarp_gib"
maxHealth = 20
health = 20
pixel_x = -16
mob_size = MOB_SIZE_LARGE
obj_damage = 80
melee_damage_lower = 20
melee_damage_upper = 20
var/regen_cooldown = 0
/mob/living/simple_animal/hostile/carp/megacarp/Initialize()
. = ..()
name = "[pick(GLOB.megacarp_first_names)] [pick(GLOB.megacarp_last_names)]"
melee_damage_lower += rand(2, 10)
melee_damage_upper += rand(10,20)
maxHealth += rand(30,60)
move_to_delay = rand(3,7)
/mob/living/simple_animal/hostile/carp/megacarp/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
. = ..()
if(.)
regen_cooldown = world.time + REGENERATION_DELAY
/mob/living/simple_animal/hostile/carp/megacarp/Life()
. = ..()
if(regen_cooldown < world.time)
heal_overall_damage(4)
/mob/living/simple_animal/hostile/carp/cayenne
name = "Cayenne"
desc = "A failed Syndicate experiment in weaponized space carp technology, it now serves as a lovable mascot."
gender = FEMALE
speak_emote = list("squeaks")
gold_core_spawnable = 0
faction = list("syndicate")
AIStatus = AI_OFF
#undef REGENERATION_DELAY
@@ -43,12 +43,12 @@
..()
if(isopenturf(loc))
var/turf/open/T = src.loc
if(T.air && T.air.gases["co2"])
var/co2 = T.air.gases["co2"][MOLES]
if(T.air && T.air.gases[/datum/gas/carbon_dioxide])
var/co2 = T.air.gases[/datum/gas/carbon_dioxide][MOLES]
if(co2 > 0)
if(prob(25))
var/amt = min(co2, 9)
T.air.gases["co2"][MOLES] -= amt
T.air.gases[/datum/gas/carbon_dioxide][MOLES] -= amt
T.atmos_spawn_air("o2=[amt]")
/mob/living/simple_animal/hostile/tree/AttackingTarget()
@@ -186,10 +186,10 @@
var/ST_gases = ST.air.gases
ST.air.assert_gases(arglist(GLOB.hardcoded_gases))
var/tox = ST_gases["plasma"][MOLES]
var/oxy = ST_gases["o2"][MOLES]
var/n2 = ST_gases["n2"][MOLES]
var/co2 = ST_gases["co2"][MOLES]
var/tox = ST_gases[/datum/gas/plasma][MOLES]
var/oxy = ST_gases[/datum/gas/oxygen][MOLES]
var/n2 = ST_gases[/datum/gas/nitrogen][MOLES]
var/co2 = ST_gases[/datum/gas/carbon_dioxide][MOLES]
ST.air.garbage_collect()
@@ -134,8 +134,8 @@
if(stat != DEAD)
var/bz_percentage =0
if("bz" in environment.gases)
bz_percentage = environment.gases["bz"][MOLES] / environment.total_moles()
if(environment.gases[/datum/gas/bz])
bz_percentage = environment.gases[/datum/gas/bz][MOLES] / environment.total_moles()
var/stasis = (bz_percentage >= 0.05 && bodytemperature < (T0C + 100)) || force_stasis
if(stat == CONSCIOUS && stasis)
+1 -1
View File
@@ -363,7 +363,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
if(M.mind in SSticker.mode.changelings)
return 2
if("wizard")
if(M.mind in SSticker.mode.wizards)
if(iswizard(M))
return 2
if("apprentice")
if(M.mind in SSticker.mode.apprentices)
+4 -4
View File
@@ -31,11 +31,11 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/process()
if(loaded_tank)
if(!loaded_tank.air_contents.gases["plasma"])
if(!loaded_tank.air_contents.gases[/datum/gas/plasma])
investigate_log("<font color='red'>out of fuel</font>.", INVESTIGATE_SINGULO)
eject()
else
loaded_tank.air_contents.gases["plasma"][MOLES] -= 0.001*drainratio
loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= 0.001*drainratio
loaded_tank.air_contents.garbage_collect()
return
@@ -50,7 +50,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
"<span class='notice'>You turn the [src.name] [active? "on":"off"].</span>")
var/fuel
if(loaded_tank)
fuel = loaded_tank.air_contents.gases["plasma"]
fuel = loaded_tank.air_contents.gases[/datum/gas/plasma]
fuel = fuel ? fuel[MOLES] : 0
investigate_log("turned [active?"<font color='green'>on</font>":"<font color='red'>off</font>"] by [user.key]. [loaded_tank?"Fuel: [round(fuel/0.29)]%":"<font color='red'>It is empty</font>"].", INVESTIGATE_SINGULO)
return
@@ -139,7 +139,7 @@ GLOBAL_LIST_EMPTY(rad_collectors)
/obj/machinery/power/rad_collector/proc/receive_pulse(pulse_strength)
if(loaded_tank && active)
var/power_produced = loaded_tank.air_contents.gases["plasma"] ? loaded_tank.air_contents.gases["plasma"][MOLES] : 0
var/power_produced = loaded_tank.air_contents.gases[/datum/gas/plasma] ? loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] : 0
power_produced *= pulse_strength*10
add_avail(power_produced)
last_power = power_produced
+10 -10
View File
@@ -284,17 +284,17 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
if(damage > damage_archived && prob(10))
playsound(get_turf(src), 'sound/effects/empulse.ogg', 50, 1)
removed.assert_gases("o2", "plasma", "co2", "n2o", "n2", "freon")
removed.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/nitrogen, /datum/gas/freon)
//calculating gas related values
combined_gas = max(removed.total_moles(), 0)
plasmacomp = max(removed.gases["plasma"][MOLES]/combined_gas, 0)
o2comp = max(removed.gases["o2"][MOLES]/combined_gas, 0)
co2comp = max(removed.gases["co2"][MOLES]/combined_gas, 0)
plasmacomp = max(removed.gases[/datum/gas/plasma][MOLES]/combined_gas, 0)
o2comp = max(removed.gases[/datum/gas/oxygen][MOLES]/combined_gas, 0)
co2comp = max(removed.gases[/datum/gas/carbon_dioxide][MOLES]/combined_gas, 0)
n2ocomp = max(removed.gases["n2o"][MOLES]/combined_gas, 0)
n2comp = max(removed.gases["n2"][MOLES]/combined_gas, 0)
freoncomp = max(removed.gases["freon"][MOLES]/combined_gas, 0)
n2ocomp = max(removed.gases[/datum/gas/nitrous_oxide][MOLES]/combined_gas, 0)
n2comp = max(removed.gases[/datum/gas/nitrogen][MOLES]/combined_gas, 0)
freoncomp = max(removed.gases[/datum/gas/freon][MOLES]/combined_gas, 0)
gasmix_power_ratio = min(max(plasmacomp + o2comp + co2comp - n2comp - freoncomp, 0), 1)
@@ -348,12 +348,12 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
removed.temperature = max(0, min(removed.temperature, 2500 * dynamic_heat_modifier))
//Calculate how much gas to release
removed.gases["plasma"][MOLES] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)
removed.gases[/datum/gas/plasma][MOLES] += max((device_energy * dynamic_heat_modifier) / PLASMA_RELEASE_MODIFIER, 0)
removed.gases["o2"][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
removed.gases[/datum/gas/oxygen][MOLES] += max(((device_energy + removed.temperature * dynamic_heat_modifier) - T0C) / OXYGEN_RELEASE_MODIFIER, 0)
if(combined_gas < 50)
removed.gases["freon"][MOLES] = max((removed.gases["freon"][MOLES] + device_energy) * freoncomp / FREON_BREEDING_MODIFIER, 0)
removed.gases[/datum/gas/freon][MOLES] = max((removed.gases[/datum/gas/freon][MOLES] + device_energy) * freoncomp / FREON_BREEDING_MODIFIER, 0)
if(produces_gas)
env.merge(removed)
+221 -219
View File
@@ -1,219 +1,221 @@
//In this file: Summon Magic/Summon Guns/Summon Events
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
var/list/gunslist = list("taser","gravgun","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","speargun","arg","uzi","alienpistol","dragnet","turret","pulsecarbine","decloner","mindflayer","hyperkinetic","advplasmacutter","wormhole","wt550","bulldog","grenadelauncher","goldenrevolver","sniper","medibeam","scatterbeam")
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying","staffdoor","voodoo", "whistle", "battlemage", "immortality", "ghostsword", "special")
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos", "necromantic", "bloodcontract")
if(user) //in this case either someone holding a spellbook or a badmin
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == DEAD || !(H.client)) continue
if(H.mind)
if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist") continue
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
SSticker.mode.traitors += H.mind
if(!summon_type)
var/datum/objective/steal_five_of_type/summon_guns/guns = new
guns.owner = H.mind
H.mind.objectives += guns
H.mind.special_role = "survivalist"
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
else
var/datum/objective/steal_five_of_type/summon_magic/magic = new
magic.owner = H.mind
H.mind.objectives += magic
H.mind.special_role = "amateur magician"
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
var/datum/objective/survive/survive = new
survive.owner = H.mind
H.mind.objectives += survive
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
H.mind.announce_objectives()
var/randomizeguns = pick(gunslist)
var/randomizemagic = pick(magiclist)
var/randomizemagicspecial = pick(magicspeciallist)
if(!summon_type)
var/obj/item/gun/G
switch (randomizeguns)
if("taser")
G = new /obj/item/gun/energy/e_gun/advtaser(get_turf(H))
if("egun")
G = new /obj/item/gun/energy/e_gun(get_turf(H))
if("laser")
G = new /obj/item/gun/energy/laser(get_turf(H))
if("revolver")
G = new /obj/item/gun/ballistic/revolver(get_turf(H))
if("detective")
G = new /obj/item/gun/ballistic/revolver/detective(get_turf(H))
if("deagle")
G = new /obj/item/gun/ballistic/automatic/pistol/deagle/camo(get_turf(H))
if("gyrojet")
G = new /obj/item/gun/ballistic/automatic/gyropistol(get_turf(H))
if("pulse")
G = new /obj/item/gun/energy/pulse(get_turf(H))
if("suppressed")
G = new /obj/item/gun/ballistic/automatic/pistol(get_turf(H))
new /obj/item/suppressor(get_turf(H))
if("doublebarrel")
G = new /obj/item/gun/ballistic/revolver/doublebarrel(get_turf(H))
if("shotgun")
G = new /obj/item/gun/ballistic/shotgun(get_turf(H))
if("combatshotgun")
G = new /obj/item/gun/ballistic/shotgun/automatic/combat(get_turf(H))
if("arg")
G = new /obj/item/gun/ballistic/automatic/ar(get_turf(H))
if("mateba")
G = new /obj/item/gun/ballistic/revolver/mateba(get_turf(H))
if("boltaction")
G = new /obj/item/gun/ballistic/shotgun/boltaction(get_turf(H))
if("speargun")
G = new /obj/item/gun/ballistic/automatic/speargun(get_turf(H))
if("uzi")
G = new /obj/item/gun/ballistic/automatic/mini_uzi(get_turf(H))
if("cannon")
G = new /obj/item/gun/energy/lasercannon(get_turf(H))
if("crossbow")
G = new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
if("nuclear")
G = new /obj/item/gun/energy/e_gun/nuclear(get_turf(H))
if("sabr")
G = new /obj/item/gun/ballistic/automatic/proto(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun/bulldog(get_turf(H))
if("c20r")
G = new /obj/item/gun/ballistic/automatic/c20r(get_turf(H))
if("saw")
G = new /obj/item/gun/ballistic/automatic/l6_saw(get_turf(H))
if("car")
G = new /obj/item/gun/ballistic/automatic/m90(get_turf(H))
if("alienpistol")
G = new /obj/item/gun/energy/alien(get_turf(H))
if("dragnet")
G = new /obj/item/gun/energy/e_gun/dragnet(get_turf(H))
if("turret")
G = new /obj/item/gun/energy/e_gun/turret(get_turf(H))
if("pulsecarbine")
G = new /obj/item/gun/energy/pulse/carbine(get_turf(H))
if("decloner")
G = new /obj/item/gun/energy/decloner(get_turf(H))
if("mindflayer")
G = new /obj/item/gun/energy/mindflayer(get_turf(H))
if("hyperkinetic")
G = new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
if("advplasmacutter")
G = new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
if("wormhole")
G = new /obj/item/gun/energy/wormhole_projector(get_turf(H))
if("wt550")
G = new /obj/item/gun/ballistic/automatic/wt550(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun(get_turf(H))
if("grenadelauncher")
G = new /obj/item/gun/ballistic/revolver/grenadelauncher(get_turf(H))
if("goldenrevolver")
G = new /obj/item/gun/ballistic/revolver/golden(get_turf(H))
if("sniper")
G = new /obj/item/gun/ballistic/automatic/sniper_rifle(get_turf(H))
if("medibeam")
G = new /obj/item/gun/medbeam(get_turf(H))
if("scatterbeam")
G = new /obj/item/gun/energy/laser/scatter(get_turf(H))
if("gravgun")
G = new /obj/item/gun/energy/gravity_gun(get_turf(H))
G.unlock()
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
else
switch (randomizemagic)
if("fireball")
new /obj/item/spellbook/oneuse/fireball(get_turf(H))
if("smoke")
new /obj/item/spellbook/oneuse/smoke(get_turf(H))
if("blind")
new /obj/item/spellbook/oneuse/blind(get_turf(H))
if("mindswap")
new /obj/item/spellbook/oneuse/mindswap(get_turf(H))
if("forcewall")
new /obj/item/spellbook/oneuse/forcewall(get_turf(H))
if("knock")
new /obj/item/spellbook/oneuse/knock(get_turf(H))
if("horsemask")
new /obj/item/spellbook/oneuse/barnyard(get_turf(H))
if("charge")
new /obj/item/spellbook/oneuse/charge(get_turf(H))
if("summonitem")
new /obj/item/spellbook/oneuse/summonitem(get_turf(H))
if("wandnothing")
new /obj/item/gun/magic/wand(get_turf(H))
if("wanddeath")
new /obj/item/gun/magic/wand/death(get_turf(H))
if("wandresurrection")
new /obj/item/gun/magic/wand/resurrection(get_turf(H))
if("wandpolymorph")
new /obj/item/gun/magic/wand/polymorph(get_turf(H))
if("wandteleport")
new /obj/item/gun/magic/wand/teleport(get_turf(H))
if("wanddoor")
new /obj/item/gun/magic/wand/door(get_turf(H))
if("wandfireball")
new /obj/item/gun/magic/wand/fireball(get_turf(H))
if("staffhealing")
new /obj/item/gun/magic/staff/healing(get_turf(H))
if("staffdoor")
new /obj/item/gun/magic/staff/door(get_turf(H))
if("armor")
new /obj/item/clothing/suit/space/hardsuit/wizard(get_turf(H))
if("scrying")
new /obj/item/scrying(get_turf(H))
if (!(H.dna.check_mutation(XRAY)))
H.dna.add_mutation(XRAY)
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
if("voodoo")
new /obj/item/voodoo(get_turf(H))
if("whistle")
new /obj/item/warpwhistle(get_turf(H))
if("battlemage")
new /obj/item/clothing/suit/space/hardsuit/shielded/wizard(get_turf(H))
if("immortality")
new /obj/item/device/immortality_talisman(get_turf(H))
if("ghostsword")
new /obj/item/melee/ghost_sword(get_turf(H))
if("special")
magiclist -= "special" //only one super OP item per summoning max
switch (randomizemagicspecial)
if("staffchange")
new /obj/item/gun/magic/staff/change(get_turf(H))
if("staffanimation")
new /obj/item/gun/magic/staff/animate(get_turf(H))
if("wandbelt")
new /obj/item/storage/belt/wands/full(get_turf(H))
if("contract")
new /obj/item/antag_spawner/contract(get_turf(H))
if("staffchaos")
new /obj/item/gun/magic/staff/chaos(get_turf(H))
if("necromantic")
new /obj/item/device/necromantic_stone(get_turf(H))
if("bloodcontract")
new /obj/item/blood_contract(get_turf(H))
to_chat(H, "<span class='notice'>You suddenly feel lucky.</span>")
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
/proc/summonevents()
if(!SSevents.wizardmode)
SSevents.frequency_lower = 600 //1 minute lower bound
SSevents.frequency_upper = 3000 //5 minutes upper bound
SSevents.toggleWizardmode()
SSevents.reschedule()
else //Speed it up
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
SSevents.frequency_upper = SSevents.frequency_lower
SSevents.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
log_game("Summon Events was increased!")
//In this file: Summon Magic/Summon Guns/Summon Events
/proc/rightandwrong(summon_type, mob/user, survivor_probability) //0 = Summon Guns, 1 = Summon Magic
var/list/gunslist = list("taser","gravgun","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","crossbow","saw","car","boltaction","speargun","arg","uzi","alienpistol","dragnet","turret","pulsecarbine","decloner","mindflayer","hyperkinetic","advplasmacutter","wormhole","wt550","bulldog","grenadelauncher","goldenrevolver","sniper","medibeam","scatterbeam")
var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying","staffdoor","voodoo", "whistle", "battlemage", "immortality", "ghostsword", "special")
var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos", "necromantic", "bloodcontract")
if(user) //in this case either someone holding a spellbook or a badmin
to_chat(user, "<B>You summoned [summon_type ? "magic" : "guns"]!</B>")
message_admins("[key_name_admin(user, 1)] summoned [summon_type ? "magic" : "guns"]!")
log_game("[key_name(user)] summoned [summon_type ? "magic" : "guns"]!")
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == DEAD || !(H.client))
continue
if(H.mind)
if(iswizard(H) || H.mind.special_role == "survivalist")
continue
if(prob(survivor_probability) && !(H.mind in SSticker.mode.traitors))
SSticker.mode.traitors += H.mind
if(!summon_type)
var/datum/objective/steal_five_of_type/summon_guns/guns = new
guns.owner = H.mind
H.mind.objectives += guns
H.mind.special_role = "survivalist"
to_chat(H, "<B>You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way.</B>")
else
var/datum/objective/steal_five_of_type/summon_magic/magic = new
magic.owner = H.mind
H.mind.objectives += magic
H.mind.special_role = "amateur magician"
to_chat(H, "<B>You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way.</B>")
var/datum/objective/survive/survive = new
survive.owner = H.mind
H.mind.objectives += survive
H.log_message("<font color='red'>Was made into a survivalist, and trusts no one!</font>", INDIVIDUAL_ATTACK_LOG)
H.mind.announce_objectives()
var/randomizeguns = pick(gunslist)
var/randomizemagic = pick(magiclist)
var/randomizemagicspecial = pick(magicspeciallist)
if(!summon_type)
var/obj/item/gun/G
switch (randomizeguns)
if("taser")
G = new /obj/item/gun/energy/e_gun/advtaser(get_turf(H))
if("egun")
G = new /obj/item/gun/energy/e_gun(get_turf(H))
if("laser")
G = new /obj/item/gun/energy/laser(get_turf(H))
if("revolver")
G = new /obj/item/gun/ballistic/revolver(get_turf(H))
if("detective")
G = new /obj/item/gun/ballistic/revolver/detective(get_turf(H))
if("deagle")
G = new /obj/item/gun/ballistic/automatic/pistol/deagle/camo(get_turf(H))
if("gyrojet")
G = new /obj/item/gun/ballistic/automatic/gyropistol(get_turf(H))
if("pulse")
G = new /obj/item/gun/energy/pulse(get_turf(H))
if("suppressed")
G = new /obj/item/gun/ballistic/automatic/pistol(get_turf(H))
new /obj/item/suppressor(get_turf(H))
if("doublebarrel")
G = new /obj/item/gun/ballistic/revolver/doublebarrel(get_turf(H))
if("shotgun")
G = new /obj/item/gun/ballistic/shotgun(get_turf(H))
if("combatshotgun")
G = new /obj/item/gun/ballistic/shotgun/automatic/combat(get_turf(H))
if("arg")
G = new /obj/item/gun/ballistic/automatic/ar(get_turf(H))
if("mateba")
G = new /obj/item/gun/ballistic/revolver/mateba(get_turf(H))
if("boltaction")
G = new /obj/item/gun/ballistic/shotgun/boltaction(get_turf(H))
if("speargun")
G = new /obj/item/gun/ballistic/automatic/speargun(get_turf(H))
if("uzi")
G = new /obj/item/gun/ballistic/automatic/mini_uzi(get_turf(H))
if("cannon")
G = new /obj/item/gun/energy/lasercannon(get_turf(H))
if("crossbow")
G = new /obj/item/gun/energy/kinetic_accelerator/crossbow/large(get_turf(H))
if("nuclear")
G = new /obj/item/gun/energy/e_gun/nuclear(get_turf(H))
if("sabr")
G = new /obj/item/gun/ballistic/automatic/proto(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun/bulldog(get_turf(H))
if("c20r")
G = new /obj/item/gun/ballistic/automatic/c20r(get_turf(H))
if("saw")
G = new /obj/item/gun/ballistic/automatic/l6_saw(get_turf(H))
if("car")
G = new /obj/item/gun/ballistic/automatic/m90(get_turf(H))
if("alienpistol")
G = new /obj/item/gun/energy/alien(get_turf(H))
if("dragnet")
G = new /obj/item/gun/energy/e_gun/dragnet(get_turf(H))
if("turret")
G = new /obj/item/gun/energy/e_gun/turret(get_turf(H))
if("pulsecarbine")
G = new /obj/item/gun/energy/pulse/carbine(get_turf(H))
if("decloner")
G = new /obj/item/gun/energy/decloner(get_turf(H))
if("mindflayer")
G = new /obj/item/gun/energy/mindflayer(get_turf(H))
if("hyperkinetic")
G = new /obj/item/gun/energy/kinetic_accelerator(get_turf(H))
if("advplasmacutter")
G = new /obj/item/gun/energy/plasmacutter/adv(get_turf(H))
if("wormhole")
G = new /obj/item/gun/energy/wormhole_projector(get_turf(H))
if("wt550")
G = new /obj/item/gun/ballistic/automatic/wt550(get_turf(H))
if("bulldog")
G = new /obj/item/gun/ballistic/automatic/shotgun(get_turf(H))
if("grenadelauncher")
G = new /obj/item/gun/ballistic/revolver/grenadelauncher(get_turf(H))
if("goldenrevolver")
G = new /obj/item/gun/ballistic/revolver/golden(get_turf(H))
if("sniper")
G = new /obj/item/gun/ballistic/automatic/sniper_rifle(get_turf(H))
if("medibeam")
G = new /obj/item/gun/medbeam(get_turf(H))
if("scatterbeam")
G = new /obj/item/gun/energy/laser/scatter(get_turf(H))
if("gravgun")
G = new /obj/item/gun/energy/gravity_gun(get_turf(H))
G.unlock()
playsound(get_turf(H),'sound/magic/summon_guns.ogg', 50, 1)
else
switch (randomizemagic)
if("fireball")
new /obj/item/spellbook/oneuse/fireball(get_turf(H))
if("smoke")
new /obj/item/spellbook/oneuse/smoke(get_turf(H))
if("blind")
new /obj/item/spellbook/oneuse/blind(get_turf(H))
if("mindswap")
new /obj/item/spellbook/oneuse/mindswap(get_turf(H))
if("forcewall")
new /obj/item/spellbook/oneuse/forcewall(get_turf(H))
if("knock")
new /obj/item/spellbook/oneuse/knock(get_turf(H))
if("horsemask")
new /obj/item/spellbook/oneuse/barnyard(get_turf(H))
if("charge")
new /obj/item/spellbook/oneuse/charge(get_turf(H))
if("summonitem")
new /obj/item/spellbook/oneuse/summonitem(get_turf(H))
if("wandnothing")
new /obj/item/gun/magic/wand(get_turf(H))
if("wanddeath")
new /obj/item/gun/magic/wand/death(get_turf(H))
if("wandresurrection")
new /obj/item/gun/magic/wand/resurrection(get_turf(H))
if("wandpolymorph")
new /obj/item/gun/magic/wand/polymorph(get_turf(H))
if("wandteleport")
new /obj/item/gun/magic/wand/teleport(get_turf(H))
if("wanddoor")
new /obj/item/gun/magic/wand/door(get_turf(H))
if("wandfireball")
new /obj/item/gun/magic/wand/fireball(get_turf(H))
if("staffhealing")
new /obj/item/gun/magic/staff/healing(get_turf(H))
if("staffdoor")
new /obj/item/gun/magic/staff/door(get_turf(H))
if("armor")
new /obj/item/clothing/suit/space/hardsuit/wizard(get_turf(H))
if("scrying")
new /obj/item/scrying(get_turf(H))
if (!(H.dna.check_mutation(XRAY)))
H.dna.add_mutation(XRAY)
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
if("voodoo")
new /obj/item/voodoo(get_turf(H))
if("whistle")
new /obj/item/warpwhistle(get_turf(H))
if("battlemage")
new /obj/item/clothing/suit/space/hardsuit/shielded/wizard(get_turf(H))
if("immortality")
new /obj/item/device/immortality_talisman(get_turf(H))
if("ghostsword")
new /obj/item/melee/ghost_sword(get_turf(H))
if("special")
magiclist -= "special" //only one super OP item per summoning max
switch (randomizemagicspecial)
if("staffchange")
new /obj/item/gun/magic/staff/change(get_turf(H))
if("staffanimation")
new /obj/item/gun/magic/staff/animate(get_turf(H))
if("wandbelt")
new /obj/item/storage/belt/wands/full(get_turf(H))
if("contract")
new /obj/item/antag_spawner/contract(get_turf(H))
if("staffchaos")
new /obj/item/gun/magic/staff/chaos(get_turf(H))
if("necromantic")
new /obj/item/device/necromantic_stone(get_turf(H))
if("bloodcontract")
new /obj/item/blood_contract(get_turf(H))
to_chat(H, "<span class='notice'>You suddenly feel lucky.</span>")
playsound(get_turf(H),'sound/magic/summon_magic.ogg', 50, 1)
/proc/summonevents()
if(!SSevents.wizardmode)
SSevents.frequency_lower = 600 //1 minute lower bound
SSevents.frequency_upper = 3000 //5 minutes upper bound
SSevents.toggleWizardmode()
SSevents.reschedule()
else //Speed it up
SSevents.frequency_upper -= 600 //The upper bound falls a minute each time, making the AVERAGE time between events lessen
if(SSevents.frequency_upper < SSevents.frequency_lower) //Sanity
SSevents.frequency_upper = SSevents.frequency_lower
SSevents.reschedule()
message_admins("Summon Events intensifies, events will now occur every [SSevents.frequency_lower / 600] to [SSevents.frequency_upper / 600] minutes.")
log_game("Summon Events was increased!")
+26 -26
View File
@@ -95,13 +95,13 @@
var/list/breath_gases = breath.gases
breath.assert_gases("o2", "n2", "plasma", "co2", "n2o", "bz")
breath.assert_gases(/datum/gas/oxygen, /datum/gas/plasma, /datum/gas/carbon_dioxide, /datum/gas/nitrous_oxide, /datum/gas/bz, /datum/gas/nitrogen)
//Partial pressures in our breath
var/O2_pp = breath.get_breath_partial_pressure(breath_gases["o2"][MOLES])
var/N2_pp = breath.get_breath_partial_pressure(breath_gases["n2"][MOLES])
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases["plasma"][MOLES])
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases["co2"][MOLES])
var/O2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/oxygen][MOLES])
var/N2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrogen][MOLES])
var/Toxins_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/plasma][MOLES])
var/CO2_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/carbon_dioxide][MOLES])
//-- OXY --//
@@ -109,7 +109,7 @@
//Too much oxygen! //Yes, some species may not like it.
if(safe_oxygen_max)
if(O2_pp > safe_oxygen_max)
var/ratio = (breath_gases["o2"][MOLES]/safe_oxygen_max) * 10
var/ratio = (breath_gases[/datum/gas/oxygen][MOLES]/safe_oxygen_max) * 10
H.apply_damage_type(Clamp(ratio, oxy_breath_dam_min, oxy_breath_dam_max), oxy_damage_type)
H.throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy)
else
@@ -118,18 +118,18 @@
//Too little oxygen!
if(safe_oxygen_min)
if(O2_pp < safe_oxygen_min)
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases["o2"][MOLES])
gas_breathed = handle_too_little_breath(H, O2_pp, safe_oxygen_min, breath_gases[/datum/gas/oxygen][MOLES])
H.throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases["o2"][MOLES]
gas_breathed = breath_gases[/datum/gas/oxygen][MOLES]
H.clear_alert("not_enough_oxy")
//Exhale
breath_gases["o2"][MOLES] -= gas_breathed
breath_gases["co2"][MOLES] += gas_breathed
breath_gases[/datum/gas/oxygen][MOLES] -= gas_breathed
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
gas_breathed = 0
//-- Nitrogen --//
@@ -137,7 +137,7 @@
//Too much nitrogen!
if(safe_nitro_max)
if(N2_pp > safe_nitro_max)
var/ratio = (breath_gases["n2"][MOLES]/safe_nitro_max) * 10
var/ratio = (breath_gases[/datum/gas/nitrogen][MOLES]/safe_nitro_max) * 10
H.apply_damage_type(Clamp(ratio, nitro_breath_dam_min, nitro_breath_dam_max), nitro_damage_type)
H.throw_alert("too_much_nitro", /obj/screen/alert/too_much_nitro)
else
@@ -146,18 +146,18 @@
//Too little nitrogen!
if(safe_nitro_min)
if(N2_pp < safe_nitro_min)
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases["n2"][MOLES])
gas_breathed = handle_too_little_breath(H, N2_pp, safe_nitro_min, breath_gases[/datum/gas/nitrogen][MOLES])
H.throw_alert("nitro", /obj/screen/alert/not_enough_nitro)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases["n2"][MOLES]
gas_breathed = breath_gases[/datum/gas/nitrogen][MOLES]
H.clear_alert("nitro")
//Exhale
breath_gases["n2"][MOLES] -= gas_breathed
breath_gases["co2"][MOLES] += gas_breathed
breath_gases[/datum/gas/nitrogen][MOLES] -= gas_breathed
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
gas_breathed = 0
//-- CO2 --//
@@ -183,18 +183,18 @@
//Too little CO2!
if(safe_co2_min)
if(CO2_pp < safe_co2_min)
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases["co2"][MOLES])
gas_breathed = handle_too_little_breath(H, CO2_pp, safe_co2_min, breath_gases[/datum/gas/carbon_dioxide][MOLES])
H.throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases["co2"][MOLES]
gas_breathed = breath_gases[/datum/gas/carbon_dioxide][MOLES]
H.clear_alert("not_enough_co2")
//Exhale
breath_gases["co2"][MOLES] -= gas_breathed
breath_gases["o2"][MOLES] += gas_breathed
breath_gases[/datum/gas/carbon_dioxide][MOLES] -= gas_breathed
breath_gases[/datum/gas/oxygen][MOLES] += gas_breathed
gas_breathed = 0
@@ -203,7 +203,7 @@
//Too much toxins!
if(safe_toxins_max)
if(Toxins_pp > safe_toxins_max)
var/ratio = (breath_gases["plasma"][MOLES]/safe_toxins_max) * 10
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_toxins_max) * 10
H.apply_damage_type(Clamp(ratio, tox_breath_dam_min, tox_breath_dam_max), tox_damage_type)
H.throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
else
@@ -213,18 +213,18 @@
//Too little toxins!
if(safe_toxins_min)
if(Toxins_pp < safe_toxins_min)
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases["plasma"][MOLES])
gas_breathed = handle_too_little_breath(H, Toxins_pp, safe_toxins_min, breath_gases[/datum/gas/plasma][MOLES])
H.throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
else
H.failed_last_breath = FALSE
if(H.health >= HEALTH_THRESHOLD_CRIT)
H.adjustOxyLoss(-5)
gas_breathed = breath_gases["plasma"][MOLES]
gas_breathed = breath_gases[/datum/gas/plasma][MOLES]
H.clear_alert("not_enough_tox")
//Exhale
breath_gases["plasma"][MOLES] -= gas_breathed
breath_gases["co2"][MOLES] += gas_breathed
breath_gases[/datum/gas/plasma][MOLES] -= gas_breathed
breath_gases[/datum/gas/carbon_dioxide][MOLES] += gas_breathed
gas_breathed = 0
@@ -234,7 +234,7 @@
// N2O
var/SA_pp = breath.get_breath_partial_pressure(breath_gases["n2o"][MOLES])
var/SA_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/nitrous_oxide][MOLES])
if(SA_pp > SA_para_min) // Enough to make us stunned for a bit
H.Unconscious(60) // 60 gives them one second to wake up and run away a bit!
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
@@ -245,7 +245,7 @@
// BZ
var/bz_pp = breath.get_breath_partial_pressure(breath_gases["bz"][MOLES])
var/bz_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/bz][MOLES])
if(bz_pp > BZ_trip_balls_min)
H.hallucination += 20
if(prob(33))