diff --git a/GainStation13/code/obj/items/minor_items.dm b/GainStation13/code/obj/items/minor_items.dm index 7a8da914..da1f1c3a 100644 --- a/GainStation13/code/obj/items/minor_items.dm +++ b/GainStation13/code/obj/items/minor_items.dm @@ -2,12 +2,12 @@ /obj/item/trash/fatoray_scrap1 name = "raygun scraps" - icon = 'GainStation13/icons/obj/fatoray_scrap.dmi' + icon = 'GainStation13/icons/obj/fatoray.dmi' icon_state = "fatoray_scrap1" desc = "Small parts that seemingly once belonged to some sort of a raygun." /obj/item/trash/fatoray_scrap2 name = "raygun scraps" - icon = 'GainStation13/icons/obj/fatoray_scrap.dmi' + icon = 'GainStation13/icons/obj/fatoray.dmi' icon_state = "fatoray_scrap2" desc = "Small parts that seemingly once belonged to some sort of a raygun." diff --git a/GainStation13/code/obj/structure/calorite_doors.dm b/GainStation13/code/obj/structure/calorite_doors.dm new file mode 100644 index 00000000..0d0602ff --- /dev/null +++ b/GainStation13/code/obj/structure/calorite_doors.dm @@ -0,0 +1,92 @@ + + +/obj/structure/mineral_door/calorite //GS13 + name = "calorite door" + icon = 'GainStation13/icons/obj/structure/calorite_door.dmi' + icon_state = "calorite" + sheetType = /obj/item/stack/sheet/mineral/calorite + max_integrity = 200 + light_range = 1 + var/fatten = FALSE // whether player will be fattened + var/fatten_delay = 1 // ticks per periodic loop + var/fat_to_add = 2 // fatness per tick stunned + var/stuck = FALSE // whether player is stuck + var/stuck_delay = 0 // set in proc/Fatten + var/blocked = FALSE // whether door is blocked + +// override /obj/structure/mineral_door/proc/Open() +/obj/structure/mineral_door/calorite/Open() //GS13 + isSwitchingStates = 1 + playsound(src, openSound, 100, 1) + set_opacity(FALSE) + flick("[initial_state]opening",src) + sleep(10) + density = FALSE + state = 1 + air_update_turf(1) + update_icon() + isSwitchingStates = 0 + + if(close_delay != -1) + addtimer(CALLBACK(src, .proc/Close), close_delay) + + // start periodic loop + stuck = FALSE + addtimer(CALLBACK(src, .proc/Fatten), fatten_delay) + +/obj/structure/mineral_door/calorite/proc/Fatten() //GS13 + if(state == 1) // door must be open + // check periodically + addtimer(CALLBACK(src, .proc/Fatten), fatten_delay) + // check for mobs in open door + var/turf/T = get_turf(src) + blocked = FALSE + for(var/mob/living/carbon/M in T) + blocked = TRUE + // determine if mob should get stuck and be fattened + if(M.fatness >= FATNESS_LEVEL_BARELYMOBILE) + fatten = TRUE + if (!stuck) + stuck_delay = 120 + M.visible_message( + "[M] gets stuck in the doorway!", + "You feel yourself get stuck in the doorway!") + else if(M.fatness >= FATNESS_LEVEL_MORBIDLY_OBESE) + fatten = TRUE + if (!stuck) + stuck_delay = 50 + M.visible_message( + "[M] barely squeezes through the doorway!", + "You feel your sides barely squeeze through the doorway!") + else if(M.fatness >= FATNESS_LEVEL_FATTER) + fatten = TRUE + if (!stuck) + stuck_delay = 15 + M.visible_message( + "[M]'s sides briefly smush against the doorway.", + "You feel your sides smush against the doorway!.") + else if(M.fatness >= FATNESS_LEVEL_FAT) + fatten = TRUE + if (!stuck) + stuck_delay = 5 + M.visible_message( + "[M]'s sides briefly brush against the doorway.", + "You feel your sides briefly brush against the doorway!") + else + fatten = FALSE + stuck = FALSE + stuck_delay = 0 + + if (fatten) // get stuck + if (!stuck) + M.Stun(stuck_delay/2) // give player time to escape + stuck = TRUE + if (stuck_delay > 0) // wait for stun to end + stuck_delay = stuck_delay - fatten_delay + if (stuck_delay <= 0) + stuck_delay = 0 + // gain weight while stuck + M.adjust_fatness(fat_to_add, FATTENING_TYPE_ITEM) + + if (!blocked) + stuck = FALSE // ready to go again diff --git a/GainStation13/icons/obj/fatoray.dmi b/GainStation13/icons/obj/fatoray.dmi index fb45d0ba..0e59d334 100644 Binary files a/GainStation13/icons/obj/fatoray.dmi and b/GainStation13/icons/obj/fatoray.dmi differ diff --git a/GainStation13/icons/obj/fatoray_scrap.dmi b/GainStation13/icons/obj/fatoray_scrap.dmi deleted file mode 100644 index efde51f3..00000000 Binary files a/GainStation13/icons/obj/fatoray_scrap.dmi and /dev/null differ diff --git a/GainStation13/icons/obj/sugarland/unusualtentical.dmi b/GainStation13/icons/obj/mobs/unusualtentical.dmi similarity index 100% rename from GainStation13/icons/obj/sugarland/unusualtentical.dmi rename to GainStation13/icons/obj/mobs/unusualtentical.dmi diff --git a/GainStation13/icons/obj/structure/calorite_door.dmi b/GainStation13/icons/obj/structure/calorite_door.dmi new file mode 100644 index 00000000..21d3892c Binary files /dev/null and b/GainStation13/icons/obj/structure/calorite_door.dmi differ diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 3718be66..5c6bd48f 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -167,97 +167,6 @@ /obj/structure/mineral_door/uranium/ComponentInitialize() return - -/obj/structure/mineral_door/calorite //GS13 - name = "calorite door" - icon_state = "paperframe" - sheetType = /obj/item/stack/sheet/mineral/calorite - max_integrity = 200 - light_range = 1 - var/fatten = FALSE // whether player will be fattened - var/fatten_delay = 1 // ticks per periodic loop - var/fat_to_add = 2 // fatness per tick stunned - var/stuck = FALSE // whether player is stuck - var/stuck_delay = 0 // set in proc/Fatten - var/blocked = FALSE // whether door is blocked - -// override /obj/structure/mineral_door/proc/Open() -/obj/structure/mineral_door/calorite/Open() //GS13 - isSwitchingStates = 1 - playsound(src, openSound, 100, 1) - set_opacity(FALSE) - flick("[initial_state]opening",src) - sleep(10) - density = FALSE - state = 1 - air_update_turf(1) - update_icon() - isSwitchingStates = 0 - - if(close_delay != -1) - addtimer(CALLBACK(src, .proc/Close), close_delay) - - // start periodic loop - stuck = FALSE - addtimer(CALLBACK(src, .proc/Fatten), fatten_delay) - -/obj/structure/mineral_door/calorite/proc/Fatten() //GS13 - if(state == 1) // door must be open - // check periodically - addtimer(CALLBACK(src, .proc/Fatten), fatten_delay) - // check for mobs in open door - var/turf/T = get_turf(src) - blocked = FALSE - for(var/mob/living/carbon/M in T) - blocked = TRUE - // determine if mob should get stuck and be fattened - if(M.fatness >= FATNESS_LEVEL_BARELYMOBILE) - fatten = TRUE - if (!stuck) - stuck_delay = 120 - M.visible_message( - "[M] gets stuck in the doorway!", - "You feel yourself get stuck in the doorway!") - else if(M.fatness >= FATNESS_LEVEL_MORBIDLY_OBESE) - fatten = TRUE - if (!stuck) - stuck_delay = 50 - M.visible_message( - "[M] barely squeezes through the doorway!", - "You feel your sides barely squeeze through the doorway!") - else if(M.fatness >= FATNESS_LEVEL_FATTER) - fatten = TRUE - if (!stuck) - stuck_delay = 15 - M.visible_message( - "[M]'s sides briefly brush against the doorway.", - "You feel your sides smush against the doorway!.") - else if(M.fatness >= FATNESS_LEVEL_FAT) - fatten = TRUE - if (!stuck) - stuck_delay = 5 - M.visible_message( - "[M]'s sides briefly brush against the doorway.", - "You feel your sides briefly brush against the doorway!") - else - fatten = FALSE - stuck = FALSE - stuck_delay = 0 - - if (fatten) // get stuck - if (!stuck) - M.Stun(stuck_delay/2) // give player time to escape - stuck = TRUE - if (stuck_delay > 0) // wait for stun to end - stuck_delay = stuck_delay - fatten_delay - if (stuck_delay <= 0) - stuck_delay = 0 - // gain weight while stuck - M.adjust_fatness(fat_to_add, FATTENING_TYPE_ITEM) - - if (!blocked) - stuck = FALSE // ready to go again - /obj/structure/mineral_door/sandstone name = "sandstone door" icon_state = "sandstone" diff --git a/tgstation.dme b/tgstation.dme index 8f63a30f..c745950d 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -23,8 +23,9 @@ #define FILE_DIR "GainStation13/icons/obj" #define FILE_DIR "GainStation13/icons/obj/clothing" #define FILE_DIR "GainStation13/icons/obj/lavaland_demone" +#define FILE_DIR "GainStation13/icons/obj/mobs" #define FILE_DIR "GainStation13/icons/obj/spells" -#define FILE_DIR "GainStation13/icons/obj/sugarland" +#define FILE_DIR "GainStation13/icons/obj/structure" #define FILE_DIR "GainStation13/icons/turf" #define FILE_DIR "GainStation13/sound" #define FILE_DIR "GainStation13/sound/voice" @@ -3344,6 +3345,7 @@ #include "GainStation13\code\modules\vending\mealdor.dm" #include "GainStation13\code\obj\items\minor_items.dm" #include "GainStation13\code\obj\structure\scale.dm" +#include "GainStation13\code\obj\structure\calorite_doors.dm" #include "GainStation13\code\obj\weapons\fatoray.dm" #include "hyperstation\code\__DEFINES\economy.dm" #include "hyperstation\code\__DEFINES\wendigo.dm"