From d9a3242bdcfb1135d0cc99749416ab9da4fb8eb4 Mon Sep 17 00:00:00 2001 From: "musketstgstation@gmail.com" Date: Fri, 5 Nov 2010 14:21:19 +0000 Subject: [PATCH] Paperwork update v1: Requisition forms printable from the supply ordering console, crates contain manifests. Changelog updated. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@371 316c924e-a436-60f5-8080-3fe189b3f50e --- code/game/supplyshuttle.dm | 63 ++++++++++++++++++++++++++++++++++++-- icons/changelog.html | 18 ++++++++++- 2 files changed, 78 insertions(+), 3 deletions(-) diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index a675300378d..559da7225aa 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -17,6 +17,7 @@ var/supply_shuttle_can_send = 1 var/supply_shuttle_time = 0 var/supply_shuttle_timeleft = 0 var/supply_shuttle_points = 50 +var/ordernum=0 /area/supply/station //DO NOT TURN THE SD_LIGHTING STUFF ON FOR SHUTTLES. IT BREAKS THINGS. name = "supply shuttle" @@ -461,6 +462,9 @@ var/supply_shuttle_points = 50 del(crate) supply_shuttle_points += SUPPLY_POINTSPERCRATE +/obj/item/weapon/paper/manifest + name = "Supply Manifest" + /proc/process_supply_order() var/shuttleat = supply_shuttle_at_station ? SUPPLY_STATION_AREATYPE : SUPPLY_DOCK_AREATYPE @@ -485,6 +489,23 @@ var/supply_shuttle_points = 50 var/atom/A = new SP.containertype ( pickedloc ) A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]" + + //supply manifest generation begin + + if(ordernum) + ordernum++ + else + ordernum = rand(500,5000) //pick a random number to start with + + var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest (A) + slip.info = "" + slip.info +="

[command_name()] Shipping Manifest



" + slip.info +="Order #: [ordernum]
" + slip.info +="Destination: [station_name]
" + slip.info +="[supply_shuttle_shoppinglist.len] PACKAGES IN THIS SHIPMENT
" + slip.info +="CONTENTS:

" + slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
" return @@ -553,8 +579,9 @@ var/supply_shuttle_points = 50 for(var/S in (typesof(/datum/supply_packs) - /datum/supply_packs) ) var/datum/supply_packs/N = new S() if(N.hidden) continue //Have to send the type instead of a reference to - src.temp += "[N.name] Cost: [N.cost]
" //the obj because it would get caught by the garbage - src.temp += "
OK" //collector. oh well. + src.temp += "[N.name] Cost: [N.cost] " //the obj because it would get caught by the garbage + src.temp += "Print Requisition
" //collector. oh well. + src.temp += "
OK" else if (href_list["doorder"]) var/datum/supply_order/O = new/datum/supply_order () @@ -566,6 +593,38 @@ var/supply_shuttle_points = 50 src.temp = "Thanks for your request. The cargo team will process it as soon as possible.
" src.temp += "
OK" + else if (href_list["printform"]) + var/supplytype = href_list["printform"] + var/datum/supply_packs/P = new supplytype () + var/obj/item/weapon/paper/reqform = new /obj/item/weapon/paper(src.loc) + var/idname = "Unknown" + var/idrank = "Unknown" + var/reason = input(usr,"Reason:","Why do you require this item?","") + + reqform.name = "Requisition Form - [P.name]" + reqform.info += "

[station_name] Supply Requisition Form


" + + if (istype(usr:wear_id, /obj/item/weapon/card/id)) + if(usr:wear_id.registered) + idname = usr:wear_id.registered + if(usr:wear_id.assignment) + idrank = usr:wear_id.assignment + else + idname = usr.name + + reqform.info += "REQUESTED BY: [idname]
" + reqform.info += "RANK: [idrank]
" + reqform.info += "REASON: [reason]
" + reqform.info += "SUPPLY CRATE TYPE: [P.name]
" + reqform.info += "Contents:

" + reqform.info += "STAMP BELOW TO APPROVE THIS REQUISITION:
" + else if (href_list["vieworders"]) src.temp = "Current approved orders:

" for(var/S in supply_shuttle_shoppinglist) diff --git a/icons/changelog.html b/icons/changelog.html index f34585bfe8b..34326348364 100644 --- a/icons/changelog.html +++ b/icons/changelog.html @@ -45,8 +45,24 @@

Changelog

+
Friday, November 5, 14:11
+ -
Thursday, November 2, 19:11(GMT)
+
Tuesday, November 2, 19:11(GMT)