Skip to content

Commit

Permalink
Reworking oil subtypes and lantern fuel.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Dec 27, 2024
1 parent 4bdf373 commit b0d53f6
Show file tree
Hide file tree
Showing 19 changed files with 113 additions and 70 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/structures/barrels/barrel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@

/obj/structure/reagent_dispensers/barrel/ebony/oil/populate_reagents()
. = ..()
add_to_reagents(/decl/material/liquid/nutriment/oil/plant, reagents.maximum_volume)
add_to_reagents(/decl/material/liquid/oil, reagents.maximum_volume)
2 changes: 1 addition & 1 deletion code/game/objects/structures/barrels/cask.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@

/obj/structure/reagent_dispensers/barrel/cask/ebony/oil/populate_reagents()
. = ..()
add_to_reagents(/decl/material/liquid/nutriment/oil/plant, reagents.maximum_volume)
add_to_reagents(/decl/material/liquid/oil, reagents.maximum_volume)
2 changes: 1 addition & 1 deletion code/modules/butchery/butchery_products_meat_fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
slice_num = 3
butchery_data = /decl/butchery_data/animal/fish
allergen_flags = ALLERGEN_FISH
var/oil_type = /decl/material/liquid/nutriment/oil/fish
var/oil_type = /decl/material/liquid/oil/fish
var/oil_amount = 2

/obj/item/food/butchery/meat/fish/oily
Expand Down
14 changes: 7 additions & 7 deletions code/modules/hydroponics/plant_types/seeds_misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
display_name = "cotton patch"
product_material = /decl/material/solid/organic/plantmatter/pith/husk
chems = list(
/decl/material/liquid/nutriment/oil/plant = list(3,10),
/decl/material/liquid/oil/plant = list(3,10),
/decl/material/solid/organic/cloth = list(10,1)
)
slice_product = null
Expand All @@ -28,7 +28,7 @@
display_name = "flax patch"
// Do we want linseed oil at some point?
chems = list(
/decl/material/liquid/nutriment/oil/plant = list(5,12),
/decl/material/liquid/oil/plant = list(5,12),
/decl/material/solid/organic/cloth/linen = list(8,1)
)

Expand Down Expand Up @@ -400,7 +400,7 @@
display_name = "hemp patch"
mutants = null
chems = list(
/decl/material/liquid/nutriment/oil/plant = list(3,10),
/decl/material/liquid/oil/plant = list(3,10),
/decl/material/solid/organic/cloth/hemp = list(8,1),
/decl/material/liquid/nutriment = list(1)
)
Expand Down Expand Up @@ -725,7 +725,7 @@
product_name = "sunflower"
display_name = "sunflower patch"
chems = list(
/decl/material/liquid/nutriment/oil/plant = list(10,10)
/decl/material/liquid/oil/plant = list(10,10)
)

/datum/seed/flower/sunflower/New()
Expand Down Expand Up @@ -800,7 +800,7 @@
display_name = "peanut vine"
chems = list(
/decl/material/liquid/nutriment = list(1,10),
/decl/material/liquid/nutriment/oil/plant = list(1,10)
/decl/material/liquid/oil/plant = list(1,10)
)
slice_product = /obj/item/food/processed_grown/chopped
slice_amount = 3
Expand Down Expand Up @@ -890,7 +890,7 @@
name = "corn"
product_name = "corn"
display_name = "ears of corn"
chems = list(/decl/material/liquid/nutriment = list(1,10), /decl/material/liquid/nutriment/cornoil = list(1,10))
chems = list(/decl/material/liquid/nutriment = list(1,10), /decl/material/liquid/oil/plant/corn = list(1,10))
grown_tag = "corn"
trash_type = /obj/item/corncob
backyard_grilling_product = /obj/item/food/popcorn
Expand Down Expand Up @@ -987,7 +987,7 @@
display_name = "soybean patch"
chems = list(
/decl/material/liquid/nutriment = list(1,20),
/decl/material/liquid/nutriment/oil/plant = list(3,20),
/decl/material/liquid/oil/plant = list(3,20),
/decl/material/liquid/drink/milk/soymilk = list(7,20)
)
grown_tag = "soybeans"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/hydroponics/seed_packets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

/obj/item/seeds/populate_reagents()
. = ..()
add_to_reagents(/decl/material/liquid/nutriment/oil/plant, 3)
add_to_reagents(/decl/material/liquid/oil/plant, 3)

/obj/item/seeds/get_single_monetary_worth()
. = seed ? seed.get_monetary_value() : ..()
Expand Down
26 changes: 13 additions & 13 deletions code/modules/mob/living/simple_animal/aquatic/aquatic_fish.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@
name = "small fish"
icon = 'icons/mob/simple_animal/fish_grump.dmi'

/mob/living/simple_animal/aquatic/fish/lantern
name = "lantern-fish"
desc = "An oily, glowing fish sometimes caught in cave rivers, rumoured to have cousins in the deep ocean."
// TODO: icon = 'icons/mob/simple_animal/fish_lantern.dmi'
/mob/living/simple_animal/aquatic/fish/large
name = "smallmouth bass"
icon = 'icons/mob/simple_animal/fish_judge.dmi'
butchery_data = /decl/butchery_data/animal/fish/medium
mob_size = MOB_SIZE_SMALL

/mob/living/simple_animal/aquatic/fish/large/lantern
name = "lantern fish"
desc = "An oily, glowing fish with a habit of nipping people. They are sometimes caught in cave rivers, and are rumoured to have cousins in the deep ocean."
icon = 'icons/mob/simple_animal/fish_lantern.dmi'
butchery_data = /decl/butchery_data/animal/fish/oily

/mob/living/simple_animal/aquatic/fish/cave
/mob/living/simple_animal/aquatic/fish/large/cave
name = "blind cave fish"
desc = "A pale, blobby fish that lives its entire life in the cold darkness of cave rivers, and hence has no need for eyes."
// TODO: icon = 'icons/mob/simple_animal/fish_cave.dmi'
icon = 'icons/mob/simple_animal/fish_cave.dmi'

/mob/living/simple_animal/aquatic/fish/cave/is_blind()
/mob/living/simple_animal/aquatic/fish/large/cave/is_blind()
return TRUE

/mob/living/simple_animal/aquatic/fish/large
name = "smallmouth bass"
icon = 'icons/mob/simple_animal/fish_judge.dmi'
butchery_data = /decl/butchery_data/animal/fish/medium
mob_size = MOB_SIZE_SMALL

/mob/living/simple_animal/aquatic/fish/large/bass
name = "largemouth bass"
icon = 'icons/mob/simple_animal/fish_bass.dmi'
Expand Down
13 changes: 0 additions & 13 deletions code/modules/reagents/chems/chems_nutriment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -296,19 +296,6 @@
boiling_point = 373
allergen_flags = ALLERGEN_FRUIT

/decl/material/liquid/nutriment/cornoil
name = "corn oil"
lore_text = "An oil derived from various types of corn."
taste_description = "slime"
taste_mult = 0.1
nutriment_factor = 20
color = "#302000"
slipperiness = 8
uid = "chem_nutriment_cornoil"
melting_point = 273
boiling_point = 373
allergen_flags = ALLERGEN_VEGETABLE

/decl/material/liquid/nutriment/sprinkles
name = "sprinkles"
lore_text = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops."
Expand Down
66 changes: 45 additions & 21 deletions code/modules/reagents/chems/chems_oil.dm
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
/decl/material/liquid/nutriment/oil
abstract_type = /decl/material/liquid/nutriment/oil
burn_product = /decl/material/gas/carbon_monoxide
ignition_point = T0C+150
accelerant_value = FUEL_VALUE_ACCELERANT
gas_flags = XGM_GAS_FUEL
melting_point = 273
boiling_point = 373
/decl/material/liquid/oil
name = "fuel oil" // paraffin etc
lore_text = "Clarified fuel oil, perfect for fuelling a lantern."
burn_product = /decl/material/gas/carbon_monoxide
ignition_point = T0C+150
accelerant_value = FUEL_VALUE_ACCELERANT
gas_flags = XGM_GAS_FUEL
melting_point = 273
boiling_point = 373
uid = "chem_oil_lamp"
color = "#664330"
value = 1.5
fishing_bait_value = 0
taste_mult = 4
metabolism = REM * 4
exoplanet_rarity_gas = MAT_RARITY_NOWHERE
affect_blood_on_ingest = 0
affect_blood_on_inhale = 0
slipperiness = 8

/decl/material/liquid/nutriment/oil/plant
name = "plant oil"
lore_text = "A thin yellow oil pressed from vegetables or nuts. Useful as fuel, or in cooking."
uid = "chem_nutriment_plant_oil"
taste_description = "oily blandness"
allergen_flags = ALLERGEN_VEGETABLE
/decl/material/liquid/oil/plant
name = "plant oil"
lore_text = "A thin yellow oil pressed from vegetables or nuts. Useful as fuel, or in cooking."
uid = "chem_oil_plant"
taste_description = "oily blandness"
allergen_flags = ALLERGEN_VEGETABLE
compost_value = 1
nutriment_factor = 8

/decl/material/liquid/nutriment/oil/fish
name = "fish oil"
lore_text = "A pungent yellow oil pressed from fish meat and fish skin. Useful as fuel, or in cooking, or for encouraging recovery after brain injuries."
uid = "chem_nutriment_fish_oil"
taste_description = "pungent, oily fish"
allergen_flags = ALLERGEN_FISH
/decl/material/liquid/oil/plant/corn
name = "corn oil"
lore_text = "An oil derived from various types of corn."
taste_description = "slime"
nutriment_factor = 20
color = "#302000"
uid = "chem_oil_corn"
taste_mult = 0.1

/decl/material/liquid/oil/fish
name = "fish oil"
lore_text = "A pungent yellow oil pressed from fish meat and fish skin. Useful as fuel, or in cooking, or for encouraging recovery after brain injuries."
uid = "chem_oil_fish"
taste_description = "pungent, oily fish"
allergen_flags = ALLERGEN_FISH
compost_value = 1
nutriment_factor = 6

// Copied from neuroannealer; yes, it's silly, but we need a way to treat brain damage on the medieval map.
// Should possibly be an ingredient rather than the be-all end-all medication.
/decl/material/liquid/nutriment/oil/fish/affect_blood(var/mob/living/M, var/removed, var/datum/reagents/holder)
/decl/material/liquid/oil/fish/affect_blood(var/mob/living/M, var/removed, var/datum/reagents/holder)
. = ..()
M.add_chemical_effect(CE_BRAIN_REGEN, 0.5) // Half as effective as neuroannealer, without the side-effects.
2 changes: 1 addition & 1 deletion code/modules/reagents/reactions/reaction_alcohol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
/decl/chemical_reaction/recipe/beer
name = "Plain Beer"
result = /decl/material/liquid/alcohol/beer
required_reagents = list(/decl/material/liquid/nutriment/cornoil = 10)
required_reagents = list(/decl/material/liquid/oil/plant/corn = 10)
catalysts = list(/decl/material/liquid/enzyme = 5)
result_amount = 10
mix_message = "The solution roils as it rapidly ferments into a foaming amber liquid."
Expand Down
24 changes: 24 additions & 0 deletions code/modules/reagents/reactions/reaction_compounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,27 @@
/decl/chemical_reaction/compound/condensed_capsaicin/on_reaction(datum/reagents/holder, created_volume, reaction_flags, list/reaction_data)
. = ..()
holder?.add_reagent(/decl/material/liquid/water, created_volume)

// This is a bit silly, but we need a way to unify oil types until someone rewrites lanterns.
/decl/chemical_reaction/compound/fuel_oil
name = "Plant Fuel Oil"
result = /decl/material/liquid/oil
result_amount = 3
required_reagents = list(
/decl/material/liquid/oil/plant = 2,
/decl/material/solid/graphite = 1
)

/decl/chemical_reaction/compound/fuel_oil/corn
name = "Corn Fuel Oil"
required_reagents = list(
/decl/material/liquid/oil/plant/corn = 2,
/decl/material/solid/graphite = 1
)

/decl/chemical_reaction/compound/fuel_oil/fish
name = "Fish Fuel Oil"
required_reagents = list(
/decl/material/liquid/oil/fish = 2,
/decl/material/solid/graphite = 1
)
2 changes: 1 addition & 1 deletion code/modules/reagents/reactions/reaction_recipe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/decl/chemical_reaction/recipe/garlicsauce
name = "Garlic Sauce"
result = /decl/material/liquid/nutriment/garlicsauce
required_reagents = list(/decl/material/liquid/drink/juice/garlic = 1, /decl/material/liquid/nutriment/cornoil = 1)
required_reagents = list(/decl/material/liquid/drink/juice/garlic = 1, /decl/material/liquid/oil/plant/corn = 1)
result_amount = 2
mix_message = "The solution thickens into a creamy white oil."

Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reactions/reaction_recipe_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
name = "Enzyme Margarine"
required_reagents = list(
/decl/material/solid/sodiumchloride = 1,
/decl/material/liquid/nutriment/oil/plant = 20
/decl/material/liquid/oil/plant = 20
)
catalysts = list(/decl/material/liquid/enzyme = 5)
mix_message = "The solution thickens and curdles into a pale yellow solid."
Expand Down
16 changes: 12 additions & 4 deletions code/modules/reagents/reactions/reaction_synthesis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@
new /obj/item/stack/medical/resin/crafted(T, create_stacks)

/decl/chemical_reaction/synthesis/soap
name = "Handmade Soap"
name = "Handmade Plant Soap"
required_reagents = list(
/decl/material/solid/carbon/ashes = 5,
/decl/material/liquid/water = 5,
/decl/material/liquid/nutriment/oil/plant = 10
/decl/material/solid/carbon/ashes = 5,
/decl/material/liquid/water = 5,
/decl/material/liquid/oil/plant = 10
)
result_amount = 1
mix_message = "The solution thickens and solidifies."
Expand All @@ -147,6 +147,14 @@
for(var/i = 1 to create_soap)
new /obj/item/soap/crafted(T)

/decl/chemical_reaction/synthesis/soap/corn
name = "Handmade Corn Soap"
required_reagents = list(
/decl/material/solid/carbon/ashes = 5,
/decl/material/liquid/water = 5,
/decl/material/liquid/oil/plant/corn = 10
)

// Making chipboard out of wood scraps/recycled wood.
/decl/chemical_reaction/synthesis/chipboard
name = "Oak Chipboard"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
condiment_center_of_mass = @'{"x":16,"y":8}'

/decl/condiment_appearance/cornoil
condiment_type = /decl/material/liquid/nutriment/cornoil
condiment_type = /decl/material/liquid/oil/plant/corn
condiment_name = "corn oil"
condiment_desc = "A delicious oil used in cooking. Made from corn."
condiment_icon = 'icons/obj/food/condiments/cornoil.dmi'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
matter = list(/decl/material/solid/metal/steel = MATTER_AMOUNT_TRACE)

/obj/structure/synthesized_instrument/synthesizer/shouldStopPlaying(mob/user)
return !(src && in_range(src, user))
return !(src && in_range(src, user))
Binary file added icons/mob/simple_animal/fish_cave.dmi
Binary file not shown.
Binary file added icons/mob/simple_animal/fish_lantern.dmi
Binary file not shown.
4 changes: 2 additions & 2 deletions maps/shaded_hills/areas/grassland.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
sound_env = CAVE
area_flags = AREA_FLAG_IS_BACKGROUND
fishing_results = list(
/mob/living/simple_animal/aquatic/fish/cave = 13
/mob/living/simple_animal/aquatic/fish/lantern = 7
/mob/living/simple_animal/aquatic/fish/large/cave = 13,
/mob/living/simple_animal/aquatic/fish/large/lantern = 7,
/obj/item/mollusc = 5,
/obj/item/mollusc/barnacle/fished = 5,
/obj/item/mollusc/clam/fished/pearl = 3,
Expand Down
2 changes: 1 addition & 1 deletion maps/shaded_hills/shaded_hills_map.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/datum/map/shaded_hills
default_liquid_fuel_type = /decl/material/liquid/nutriment/oil/plant
default_liquid_fuel_type = /decl/material/liquid/oil
default_species = SPECIES_KOBALOI
loadout_categories = list(
/decl/loadout_category/fantasy/clothing,
Expand Down

0 comments on commit b0d53f6

Please sign in to comment.