Merge pull request #197 from Alphas00/master

Metal Cruncher quirk
This commit is contained in:
evilew
2024-06-07 15:03:54 +02:00
committed by GitHub
13 changed files with 297 additions and 71 deletions
@@ -57,7 +57,7 @@
affected_mob.reagents.remove_reagent(/datum/reagent/berry_juice_infection, volume)
return
picked_color = pick(random_color_list)
affected_mob.fat_hide(affected_mob.fatness_real + ((3 * (volume * volume))/50), src)
affected_mob.hider_add(src)
else
L.reagents.remove_reagent(/datum/reagent/berry_juice_infection, volume)
..()
@@ -68,7 +68,6 @@
return
if(!no_mob_color)
M.add_atom_colour(picked_color, WASHABLE_COLOUR_PRIORITY)
M.fat_hide(M.fatness_real + ((3 * (volume * volume))/50), src)
M.adjust_fatness(1, FATTENING_TYPE_CHEM)
..()
@@ -76,7 +75,7 @@
if(!iscarbon(L))
return
var/mob/living/carbon/C = L
C.fat_show()
C.hider_remove(src)
/obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target)
if(M.reagents.get_reagent_amount(/datum/reagent/berry_juice_infection) > 0 && (reagents.total_volume + min(amount_per_transfer_from_this, 10)) <= volume)
@@ -89,3 +88,6 @@
to_chat(user, "<span class='warning'>You get some juice out of you...</span>")
return
..()
/datum/reagent/berry_juice_infection/proc/fat_hide()
return (3 * (volume * volume))/50
+42 -22
View File
@@ -5,12 +5,10 @@
// -fatness_real is the value a mob is actually at, even if it's being hidden. For permanent changes, use this one
//What level of fatness is the parent mob currently at?
var/fatness = 0
//Is something hiding the actual fatness value of a character?
var/fat_hider = FALSE
//The list of items/effects that are being added/subtracted from our real fatness
var/fat_hiders = list()
//The actual value a mob is at. Is equal to fatness if fat_hider is FALSE.
var/fatness_real = 0
//The value a mob's fatness is being overwritten with if fat_hider has something in it.
var/fatness_over = 0
///At what rate does the parent mob gain weight? 1 = 100%
var/weight_gain_rate = 1
//At what rate does the parent mob lose weight? 1 = 100%
@@ -44,13 +42,9 @@
if(client?.prefs?.max_weight) // GS13
fatness_real = min(fatness_real, (client?.prefs?.max_weight - 1))
if(fat_hider) //If a character's real fatness is being hidden
if(client?.prefs?.max_weight) //Check their prefs
fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max
fatness = fatness_real //Make their current fatness their real fatness
fatness = fatness_over //Then, make that value their current fatness
else //If it's not being hidden
fatness = fatness_real //Make their current fatness their real fatness
hiders_apply() //Check and apply hiders
if(client?.prefs?.weight_gain_extreme)
xwg_resize()
@@ -102,23 +96,45 @@
return TRUE
/mob/living/carbon/proc/fat_hide(hide_amount, hide_source) //If something wants to hide fatness_real, it'll call this method and give it an amount to cover it with
fat_hider = hide_source
fatness_over = hide_amount
fatness = fatness_over //To update a mob's fatness with the new amount to be shown immediately
if(client?.prefs?.weight_gain_extreme)
xwg_resize()
// THE FATNESS HIDING GUIDE!!!
// HOW 2 FATNESS HIDE
//Step 1) Grab a thing that will add or reduce fatness!
//Step 2) Give it a character.hider_add(src) and a character.hider_remove(src) depending on the conditions you want it to meet for which it will add or remove itself from messing with a character's fatness!
//Step 3) Give it a proc/fat_hide([character argument]), with a return that will give the amount to shift that character's fatness by!
//Step 4) There is no step 4, you did it bucko!
//Wanna see an example? Search for /obj/item/bluespace_belt !!!
/mob/living/carbon/proc/hider_add(hide_source)
if(!(hide_source in fat_hiders))
fat_hiders += hide_source
return TRUE
/mob/living/carbon/proc/fat_show() //If something that hides fatness is removed or expires, it'll call this method
fat_hider = FALSE
fatness = fatness_real //To update a mob's fatness with their real one immediately
if(client?.prefs?.weight_gain_extreme)
xwg_resize()
/mob/living/carbon/proc/hider_remove(hide_source)
if(hide_source in fat_hiders)
fat_hiders -= hide_source
return TRUE
/mob/living/carbon/proc/hiders_calc()
var/hiders_value = 0
for(var/hider in fat_hiders)
var/hide_values = hider:fat_hide(src)
if(!islist(hide_values))
hiders_value += hide_values
else
for(var/hide_value in hide_values)
hiders_value += hide_value
return hiders_value
/mob/living/carbon/proc/hiders_apply()
if(fat_hiders) //do we have any hiders active?
var/fatness_over = hiders_calc() //calculate the sum of all hiders
if(client?.prefs?.max_weight) //Check their prefs
fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max
fatness = fatness_real + fatness_over //Then, make their current fatness the sum of their real plus/minus the calculated amount
if(client?.prefs?.weight_gain_extreme)
xwg_resize()
/mob/living/carbon/proc/xwg_resize()
var/xwg_size = sqrt(fatness/FATNESS_LEVEL_BLOB)
xwg_size = min(xwg_size, RESIZE_HUGE)
@@ -146,3 +162,7 @@
return "Immobile"
return "Blob"
/mob/living/carbon/human/handle_breathing(times_fired)
. = ..()
hiders_apply()
@@ -0,0 +1,87 @@
/datum/quirk/metal_cruncher
name = "Metal Cruncher"
desc = "You can eat most minerals. Brush your teeth."
value = 0 //ERP quirk
gain_text = "<span class='notice'>You feel like you could eat steel.</span>"
lose_text = "<span class='notice'>Your teeth hurt too much...</span>"
category = CATEGORY_FOOD
mob_trait = TRAIT_METAL_CRUNCHER
/obj/item/stack
var/crunch_value = 0
/obj/item/stack/attack(mob/living/M, mob/living/user)
if(HAS_TRAIT(M, TRAIT_METAL_CRUNCHER))
if(crunch_value > 0)
if(M == user)
user.visible_message("<span class='notice'>[user] crunches on some of [src].</span>", "<span class='notice'>You crunch on some of [src].</span>")
else
M.visible_message("<span class='danger'>[user] attempts to feed some of [src] to [M].</span>", "<span class='userdanger'>[user] attempts to feed some of [src] to [M].</span>")
playsound(M,'sound/items/eatfood.ogg', rand(10,50), 1)
use(1)
M.nutrition += crunch_value
if(HAS_TRAIT(M, TRAIT_VORACIOUS))
M.changeNext_move(CLICK_CD_MELEE * 0.5)
return
. = ..()
/obj/item/stack/cable_coil
crunch_value = 2
/obj/item/stack/sheet/metal
crunch_value = 4
/obj/item/stack/rods
crunch_value = 2
/obj/item/stack/sheet/glass
crunch_value = 2
/obj/item/stack/sheet/rglass
crunch_value = 4
/obj/item/stack/sheet/plasmaglass
crunch_value = 12
/obj/item/stack/sheet/plasmarglass
crunch_value = 14
/obj/item/stack/sheet/titaniumglass
crunch_value = 27
/obj/item/stack/sheet/plastitaniumglass
crunch_value = 37
/obj/item/stack/sheet/plasteel
crunch_value = 14
/obj/item/stack/sheet/durathread
crunch_value = 10
/obj/item/stack/sheet/plastic
crunch_value = 2
/obj/item/stack/sheet/micro_bricks
crunch_value = 1
/obj/item/stack/sheet/cardboard
crunch_value = 1
/obj/item/stack/sheet/mineral/calorite
crunch_value = 100
/obj/item/stack/sheet/mineral/sandstone
crunch_value = 1
/obj/item/stack/sheet/mineral/uranium
crunch_value = 50
/obj/item/stack/sheet/mineral/plasma
crunch_value = 10
/obj/item/stack/sheet/mineral/gold
crunch_value = 20
/obj/item/stack/sheet/mineral/silver
crunch_value = 15
/obj/item/stack/sheet/mineral/titanium
crunch_value = 25
/obj/item/stack/sheet/mineral/plastitanium
crunch_value = 35
/obj/item/stack/sheet/mineral/adamantine
crunch_value = 75
/obj/item/stack/sheet/mineral/mythril
crunch_value = 75
/obj/item/stack/sheet/mineral/coal
crunch_value = 50
/obj/item/stack/sheet/mineral/wood
crunch_value = 4
/obj/item/stack/sheet/mineral/bamboo
crunch_value = 10
/obj/item/stack/sheet/mineral/shadoww
crunch_value = 15
/obj/item/stack/sheet/mineral/gmushroom
crunch_value = 15
/obj/item/stack/sheet/mineral/plaswood
crunch_value = 15
@@ -0,0 +1,84 @@
/datum/quirk/water_sponge
name = "Water Sponge"
desc = "You can hold lots of water in you! Careful with showers!"
value = 0 //ERP quirk
gain_text = "<span class='notice'>You feel absorbant.</span>"
lose_text = "<span class='notice'>You don't feel absorbant anymore.</span>"
category = CATEGORY_FOOD
mob_trait = TRAIT_WATER_SPONGE
/datum/reagent/water/on_mob_add(mob/living/L, amount)
if(HAS_TRAIT(L, TRAIT_WATER_SPONGE))
if(iscarbon(L))
var/mob/living/carbon/C = L
C.hider_add(src)
. = ..()
/datum/reagent/water/on_mob_delete(mob/living/L)
if(HAS_TRAIT(L, TRAIT_WATER_SPONGE))
if(iscarbon(L))
var/mob/living/carbon/C = L
C.hider_remove(src)
. = ..()
/datum/reagent/water/reaction_mob(mob/living/M, method, reac_volume)
. = ..()
if(HAS_TRAIT(M, TRAIT_WATER_SPONGE))
if(method == TOUCH)
M.reagents.add_reagent(/datum/reagent/water, reac_volume/2)
if(method == VAPOR)
M.reagents.add_reagent(/datum/reagent/water, reac_volume/3)
/datum/reagent/water/proc/fat_hide(mob/living/carbon/user)
return volume * 3.5
/obj/machinery/shower/process()
..()
for(var/atom/movable/AM in loc)
if(iscarbon(AM))
if(HAS_TRAIT(AM, TRAIT_WATER_SPONGE))
var/mob/living/carbon/L = AM
L.reagents.add_reagent(/datum/reagent/water, 3)
/mob/living/carbon/proc/water_check(datum/gas_mixture/breath)
var/breath_gases = breath.gases
if(breath_gases[/datum/gas/water_vapor])
if(HAS_TRAIT(src, TRAIT_WATER_SPONGE))
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
/obj/structure/sink/MouseDrop(mob/living/target)
. = ..()
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target))
return
if(attached)
visible_message("<span class='warning'>[attached] is detached from [src].</span>")
attached = null
return
if(Adjacent(target) && usr.Adjacent(target))
usr.visible_message("<span class='warning'>[usr] attaches [target] to [src].</span>", "<span class='notice'>You attach [target] to [src].</span>")
add_fingerprint(usr)
attached = target
START_PROCESSING(SSobj, src)
/obj/structure/sink/process()
if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
to_chat(attached, "<span class='userdanger'>[attached] is ripped from the sink!</span>") // GS13
attached = null
return PROCESS_KILL
if(attached)
playsound(attached, 'sound/vore/pred/swallow_02.ogg', rand(10,50), 1)
attached.reagents.add_reagent(/datum/reagent/water, 5)
else
return PROCESS_KILL
/obj/structure/sink/attack_hand(mob/living/user)
if(attached)
visible_message("[attached] is detached from [src]")
attached = null
return
+13 -6
View File
@@ -8,20 +8,27 @@
equip_sound = 'sound/items/equip/toolbelt_equip.ogg'
drop_sound = 'sound/items/handling/toolbelt_drop.ogg'
pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg'
var/hide_value = 0
/obj/item/bluespace_belt/equipped(mob/user, slot)
..()
if(!iscarbon(user))
return
var/mob/living/carbon/U = user
if(slot == SLOT_BELT)
to_chat(user, "<span class='notice'>You put the belt around your waist and your mass begins to shrink...</span>")
U.fat_hide(hide_value, src)
to_chat(U, "<span class='notice'>You put the belt around your waist and your mass begins to shrink...</span>")
U.hider_add(src)
else
to_chat(user, "<span class='notice'>The belt is opened, letting your mass flow out!</span>")
U.fat_show()
U.hider_remove(src)
/obj/item/bluespace_belt/dropped(mob/user)
..()
to_chat(user, "<span class='warning'>The belt is opened, letting your mass flow out!</span>")
if(!iscarbon(user))
return
var/mob/living/carbon/U = user
U.fat_show()
to_chat(U, "<span class='warning'>The belt is opened, letting your mass flow out!</span>")
U.hider_remove(src)
/obj/item/bluespace_belt/proc/fat_hide(var/mob/living/carbon/user)
return -(user.fatness_real - 1)
+9 -9
View File
@@ -2,9 +2,9 @@
. = ..()
if(iscarbon(target))
var/mob/living/carbon/T = target
if(T.fat_hider)
if(isitem(T.fat_hider))
var/obj/item/O = T.fat_hider
for(var/hider in T.fat_hiders)
if(isitem(hider))
var/obj/item/O = hider
T.dropItemToGround(O)
if(T.cursed_fat == 1)
T.cursed_fat = 0
@@ -14,9 +14,9 @@
. = ..()
if(iscarbon(M))
var/mob/living/carbon/T = M
if(T.fat_hider)
if(isitem(T.fat_hider))
var/obj/item/O = T.fat_hider
for(var/hider in T.fat_hiders)
if(isitem(hider))
var/obj/item/O = hider
T.dropItemToGround(O)
if(T.cursed_fat == 1)
T.cursed_fat = 0
@@ -24,9 +24,9 @@
/datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M)
. = ..()
if(M.fat_hider)
if(isitem(M.fat_hider))
var/obj/item/O = M.fat_hider
for(var/hider in M.fat_hiders)
if(isitem(hider))
var/obj/item/O = hider
M.dropItemToGround(O)
if(M.cursed_fat == 1)
M.cursed_fat = 0
+2
View File
@@ -204,6 +204,8 @@
#define TRAIT_WEAKLEGS "weak_legs"
#define TRAIT_STRONGLEGS "strong_legs"
#define TRAIT_WEB_WEAVER "web_weaving"
#define TRAIT_METAL_CRUNCHER "metal_cruncher"
#define TRAIT_WATER_SPONGE "water_sponge"
//Hyper
#define TRAIT_MACROPHILE "macrophile" //likes the big
@@ -108,6 +108,8 @@
var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src))
B.beehome = src
B.assign_reagent(queen_bee.beegent)
if(queen_bee.paxed)
B.paxed = TRUE
bees += B
@@ -55,6 +55,8 @@
var/static/beehometypecache = typecacheof(/obj/structure/beebox)
var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics)
var/paxed = FALSE
/mob/living/simple_animal/hostile/poison/bees/Initialize()
. = ..()
generate_bee_visuals()
@@ -135,13 +137,13 @@
wanted_objects -= beehometypecache //so we don't attack beeboxes when not going home
return //no don't attack the goddamm box
else
. = ..()
if(. && beegent && isliving(target))
var/mob/living/L = target
if(L.reagents)
beegent.reaction_mob(L, INJECT)
L.reagents.add_reagent(beegent.type, rand(1,5))
if(!paxed)
. = ..()
if(. && beegent && isliving(target))
var/mob/living/L = target
if(L.reagents)
beegent.reaction_mob(L, INJECT)
L.reagents.add_reagent(beegent.type, rand(1,5))
/mob/living/simple_animal/hostile/poison/bees/proc/assign_reagent(datum/reagent/R)
if(istype(R))
@@ -249,7 +251,6 @@
icon = 'icons/mob/bees.dmi'
var/mob/living/simple_animal/hostile/poison/bees/queen/queen
/obj/item/queen_bee/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/S = I
@@ -265,6 +266,10 @@
user.visible_message("<span class='notice'>[user] injects [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>","<span class ='warning'>You inject [src] with royal bee jelly, causing it to split into two bees, MORE BEES!</span>")
else
to_chat(user, "<span class='warning'>You don't have enough royal bee jelly to split a bee in two!</span>")
if(S.reagents.get_reagent_amount(/datum/reagent/pax) >= 5 && !queen.paxed)
user.visible_message("<span class='notice'>[user] injects [src] with something, it looks relaxed!</span>","<span class ='warning'>You inject [src] with pax, it look relaxed!</span>")
S.reagents.remove_reagent(/datum/reagent/pax, 5)
queen.paxed = TRUE
else
var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()]
if(R && S.reagents.has_reagent(R.type, 5))
+1
View File
@@ -102,6 +102,7 @@
/obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
//TODO: add lung damage = less oxygen gains
H.water_check(breath) //GS13 Water Sponge quirk
var/breathModifier = (5-(5*(damage/maxHealth)/2)) //range 2.5 - 5
if((H.status_flags & GODMODE))
return
@@ -227,10 +227,9 @@
items_preserved.Cut()
owner.update_icons()
var/mob/living/carbon/predator = owner
if(iscarbon(predator))
if(digest_mode == DM_FATTEN && predator.fat_hider == src)
predator.fat_show()
if(iscarbon(owner))
var/mob/living/carbon/predator = owner
predator.hider_remove(src)
return count
@@ -279,16 +278,17 @@
owner.visible_message("<font color='green'><b>[owner] expels [M] from their [lowertext(name)]!</b></font>")
owner.update_icons()
var/mob/living/carbon/predator = owner
if(iscarbon(predator))
if(digest_mode == DM_FATTEN && predator.fat_hider == src)
var/preys_fatness = 0
for(var/mob/living/carbon/prey in contents)
preys_fatness += prey.fatness
if(preys_fatness > predator.fatness)
predator.fat_hide(preys_fatness, src)
else
predator.fat_show()
if(iscarbon(owner))
var/mob/living/carbon/predator = owner
var/found = FALSE
for(var/prey in contents)
if(istype(prey, /mob/living/carbon))
found = TRUE
if(found)
predator.hider_add(src)
else
predator.hider_remove(src)
return TRUE
// Actually perform the mechanics of devouring the tasty prey.
@@ -695,3 +695,11 @@
for(var/I in emote_lists[K])
dupe.emote_lists[K] += I
return dupe
/obj/belly/proc/fat_hide(var/mob/living/carbon/user)
var/preys_fatness = 0
for(var/prey in contents)
if(iscarbon(prey))
var/mob/living/carbon/cprey = prey
preys_fatness += cprey.fatness
return preys_fatness
@@ -58,6 +58,18 @@
var/sound/pred_death = sound(get_sfx("death_pred"))
var/turf/source = get_turf(owner)
////////////////////////// Vore Fatness /////////////////////////////
if(iscarbon(owner))
var/mob/living/carbon/predator = owner
var/found = FALSE
for(var/prey in contents)
if(istype(prey, /mob/living/carbon))
found = TRUE
if(found)
predator.hider_add(src)
else
predator.hider_remove(src)
///////////////////////////// DM_HOLD /////////////////////////////
if(digest_mode == DM_HOLD)
return SSBELLIES_PROCESSED
@@ -65,8 +77,8 @@
///////////////////////////// DM_FATTEN /////////////////////////////
if(digest_mode == DM_FATTEN)
var/preys_fatness = 0
var/mob/living/carbon/predator = owner
if(iscarbon(predator))
if(iscarbon(owner))
var/mob/living/carbon/predator = owner
for(var/mob/living/M in contents)
var/mob/living/carbon/prey = M
if(iscarbon(prey) && predator.fatness_real)
@@ -77,12 +89,6 @@
predator.nutrition -= 3
preys_fatness += prey.fatness
if(!predator.fat_hider || predator.fat_hider == src)
if(preys_fatness > predator.fatness)
predator.fat_hide(preys_fatness, src)
if(predator.fat_hider != src)
predator.fat_show()
//////////////////////////// DM_DIGEST ////////////////////////////
else if(digest_mode == DM_DIGEST)
if(HAS_TRAIT(owner, TRAIT_PACIFISM)) //obvious.
+3 -1
View File
@@ -2784,7 +2784,6 @@
#include "code\modules\research\nanites\nanite_program_hub.dm"
#include "code\modules\research\nanites\nanite_programmer.dm"
#include "code\modules\research\nanites\nanite_programs.dm"
#include "code\modules\research\nanites\nanite_programs\protocols.dm"
#include "code\modules\research\nanites\nanite_remote.dm"
#include "code\modules\research\nanites\program_disks.dm"
#include "code\modules\research\nanites\public_chamber.dm"
@@ -2796,6 +2795,7 @@
#include "code\modules\research\nanites\extra_settings\type.dm"
#include "code\modules\research\nanites\nanite_programs\buffing.dm"
#include "code\modules\research\nanites\nanite_programs\healing.dm"
#include "code\modules\research\nanites\nanite_programs\protocols.dm"
#include "code\modules\research\nanites\nanite_programs\rogue.dm"
#include "code\modules\research\nanites\nanite_programs\sensor.dm"
#include "code\modules\research\nanites\nanite_programs\suppression.dm"
@@ -3094,8 +3094,10 @@
#include "GainStation13\code\mechanics\fatness.dm"
#include "GainStation13\code\mechanics\fattening_trap.dm"
#include "GainStation13\code\mechanics\infestation.dm"
#include "GainStation13\code\mechanics\metal_cruncher.dm"
#include "GainStation13\code\mechanics\spells.dm"
#include "GainStation13\code\mechanics\wand.dm"
#include "GainStation13\code\mechanics\water_sponge.dm"
#include "GainStation13\code\mechanics\web_weaving.dm"
#include "GainStation13\code\mechanics\den abductors\console.dm"
#include "GainStation13\code\mechanics\den abductors\purchaseble_goodies.dm"