mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Added pizzaboxes. Stackable, Tagable, and awesome. Sprites by supercrayon (I slightly modified them, sorry)
Updated (and fixed) changelog. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3927 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -152,6 +152,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( \
|
||||
new/datum/stack_recipe("mouse traps", /obj/item/weapon/storage/mousetraps), \
|
||||
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
|
||||
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
|
||||
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
|
||||
)
|
||||
|
||||
/obj/item/stack/sheet/cardboard
|
||||
|
||||
@@ -1880,3 +1880,175 @@
|
||||
icon_state = "vegetablepizzaslice"
|
||||
bitesize = 2
|
||||
|
||||
/obj/item/pizzabox
|
||||
name = "Pizza Box"
|
||||
desc = "A box suited for pizzas"
|
||||
icon = 'food.dmi'
|
||||
icon_state = "pizzabox1"
|
||||
|
||||
var/open = 0 // Is the box open?
|
||||
var/ismessy = 0 // Fancy mess on the lid
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/pizza // Content pizza
|
||||
var/list/boxes = list() // If the boxes are stacked, they come here
|
||||
var/boxtag = ""
|
||||
|
||||
/obj/item/pizzabox/update_icon()
|
||||
|
||||
overlays = list()
|
||||
|
||||
// Set appropriate description
|
||||
if( open && pizza )
|
||||
desc = "A box suited for pizzas. It appears to have a [pizza.name] inside."
|
||||
else if( boxes.len > 0 )
|
||||
desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile."
|
||||
|
||||
var/obj/item/pizzabox/topbox = boxes[boxes.len]
|
||||
var/toptag = topbox.boxtag
|
||||
if( toptag != "" )
|
||||
desc = "[desc] The box on top has a tag, it reads: '[toptag]'."
|
||||
else
|
||||
desc = "A box suited for pizzas."
|
||||
|
||||
if( boxtag != "" )
|
||||
desc = "[desc] The box has a tag, it reads: '[boxtag]'."
|
||||
|
||||
// Icon states and overlays
|
||||
if( open )
|
||||
if( ismessy )
|
||||
icon_state = "pizzabox_messy"
|
||||
else
|
||||
icon_state = "pizzabox_open"
|
||||
|
||||
if( pizza )
|
||||
var/image/pizzaimg = image("food.dmi", icon_state = pizza.icon_state)
|
||||
pizzaimg.pixel_y = -3
|
||||
overlays += pizzaimg
|
||||
|
||||
return
|
||||
else
|
||||
// Stupid code because byondcode sucks
|
||||
var/doimgtag = 0
|
||||
if( boxes.len > 0 )
|
||||
var/obj/item/pizzabox/topbox = boxes[boxes.len]
|
||||
if( topbox.boxtag != "" )
|
||||
doimgtag = 1
|
||||
else
|
||||
if( boxtag != "" )
|
||||
doimgtag = 1
|
||||
|
||||
if( doimgtag )
|
||||
var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag")
|
||||
tagimg.pixel_y = boxes.len * 3
|
||||
overlays += tagimg
|
||||
|
||||
icon_state = "pizzabox[boxes.len+1]"
|
||||
|
||||
/obj/item/pizzabox/attack_hand( mob/user as mob )
|
||||
|
||||
if( open && pizza )
|
||||
user.put_in_hand( pizza )
|
||||
|
||||
user << "\red You take the [src.pizza] out of the [src]."
|
||||
src.pizza = null
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if( boxes.len > 0 )
|
||||
if( user.get_inactive_hand() != src )
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/pizzabox/box = boxes[boxes.len]
|
||||
boxes -= box
|
||||
|
||||
user.put_in_hand( box )
|
||||
user << "\red You remove the topmost [src] from your hand."
|
||||
box.update_icon()
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/pizzabox/attack_self( mob/user as mob )
|
||||
|
||||
if( boxes.len > 0 )
|
||||
return
|
||||
|
||||
open = !open
|
||||
|
||||
if( open && pizza )
|
||||
ismessy = 1
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob )
|
||||
if( istype(I, /obj/item/pizzabox/) )
|
||||
var/obj/item/pizzabox/box = I
|
||||
|
||||
if( !box.open && !src.open )
|
||||
// Make a list of all boxes to be added
|
||||
var/list/boxestoadd = list()
|
||||
boxestoadd += box
|
||||
for(var/obj/item/pizzabox/i in box.boxes)
|
||||
boxestoadd += i
|
||||
|
||||
if( (boxes.len+1) + boxestoadd.len <= 5 )
|
||||
user.drop_item()
|
||||
|
||||
box.loc = src
|
||||
box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit
|
||||
src.boxes.Add( boxestoadd )
|
||||
|
||||
box.update_icon()
|
||||
update_icon()
|
||||
|
||||
user << "\red You put the [box] ontop of the [src]!"
|
||||
else
|
||||
user << "\red The stack is too high!"
|
||||
else
|
||||
user << "\red Close the [box] first!"
|
||||
|
||||
return
|
||||
|
||||
if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name
|
||||
|
||||
if( src.open )
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
src.pizza = I
|
||||
|
||||
update_icon()
|
||||
|
||||
user << "\red You put the [I] in the [src]!"
|
||||
else
|
||||
user << "\red You try to push the [I] through the lid but it doesn't work!"
|
||||
return
|
||||
|
||||
if( istype(I, /obj/item/weapon/pen/) )
|
||||
|
||||
if( src.open )
|
||||
return
|
||||
|
||||
var/t = input("Enter what you want to add to the tag:", "Write", null, null) as text
|
||||
|
||||
var/obj/item/pizzabox/boxtotagto = src
|
||||
if( boxes.len > 0 )
|
||||
boxtotagto = boxes[boxes.len]
|
||||
|
||||
boxtotagto.boxtag = copytext("[boxtotagto.boxtag][t]", 1, 30)
|
||||
|
||||
update_icon()
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -46,18 +46,21 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Wed 27th June 2012</h2>
|
||||
<h2 class="date">Wednesday, June 27th</h2>
|
||||
<h3 class="author">Errorage updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Fixed the bug which prevented you from editing book's titles and authors with a pen. Also fixed the bug which prevented you from ordering a book by it's SS13ID.</li>
|
||||
<li class="rscadd"><font color='red'><b>Added the F12 hotkey which hides most of the UI. Currently only works for humans.</b></font></li>
|
||||
</ul>
|
||||
<h3 class="author">Donkie updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Pizza boxes! Fully stackable, tagable (with pen), and everythingelse-able. Fantastic icons by supercrayon!<br>Created with a sheet of cardboard.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Tue 26th June 2012</h2>
|
||||
<h2 class="date">Tuesday, June 26th</h2>
|
||||
<h3 class="author">Errorage updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Changeling parasting now only weakens for 10 game ticks. It no longer silences your target.</li>
|
||||
@@ -65,7 +68,12 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Sat 23rd June 2012</h2>
|
||||
<h2 class="date">Saturday, June 23rd</h2>
|
||||
<h3 class="author">Donkie updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Reworked job randomizing system. Should be more fair.</li>
|
||||
<li class="tweak">List of players are now randomized before given antag, this means that declaring as fast as possible doesn't mean shit anymore!</li>
|
||||
</ul>
|
||||
<h3 class="author">Carn updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">Putting a blindfold on a human with lightly damaged eyes will speed up the healing process. Similar with earmuffs.</li>
|
||||
@@ -79,16 +87,7 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Saturday, June 23rd</h2>
|
||||
<h3 class="author">Donkie updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="tweak">Reworked job randomizing system. Should be more fair.</li>
|
||||
<li class="tweak">List of players are now randomized before given antag, this means that declaring as fast as possible doesn't mean shit anymore!</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">June 20th, 2012</h2>
|
||||
<h2 class="date">Wednesday, June 20th</h2>
|
||||
<h3 class="author">Nodrak updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">AIs, Borgs are no longer able to be cultists or revolutionaries as their objectives completely contradict their laws. They can still be subverted of course.</li>
|
||||
@@ -104,15 +103,11 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">June 18th, 2012</h2>
|
||||
<h2 class="date">Monday, June 18th</h2>
|
||||
<h3 class="author">Giacom updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Fix for special characters on paper and from announcements</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">June 18th, 2012</h2>
|
||||
<h3 class="author">Sieve updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="bugfix">Various small bugfixes, check the commit log for full details</li>
|
||||
@@ -124,10 +119,6 @@ should be listed in the changelog upon commit tho. Thanks. -->
|
||||
<li class="rscadd">If a borg has the satchel in its modules (Doesn't have to be the active one), it will auto-magically pick up any ores it walks over.</li>
|
||||
<li class="rscadd">Bumping an asteroid wall with a pickaxe/drill in your hand makes you auto-magically start drilling the wall, making mining much less tedious (humans and borgs)(Also, gustavg's idea)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">Monday, June 18th</h2>
|
||||
<h3 class="author">Icarus updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="imageadd">New afro hairstyles. Big Afro by Intigracy.</li>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 81 KiB |
Reference in New Issue
Block a user