diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 496654df1ae..88a89b6fcdc 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -44,6 +44,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ new/datum/stack_recipe("button frame", /obj/item/wallframe/button, 1), \ null, \ new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe("display case", /obj/structure/displaycase, 10, one_per_turf = 1, on_floor = 1), \ ) /obj/item/stack/sheet/metal diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 148202d59e6..64124566402 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -1,22 +1,22 @@ /obj/structure/displaycase name = "display case" icon = 'icons/obj/stationobjs.dmi' - icon_state = "glassbox1" - desc = "A display case for prized possessions. Hooked up with an anti-theft system." + icon_state = "glassbox0" + desc = "A display case for prized possessions." density = 1 anchored = 1 unacidable = 1//Dissolving the case would also delete the gun. var/health = 30 - var/occupied = 1 var/destroyed = 0 + var/obj/item/showpiece = null + var/alert = 0 + var/open = 0 /obj/structure/displaycase/ex_act(severity, target) switch(severity) if (1) new /obj/item/weapon/shard( src.loc ) - if (occupied) - new /obj/item/weapon/gun/energy/laser/captain( src.loc ) - occupied = 0 + dump() qdel(src) if (2) if (prob(50)) @@ -27,6 +27,13 @@ src.health -= 5 src.healthcheck() +/obj/structure/displaycase/examine(mob/user) + ..() + if(showpiece) + user << "There's [showpiece] inside." + if(alert) + user << "Hooked up with an anti-theft system." + /obj/structure/displaycase/bullet_act(obj/item/projectile/Proj) if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) @@ -35,16 +42,17 @@ src.healthcheck() return +/obj/structure/displaycase/proc/dump() + if (showpiece) + showpiece.loc = src.loc + showpiece = null /obj/structure/displaycase/blob_act() if (prob(75)) new /obj/item/weapon/shard( src.loc ) - if (occupied) - new /obj/item/weapon/gun/energy/laser/captain( src.loc ) - occupied = 0 + dump() qdel(src) - /obj/structure/displaycase/proc/healthcheck() if (src.health <= 0) if (!( src.destroyed )) @@ -55,27 +63,46 @@ update_icon() //Activate Anti-theft - var/area/alarmed = get_area(src) - alarmed.burglaralert(src) - playsound(src, "sound/effects/alert.ogg", 50, 1) + if(alert) + var/area/alarmed = get_area(src) + alarmed.burglaralert(src) + playsound(src, "sound/effects/alert.ogg", 50, 1) else playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) return /obj/structure/displaycase/update_icon() - if(src.destroyed) - src.icon_state = "glassboxb[src.occupied]" - else - src.icon_state = "glassbox[src.occupied]" + var/icon/I = icon('icons/obj/stationobjs.dmi',"glassbox[destroyed || open?"b":""]0") + if(showpiece) + var/icon/S = getFlatIcon(showpiece) //Guns got overlays + S.Scale(17,17) + I.Blend(S,ICON_UNDERLAY,8,8) + src.icon = I return - /obj/structure/displaycase/attackby(obj/item/weapon/W, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - src.health -= W.force - src.healthcheck() - ..() + if(!alert && istype(W,/obj/item/weapon/crowbar)) + if(destroyed && !showpiece) + user << "You remove the destroyed case" + qdel(src) + return + user << "You start to [open ? "close":"open"] the [src]" + if(do_after(user, 20, target = src)) + open = !open + user << "You [open ? "close":"open"] the [src]" + update_icon() + else if(open) + if(user.unEquip(W)) + W.loc = src + showpiece = W + user << "You put [W] on display" + update_icon() + else + user.changeNext_move(CLICK_CD_MELEE) + src.health -= W.force + src.healthcheck() + ..() return /obj/structure/displaycase/attack_paw(mob/user) @@ -83,10 +110,9 @@ /obj/structure/displaycase/attack_hand(mob/user) user.changeNext_move(CLICK_CD_MELEE) - if (src.destroyed && src.occupied) - new /obj/item/weapon/gun/energy/laser/captain( src.loc ) + if (showpiece && (destroyed || open)) + dump() user << "You deactivate the hover field built into the case." - src.occupied = 0 src.add_fingerprint(user) update_icon() return @@ -98,3 +124,23 @@ return +/obj/structure/displaycase/captain + alert = 1 + +/obj/structure/displaycase/captain/New() + ..() + showpiece = new /obj/item/weapon/gun/energy/laser/captain (src) + update_icon() + +/obj/structure/displaycase/labcage + name = "lab cage" + desc = "A glass lab container for storing interesting creatures." + +/obj/structure/displaycase/labcage/New() + ..() + var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger(src) + A.sterile = 1 + A.name = "Lamarr" + showpiece = A + update_icon() + diff --git a/code/game/objects/structures/lamarr_cage.dm b/code/game/objects/structures/lamarr_cage.dm deleted file mode 100644 index e1944e4d6bc..00000000000 --- a/code/game/objects/structures/lamarr_cage.dm +++ /dev/null @@ -1,91 +0,0 @@ -/obj/structure/lamarr - name = "lab cage" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "labcage1" - desc = "A glass lab container for storing interesting creatures." - density = 1 - anchored = 1 - unacidable = 1//Dissolving the case would also delete Lamarr - var/health = 30 - var/occupied = 1 - var/destroyed = 0 - -/obj/structure/lamarr/ex_act(severity, target) - switch(severity) - if (1) - new /obj/item/weapon/shard( src.loc ) - Break() - qdel(src) - if (2) - if (prob(50)) - src.health -= 15 - src.healthcheck() - if (3) - if (prob(50)) - src.health -= 5 - src.healthcheck() - - -/obj/structure/lamarr/bullet_act(obj/item/projectile/Proj) - health -= Proj.damage - ..() - src.healthcheck() - return - - -/obj/structure/lamarr/blob_act() - if (prob(75)) - new /obj/item/weapon/shard( src.loc ) - Break() - qdel(src) - - -/obj/structure/lamarr/proc/healthcheck() - if (src.health <= 0) - if (!( src.destroyed )) - src.density = 0 - src.destroyed = 1 - new /obj/item/weapon/shard( src.loc ) - playsound(src, "shatter", 70, 1) - Break() - else - playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1) - return - -/obj/structure/lamarr/update_icon() - if(src.destroyed) - src.icon_state = "labcageb[src.occupied]" - else - src.icon_state = "labcage[src.occupied]" - return - - -/obj/structure/lamarr/attackby(obj/item/weapon/W, mob/user, params) - user.changeNext_move(CLICK_CD_MELEE) - src.health -= W.force - src.healthcheck() - ..() - return - -/obj/structure/lamarr/attack_paw(mob/user) - return src.attack_hand(user) - -/obj/structure/lamarr/attack_hand(mob/user) - user.changeNext_move(CLICK_CD_MELEE) - if (src.destroyed) - return - else - user.visible_message("[user] kicks the lab cage.", \ - "You kick the lab cage.") - src.health -= 2 - healthcheck() - return - -/obj/structure/lamarr/proc/Break() - if(occupied) - var/obj/item/clothing/mask/facehugger/A = new /obj/item/clothing/mask/facehugger( src.loc ) - A.sterile = 1 - A.name = "Lamarr" - occupied = 0 - update_icon() - return \ No newline at end of file diff --git a/icons/obj/stationobjs.dmi b/icons/obj/stationobjs.dmi index a0ad4429129..09e55039b56 100644 Binary files a/icons/obj/stationobjs.dmi and b/icons/obj/stationobjs.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 23408636bb2..4cb1cfab55a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -734,7 +734,6 @@ #include "code\game\objects\structures\janicart.dm" #include "code\game\objects\structures\kitchen_spike.dm" #include "code\game\objects\structures\ladders.dm" -#include "code\game\objects\structures\lamarr_cage.dm" #include "code\game\objects\structures\lattice.dm" #include "code\game\objects\structures\mineral_doors.dm" #include "code\game\objects\structures\mirror.dm"