diff --git a/code/__DEFINES/food.dm b/code/__DEFINES/food.dm index 15c7af57..b3ff9cab 100644 --- a/code/__DEFINES/food.dm +++ b/code/__DEFINES/food.dm @@ -11,6 +11,7 @@ #define GROSS (1<<10) #define TOXIC (1<<11) #define PINEAPPLE (1<<12) +#define CLOTH (1<<14) #define DRINK_NICE 1 #define DRINK_GOOD 2 diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index 8ff40c3e..31096a94 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -57,6 +57,7 @@ #define isluminescent(A) (is_species(A, /datum/species/jelly/luminescent)) #define iszombie(A) (is_species(A, /datum/species/zombie)) #define ismoth(A) (is_species(A, /datum/species/moth)) +#define ismoth(A) (is_species(A, /datum/species/insect)) #define ishumanbasic(A) (is_species(A, /datum/species/human)) #define iscatperson(A) (ishumanbasic(A) && istype(A.dna.species, /datum/species/human/felinid) ) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 796c93a3..18d48f93 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -75,6 +75,7 @@ desc = "If you're reading this it means I messed up. This is related to moths eating clothes and I didn't know a better way to do it than making a new food object." list_reagents = list("nutriment" = 1) tastes = list("dust" = 1, "lint" = 1) + foodtype = CLOTH /obj/item/clothing/attack(mob/M, mob/user, def_zone) if(user.a_intent != INTENT_HARM && ismoth(M)) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index b79979e2..c32da80f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1179,7 +1179,10 @@ GLOBAL_LIST_EMPTY(roundstart_races) /datum/species/proc/check_weakness(obj/item, mob/living/attacker) return FALSE -//////// +/datum/species/proc/check_species_weakness(obj/item, mob/living/attacker) + return 0 //This is not a boolean, it's the multiplier for the damage that the user takes from the item.It is added onto the check_weakness value of the mob, and then the force of the item is multiplied by this value + + //////// //LIFE// //////// diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 3ad2a4bd..7534a474 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -11,7 +11,7 @@ attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/moth - liked_food = VEGETABLES | DAIRY + liked_food = VEGETABLES | DAIRY| CLOTH disliked_food = FRUIT | GROSS toxic_food = MEAT | RAW @@ -43,18 +43,19 @@ /datum/species/moth/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) . = ..() - if(chem.id == "pestkiller") + if(chem.type == /datum/reagent/toxin/pestkiller) H.adjustToxLoss(3) - H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM) + H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM) -/datum/species/moth/check_weakness(obj/item/weapon, mob/living/attacker) +/datum/species/moth/check_species_weakness(obj/item/weapon, mob/living/attacker) if(istype(weapon, /obj/item/melee/flyswatter)) return 9 //flyswatters deal 10x damage to moths return 0 + /datum/species/moth/space_move(mob/living/carbon/human/H) . = ..() if(H.loc && !isspaceturf(H.loc) && H.dna.features["moth_wings"] != "Burnt Off") var/datum/gas_mixture/current = H.loc.return_air() if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible - return TRUE + return TRUE \ No newline at end of file diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index 535885b3..9eb998f5 100644 --- a/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/modular_citadel/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -154,8 +154,20 @@ attack_verb = "flutter" //wat? attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - liked_food = MEAT | FRUIT - disliked_food = TOXIC + liked_food = VEGETABLES | DAIRY| CLOTH + disliked_food = FRUIT | GROSS + toxic_food = MEAT | RAW + +/datum/species/insect/handle_chemicals(datum/reagent/chem, mob/living/carbon/human/H) + . = ..() + if(chem.type == /datum/reagent/toxin/pestkiller) + H.adjustToxLoss(3) + H.reagents.remove_reagent(chem.type, REAGENTS_METABOLISM) + +/datum/species/insect/check_species_weakness(obj/item/weapon, mob/living/attacker) + if(istype(weapon, /obj/item/melee/flyswatter)) + return 9 //flyswatters deal 10x damage to moths + return 0 /datum/species/insect/spec_death(gibbed, mob/living/carbon/human/H) if(H)