mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-08 16:41:58 +00:00
Cold Reactions and Applejack
Adds the ability to make a chemical reaction only occur when at or below a specified temperature. Adds new reaction for freezing water into ice - Must be at or below 270K to turn water to ice Adds two new reagents/drinks: Applejack and Jack Rose cocktail -Applejack is obtained by freezing cider at or below 270K - Applejack is slightly more potent than cider, due to it's alcohol concentration being higher - Jack Rose is a new mixed drink that is 4 parts Applejack, 1 part Lemon Juice Only Ice and Applejack utilize the cold reactions at this time, but the functionality is in place for future reactions. - This should allow coders more flexibility with defining new reactions that may realistically occur at low temperatures. Renamed the existing "required_temp" variable for reactions to "min_temp" to better communicate it's purpose and differentiate it from the new "max_temp" variable for cold reactions.
This commit is contained in:
@@ -257,7 +257,8 @@ datum
|
||||
var/matching_container = 0
|
||||
var/matching_other = 0
|
||||
var/list/multipliers = new/list()
|
||||
var/required_temp = C.required_temp
|
||||
var/min_temp = C.min_temp //Minimum temperature required for the reaction to occur (heat to/above this)
|
||||
var/max_temp = C.max_temp //Maximum temperature allowed for the reaction to occur (cool to/below this)
|
||||
for(var/B in C.required_reagents)
|
||||
if(!has_reagent(B, C.required_reagents[B])) break
|
||||
total_matching_reagents++
|
||||
@@ -288,10 +289,10 @@ datum
|
||||
if(M.Uses > 0) // added a limit to slime cores -- Muskets requested this
|
||||
matching_other = 1
|
||||
|
||||
if(required_temp == 0)
|
||||
required_temp = chem_temp
|
||||
if(min_temp == 0)
|
||||
min_temp = chem_temp
|
||||
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp >= required_temp)
|
||||
if(total_matching_reagents == total_required_reagents && total_matching_catalysts == total_required_catalysts && matching_container && matching_other && chem_temp <= max_temp && chem_temp >= min_temp)
|
||||
var/multiplier = min(multipliers)
|
||||
var/preserved_data = null
|
||||
for(var/B in C.required_reagents)
|
||||
|
||||
@@ -14,7 +14,8 @@ datum
|
||||
var/result_amount = 0
|
||||
var/secondary = 0 // set to nonzero if secondary reaction
|
||||
var/list/secondary_results = list() //additional reagents produced by the reaction
|
||||
var/required_temp = 0
|
||||
var/min_temp = 0 //Minimum temperature required for the reaction to occur (heat to/above this). min_temp = 0 means no requirement
|
||||
var/max_temp = 9999 //Maximum temperature allowed for the reaction to occur (cool to/below this).
|
||||
var/mix_message = "The solution begins to bubble."
|
||||
var/mix_sound = 'sound/effects/bubbles.ogg'
|
||||
var/no_message = 0
|
||||
@@ -64,6 +65,15 @@ datum
|
||||
result_amount = 3
|
||||
*/
|
||||
|
||||
ice
|
||||
name = "Ice"
|
||||
id = "ice"
|
||||
result = "ice"
|
||||
required_reagents = list("water" = 1)
|
||||
result_amount = 1
|
||||
max_temp = 273
|
||||
mix_message = "Ice forms as the water freezes."
|
||||
|
||||
sterilizine
|
||||
name = "Sterilizine"
|
||||
id = "sterilizine"
|
||||
@@ -352,7 +362,7 @@ datum
|
||||
result = "diethylamine"
|
||||
required_reagents = list ("ammonia" = 1, "ethanol" = 1)
|
||||
result_amount = 2
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "A horrible smell pours forth from the mixture."
|
||||
|
||||
space_cleaner
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
datum/reagent/ginsonic
|
||||
/datum/reagent/ginsonic
|
||||
name = "Gin and sonic"
|
||||
id = "ginsonic"
|
||||
description = "GOTTA GET CRUNK FAST BUT LIQUOR TOO SLOW"
|
||||
@@ -13,7 +13,7 @@ datum/reagent/ginsonic
|
||||
result_amount = 2
|
||||
mix_message = "The drink turns electric blue and starts quivering violently."
|
||||
|
||||
datum/reagent/ginsonic/on_mob_life(var/mob/living/M as mob)
|
||||
/datum/reagent/ginsonic/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
if(prob(10))
|
||||
M.reagents.add_reagent("methamphetamine",1.2)
|
||||
@@ -30,3 +30,34 @@ datum/reagent/ginsonic/on_mob_life(var/mob/living/M as mob)
|
||||
M << "<span class='notice'>Way Past Cool!</span>"
|
||||
..()
|
||||
return
|
||||
|
||||
/datum/reagent/ethanol/applejack
|
||||
name = "Applejack"
|
||||
id = "applejack"
|
||||
description = "A highly concentrated alcoholic beverage made by repeatedly freezing cider and removing the ice."
|
||||
color = "#997A00"
|
||||
slur_start = 30
|
||||
brawl_start = 40
|
||||
confused_start = 100
|
||||
|
||||
/datum/chemical_reaction/applejack
|
||||
name = "applejack"
|
||||
id = "applejack"
|
||||
result = "applejack"
|
||||
required_reagents = list("cider" = 2)
|
||||
max_temp = 270
|
||||
result_amount = 1
|
||||
mix_message = "The drink darkens as the water freezes, leaving the concentrated cider behind."
|
||||
|
||||
/datum/reagent/ethanol/jackrose
|
||||
name = "Jack Rose"
|
||||
id = "jackrose"
|
||||
description = "A classic cocktail that had fallen out of fashion, but never out of taste,"
|
||||
color = "#664300"
|
||||
|
||||
/datum/chemical_reaction/jackrose
|
||||
name = "jackrose"
|
||||
id = "jackrose"
|
||||
result = "jackrose"
|
||||
required_reagents = list("applejack" = 4, "lemonjuice" = 1)
|
||||
result_amount = 5
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
required_reagents = list("diphenhydramine" = 1, "ammonia" = 1, "lithium" = 1, "sacid" = 1, "fuel" = 1)
|
||||
result_amount = 5
|
||||
mix_message = "The mixture violently reacts, leaving behind a few crystalline shards."
|
||||
required_temp = 390
|
||||
min_temp = 390
|
||||
|
||||
/datum/chemical_reaction/crank/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/T = get_turf(holder.my_atom)
|
||||
@@ -150,7 +150,7 @@
|
||||
required_reagents = list("diphenhydramine" = 1, "morphine" = 1, "cleaner" = 1, "potassium" = 1, "phosphorus" = 1, "fuel" = 1)
|
||||
result_amount = 6
|
||||
mix_message = "The mixture dries into a pale blue powder."
|
||||
required_temp = 380
|
||||
min_temp = 380
|
||||
|
||||
/datum/reagent/methamphetamine
|
||||
name = "Methamphetamine"
|
||||
@@ -228,7 +228,7 @@
|
||||
result = "methamphetamine"
|
||||
required_reagents = list("ephedrine" = 1, "iodine" = 1, "phosphorus" = 1, "hydrogen" = 1)
|
||||
result_amount = 4
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
/datum/chemical_reaction/saltpetre
|
||||
name = "saltpetre"
|
||||
@@ -279,7 +279,7 @@
|
||||
result = "bath_salts"
|
||||
required_reagents = list("????" = 1, "saltpetre" = 1, "msg" = 1, "cleaner" = 1, "enzyme" = 1, "mugwort" = 1, "mercury" = 1)
|
||||
result_amount = 6
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "Tiny cubic crystals precipitate out of the mixture. Huh."
|
||||
|
||||
/datum/reagent/bath_salts/overdose_process(var/mob/living/M as mob)
|
||||
|
||||
@@ -61,7 +61,7 @@ datum/reagent/corn_starch
|
||||
result = "corn_syrup"
|
||||
required_reagents = list("corn_starch" = 1, "sacid" = 1)
|
||||
result_amount = 2
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "The mixture forms a viscous, clear fluid!"
|
||||
|
||||
datum/reagent/corn_syrup
|
||||
@@ -391,7 +391,7 @@ datum/reagent/ectoplasm/reaction_turf(var/turf/T, var/volume)
|
||||
result = "hydrogenated_soybeanoil"
|
||||
required_reagents = list("soybeanoil" = 1, "hydrogen" = 1)
|
||||
result_amount = 2
|
||||
required_temp = 520
|
||||
min_temp = 520
|
||||
mix_message = "The mixture emits a burnt, oily smell."
|
||||
|
||||
/datum/reagent/meatslurry
|
||||
@@ -430,7 +430,7 @@ datum/reagent/ectoplasm/reaction_turf(var/turf/T, var/volume)
|
||||
result = "gravy"
|
||||
required_reagents = list("porktonium" = 1, "corn_starch" = 1, "milk" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "The substance thickens and takes on a meaty odor."
|
||||
|
||||
/datum/reagent/beff
|
||||
|
||||
@@ -124,7 +124,7 @@ datum/reagent/charcoal/on_mob_life(var/mob/living/M as mob)
|
||||
required_reagents = list("ash" = 1, "sodiumchloride" = 1)
|
||||
result_amount = 2
|
||||
mix_message = "The mixture yields a fine black powder."
|
||||
required_temp = 380
|
||||
min_temp = 380
|
||||
|
||||
/datum/chemical_reaction/silver_sulfadiazine
|
||||
name = "Silver Sulfadiazine"
|
||||
@@ -210,7 +210,7 @@ datum/reagent/calomel/on_mob_life(var/mob/living/M as mob)
|
||||
result = "calomel"
|
||||
required_reagents = list("mercury" = 1, "chlorine" = 1)
|
||||
result_amount = 2
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "Stinging vapors rise from the solution."
|
||||
|
||||
datum/reagent/potass_iodide
|
||||
@@ -349,7 +349,7 @@ datum/reagent/perfluorodecalin/on_mob_life(var/mob/living/carbon/human/M as mob)
|
||||
result = "perfluorodecalin"
|
||||
required_reagents = list("hydrogen" = 1, "fluorine" = 1, "oil" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 370
|
||||
min_temp = 370
|
||||
mix_message = "The mixture rapidly turns into a dense pink liquid."
|
||||
|
||||
datum/reagent/ephedrine
|
||||
@@ -687,7 +687,7 @@ datum/reagent/life
|
||||
result = null
|
||||
required_reagents = list("strange_reagent" = 1, "synthflesh" = 1, "blood" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
/datum/chemical_reaction/life/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
chemical_mob_spawn(holder, 1, "Life")
|
||||
@@ -1007,5 +1007,5 @@ datum/reagent/haloperidol/on_mob_life(var/mob/living/M as mob)
|
||||
result = "liquid_solder"
|
||||
required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 370
|
||||
min_temp = 370
|
||||
mix_message = "The solution gently swirls with a metallic sheen."
|
||||
|
||||
@@ -100,7 +100,7 @@ datum/reagent/acetone
|
||||
result = "ash"
|
||||
required_reagents = list("oil" = 1)
|
||||
result_amount = 0.5
|
||||
required_temp = 480
|
||||
min_temp = 480
|
||||
mix_sound = null
|
||||
no_message = 1
|
||||
|
||||
@@ -142,7 +142,7 @@ datum/reagent/colorful_reagent/reaction_turf(var/turf/T, var/volume)
|
||||
result = null
|
||||
required_reagents = list("nutriment" = 1, "colorful_reagent" = 1, "strange_reagent" = 1, "blood" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
datum/reagent/corgium
|
||||
name = "Corgium"
|
||||
@@ -164,7 +164,7 @@ datum/reagent/corgium
|
||||
result = null
|
||||
required_reagents = list("egg" = 1, "colorful_reagent" = 1, "chicken_soup" = 1, "strange_reagent" = 1, "blood" = 1)
|
||||
result_amount = 5
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
mix_message = "The substance turns an airy sky-blue and foams up into a new shape."
|
||||
|
||||
/datum/chemical_reaction/flaptonium/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
result = "clf3"
|
||||
required_reagents = list("chlorine" = 1, "fluorine" = 3)
|
||||
result_amount = 2
|
||||
required_temp = 424
|
||||
min_temp = 424
|
||||
|
||||
/datum/reagent/clf3/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
@@ -94,7 +94,7 @@
|
||||
id = "sorium_vortex"
|
||||
result = null
|
||||
required_reagents = list("sorium" = 1)
|
||||
required_temp = 474
|
||||
min_temp = 474
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
@@ -126,7 +126,7 @@
|
||||
id = "ldm_vortex"
|
||||
result = null
|
||||
required_reagents = list("liquid_dark_matter" = 1)
|
||||
required_temp = 474
|
||||
min_temp = 474
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
@@ -177,7 +177,7 @@
|
||||
result = null
|
||||
required_reagents = list("blackpowder" = 1)
|
||||
result_amount = 1
|
||||
required_temp = 474
|
||||
min_temp = 474
|
||||
no_message = 1
|
||||
mix_sound = null
|
||||
|
||||
@@ -240,7 +240,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
id = "flash_powder_flash"
|
||||
result = null
|
||||
required_reagents = list("flash_powder" = 1)
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
/datum/chemical_reaction/flash_powder_flash/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
@@ -324,7 +324,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
name = "smoke_powder_smoke"
|
||||
id = "smoke_powder_smoke"
|
||||
required_reagents = list("smoke_powder" = 1)
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
secondary = 1
|
||||
result_amount = 1
|
||||
forbidden_reagents = list()
|
||||
@@ -350,7 +350,7 @@ datum/reagent/blackpowder/reaction_turf(var/turf/T, var/volume) //oh shit
|
||||
id = "sonic_powder_deafen"
|
||||
result = null
|
||||
required_reagents = list("sonic_powder" = 1)
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
/datum/chemical_reaction/sonic_powder_deafen/on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
var/location = get_turf(holder.my_atom)
|
||||
|
||||
@@ -80,7 +80,7 @@ datum/reagent/formaldehyde/on_mob_life(var/mob/living/M as mob)
|
||||
result = "formaldehyde"
|
||||
required_reagents = list("ethanol" = 1, "oxygen" = 1, "silver" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 420
|
||||
min_temp = 420
|
||||
mix_message = "Ugh, it smells like the morgue in here."
|
||||
|
||||
datum/reagent/venom
|
||||
@@ -141,7 +141,7 @@ datum/reagent/neurotoxin2/on_mob_life(var/mob/living/M as mob)
|
||||
result = "neurotoxin2"
|
||||
required_reagents = list("space_drugs" = 1)
|
||||
result_amount = 1
|
||||
required_temp = 674
|
||||
min_temp = 674
|
||||
mix_sound = null
|
||||
no_message = 1
|
||||
|
||||
@@ -175,7 +175,7 @@ datum/reagent/cyanide/on_mob_life(var/mob/living/M as mob)
|
||||
result = "cyanide"
|
||||
required_reagents = list("oil" = 1, "ammonia" = 1, "oxygen" = 1)
|
||||
result_amount = 3
|
||||
required_temp = 380
|
||||
min_temp = 380
|
||||
mix_message = "The mixture gives off a faint scent of almonds."
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ datum/reagent/facid/reaction_obj(var/obj/O, var/volume)
|
||||
result = "facid"
|
||||
required_reagents = list("sacid" = 1, "fluorine" = 1, "hydrogen" = 1, "potassium" = 1)
|
||||
result_amount = 4
|
||||
required_temp = 380
|
||||
min_temp = 380
|
||||
mix_message = "The mixture deepens to a dark blue, and slowly begins to corrode its container."
|
||||
|
||||
datum/reagent/initropidril
|
||||
@@ -519,7 +519,7 @@ datum/reagent/tabun
|
||||
required_reagents = list("phenol" = 1, "diethylamine" = 1, "phosphorus" = 1, "oxygen" = 1, "chlorine" = 1, "sodiumchloride" = 1, "ethanol" = 1, "cyanide" = 1)
|
||||
result_amount = 8
|
||||
mix_message = "The mixture yields a colorless, odorless liquid."
|
||||
required_temp = 374
|
||||
min_temp = 374
|
||||
|
||||
datum/reagent/tabun/on_mob_life(var/mob/living/M as mob)
|
||||
if(!M) M = holder.my_atom
|
||||
|
||||
@@ -556,6 +556,14 @@
|
||||
icon_state = "rewriter"
|
||||
name = "Rewriter"
|
||||
desc = "The secert of the sanctuary of the Libarian..."
|
||||
if("applejack")
|
||||
icon_state = "cognacglass"
|
||||
name = "Glass of applejack"
|
||||
desc = "When cider isn't strong enough, you gotta jack it."
|
||||
if("jackrose")
|
||||
icon_state = "patronglass"
|
||||
name = "Jack Rose"
|
||||
desc = "Drinking this makes you feel like you belong in a luxury hotel bar during the 1920s."
|
||||
else
|
||||
icon_state ="glass_brown"
|
||||
name = "Glass of ..what?"
|
||||
|
||||
Reference in New Issue
Block a user