mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Refactor of Simple Animal Eating
This commit is contained in:
@@ -63,6 +63,8 @@
|
||||
|
||||
var/ventcrawler = 0 //Determines if the mob can go through the vents.
|
||||
var/has_fine_manipulation = 1 // Can use small items.
|
||||
var/can_consume_mobs = 0 //can it consume mobs?
|
||||
var/list/allowed_consumed_mobs = list()
|
||||
|
||||
var/flags = 0 // Various specific features.
|
||||
var/clothing_flags = 0 // Underwear and socks.
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
flesh_color = "#34AF10"
|
||||
reagent_tag = PROCESS_ORG
|
||||
base_color = "#066000"
|
||||
can_consume_mobs = 1
|
||||
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken,
|
||||
/mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble)
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
@@ -106,6 +109,9 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
flesh_color = "#AFA59E"
|
||||
base_color = "#333333"
|
||||
can_consume_mobs = 1
|
||||
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/chick, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot,
|
||||
/mob/living/simple_animal/tribble)
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
@@ -147,6 +153,9 @@
|
||||
reagent_tag = PROCESS_ORG
|
||||
flesh_color = "#966464"
|
||||
base_color = "#B43214"
|
||||
can_consume_mobs = 1
|
||||
allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken,
|
||||
/mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble)
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their tongue off!",
|
||||
@@ -354,6 +363,8 @@
|
||||
dietflags = DIET_HERB
|
||||
blood_color = "#FB9800"
|
||||
reagent_tag = PROCESS_ORG
|
||||
can_consume_mobs = 1
|
||||
allowed_consumed_mobs = list(/mob/living/simple_animal/diona)
|
||||
|
||||
suicide_messages = list(
|
||||
"is attempting to bite their antenna off!",
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
if(M.loc != src)
|
||||
stomach_contents.Remove(M)
|
||||
continue
|
||||
if(istype(M, /mob/living/carbon) && stat != 2)
|
||||
if(istype(M, /mob/living) && stat != 2)
|
||||
if(M.stat == 2)
|
||||
M.death(1)
|
||||
stomach_contents.Remove(M)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#define EAT_TIME_FAT 100
|
||||
|
||||
//time it takes for a mob to be eaten (in deciseconds) (overrides mob eat time)
|
||||
#define EAT_TIME_MOUSE 30
|
||||
#define EAT_TIME_ANIMAL 30
|
||||
|
||||
/obj/item/weapon/grab
|
||||
name = "grab"
|
||||
@@ -413,10 +413,8 @@
|
||||
if(isalien(attacker) && iscarbon(prey)) //Xenomorphs eating carbon mobs
|
||||
return 1
|
||||
|
||||
if(ishuman(attacker) && attacker.get_species() == "Kidan" && istype(prey,/mob/living/simple_animal/diona)) //Kidan eating nymphs
|
||||
return 1
|
||||
|
||||
if(ishuman(attacker) && attacker.get_species() == "Tajaran" && istype(prey,/mob/living/simple_animal/mouse)) //Tajaran eating mice. Meow!
|
||||
var/mob/living/carbon/human/H = attacker
|
||||
if(ishuman(H) && H.species.can_consume_mobs && is_type_in_list(prey, H.species.allowed_consumed_mobs)) //species eating of other mobs
|
||||
return 1
|
||||
|
||||
return 0
|
||||
@@ -425,8 +423,8 @@
|
||||
if(isalien(attacker))
|
||||
return EAT_TIME_XENO //xenos get a speed boost
|
||||
|
||||
if(istype(prey,/mob/living/simple_animal/mouse)) //mice get eaten at xeno-eating-speed regardless
|
||||
return EAT_TIME_MOUSE
|
||||
if(istype(prey,/mob/living/simple_animal)) //simple animals get eaten at xeno-eating-speed regardless
|
||||
return EAT_TIME_ANIMAL
|
||||
|
||||
return EAT_TIME_FAT //if it doesn't fit into the above, it's probably a fat guy, take EAT_TIME_FAT to do it
|
||||
|
||||
@@ -447,4 +445,4 @@
|
||||
#undef EAT_TIME_XENO
|
||||
#undef EAT_TIME_FAT
|
||||
|
||||
#undef EAT_TIME_MOUSE
|
||||
#undef EAT_TIME_ANIMAL
|
||||
|
||||
Reference in New Issue
Block a user