Healium crystal changes (#60477)

Healium crystals now straight up fix the air in a room instead of giving an undetermined amount of gas
Area fixed is now a 7x7
Changed the recipe to no longer require freon but O2 instead
This commit is contained in:
Ghilker
2021-08-15 01:01:02 +02:00
committed by GitHub
parent 58c718b237
commit 1548352cf2
2 changed files with 8 additions and 20 deletions
@@ -25,32 +25,20 @@
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
///Amount of gas released if the state is optimal
var/gas_amount = 200
var/fix_range = 7
/obj/item/grenade/gas_crystal/healium_crystal/detonate(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))
var/list/connected_turfs = detect_room(origin = get_turf(src), max_size = fix_range)
var/datum/gas_mixture/base_mix = new
base_mix.parse_gas_string(OPENTURF_DEFAULT_ATMOS)
for(var/turf/open/turf_fix in connected_turfs)
if(turf_fix.blocks_air)
continue
var/distance_from_center = max(get_dist(turf_loc, loc), 1)
var/turf/open/floor_loc = turf_loc
if(floor_loc.air.temperature > 260 && floor_loc.air.temperature < 370)
floor_loc.atmos_spawn_air("n2=[(gas_amount - 150) / distance_from_center];TEMP=273")
if(floor_loc.air.temperature > 370)
floor_loc.atmos_spawn_air("n2=[gas_amount / distance_from_center];TEMP=30")
floor_loc.MakeSlippery(TURF_WET_PERMAFROST, (5 / distance_from_center) 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 / distance_from_center
for(var/mob/living/carbon/live_mob in turf_loc)
live_mob.adjustStaminaLoss(stamina_damage / distance_from_center)
live_mob.adjust_bodytemperature(-150 / distance_from_center)
turf_fix.assume_air(base_mix)
qdel(src)
/obj/item/grenade/gas_crystal/proto_nitrate_crystal
@@ -65,7 +65,7 @@ GLOBAL_LIST_INIT(gas_recipe_meta, gas_recipes_list())
max_temp = 400
reaction_type = ENDOTHERMIC_REACTION
energy_release = 2000000
requirements = list(/datum/gas/healium = 100, /datum/gas/freon = 120, /datum/gas/plasma = 50)
requirements = list(/datum/gas/healium = 100, /datum/gas/oxygen = 120, /datum/gas/plasma = 50)
products = list(/obj/item/grenade/gas_crystal/healium_crystal = 1)
/datum/gas_recipe/crystallizer/proto_nitrate_grenade