mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #28404 from Expletive/fancymedalbox
Medal lockboxes are now fancy, and will accurately represent their contents.
This commit is contained in:
@@ -8,8 +8,9 @@
|
||||
max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item.
|
||||
storage_slots = 4
|
||||
req_access = list(GLOB.access_armory)
|
||||
var/locked = 1
|
||||
var/broken = 0
|
||||
var/locked = TRUE
|
||||
var/broken = FALSE
|
||||
var/open = FALSE
|
||||
var/icon_locked = "lockbox+l"
|
||||
var/icon_closed = "lockbox"
|
||||
var/icon_broken = "lockbox+b"
|
||||
@@ -48,8 +49,8 @@
|
||||
|
||||
/obj/item/weapon/storage/lockbox/emag_act(mob/user)
|
||||
if(!broken)
|
||||
broken = 1
|
||||
locked = 0
|
||||
broken = TRUE
|
||||
locked = FALSE
|
||||
desc += "It appears to be broken."
|
||||
icon_state = src.icon_broken
|
||||
if(user)
|
||||
@@ -67,6 +68,7 @@
|
||||
if(locked)
|
||||
to_chat(user, "<span class='warning'>It's locked!</span>")
|
||||
return 0
|
||||
open = TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/can_be_inserted(obj/item/W, stop_messages = 0)
|
||||
@@ -74,6 +76,15 @@
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/handle_item_insertion(obj/item/W, prevent_warning = 0, mob/user)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
/obj/item/weapon/storage/lockbox/remove_from_storage(obj/item/W, atom/new_location, burn = 0)
|
||||
open = TRUE
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/loyalty
|
||||
name = "lockbox of mindshield implants"
|
||||
req_access = list(GLOB.access_security)
|
||||
@@ -107,51 +118,60 @@
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/medal/AltClick()
|
||||
if(!locked)
|
||||
open = (open ? FALSE : TRUE)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/medal/PopulateContents()
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/valor(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/bronze_heart(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/conduct(src)
|
||||
new /obj/item/clothing/accessory/medal/gold/captain(src)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma(src)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
new /obj/item/clothing/accessory/medal/gold/heroism(src)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/secmedal
|
||||
/obj/item/weapon/storage/lockbox/medal/update_icon()
|
||||
cut_overlays()
|
||||
if(locked)
|
||||
icon_state = "medalbox+l"
|
||||
open = FALSE
|
||||
else
|
||||
icon_state = "medalbox"
|
||||
if(open)
|
||||
icon_state += "open"
|
||||
if(broken)
|
||||
icon_state += "+b"
|
||||
if(contents && open)
|
||||
for (var/i in 1 to contents.len)
|
||||
var/obj/item/clothing/accessory/medal/M = contents[i]
|
||||
var/mutable_appearance/medalicon = mutable_appearance(initial(icon), M.medaltype)
|
||||
if(i > 1 && i <= 5)
|
||||
medalicon.pixel_x += ((i-1)*3)
|
||||
else if(i > 5)
|
||||
medalicon.pixel_y -= 7
|
||||
medalicon.pixel_x -= 2
|
||||
medalicon.pixel_x += ((i-6)*3)
|
||||
add_overlay(medalicon)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/medal/sec
|
||||
name = "security medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the security department."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(GLOB.access_hos)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/secmedal/PopulateContents()
|
||||
/obj/item/weapon/storage/lockbox/medal/sec/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/silver/security(src)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/scimedal
|
||||
/obj/item/weapon/storage/lockbox/medal/sci
|
||||
name = "science medal box"
|
||||
desc = "A locked box used to store medals to be given to members of the science department."
|
||||
icon_state = "medalbox+l"
|
||||
item_state = "syringe_kit"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
storage_slots = 10
|
||||
max_combined_w_class = 20
|
||||
req_access = list(GLOB.access_rd)
|
||||
icon_locked = "medalbox+l"
|
||||
icon_closed = "medalbox"
|
||||
icon_broken = "medalbox+b"
|
||||
can_hold = list(/obj/item/clothing/accessory/medal)
|
||||
|
||||
/obj/item/weapon/storage/lockbox/scimedal/PopulateContents()
|
||||
/obj/item/weapon/storage/lockbox/medal/sci/PopulateContents()
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/clothing/accessory/medal/plasma/nobel_science(src)
|
||||
@@ -24,4 +24,4 @@
|
||||
new /obj/item/device/laser_pointer(src)
|
||||
new /obj/item/weapon/door_remote/research_director(src)
|
||||
new /obj/item/weapon/storage/box/firingpins(src)
|
||||
new /obj/item/weapon/storage/lockbox/scimedal(src)
|
||||
new /obj/item/weapon/storage/lockbox/medal/sci(src)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
new /obj/item/device/flashlight/seclite(src)
|
||||
new /obj/item/weapon/pinpointer(src)
|
||||
new /obj/item/clothing/under/rank/head_of_security/grey(src)
|
||||
new /obj/item/weapon/storage/lockbox/secmedal(src)
|
||||
new /obj/item/weapon/storage/lockbox/medal/sec(src)
|
||||
|
||||
/obj/structure/closet/secure_closet/warden
|
||||
name = "\proper warden's locker"
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
item_color = "bronze"
|
||||
materials = list(MAT_METAL=1000)
|
||||
resistance_flags = FIRE_PROOF
|
||||
var/medaltype = "medal" //Sprite used for medalbox
|
||||
var/commended = FALSE
|
||||
|
||||
//Pinning medals on people
|
||||
@@ -138,6 +139,7 @@
|
||||
desc = "A silver medal."
|
||||
icon_state = "silver"
|
||||
item_color = "silver"
|
||||
medaltype = "medal-silver"
|
||||
materials = list(MAT_SILVER=1000)
|
||||
|
||||
/obj/item/clothing/accessory/medal/silver/valor
|
||||
@@ -153,6 +155,7 @@
|
||||
desc = "A prestigious golden medal."
|
||||
icon_state = "gold"
|
||||
item_color = "gold"
|
||||
medaltype = "medal-gold"
|
||||
materials = list(MAT_GOLD=1000)
|
||||
|
||||
/obj/item/clothing/accessory/medal/gold/captain
|
||||
@@ -169,6 +172,7 @@
|
||||
desc = "An eccentric medal made of plasma."
|
||||
icon_state = "plasma"
|
||||
item_color = "plasma"
|
||||
medaltype = "medal-plasma"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = -10, acid = 0) //It's made of plasma. Of course it's flammable.
|
||||
materials = list(MAT_PLASMA=1000)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 57 KiB |
Reference in New Issue
Block a user