The rest of the offering stuff

This commit is contained in:
keronshb
2021-10-13 22:13:33 -04:00
parent e07d39bb8b
commit 6331ced3e5
11 changed files with 190 additions and 79 deletions
+24 -2
View File
@@ -1196,6 +1196,28 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
embed_chance_turf_mod = (!isnull(embedding["embed_chance_turf_mod"]) ? embedding["embed_chance_turf_mod"] : EMBED_CHANCE_TURF_MOD))
return TRUE
/obj/item/proc/on_offer_taken(mob/living/carbon/giver, mob/living/carbon/taker)
if(SEND_SIGNAL(src, COMSIG_ITEM_OFFER_TAKEN, giver, taker) & COMPONENT_OFFER_INTERRUPT)
/**
* * An interrupt for offering an item to other people, called mainly from [/mob/living/carbon/proc/give], in case you want to run your own offer behavior instead.
*
* * Return TRUE if you want to interrupt the offer.
*
* * Arguments:
* * offerer - the person offering the item
*/
/obj/item/proc/on_offered(mob/living/carbon/offerer)
if(SEND_SIGNAL(src, COMSIG_ITEM_OFFERING, offerer) & COMPONENT_OFFER_INTERRUPT)
return TRUE
/**
* * An interrupt for someone trying to accept an offered item, called mainly from [/mob/living/carbon/proc/take], in case you want to run your own take behavior instead.
*
* * Return TRUE if you want to interrupt the taking.
*
* * Arguments:
* * offerer - the person offering the item
* * taker - the person trying to accept the offer
*/
/obj/item/proc/on_offer_taken(mob/living/carbon/offerer, mob/living/carbon/taker)
if(SEND_SIGNAL(src, COMSIG_ITEM_OFFER_TAKEN, offerer, taker) & COMPONENT_OFFER_INTERRUPT)
return TRUE