mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-15 03:27:46 +00:00
## About The Pull Request Removes the last computer part in the game: ID parts Because this is removed, I also removed all computer hardware in the game, and removed mentions of it in the game. There is still 'hardware', as in Computer, Tablet, or Laptop. Computers now all hold one ID slot by default, the only time a second ID was needed was to use the access of both at once, and for the ID modification application. This was now replaced with a new UI that only has one tab, one ID slot: https://user-images.githubusercontent.com/53777086/202801939-151b783f-75c8-46bf-a6c5-1b57b0d0da8e.mp4 ## Why It's Good For The Game Computer hardware is finally dead 🦀 ## Changelog 🆑 balance: All modular computers now only have one ID slot, and cannot be upgraded. qol: The HoP's access application now only has one app, logging in will directly modify the ID that's in it, making it less confusing to swap back and forth. /🆑
65 lines
2.4 KiB
Plaintext
65 lines
2.4 KiB
Plaintext
/datum/computer_file/program/shipping
|
|
filename = "shipping"
|
|
filedesc = "GrandArk Exporter"
|
|
category = PROGRAM_CATEGORY_SUPL
|
|
program_icon_state = "shipping"
|
|
extended_desc = "A combination printer/scanner app that enables modular computers to print barcodes for easy scanning and shipping."
|
|
size = 6
|
|
tgui_id = "NtosShipping"
|
|
program_icon = "tags"
|
|
///Account used for creating barcodes.
|
|
var/datum/bank_account/payments_acc
|
|
///The person who tagged this will receive the sale value multiplied by this number.
|
|
var/cut_multiplier = 0.5
|
|
///Maximum value for cut_multiplier.
|
|
var/cut_max = 0.5
|
|
///Minimum value for cut_multiplier.
|
|
var/cut_min = 0.01
|
|
|
|
/datum/computer_file/program/shipping/ui_data(mob/user)
|
|
var/list/data = get_header_data()
|
|
|
|
data["has_id_slot"] = !!computer.computer_id_slot
|
|
data["paperamt"] = "[computer.stored_paper] / [computer.max_paper]"
|
|
data["card_owner"] = computer.computer_id_slot || "No Card Inserted."
|
|
data["current_user"] = payments_acc ? payments_acc.account_holder : null
|
|
data["barcode_split"] = cut_multiplier * 100
|
|
return data
|
|
|
|
/datum/computer_file/program/shipping/ui_act(action, list/params)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(!computer)
|
|
return
|
|
|
|
if(!computer.computer_id_slot) //We need an ID to successfully run
|
|
return
|
|
|
|
switch(action)
|
|
if("ejectid")
|
|
computer.RemoveID(usr)
|
|
if("selectid")
|
|
if(!computer.computer_id_slot.registered_account)
|
|
playsound(get_turf(ui_host()), 'sound/machines/buzz-sigh.ogg', 50, TRUE, -1)
|
|
return
|
|
payments_acc = computer.computer_id_slot.registered_account
|
|
playsound(get_turf(ui_host()), 'sound/machines/ping.ogg', 50, TRUE, -1)
|
|
if("resetid")
|
|
payments_acc = null
|
|
if("setsplit")
|
|
var/potential_cut = input("How much would you like to pay out to the registered card?","Percentage Profit ([round(cut_min*100)]% - [round(cut_max*100)]%)") as num|null
|
|
cut_multiplier = potential_cut ? clamp(round(potential_cut/100, cut_min), cut_min, cut_max) : initial(cut_multiplier)
|
|
if("print")
|
|
if(computer.stored_paper <= 0)
|
|
to_chat(usr, span_notice("Printer is out of paper."))
|
|
return
|
|
if(!payments_acc)
|
|
to_chat(usr, span_notice("Software error: Please set a current user first."))
|
|
return
|
|
var/obj/item/barcode/barcode = new /obj/item/barcode(get_turf(ui_host()))
|
|
barcode.payments_acc = payments_acc
|
|
barcode.cut_multiplier = cut_multiplier
|
|
computer.stored_paper--
|
|
to_chat(usr, span_notice("The computer prints out a barcode."))
|