Files
Paradise/code/modules/supply/supply_order.dm
T
d668a29a60 Ports (most(ok like half)) station traits from tg. Ready for review into TM (#22334)
* no longer super sick time to port station traits in a 4 hour rush as you have lost control of your life

* some changes /fixes

* Apply suggestions from code review

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* more changes

* oh right, the murders (uplink price tweaks)

* Update code/controllers/subsystem/SSjobs.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* compiles

* doesnt work but works better

* tgui dogs still sleep but I want to sleep

* it should finally compile now. Probably.

* Update tgui.bundle.js

* Sorry IAN, transfer components is shoddy as hell

* removes minor uneeded /tgui

* also extra line whoops

* final stuff

* reverting changes I made earlier is hard ok

* Weight change, uplink reference

* oh right, the hey fucko

* Update code/_globalvars/traits.dm

Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>

* Update tgui.bundle.js

* pushes

* pulls it

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* more changes, ion rifle blocked on cyb revolution

* dipshit remove the debug / tgui pritier and such

* tgui

* updates tgui again as nanomap was merged

* Apply suggestions from code review

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* comment / tgui

* every day I worry all day

* Full TGUI rebuild + prettier

* ah fuck

* leave a customer feedback at the link below!

* tgui momenr

* tgui moment

* FUCK I am dumb

* vertical TGUI

* She T's on my GUI till I

* Update tgui.bundle.js

* Apply suggestions from code review

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>

* Update code/modules/supply/supply_pack.dm

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>

* IPC can now use robotic hearts / pulse demon hearts and charge

* fixes revert not working for hangover / arrivals

* tgui moment

* hhgreg

* fixes that one bug

* Every day I worry all day

* deconflicted for real this t ime

* Update code/datums/station_traits/postive_traits.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* ch-ch-ch-changes

* Update SSjobs.dm

* Update code/modules/supply/supply_pack.dm

Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>

* deconflicted but won't pass CI

* fixes double dipping on traits

* my le consoles, they le no work?

* Great Great Asset, Asset, Great Great Asset, Asset...

* sorry slime mains

* fixes borgs being punished heavier

* actually fixes it, I was dense

* hopefully fixes borg drunk further

* makes it compile?

* actually makes it compile god whyyyy

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
Co-authored-by: Ryan <80364400+Sirryan2002@users.noreply.github.com>
Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com>
Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
2024-01-08 19:07:09 +00:00

84 lines
2.8 KiB
Plaintext

/datum/supply_order
///The orders ID number
var/ordernum
///The supply pack this order is for
var/datum/supply_packs/object
///The person who ordered the supply order
var/orderedby
///The occupation/assignment of the person who ordered the supply order
var/orderedbyRank
///The account tied to this order, important for personal orders
var/orderedbyaccount
///The station department datum of the person's department who ordered the supply order
var/datum/station_department/ordered_by_department
///Reason/purpose for order given by orderer
var/comment
///does this order need to be approve by the department head?
var/requires_head_approval = FALSE
///does this order need to be approve by carg?
var/requires_cargo_approval = FALSE
/obj/item/paper/request_form
name = "request form"
var/order_number
/datum/supply_order/proc/createObject(atom/_loc, errors = 0)
if(!object)
return
//create the crate
var/obj/structure/closet/crate/crate = object.create_package(_loc)
if(comment)
crate.name = "[crate.name] ([comment])"
//create the manifest slip
var/obj/item/paper/manifest/slip = new
slip.points = object.get_cost()
slip.ordernumber = ordernum
var/stationName = station_name()
var/packagesAmt = length(SSeconomy.shopping_list)
slip.name = "Shipping Manifest - '[object.name]' for [orderedby]"
slip.info = "<h3>NAS Trurl Shipping Manifest</h3><hr><br>"
slip.info += "Order: #[ordernum]<br>"
slip.info += "Destination: [stationName]<br>"
slip.info += "Requested By: [orderedby]<br>"
slip.info += "Rank: [orderedbyRank]<br>"
slip.info += "Reason: [comment]<br>"
slip.info += "Supply Crate Type: [object.name]<br>"
slip.info += "Access Restriction: [object.access ? get_access_desc(object.access) : "None"]<br>"
slip.info += "[packagesAmt] PACKAGES IN THIS SHIPMENT<br>"
slip.info += "CONTENTS:<br><ul>"
for(var/atom/A in crate.contents)
slip.info += "<li>[A.name]</li>"
if(istype(crate, /obj/structure/closet/critter)) // critter crates do not actually spawn mobs yet and have no contains var, but the manifest still needs to list them
var/obj/structure/closet/critter/CritCrate = crate
if(CritCrate.content_mob)
var/mob/crittername = CritCrate.content_mob
slip.info += "<li>[initial(crittername.name)]</li>"
//manifest finalisation
slip.info += "</ul><br>"
slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS<hr>" // And now this is actually meaningful.
slip.loc = crate
if(istype(crate, /obj/structure/closet/crate))
var/obj/structure/closet/crate/CR = crate
CR.manifest = slip
CR.update_icon()
CR.announce_beacons = object.announce_beacons.Copy()
if(istype(crate, /obj/structure/largecrate))
var/obj/structure/largecrate/LC = crate
LC.manifest = slip
LC.update_icon()
return crate
/obj/item/paper/manifest
name = "supply manifest"
var/points = 0
var/ordernumber = 0