Merge pull request #205 from Alphas00/master

Kudzu update, Munchies Weed
This commit is contained in:
evilew
2024-06-17 01:53:29 +02:00
committed by GitHub
13 changed files with 296 additions and 44 deletions
+7 -6
View File
@@ -43,12 +43,13 @@
/mob/living/carbon/proc/water_check(datum/gas_mixture/breath)
if(HAS_TRAIT(src, TRAIT_WATER_SPONGE))
if(breath.gases)
var/breath_gases = breath.gases
if(breath_gases[/datum/gas/water_vapor])
var/H2O_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/water_vapor])
reagents.add_reagent(/datum/reagent/water, H2O_pp/10)
breath_gases[/datum/gas/water_vapor] -= H2O_pp
if(breath)
if(breath.gases)
var/breath_gases = breath.gases
if(breath_gases[/datum/gas/water_vapor])
var/H2O_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/water_vapor])
reagents.add_reagent(/datum/reagent/water, H2O_pp/10)
breath_gases[/datum/gas/water_vapor] -= H2O_pp
/obj/structure/sink
var/mob/living/attached
@@ -0,0 +1,124 @@
/*/obj/item/seeds/lipoplant
name = "pack of adipolipus"
desc = "These seeds grow into a foreign plant."
icon_state = "seed-fat"
species = "adipolipus"
plantname = "Adipolipus"
product = /obj/item/reagent_containers/food/snacks/grown/lipofruit
lifespan = 30
potency = 20
maturation = 8
production = 5
yield = 1
growing_icon = 'icons/obj/hydroponics/growing_fruits.dmi'
icon_grow = "fat-grow" // Uses one growth icons set for all the subtypes
icon_dead = "fat-dead" // Same for the dead icon
reagents_add = list(/datum/reagent/consumable/lipoifier = 0.05)
/obj/item/reagent_containers/food/snacks/grown/lipofruit
seed = /obj/item/seeds/lipoplant
name = "lipofruit"
desc = "A foreign fruit with an hard shell. Perhaps something sharp could open it?"
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "lipofruit"
item_state = "lipofruit"
possible_transfer_amounts = list(5, 10, 15, 20, 25, 30, 50)
spillable = FALSE
resistance_flags = ACID_PROOF
volume = 150 //so it won't cut reagents despite having the capacity for them
w_class = WEIGHT_CLASS_SMALL
force = 5
throwforce = 5
hitsound = 'sound/weapons/klonk.ogg'
attack_verb = list("klonked", "donked", "bonked")
distill_reagent = "creme_de_coconut"
var/opened = FALSE
/obj/item/reagent_containers/food/snacks/grown/lipofruit/attackby(obj/item/W, mob/user, params)
if(!opened && W.sharpness)
user.show_message("<span class='notice'>You slice the fruit open!</span>", 1)
opened = TRUE
spillable = TRUE
reagent_flags = OPENCONTAINER
ENABLE_BITFIELD(reagents.reagents_holder_flags, OPENCONTAINER)
icon_state = "lipofruit_opened"
desc = "A foreign fruit with an hard shell, the liquid inside looks very inviting."
playsound(user, W.hitsound, 50, 1, -1)
return
return ..()
/obj/item/reagent_containers/food/snacks/grown/lipofruit/attack(mob/living/M, mob/user, obj/target)
if(!opened)
return
if(!canconsume(M, user))
return
if(!reagents || !reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(user.a_intent == INTENT_HARM && spillable)
var/R
M.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [M]!</span>",
"<span class='userdanger'>[user] splashes the contents of [src] onto [M]!</span>")
if(reagents)
for(var/datum/reagent/A in reagents.reagent_list)
R += A.type + " ("
R += num2text(A.volume) + "),"
if(isturf(target) && reagents.reagent_list.len && thrownby)
log_combat(thrownby, target, "splashed (thrown) [english_list(reagents.reagent_list)]")
message_admins("[ADMIN_LOOKUPFLW(thrownby)] splashed (thrown) [english_list(reagents.reagent_list)] on [target] at [ADMIN_VERBOSEJMP(target)].")
reagents.reaction(M, TOUCH)
log_combat(user, M, "splashed", R)
reagents.clear_reagents()
else
if(M != user)
M.visible_message("<span class='danger'>[user] attempts to feed something to [M].</span>",
"<span class='userdanger'>[user] attempts to feed something to you.</span>")
if(!do_mob(user, M))
return
if(!reagents || !reagents.total_volume)
return // The drink might be empty after the delay, such as by spam-feeding
M.visible_message("<span class='danger'>[user] feeds something to [M].</span>", "<span class='userdanger'>[user] feeds something to you.</span>")
log_combat(user, M, "fed", reagents.log_list())
else
to_chat(user, "<span class='notice'>You swallow a gulp of [src].</span>")
var/fraction = min(5/reagents.total_volume, 1)
reagents.reaction(M, INGEST, fraction)
addtimer(CALLBACK(reagents, TYPE_PROC_REF(/datum/reagents, trans_to), M, 5), 5)
playsound(M.loc,'sound/items/drink.ogg', rand(10,50), 1)
if(!reagents || !reagents.total_volume)
icon_state = "lipofruit_empty"
desc = "A foreign fruit with an hard shell."
/obj/item/reagent_containers/food/snacks/grown/lipofruit/afterattack(obj/target, mob/user, proximity)
. = ..()
if((!proximity) || !check_allowed_items(target,target_self=1))
return
if(target.is_refillable()) //Something like a glass. Player probably wants to transfer TO it.
if(!reagents.total_volume)
to_chat(user, "<span class='warning'>[src] is empty!</span>")
return
if(target.reagents.holder_full())
to_chat(user, "<span class='warning'>[target] is full.</span>")
return
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You transfer [trans] unit\s of the solution to [target].</span>")
else if(target.is_drainable()) //A dispenser. Transfer FROM it TO us.
if(!target.reagents.total_volume)
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
return
if(reagents.holder_full())
to_chat(user, "<span class='warning'>[src] is full.</span>")
return
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
else if(reagents.total_volume)
if(user.a_intent == INTENT_HARM && spillable == TRUE)
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
reagents.reaction(target, TOUCH)
reagents.clear_reagents()
if(reagents && reagents.total_volume)
icon_state = "lipofruit_opened"
desc = "A foreign fruit with an hard shell, the liquid inside looks very inviting."
*/
@@ -0,0 +1,53 @@
/mob/living/carbon
var/nutri_mult = 1
/obj/item/seeds/cannabis/munchies
name = "pack of munchies weed seeds"
desc = "These seeds grow into munchies weed."
icon_state = "seed-munchies"
species = "munchycannabis"
plantname = "Munchies Weed"
icon_grow = "munchycannabis-grow" // Uses one growth icons set for all the subtypes
icon_dead = "munchycannabis-dead" // Same for the dead icon
product = /obj/item/reagent_containers/food/snacks/grown/cannabis/munchies
genes = list(/datum/plant_gene/trait/repeated_harvest, /datum/plant_gene/trait/glow/orange)
mutatelist = list()
reagents_add = list(/datum/reagent/drug/space_drugs = 0.05,
/datum/reagent/drug/munchies = 0.10)
rarity = 69
/obj/item/reagent_containers/food/snacks/grown/cannabis/munchies
seed = /obj/item/seeds/cannabis/munchies
name = "munchies cannabis leaf"
desc = "You feel hungry just looking at it."
icon_state = "munchycannabis"
wine_power = 90
/datum/reagent/drug/munchies
name = "Appetite Stimulant"
value = 6
description = "A chemical compound that makes one mindlessly ravenous."
color = "#60A584"
pH = 9
metabolization_rate = REAGENTS_METABOLISM / 4
/datum/reagent/drug/munchies/on_mob_add(mob/living/L, amount)
. = ..()
if(iscarbon(L))
var/mob/living/carbon/C = L
C.nutri_mult += 0.5
/datum/reagent/drug/munchies/on_mob_delete(mob/living/L)
. = ..()
if(iscarbon(L))
var/mob/living/carbon/C = L
C.nutri_mult -= 0.5
/datum/reagent/drug/munchies/on_mob_life(mob/living/carbon/M)
. = ..()
if(prob(10))
to_chat(M, "<span class='warning'>[pick("You feel a little ravenous...", "You could really go feel for a snack right now...", "The taste of food seems really enticing right now...", "Your belly groans, demanding food...")]</span>")
if(M.fullness > 10)
M.fullness -= 1
if(M.nutrition > 150)
M.nutrition -= 1
+54 -12
View File
@@ -159,6 +159,7 @@
/datum/spacevine_mutation/transparency/on_grow(obj/structure/spacevine/holder)
holder.set_opacity(0)
holder.alpha = 125
holder.layer = BELOW_OPEN_DOOR_LAYER
/datum/spacevine_mutation/oxy_eater
name = "oxygen consuming"
@@ -270,6 +271,40 @@
if(prob(25))
holder.entangle(crosser)
/datum/spacevine_mutation/stable
name = "stable"
hue = "#2a8352"
quality = POSITIVE
/datum/spacevine_mutation/prickle //prickle reagent needs fixing
name = "prickly"
hue = "#797777"
severity = 10
quality = MINOR_NEGATIVE
/datum/spacevine_mutation/prickle/on_cross(obj/structure/spacevine/holder, mob/living/crosser)
if(prob(5))
var/datum/reagent/PR = holder.prickle_reagent
if(PR && istype(PR) && iscarbon(crosser))
var/mob/living/carbon/M = crosser
M.reagents.add_reagent(PR.type, 1)
to_chat(M, "<span class='alert'>You feel a prickle as you cross the vines.</span>")
/datum/spacevine_mutation/prickle/process_mutation(obj/structure/spacevine/holder)
if(holder.has_buckled_mobs())
var/datum/reagent/PR = holder.prickle_reagent
if(PR && istype(PR))
for(var/mob/living/carbon/C in holder.buckled_mobs)
C.reagents.add_reagent(PR.type, 2)
to_chat(C, "<span class='danger'>The vines prickle you!</span>")
/datum/spacevine_mutation/timid
name = "timid"
hue = "#2dad67"
quality = POSITIVE
/datum/spacevine_mutation/timid/on_buckle(obj/structure/spacevine/holder, mob/living/buckled)
holder.unbuckle_all_mobs()
// SPACE VINES (Note that this code is very similar to Biomass code)
/obj/structure/spacevine
@@ -286,6 +321,7 @@
var/energy = 0
var/datum/spacevine_controller/master = null
var/list/mutations = list()
var/prickle_reagent
/obj/structure/spacevine/Initialize()
. = ..()
@@ -378,10 +414,10 @@
var/list/vine_mutations_list
var/mutativeness = 1
/datum/spacevine_controller/New(turf/location, list/muts, potency, production)
/datum/spacevine_controller/New(turf/location, list/muts, potency, production, areagent)
vines = list()
growth_queue = list()
spawn_spacevine_piece(location, null, muts)
spawn_spacevine_piece(location, null, muts, areagent)
START_PROCESSING(SSobj, src)
vine_mutations_list = list()
init_subtypes(/datum/spacevine_mutation/, vine_mutations_list)
@@ -408,22 +444,28 @@
STOP_PROCESSING(SSobj, src)
return ..()
/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts)
/datum/spacevine_controller/proc/spawn_spacevine_piece(turf/location, obj/structure/spacevine/parent, list/muts, thereagent)
var/obj/structure/spacevine/SV = new(location)
growth_queue += SV
vines += SV
SV.master = src
if(muts && muts.len)
for(var/datum/spacevine_mutation/M in muts)
M.add_mutation_to_vinepiece(SV)
return
if(parent)
SV.mutations |= parent.mutations
SV.prickle_reagent = parent.prickle_reagent
var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
if(prob(mutativeness))
for(var/datum/spacevine_mutation/stable/SM in SV.mutations)
return
var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations)
randmut.add_mutation_to_vinepiece(SV)
else
for(var/A in muts)
var/datum/spacevine_mutation/M = A
SV.mutations |= M
SV.prickle_reagent = thereagent
SV.add_atom_colour(M.hue, FIXED_COLOUR_PRIORITY)
return
for(var/datum/spacevine_mutation/SM in SV.mutations)
SM.on_birth(SV)
@@ -436,6 +478,7 @@
if(!vines.len)
var/obj/item/seeds/kudzu/KZ = new(S.loc)
KZ.mutations |= S.mutations
KZ.prickle_reagent = S.prickle_reagent
KZ.set_potency(mutativeness * 10)
KZ.set_production((spread_cap / initial(spread_cap)) * 5)
qdel(src)
@@ -466,8 +509,7 @@
if(prob(20))
SV.grow()
else //If tile is fully grown
SV.entangle_mob()
SV.entangle_mob()
SV.spread()
if(i >= length)
break
@@ -497,11 +539,11 @@
/obj/structure/spacevine/proc/entangle(mob/living/V)
if(!V || isvineimmune(V))
return
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_buckle(src, V)
if((V.stat != DEAD) && (V.buckled != src)) //not dead or captured
to_chat(V, "<span class='danger'>The vines [pick("wind", "tangle", "tighten")] around you!</span>")
buckle_mob(V, 1)
for(var/datum/spacevine_mutation/SM in mutations)
SM.on_buckle(src, V)
/obj/structure/spacevine/proc/spread()
var/direction = pick(GLOB.cardinals)
@@ -512,7 +554,7 @@
stepturf = get_step(src,direction) //in case turf changes, to make sure no runtimes happen
if(!locate(/obj/structure/spacevine, stepturf))
if(master)
master.spawn_spacevine_piece(stepturf, src)
master.spawn_spacevine_piece(stepturf, src, null, prickle_reagent)
/obj/structure/spacevine/ex_act(severity, target)
if(istype(target, type)) //if its agressive spread vine dont do anything
+2 -1
View File
@@ -14,7 +14,8 @@
icon_dead = "cannabis-dead" // Same for the dead icon
genes = list(/datum/plant_gene/trait/repeated_harvest)
mutatelist = list(/obj/item/seeds/cannabis/rainbow,
/obj/item/seeds/cannabis/death)
/obj/item/seeds/cannabis/death,
/obj/item/seeds/cannabis/munchies)
reagents_add = list(/datum/reagent/drug/space_drugs = 0.15, /datum/reagent/medicine/lipolicide = 0.35) // gives u the munchies
/obj/item/seeds/cannabis/rainbow
+45 -18
View File
@@ -16,9 +16,18 @@
var/list/mutations = list()
reagents_add = list(/datum/reagent/medicine/charcoal = 0.04, /datum/reagent/consumable/nutriment = 0.02)
var/list/muts_list = list()
var/prickle_reagent
/obj/item/seeds/kudzu/Initialize(mapload, nogenes)
. = ..()
for(var/A in subtypesof(/datum/spacevine_mutation))
muts_list += new A()
/obj/item/seeds/kudzu/Copy()
var/obj/item/seeds/kudzu/S = ..()
S.mutations = mutations.Copy()
S.prickle_reagent = prickle_reagent
return S
/obj/item/seeds/kudzu/suicide_act(mob/user)
@@ -38,7 +47,7 @@
to_chat(user, "<span class='notice'>You plant [src].</span>")
message_admins("Kudzu planted by [ADMIN_LOOKUPFLW(user)] at [ADMIN_VERBOSEJMP(user)]")
investigate_log("was planted by [key_name(user)] at [AREACOORD(user)]", INVESTIGATE_BOTANY)
new /datum/spacevine_controller(get_turf(user), mutations, potency, production)
new /datum/spacevine_controller(get_turf(user), mutations, potency, production, prickle_reagent)
qdel(src)
/obj/item/seeds/kudzu/attack_self(mob/user)
@@ -50,50 +59,61 @@
/obj/item/seeds/kudzu/get_analyzer_text()
var/text = ..()
var/text_string = ""
for(var/datum/spacevine_mutation/SM in mutations)
for(var/A in mutations)
var/datum/spacevine_mutation/SM = A
text_string += "[(text_string == "") ? "" : ", "][SM.name]"
text += "\n- Plant Mutations: [(text_string == "") ? "None" : text_string]"
if(prickle_reagent)
text += "\n- Plant Chemical: [prickle_reagent]"
return text
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/S)
var/list/temp_mut_list = list()
if(S.has_reagent(/datum/reagent/space_cleaner/sterilizine, 5))
for(var/datum/spacevine_mutation/SM in mutations)
for(var/A in mutations)
var/datum/spacevine_mutation/SM = A
if(SM.quality == NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent(/datum/reagent/fuel, 5))
for(var/datum/spacevine_mutation/SM in mutations)
else if(S.has_reagent(/datum/reagent/fuel, 5))
for(var/A in mutations)
var/datum/spacevine_mutation/SM = A
if(SM.quality == POSITIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent(/datum/reagent/phenol, 5))
for(var/datum/spacevine_mutation/SM in mutations)
else if(S.has_reagent(/datum/reagent/phenol, 5))
for(var/A in mutations)
var/datum/spacevine_mutation/SM = A
if(SM.quality == MINOR_NEGATIVE)
temp_mut_list += SM
if(prob(20) && temp_mut_list.len)
mutations.Remove(pick(temp_mut_list))
temp_mut_list.Cut()
if(S.has_reagent(/datum/reagent/blood, 15))
else if(S.has_reagent(/datum/reagent/blood, 15))
adjust_production(rand(15, -5))
if(S.has_reagent(/datum/reagent/toxin/amatoxin, 5))
else if(S.has_reagent(/datum/reagent/toxin/amatoxin, 5))
adjust_production(rand(5, -15))
if(S.has_reagent(/datum/reagent/toxin/plasma, 5))
else if(S.has_reagent(/datum/reagent/toxin/plasma, 5))
adjust_potency(rand(5, -15))
if(S.has_reagent(/datum/reagent/water/holywater, 10))
else if(S.has_reagent(/datum/reagent/water/holywater, 10))
adjust_potency(rand(15, -5))
else
if(S.has_reagent(/datum/reagent/drug/space_drugs, 5))
if(prob(20) && (muts_list - mutations).len > 0)
var/datum/spacevine_mutation/mut = pick(muts_list - mutations)
if(!(mut in mutations))
mutations |= mut
src.visible_message("<span class='alert'>[src.plantname] seems to react with the chemical...</span>")
return
if(S.reagent_list.len > 0)
prickle_reagent = S.get_master_reagent().type
prickle_reagent = new prickle_reagent()
src.visible_message("<span class='alert'>[src.plantname] seems to absorb the chemical...</span>")
/obj/item/reagent_containers/food/snacks/grown/kudzupod
seed = /obj/item/seeds/kudzu
@@ -105,3 +125,10 @@
foodtype = VEGETABLES | GROSS
tastes = list("kudzu" = 1)
wine_power = 20
/*/obj/item/seeds/kudzu/test
potency = 100
yield = 10
maturation = 1
production = 1
mutations = list(new /datum/spacevine_mutation/prickle(), new /datum/spacevine_mutation/stable())*/
+5
View File
@@ -356,6 +356,11 @@ datum/plant_gene/trait/glow/white
name = "Pink Bioluminescence"
glow_color = "#FFB3DA"
/datum/plant_gene/trait/glow/orange
//GS13
name = "Orange Bioluminescence"
glow_color = "#f59c18"
//Change grow, harvest, and crafted food's color
//Made for mostly being fancy with stuff. Should be rare or hard to obtain, with the exception of strange seeds
/datum/plant_gene/trait/modified_color
@@ -17,7 +17,7 @@
/datum/reagent/consumable/on_mob_life(mob/living/carbon/M)
current_cycle++
M.nutrition += nutriment_factor
M.nutrition += nutriment_factor * M.nutri_mult //GS13 nutriment multiplier to make nutrition stronger based on certain effects
M.thirst += hydration
holder.remove_reagent(type, metabolization_rate)
+2 -1
View File
@@ -74,7 +74,8 @@
if(!do_after(user,50,target=src))
to_chat(user,"You need to stand still to extract the seeds.")
return
var/seed = pick(list( /obj/item/seeds/amauri,
var/seed = pick(list( ///obj/item/seeds/lipoplant,
/obj/item/seeds/amauri,
/obj/item/seeds/gelthi,
/obj/item/seeds/jurlmah,
/obj/item/seeds/nofruit,
@@ -7,7 +7,6 @@ GLOBAL_LIST_INIT(bas_artifact,list( /obj/item/kitchen/fork=1,
/obj/item/trash/plate=1,
/obj/item/extendohand=1,
/obj/item/toy/plush/random=1,
/obj/item/clothing/head/condom=1,
/obj/item/ancientartifact/useless=11
))
@@ -17,9 +16,7 @@ GLOBAL_LIST_INIT(adv_artifact,list( /obj/item/shield/riot/roman=1,
/obj/item/stack/telecrystal=1,
/obj/item/sharpener=1,
/obj/item/switchblade=1,
/obj/item/laser_pointer=1,
/obj/item/instrument/piano_synth=1,
/obj/item/megaphone=1,
/obj/item/storage/backpack/satchel/bone=1,
/obj/item/clothing/accessory/talisman=1,
/obj/item/clothing/accessory/skullcodpiece=1,
@@ -31,9 +28,8 @@ GLOBAL_LIST_INIT(adv_artifact,list( /obj/item/shield/riot/roman=1,
/obj/item/reagent_containers/pill/floorpill=1,
/obj/item/survivalcapsule/luxury=1,
/obj/item/slime_extract/grey=1,
/obj/item/ancientartifact/useless=5,
/obj/item/ancientartifact/faunafossil=10,
/obj/item/ancientartifact/florafossil=10
/obj/item/ancientartifact/florafossil=20
))
GLOBAL_LIST_INIT(ult_artifact,list( /obj/item/nuke_core/supermatter_sliver=1,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

+2
View File
@@ -3113,6 +3113,8 @@
#include "GainStation13\code\modules\food_and_drinks\objects\candy_flora.dm"
#include "GainStation13\code\modules\food_and_drinks\recipes\recipes_ported.dm"
#include "GainStation13\code\modules\gym\gym.dm"
#include "GainStation13\code\modules\hydroponics\lipoplant.dm"
#include "GainStation13\code\modules\hydroponics\munchies_weed.dm"
#include "GainStation13\code\modules\hydroponics\grown\berries.dm"
#include "GainStation13\code\modules\mob\living\emote.dm"
#include "GainStation13\code\modules\mob\living\emote_modular.dm"