mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Santa's toy bag!
Fixed some miscellaneous stuff to prevent round-start crashing. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2758 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -112,6 +112,14 @@
|
||||
if (M.s_active == src.loc)
|
||||
if (M.client)
|
||||
M.client.screen -= src
|
||||
if(istype(src.loc, /obj/item/weapon/storage/backpack/santabag))
|
||||
if(src.loc.contents.len < 5)
|
||||
src.loc.icon_state = "giftbag0"
|
||||
else if(src.loc.contents.len >= 5 && src.loc.contents.len < 15)
|
||||
src.loc.icon_state = "giftbag1"
|
||||
else if(src.loc.contents.len >= 15)
|
||||
src.loc.icon_state = "giftbag2"
|
||||
|
||||
src.throwing = 0
|
||||
if (src.loc == user)
|
||||
//canremove==0 means that object may not be removed. You can still wear it. This only applies to clothing. /N
|
||||
|
||||
@@ -70,3 +70,19 @@
|
||||
del(O)
|
||||
crit_fail = 1
|
||||
icon_state = "brokenpack"
|
||||
|
||||
|
||||
/obj/item/weapon/storage/backpack/santabag
|
||||
name = "Santa's Gift Bag"
|
||||
desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!"
|
||||
icon_state = "giftbag0"
|
||||
item_state = "giftbag"
|
||||
w_class = 4.0
|
||||
storage_slots = 20
|
||||
max_w_class = 3
|
||||
max_combined_w_class = 400 // can store a ton of shit!
|
||||
|
||||
New()
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -162,6 +162,15 @@
|
||||
src.orient2hud(user)
|
||||
W.dropped(user)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(istype(src, /obj/item/weapon/storage/backpack/santabag)) // update the santa bag icon
|
||||
if(contents.len < 5)
|
||||
src.icon_state = "giftbag0"
|
||||
else if(contents.len >= 5 && contents.len < 15)
|
||||
src.icon_state = "giftbag1"
|
||||
else if(contents.len >= 15)
|
||||
src.icon_state = "giftbag2"
|
||||
|
||||
if (istype(W, /obj/item/weapon/gun/energy/crossbow)) return //STEALTHY
|
||||
for(var/mob/O in viewers(user, null))
|
||||
O.show_message(text("\blue [user] has added [W] to [src]!"))
|
||||
@@ -185,7 +194,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/attack_paw(mob/user as mob)
|
||||
playsound(src.loc, "rustle", 50, 1, -5)
|
||||
//playsound(src.loc, "rustle", 50, 1, -5) // what
|
||||
return src.attack_hand(user)
|
||||
|
||||
/obj/item/weapon/storage/attack_hand(mob/user as mob)
|
||||
|
||||
Reference in New Issue
Block a user