This commit is contained in:
Marvin Megavolt
2021-05-18 02:37:43 -05:00
parent d978adc7d2
commit 4113fc5bd0
4 changed files with 49 additions and 0 deletions
+2
View File
@@ -195,6 +195,8 @@
#define COMSIG_MICRO_PICKUP_FEET "micro_force_grabbed" //From /datum/element/mob_holder/micro
#define COMSIG_MOBSIZE_CHANGED "mobsize_changed" //Adding this in so items and whatnot can check when someone changes size. -Cap'n
// /area signals
///from base of area/Entered(): (atom/movable/M)
@@ -0,0 +1,44 @@
/obj/item/storage/backpack/gigantic
name = "enormous backpack"
desc = "An absolutely massive backpack for particularly large crewmen."
icon_state = "explorerpack"
item_state = "explorerpack"
/obj/item/storage/backpack/gigantic/ComponentInitialize()
. = ..()
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
STR.allow_big_nesting = TRUE
STR.max_combined_w_class = 35
STR.max_w_class = WEIGHT_CLASS_HUGE
/obj/item/storage/backpack/gigantic/mob_can_equip(mob/living/M, mob/living/equipper, slot, disable_warning, bypass_equip_delay_self)
if(!..())
return FALSE
if(M.size_multiplier >= 2.0)
return ..()
else
return FALSE
/obj/item/storage/backpack/gigantic/proc/fallOff(mob/living/wearer)
wearer.dropItemToGround(src, TRUE)
playsound(src.loc, 'sound/items/handling/cloth_drop.ogg', 50, TRUE)
playsound(src.loc, 'sound/items/handling/toolbelt_drop.ogg', 50, TRUE)
wearer.visible_message("<span class='warning'>The [src.name] slips off [wearer]'s now too-small body and falls to the ground!'</span>", "<span class='warning'>The [src.name] slips off your now too-small body and falls to the ground!'</span>")
/obj/item/storage/backpack/gigantic/equipped(mob/equipper, slot)
. = ..()
if(slot == SLOT_BACK)
RegisterSignal(equipper, COMSIG_MOBSIZE_CHANGED, .proc/fallOff)
else
UnregisterSignal(equipper, COMSIG_MOBSIZE_CHANGED)
/obj/item/storage/backpack/gigantic/dropped(mob/user, silent)
UnregisterSignal(user, COMSIG_MOBSIZE_CHANGED)
/obj/item/storage/backpack/gigantic/satchel
name = "enormous satchel"
desc = "An absolutely massive satchel for particularly large crewmen."
icon_state = "satchel-explorer"
item_state = "securitypack"
@@ -62,6 +62,8 @@ mob/living/get_effective_size()
//if(src.size_multiplier >= RESIZE_A_HUGEBIG || src.size_multiplier <= RESIZE_A_TINYMICRO) Will remove clothing when too big or small. Will do later.
previous_size = size_multiplier //And, change this now that we are finally done.
SEND_SIGNAL(src, COMSIG_MOBSIZE_CHANGED, src) //This SHOULD allow other shit to check when a mob changes size -Capn
//Now check if the mob can get the size action
if(!small_sprite)
small_sprite = new(src)
+1
View File
@@ -3049,6 +3049,7 @@
#include "hyperstation\code\datums\traits\neutral.dm"
#include "hyperstation\code\game\objects\railings.dm"
#include "hyperstation\code\game\objects\items\cosmetics.dm"
#include "hyperstation\code\game\objects\items\storage\big_bag.dm"
#include "hyperstation\code\game\objects\structures\ghost_role_spawners.dm"
#include "hyperstation\code\gamemode\traitor_lewd.dm"
#include "hyperstation\code\gamemode\traitor_thief.dm"