Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 5 new gases, related interactions/items/content, changes parts of fusion #53013

Merged
merged 38 commits into from Sep 10, 2020
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2485402
AHAH atmos goes BRRRRRR
Ghilker Aug 17, 2020
dba15df
some fixes, better code and sprites
Ghilker Aug 17, 2020
c7f67aa
more reactions, icon fixes, flamethrower now heat up gases on shoot, …
Ghilker Aug 18, 2020
67138b8
flamethrower fix and fireaxe balance
Ghilker Aug 18, 2020
fac58a2
merge master
Ghilker Aug 20, 2020
98b68e0
new gas names!
Ghilker Aug 20, 2020
a79a5d6
forgot this
Ghilker Aug 20, 2020
b60bece
raynar is now a reagent used in breath code
Ghilker Aug 20, 2020
2eccf9c
new atmos device the "pressure valve"
Ghilker Aug 21, 2020
6fb91dd
reactions.dm fixes, grammar fix, removed flamethrower.dm changes (dum…
Ghilker Aug 22, 2020
9700459
f
Ghilker Aug 22, 2020
8fa4ea1
changed the armor type for the metallic hydrogen
Ghilker Aug 22, 2020
9ad2e29
requested changes
Ghilker Aug 22, 2020
c61ec5b
new names and requested changes
Ghilker Aug 23, 2020
f8d3f59
name change (again), more breath code
Ghilker Aug 23, 2020
14fa4bf
fusion is a bit "easier" to start
Ghilker Aug 23, 2020
05e0a75
requested changes, balancing and AHHHH FIX IT NOW
Ghilker Aug 23, 2020
0f29267
quick pluox fix
Ghilker Aug 24, 2020
d4b9543
merge master
Ghilker Aug 24, 2020
efc961f
fixes
Ghilker Aug 24, 2020
86d2109
fixes and balancing, lowered hypernob min temp of reaction, balanced …
Ghilker Aug 25, 2020
1846efd
Merge branch 'master' into reactions-go-BRRRR
Ghilker Aug 25, 2020
8a4d11f
nobody tells me anything ç_ç
Ghilker Aug 25, 2020
5e41e02
docs
Ghilker Aug 26, 2020
58a9086
balancing
Ghilker Aug 26, 2020
0277d01
merge master
Ghilker Aug 26, 2020
3c3042d
F
Ghilker Aug 26, 2020
0cfb92f
change
Ghilker Aug 27, 2020
c671340
atmos grenades works by distance, added bounties and gas selling
Ghilker Aug 27, 2020
095755b
merge master
Ghilker Aug 28, 2020
8b2515a
atomized removal
Ghilker Aug 28, 2020
c23dc8d
changes
Ghilker Aug 29, 2020
3999e02
changes
Ghilker Aug 29, 2020
d1fc932
min max the freon fire
Ghilker Aug 29, 2020
f97ae51
requested changes
Ghilker Aug 30, 2020
afc1217
merge master
Ghilker Aug 30, 2020
396012a
Merge master + remove travis error
Ghilker Sep 1, 2020
f3c3ff3
requested changes and some tweaks
Ghilker Sep 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions code/__DEFINES/reactions.dm
Expand Up @@ -53,16 +53,15 @@
#define METAL_HYDROGEN_RESEARCH_MAX_AMOUNT 3000
#define STIMULUM_RESEARCH_AMOUNT 50
//Plasma fusion properties
#define FUSION_ENERGY_THRESHOLD 3e9 //Amount of energy it takes to start a fusion reaction
#define FUSION_MOLE_THRESHOLD 250 //Mole count required (tritium/plasma) to start a fusion reaction
#define FUSION_TRITIUM_CONVERSION_COEFFICIENT (1e-10)
#define INSTABILITY_GAS_POWER_FACTOR 0.003
#define FUSION_TRITIUM_MOLES_USED 1
#define PLASMA_BINDING_ENERGY 20000000
#define TOROID_VOLUME_BREAKEVEN 1000
#define FUSION_TEMPERATURE_THRESHOLD 10000
#define TOROID_VOLUME_BREAKEVEN 1000
#define FUSION_TEMPERATURE_THRESHOLD 9000
#define PARTICLE_CHANCE_CONSTANT (-20000000)
#define FUSION_RAD_MAX 2000
#define FUSION_RAD_MAX 1500
#define FUSION_RAD_COEFFICIENT (-1000)
#define FUSION_INSTABILITY_ENDOTHERMALITY 2
#define FUSION_MAXIMUM_TEMPERATURE 1e8
LemonInTheDark marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 12 additions & 0 deletions code/datums/components/crafting/recipes.dm
Expand Up @@ -890,3 +890,15 @@
reqs = list(
/obj/item/reagent_containers/food/snacks/grown/wheat = 50
)


/datum/crafting_recipe/elder_atmosian_statue
name = "Elder Atmosian Statue"
result = /obj/structure/statue/elder_atmosian
time = 6 SECONDS
reqs = list(/obj/item/stack/sheet/mineral/metal_hydrogen = 10,
/obj/item/grenade/gas_crystal/healium_crystal = 1,
/obj/item/grenade/gas_crystal/proto_nitrate_crystal = 1,
/obj/item/grenade/gas_crystal/cyrion_b_crystal = 1
)
category = CAT_MISC
15 changes: 15 additions & 0 deletions code/game/objects/items/fireaxe.dm
Expand Up @@ -74,3 +74,18 @@

/obj/item/fireaxe/boneaxe/update_icon_state()
icon_state = "bone_axe0"

/*
* Metal Hydrogen Axe
*/
/obj/item/fireaxe/metal_h2_axe // Blatant imitation of the fireaxe, but made out of metallic hydrogen
icon_state = "metalh2_axe0"
name = "metallic hydrogen axe"
desc = "A large, menacing axe made of an unkown substance that the most elder atmosians calls Metallic Hydrogen. Truly an otherwordly weapon."

/obj/item/fireaxe/metal_h2_axe/ComponentInitialize()
. = ..()
AddComponent(/datum/component/two_handed, force_unwielded=5, force_wielded=23, icon_wielded="metalh2_axe1")
Ghilker marked this conversation as resolved.
Show resolved Hide resolved

/obj/item/fireaxe/metal_h2_axe/update_icon_state()
icon_state = "metalh2_axe0"
1 change: 0 additions & 1 deletion code/game/objects/items/flamethrower.dm
Expand Up @@ -223,7 +223,6 @@
//location.hotspot_expose(1000,500,1)
SSair.add_to_active(target, 0)


/obj/item/flamethrower/Initialize(mapload)
. = ..()
if(create_full)
Expand Down
127 changes: 127 additions & 0 deletions code/game/objects/items/grenades/atmos_grenades.dm
@@ -0,0 +1,127 @@
/obj/item/grenade/gas_crystal
desc = "Some kind of crystal, this shouldn't spawn"
name = "Gas Crystal"
icon = 'icons/obj/grenade.dmi'
icon_state = "bluefrag"
inhand_icon_state = "flashbang"
resistance_flags = FIRE_PROOF


/obj/item/grenade/gas_crystal/healium_crystal
name = "Healium crystal"
desc = "A crystal made from the Healium gas, it's cold to the touch."
icon_state = "healium_crystal"
///Amount of stamina damage mobs will take if in range
var/stamina_damage = 30
///Range of the grenade that will cool down and affect mobs
var/freeze_range = 4

/obj/item/grenade/gas_crystal/proto_nitrate_crystal
name = "Proto Nitrate crystal"
desc = "A crystal made from the Proto Nitrate gas, you can see the liquid gases inside."
icon_state = "proto_nitrate_crystal"
///Range of the grenade air refilling
var/refill_range = 5

/obj/item/grenade/gas_crystal/cyrion_b_crystal
name = "Cyrion B crystal"
desc = "A crystal made from the Cyrion B Gas, you can see the liquid plasma inside."
icon_state = "cyrion_b_crystal"
ex_dev = 1
ex_heavy = 2
ex_light = 4
ex_flame = 2

/obj/item/grenade/gas_crystal/preprime(mob/user, delayoverride, msg = TRUE, volume = 60)
var/turf/turf_loc = get_turf(src)
log_grenade(user, turf_loc) //Inbuilt admin procs already handle null users
if(user)
add_fingerprint(user)
if(msg)
to_chat(user, "<span class='warning'>You crush the [src]! [capitalize(DisplayTimeText(det_time))]!</span>")
if(shrapnel_type && shrapnel_radius)
shrapnel_initialized = TRUE
AddComponent(/datum/component/pellet_cloud, projectile_type=shrapnel_type, magnitude=shrapnel_radius)
active = TRUE
icon_state = initial(icon_state) + "_active"
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', volume, TRUE)
SEND_SIGNAL(src, COMSIG_GRENADE_ARMED, det_time, delayoverride)
addtimer(CALLBACK(src, .proc/prime), isnull(delayoverride)? det_time : delayoverride)

/obj/item/grenade/gas_crystal/healium_crystal/prime(mob/living/lanced_by)
. = ..()
update_mob()
playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
for(var/turf/turf_loc in view(freeze_range, loc))
if(!isopenturf(turf_loc))
continue
var/distance_from_center = get_dist(turf_loc, loc)
var/turf/open/floor_loc = turf_loc
switch(distance_from_center)
if(0)
if(floor_loc.air.temperature > 260 && floor_loc.air.temperature < 370)
floor_loc.atmos_spawn_air("n2=100;TEMP=273")
if(floor_loc.air.temperature > 370)
floor_loc.atmos_spawn_air("n2=250;TEMP=30")
floor_loc.MakeSlippery(TURF_WET_PERMAFROST, 5 MINUTES)
if(floor_loc.air.gases[/datum/gas/plasma])
floor_loc.air.gases[/datum/gas/plasma][MOLES] -= floor_loc.air.gases[/datum/gas/plasma][MOLES] * 0.5
if(1)
if(floor_loc.air.temperature > 260 && floor_loc.air.temperature < 370)
floor_loc.atmos_spawn_air("n2=50;TEMP=273")
if(floor_loc.air.temperature > 370)
floor_loc.atmos_spawn_air("n2=150;TEMP=30")
floor_loc.MakeSlippery(TURF_WET_PERMAFROST, 3 MINUTES)
if(floor_loc.air.gases[/datum/gas/plasma])
floor_loc.air.gases[/datum/gas/plasma][MOLES] -= floor_loc.air.gases[/datum/gas/plasma][MOLES] * 0.25
LemonInTheDark marked this conversation as resolved.
Show resolved Hide resolved
if(2)
if(floor_loc.air.temperature > 260 && floor_loc.air.temperature < 370)
floor_loc.atmos_spawn_air("n2=25;TEMP=273")
if(floor_loc.air.temperature > 370)
floor_loc.atmos_spawn_air("n2=75;TEMP=30")
floor_loc.MakeSlippery(TURF_WET_PERMAFROST, 1 MINUTES)
if(floor_loc.air.gases[/datum/gas/plasma])
floor_loc.air.gases[/datum/gas/plasma][MOLES] -= floor_loc.air.gases[/datum/gas/plasma][MOLES] * 0.15
else
if(floor_loc.air.temperature > 260 && floor_loc.air.temperature < 370)
floor_loc.atmos_spawn_air("n2=15;TEMP=273")
if(floor_loc.air.temperature > 370)
floor_loc.atmos_spawn_air("n2=35;TEMP=30")
floor_loc.MakeSlippery(TURF_WET_WATER, 1 MINUTES)
if(floor_loc.air.gases[/datum/gas/plasma])
floor_loc.air.gases[/datum/gas/plasma][MOLES] -= floor_loc.air.gases[/datum/gas/plasma][MOLES] * 0.05
floor_loc.air_update_turf()
for(var/mob/living/carbon/live_mob in turf_loc)
live_mob.adjustStaminaLoss(stamina_damage)
live_mob.adjust_bodytemperature(-150)
qdel(src)

/obj/item/grenade/gas_crystal/proto_nitrate_crystal/prime(mob/living/lanced_by)
. = ..()
update_mob()
playsound(src, 'sound/effects/spray2.ogg', 100, TRUE)
for(var/turf/turf_loc in view(refill_range, loc))
if(!isopenturf(turf_loc))
continue
var/distance_from_center = get_dist(turf_loc, loc)
var/turf/open/floor_loc = turf_loc
switch(distance_from_center)
if(0)
floor_loc.atmos_spawn_air("n2=400;TEMP=273")
floor_loc.atmos_spawn_air("o2=100;TEMP=273")
if(1)
floor_loc.atmos_spawn_air("n2=250;TEMP=273")
floor_loc.atmos_spawn_air("o2=65;TEMP=273")
if(2)
floor_loc.atmos_spawn_air("n2=125;TEMP=273")
floor_loc.atmos_spawn_air("o2=35;TEMP=273")
else
floor_loc.atmos_spawn_air("n2=75;TEMP=273")
Ghilker marked this conversation as resolved.
Show resolved Hide resolved
floor_loc.atmos_spawn_air("o2=20;TEMP=273")
floor_loc.air_update_turf()
qdel(src)

/obj/item/grenade/gas_crystal/cyrion_b_crystal/prime(mob/living/lanced_by)
. = ..()
update_mob()
qdel(src)
5 changes: 4 additions & 1 deletion code/game/objects/items/stacks/sheets/mineral.dm
Expand Up @@ -482,6 +482,9 @@ GLOBAL_LIST_INIT(abductor_recipes, list ( \
//Metal Hydrogen
GLOBAL_LIST_INIT(metalhydrogen_recipes, list(
new /datum/stack_recipe("incomplete servant golem shell", /obj/item/golem_shell/servant, req_amount=20, res_amount=1),
new /datum/stack_recipe("ancient armor", /obj/item/clothing/suit/armor/elder_atmosian, req_amount = 8, res_amount = 1),
new /datum/stack_recipe("ancient helmet", /obj/item/clothing/head/helmet/elder_atmosian, req_amount = 5, res_amount = 1),
new /datum/stack_recipe("metallic hydrogen axe", /obj/item/fireaxe/metal_h2_axe, req_amount = 15, res_amount = 1),
))

/obj/item/stack/sheet/mineral/metal_hydrogen
Expand All @@ -492,7 +495,7 @@ GLOBAL_LIST_INIT(metalhydrogen_recipes, list(
w_class = WEIGHT_CLASS_NORMAL
resistance_flags = FIRE_PROOF | LAVA_PROOF | ACID_PROOF | INDESTRUCTIBLE
point_value = 100
custom_materials = list(/datum/material/metalhydrogen=MINERAL_MATERIAL_AMOUNT)
custom_materials = list(/datum/material/metalhydrogen = MINERAL_MATERIAL_AMOUNT)
merge_type = /obj/item/stack/sheet/mineral/metal_hydrogen

/obj/item/stack/sheet/mineral/metal_hydrogen/get_main_recipes()
Expand Down
10 changes: 10 additions & 0 deletions code/game/objects/structures/statues.dm
Expand Up @@ -300,3 +300,13 @@
desc = "A bust depicting a certain 19th century economist. You get the feeling a specter is haunting the station."
icon_state = "marx"
art_type = /datum/component/art/rev

///////////Elder Atmosian///////////////////////////////////////////

/obj/structure/statue/elder_atmosian
name = "Elder Atmosian"
desc = "A statue of an Elder Atmosian, capable of bending the laws of thermodynamics to their will"
icon_state = "eng"
Ghilker marked this conversation as resolved.
Show resolved Hide resolved
material_drop_type = /obj/item/stack/sheet/mineral/metal_hydrogen
max_integrity = 1000
impressiveness = 100
17 changes: 13 additions & 4 deletions code/game/turfs/open/_open.dm
Expand Up @@ -264,9 +264,18 @@
/turf/open/rad_act(pulse_strength)
. = ..()
if (air.gases[/datum/gas/carbon_dioxide] && air.gases[/datum/gas/oxygen])
pulse_strength = min(pulse_strength,air.gases[/datum/gas/carbon_dioxide][MOLES]*1000,air.gases[/datum/gas/oxygen][MOLES]*2000) //Ensures matter is conserved properly
air.gases[/datum/gas/carbon_dioxide][MOLES]=max(air.gases[/datum/gas/carbon_dioxide][MOLES]-(pulse_strength/1000),0)
air.gases[/datum/gas/oxygen][MOLES]=max(air.gases[/datum/gas/oxygen][MOLES]-(pulse_strength/2000),0)
pulse_strength = min(pulse_strength, air.gases[/datum/gas/carbon_dioxide][MOLES] * 1000, air.gases[/datum/gas/oxygen][MOLES] * 2000) //Ensures matter is conserved properly
air.gases[/datum/gas/carbon_dioxide][MOLES] = max(air.gases[/datum/gas/carbon_dioxide][MOLES] - (pulse_strength * 0.001),0)
air.gases[/datum/gas/oxygen][MOLES] = max(air.gases[/datum/gas/oxygen][MOLES]-(pulse_strength * 0.002),0)
air.assert_gas(/datum/gas/pluoxium)
air.gases[/datum/gas/pluoxium][MOLES]+=(pulse_strength/4000)
air.gases[/datum/gas/pluoxium][MOLES] +=(pulse_strength * 0.004)
air.garbage_collect()
air_update_turf()
if (air.gases[/datum/gas/hydrogen])
pulse_strength = min(pulse_strength, air.gases[/datum/gas/hydrogen][MOLES] * 1000)
air.gases[/datum/gas/hydrogen][MOLES] = max(air.gases[/datum/gas/hydrogen][MOLES] - (pulse_strength * 0.001), 0)
air.assert_gas(/datum/gas/tritium)
air.gases[/datum/gas/tritium][MOLES] += (pulse_strength * 0.001)
air.garbage_collect()
air_update_turf()

8 changes: 5 additions & 3 deletions code/modules/atmospherics/gasmixtures/gas_mixture.dm
Expand Up @@ -448,12 +448,14 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
var/datum/gas_reaction/reaction = r

var/list/min_reqs = reaction.min_requirements
if((min_reqs["TEMP"] && temp < min_reqs["TEMP"]) \
|| (min_reqs["ENER"] && ener < min_reqs["ENER"]))
if( (min_reqs["TEMP"] && temp < min_reqs["TEMP"]) || \
(min_reqs["ENER"] && ener < min_reqs["ENER"]) || \
(min_reqs["MAX_TEMP"] && temp > min_reqs["MAX_TEMP"])
)
continue

for(var/id in min_reqs)
if (id == "TEMP" || id == "ENER")
if (id == "TEMP" || id == "ENER" || id == "MAX_TEMP")
continue
if(!cached_gases[id] || cached_gases[id][MOLES] < min_reqs[id])
continue reaction_loop
Expand Down
45 changes: 45 additions & 0 deletions code/modules/atmospherics/gasmixtures/gas_types.dm
Expand Up @@ -170,6 +170,51 @@ GLOBAL_LIST_INIT(nonreactive_gases, typecacheof(list(/datum/gas/oxygen, /datum/g
dangerous = TRUE
rarity = 700

/datum/gas/healium
id = "healium"
specific_heat = 10
name = "Healium"
dangerous = TRUE
gas_overlay = "healium"
moles_visible = MOLES_GAS_VISIBLE
rarity = 100

/datum/gas/proto_nitrate
id = "proto_nitrate"
specific_heat = 30
name = "Proto Nitrate"
dangerous = TRUE
gas_overlay = "proto_nitrate"
moles_visible = MOLES_GAS_VISIBLE
rarity = 100

/datum/gas/cyrion_b
id = "cyrion_b"
specific_heat = 350
name = "Cyrion B"
dangerous = TRUE
gas_overlay = "cyrion_b"
moles_visible = MOLES_GAS_VISIBLE
rarity = 100

/datum/gas/halon
id = "halon"
specific_heat = 175
name = "Halon"
dangerous = TRUE
gas_overlay = "halon"
moles_visible = MOLES_GAS_VISIBLE
rarity = 100

/datum/gas/hexane
id = "hexane"
specific_heat = 5
name = "Hexane"
dangerous = TRUE
gas_overlay = "hexane"
moles_visible = MOLES_GAS_VISIBLE
rarity = 100

/obj/effect/overlay/gas
icon = 'icons/effects/atmospherics.dmi'
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
Expand Down