mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[READY] Meat material & material datum turf support (#49402)
* temp * meatwalls * more * adds sheetifier * fix * two * mat texture + 4dplanner admin (#21) * mat texture + 4dplanner admin * keep together trait * counter instead of trait * finalizations * woops * fixes * oopsie * only set starting keep_together if necessary (#24) * keep together as trait again * remove false comment * doc for TRAIT_KEEP_TOGETHER * remove needless scoping Co-authored-by: 4dplanner <3combined@gmail.com>
This commit is contained in:
@@ -2,11 +2,15 @@
|
||||
var/beauty = 0
|
||||
|
||||
/datum/component/beauty/Initialize(beautyamount)
|
||||
if(!isatom(parent))
|
||||
if(!isatom(parent) || isarea(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
beauty = beautyamount
|
||||
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
|
||||
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
|
||||
|
||||
if(ismovable(parent))
|
||||
RegisterSignal(parent, COMSIG_ENTER_AREA, .proc/enter_area)
|
||||
RegisterSignal(parent, COMSIG_EXIT_AREA, .proc/exit_area)
|
||||
|
||||
var/area/A = get_area(parent)
|
||||
if(A)
|
||||
enter_area(null, A)
|
||||
|
||||
@@ -86,13 +86,19 @@ Behavior that's still missing from this component that original food items had t
|
||||
///All the checks for the act of eating itself and
|
||||
/datum/component/edible/proc/TryToEat(mob/living/eater, mob/living/feeder)
|
||||
|
||||
set waitfor = FALSE
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(feeder.a_intent == INTENT_HARM)
|
||||
return
|
||||
if(!owner.reagents.total_volume)//Shouldn't be needed but it checks to see if it has anything left in it.
|
||||
to_chat(feeder, "<span class='warning'>None of [owner] left, oh no!</span>")
|
||||
qdel(parent)
|
||||
if(isturf(parent))
|
||||
var/turf/T = parent
|
||||
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
qdel(parent)
|
||||
return
|
||||
if(!CanConsume(eater, feeder))
|
||||
return
|
||||
@@ -145,7 +151,7 @@ Behavior that's still missing from this component that original food items had t
|
||||
|
||||
var/atom/owner = parent
|
||||
|
||||
if(!owner.reagents)
|
||||
if(!owner?.reagents)
|
||||
return FALSE
|
||||
if(eater.satiety > -200)
|
||||
eater.satiety -= junkiness
|
||||
@@ -215,7 +221,11 @@ Behavior that's still missing from this component that original food items had t
|
||||
if(!eater)
|
||||
return
|
||||
if(!owner.reagents.total_volume)
|
||||
qdel(parent)
|
||||
if(isturf(parent))
|
||||
var/turf/T = parent
|
||||
T.ScrapeAway(1, CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
qdel(parent)
|
||||
|
||||
///Ability to feed food to puppers
|
||||
/datum/component/edible/proc/UseByAnimal(datum/source, mob/user)
|
||||
|
||||
Reference in New Issue
Block a user