Files
Yogstation/code/datums/components/spill.dm
Time-Green b2348f1d93 [READY] Goon Genetics (#41258)
GENETICS

    The random hexadecimal rng game has been replaced with gene sequencing from goon.

    Adds mutation activators and mutators

    You can now store mutations

    Everyone now has their own set of unique mutations

    Limited mutations per person to 8 (including one always being monkey)

    Adds race specific mutations (See fire breathing for lizads)

    You can inspect discovered mutations, undiscovered mutations use an alias to recognize them by

    Adds a sequence analyzer. Can be used to scan someones genes sequence. Useful for determing what mutations they can safely have and or collecting data for very difficult sequences

    Adds mutation combining. It's currently only RADIOACTIVE + STRONG = HULK (So yes you will now need 2 mutations for to get hulk)

    Adds several other mutations. Telepathy, firebreath, glowy, radioactive and strength

cl Time-Green
add: Goon genetics!
add: More mutations! Fire breath for lizards! Radioactive! Telepathy! Glowy! Strength, though its cosmetic and should be combined with radioactivity instead! Fiery sweat!
add: Adds void magnet mutation by @tralezab !
/cl
2018-12-10 03:38:13 +01:00

56 lines
1.9 KiB
Plaintext

// This component is for forcing strange things into your pocket that fall out if you fall down
// Yes this exists purely for the spaghetti meme
/datum/component/spill
var/preexisting_item_flags
var/list/droptext
var/list/dropsound
// droptext is an arglist for visible_message
// dropsound is a list of potential sounds that gets picked from
/datum/component/spill/Initialize(list/_droptext, list/_dropsound)
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
if(_droptext && !islist(_droptext))
_droptext = list(_droptext)
droptext = _droptext
if(_dropsound && !islist(_dropsound))
_dropsound = list(_dropsound)
dropsound = _dropsound
/datum/component/spill/PostTransfer()
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
/datum/component/spill/RegisterWithParent()
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, .proc/equip_react)
RegisterSignal(parent, COMSIG_ITEM_DROPPED, .proc/drop_react)
var/obj/item/master = parent
preexisting_item_flags = master.item_flags
master.item_flags |= ITEM_SLOT_POCKET
/datum/component/spill/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED))
var/obj/item/master = parent
if(!(preexisting_item_flags & ITEM_SLOT_POCKET))
master.item_flags &= ~ITEM_SLOT_POCKET
/datum/component/spill/proc/equip_react(obj/item/source, mob/equipper, slot)
if(slot == SLOT_L_STORE || slot == SLOT_R_STORE)
RegisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN, .proc/knockdown_react, TRUE)
else
UnregisterSignal(equipper, COMSIG_LIVING_STATUS_KNOCKDOWN)
/datum/component/spill/proc/drop_react(obj/item/source, mob/dropper)
UnregisterSignal(dropper, COMSIG_LIVING_STATUS_KNOCKDOWN)
/datum/component/spill/proc/knockdown_react(mob/living/fool)
var/obj/item/master = parent
fool.dropItemToGround(master)
if(droptext)
fool.visible_message(arglist(droptext))
if(dropsound)
playsound(master, pick(dropsound), 30)