Skip to content

Commit

Permalink
Santa's toy bag!
Browse files Browse the repository at this point in the history
Fixed some miscellaneous stuff to prevent round-start crashing.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2758 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
vageyenaman@gmail.com committed Dec 21, 2011
1 parent 6ad42b9 commit bbed525
Show file tree
Hide file tree
Showing 9 changed files with 815 additions and 775 deletions.
8 changes: 8 additions & 0 deletions code/game/objects/items/item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions code/game/objects/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

11 changes: 10 additions & 1 deletion code/game/objects/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]!"))
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions code/modules/admin/NewBan.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ var/savefile/Banlist
var/id = clientvar.computer_id
var/key = clientvar.ckey

if(!Banlist) // if Banlist cannot be located for some reason
LoadBans() // try to load the bans
if(!Banlist) // uh oh, can't find bans!
return 0 // ABORT ABORT ABORT

Banlist.cd = "/base"
if (Banlist.dir.Find("[key][id]"))
Banlist.cd = "[key][id]"
Expand Down
Binary file modified icons/mob/back.dmi
Binary file not shown.
Binary file modified icons/mob/items_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/items_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/storage.dmi
Binary file not shown.
1,550 changes: 776 additions & 774 deletions maps/tgstation.2.0.8.dmm

Large diffs are not rendered by default.

0 comments on commit bbed525

Please sign in to comment.