Skip to content

Commit

Permalink
it WORKS
Browse files Browse the repository at this point in the history
  • Loading branch information
Glyphee committed Oct 14, 2023
1 parent 47573c6 commit d8f354b
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
return possible_values_for_sprite_accessory_list_for_body_part(
GLOB.floran_leaves_list,
"floran_leaves",
list("FRONT"),
list("ADJ"),
)

/datum/preference/choiced/floran_leaves/apply_to_human(mob/living/carbon/human/target, value)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/datum/sprite_accessory/floran_leaves
icon = 'monkestation/icons/mob/species/floran/floran_leaves.dmi'
color_src = MUTCOLORS_SECONDARY
color_src = MUTCOLORS
//Should be MUTCOLORS_SECONDARY, but while its not working it will be the inverse of MUTCOLORS

/datum/sprite_accessory/floran_leaves/furnivour
name = "Furnivour"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
species_traits = list(
MUTCOLORS,
MUTCOLORS_SECONDARY,
NO_UNDERWEAR
NO_UNDERWEAR,
)
inherent_traits = list(
TRAIT_PLANT_SAFE,
Expand Down Expand Up @@ -46,23 +46,16 @@
if(H.stat == DEAD)
return

var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/light_amount = 0
if(isturf(H.loc))
var/turf/T = H.loc
light_amount = min(1, T.get_lumcount()) - 0.5
//Removed nutrition gain from sunlight, now they gotta eats
if(light_amount > 0.3) //if there's enough light, heal. Raised from 0.2
if(light_amount > 0.3) //Raised from 0.2
H.heal_overall_damage(brute = 0.25 * seconds_per_tick, burn = 0.25 * seconds_per_tick, required_bodytype = BODYTYPE_ORGANIC) //Lowered to 0.25
H.adjustToxLoss(-0.25 * seconds_per_tick) //Lowered to 0.25
H.adjustOxyLoss(-0.25 * seconds_per_tick) //Lowered to 0.25

if(H.nutrition > NUTRITION_LEVEL_ALMOST_FULL) //don't make podpeople fat because they stood in the sun for too long
H.set_nutrition(NUTRITION_LEVEL_ALMOST_FULL)

if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
H.take_overall_damage(brute = 1 * seconds_per_tick, required_bodytype = BODYTYPE_ORGANIC)
..()

/datum/species/floran/on_species_gain(mob/living/carbon/new_floran, datum/species/old_species, pref_load)
. = ..()
if(ishuman(new_floran))
Expand Down Expand Up @@ -105,7 +98,7 @@
Their primary drives are hunting, acquiring trophies, fighting, eating meat, and more hunting. \
It is speculated that their general casual view towards killing and consuming other intelligent species stems from not viewing \"meat\" as \"alive\" in \
the same sense they are. However, as the Floran spread throughout the galaxy, more and more individuals are recognizing a need to integrate, \
make friends, and maybe not stab anyone that slightly inconveniences them."
make friends, and maybe not stab anyone that slightly inconveniences them. (E.I. THIS IS NOT AN EXCUSE TO RDM)"

/datum/species/floran/create_pref_unique_perks()
var/list/to_add = list()
Expand All @@ -132,3 +125,22 @@
)

return to_add


/obj/item/organ/external/floran_leaves
name = "floran leaves"
desc = "you shouldn't see this"
organ_flags = ORGAN_UNREMOVABLE
icon_state = "floran_leaves"
icon = 'monkestation/icons/obj/medical/organs/organs.dmi'

preference = "feature_floran_leaves"
zone = BODY_ZONE_CHEST
slot = ORGAN_SLOT_EXTERNAL_FLORAN_LEAVES

use_mob_sprite_as_obj_sprite = TRUE
bodypart_overlay = /datum/bodypart_overlay/mutant/floran_leaves

/datum/bodypart_overlay/mutant/floran_leaves
layers = EXTERNAL_FRONT
feature_key = "floran_leaves"
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,25 @@
bodypart_overlay = /datum/bodypart_overlay/mutant/floran_leaves

/datum/bodypart_overlay/mutant/floran_leaves
layers = EXTERNAL_FRONT
layers = EXTERNAL_ADJACENT
feature_key = "floran_leaves"

var/color_swapped_layer = EXTERNAL_ADJACENT//Remove when MUTCOLORS_SECONDARY works
var/color_inverse_base = 255//Remove when MUTCOLORS_SECONDARY works

/datum/bodypart_overlay/mutant/floran_leaves/get_global_feature_list()
return GLOB.floran_leaves_list

/datum/bodypart_overlay/mutant/floran_leaves/color_image(image/overlay, draw_layer, obj/item/bodypart/limb)//Remove when MUTCOLORS_SECONDARY works
if(draw_layer != bitflag_to_layer(color_swapped_layer))
return ..()

if(draw_color)
var/list/rgb_list = rgb2num(draw_color)
overlay.color = rgb(color_inverse_base - rgb_list[1], color_inverse_base - rgb_list[2], color_inverse_base - rgb_list[3])
else
overlay.color = null

/datum/bodypart_overlay/mutant/floran_leaves/get_base_icon_state()
return sprite_datum.icon_state

Expand Down
Binary file modified monkestation/icons/mob/species/floran/bodyparts.dmi
Binary file not shown.
Binary file modified monkestation/icons/mob/species/floran/floran_leaves.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6310,4 +6310,5 @@
#include "monkestation\code\random_rooms\engines\kilostation.dm"
#include "monkestation\code\random_rooms\engines\metastation.dm"
#include "monkestation\code\random_rooms\engines\tramstation.dm"
#include "monkestation\code\modules\client\preferences\species_features\floran.dm"
// END_INCLUDE

0 comments on commit d8f354b

Please sign in to comment.