mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 04:57:12 +01:00
Traits framework (#12548)
This commit is contained in:
committed by
variableundefined
parent
c2a963d7a8
commit
d6a6debf94
@@ -649,6 +649,8 @@ var/const/INGEST = 2
|
||||
if(data)
|
||||
R.data = data
|
||||
|
||||
if(isliving(my_atom))
|
||||
R.on_mob_add(my_atom) //Must occur befor it could posibly run on_mob_delete
|
||||
update_total()
|
||||
if(my_atom)
|
||||
my_atom.on_reagent_change()
|
||||
|
||||
@@ -81,6 +81,10 @@
|
||||
/datum/reagent/proc/on_mob_death(mob/living/M) //use this to have chems have a "death-triggered" effect
|
||||
return
|
||||
|
||||
// Called when this reagent is first added to a mob
|
||||
/datum/reagent/proc/on_mob_add(mob/living/L)
|
||||
return
|
||||
|
||||
// Called when this reagent is removed while inside a mob
|
||||
/datum/reagent/proc/on_mob_delete(mob/living/M)
|
||||
return
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
M.SetParalysis(0, FALSE)
|
||||
M.SetSilence(0, FALSE)
|
||||
M.SetHallucinate(0)
|
||||
REMOVE_TRAITS_NOT_IN(M, list(ROUNDSTART_TRAIT))
|
||||
M.SetDizzy(0)
|
||||
M.SetDrowsy(0)
|
||||
M.SetStuttering(0)
|
||||
|
||||
@@ -404,11 +404,13 @@
|
||||
process_flags = ORGANIC | SYNTHETIC // That's the power of love~
|
||||
taste_description = "<font color='pink'><b>love</b></font>"
|
||||
|
||||
/datum/reagent/love/on_mob_life(mob/living/M)
|
||||
if(M.a_intent != INTENT_HELP)
|
||||
M.a_intent_change(INTENT_HELP)
|
||||
M.can_change_intents = 0 //Now you have no choice but to be helpful.
|
||||
/datum/reagent/love/on_mob_add(mob/living/L)
|
||||
..()
|
||||
if(L.a_intent != INTENT_HELP)
|
||||
L.a_intent_change(INTENT_HELP)
|
||||
L.can_change_intents = FALSE //Now you have no choice but to be helpful.
|
||||
|
||||
/datum/reagent/love/on_mob_life(mob/living/M)
|
||||
if(prob(8))
|
||||
var/lovely_phrase = pick("appreciated", "loved", "pretty good", "really nice", "pretty happy with yourself, even though things haven't always gone as well as they could")
|
||||
to_chat(M, "<span class='notice'>You feel [lovely_phrase].</span>")
|
||||
@@ -425,7 +427,7 @@
|
||||
return ..()
|
||||
|
||||
/datum/reagent/love/on_mob_delete(mob/living/M)
|
||||
M.can_change_intents = 1
|
||||
M.can_change_intents = TRUE
|
||||
..()
|
||||
|
||||
/datum/reagent/love/reaction_mob(mob/living/M, method=TOUCH, volume)
|
||||
@@ -543,6 +545,22 @@
|
||||
M.update_transform()
|
||||
..()
|
||||
|
||||
/datum/reagent/pax
|
||||
name = "Pax"
|
||||
id = "pax"
|
||||
description = "A colorless liquid that suppresses violence in its subjects."
|
||||
color = "#AAAAAA55"
|
||||
taste_description = "water"
|
||||
metabolization_rate = 0.25 * REAGENTS_METABOLISM
|
||||
|
||||
/datum/reagent/pax/on_mob_add(mob/living/M)
|
||||
..()
|
||||
ADD_TRAIT(M, TRAIT_PACIFISM, id)
|
||||
|
||||
/datum/reagent/pax/on_mob_delete(mob/living/M)
|
||||
REMOVE_TRAIT(M, TRAIT_PACIFISM, id)
|
||||
..()
|
||||
|
||||
/datum/reagent/toxin/coffeepowder
|
||||
name = "Coffee Grounds"
|
||||
id = "coffeepowder"
|
||||
|
||||
Reference in New Issue
Block a user