mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-21 14:34:49 +00:00
* The Coupon Master PDA app (#80240) ## About The Pull Request This PR adds a new PDA program to the supply category, which allows users to redeems coupons for various cargo packs (mostly goodies), like the ones also found at the bottom of cig packs. How it works is fairly simple: - Once installed, the modular computer subsystem will periodically, at a 3-5 minutes interval, generate a coupon code datum associated to a plain text code, which is sent out to everyone with the program installed. - The user can then open the program and insert the text into an input box to redeem the coupon code, which is then associated with their bank account. - He will then have to find a photocopier, and tap it with the PDA to print the coupon. Only one coupon can be printed. Photocopier fees apply, so it'd cost 5 creds to the average assistant to print the coupon. - He can then insert the coupon in a cargo console and order/reuest the associated pack (same deal as cig coupons). - Some coupon codes however, especially those with juicer discounts, will expire after a while if not printed. Albeit mostly innocuous, the program provides negative Detomatix resistance, slowly fills the computer file storage with trash files with each redeemed coupon, and halves the download speed of new apps. Not really the cleanest ware out there. This PR also extends coupons to several non-goody packs, since they have been privately buyable for over the last couple years now. Some packs get discounts less frequently however, with those in the uncommon category being roughly 1 in a 12 chance and the rare being 1 in 50. Here's a screenshot of the UI (outdated, I've reduced the height from 500 to 400 and the notice box tip to specify the right click):  Fun fact: Right now, the odds of a 75% discount coming from the Coupon Master for the 1.000.000 credits bycycle pack are roughly 0.0012%, while that of a 50% for the same pack, from a cig pack coupon are 0.0042%. ## Why It's Good For The Game These last couple days I've been wanting to test myself at making simple UIs, as well as contributing to the modular computers feature, which has started to become pretty neat ever since PDAs were reworked into a subtype of it. Beside, coupons are a very small feature limited to the bottom of cigarette packs (also possibly cursed) in the current state of affairs. Cargo is filled with packs that are niche or fluff. Modular computers also has those little things that, while interesting, do not contribute a whole lot. Maybe this is one of them, but I guess free* coupons are always a big W. ## Changelog 🆑 add: Added the 'Coupon Master' program for the PDA. Install it to receive periodical, redeemable coupons for several cargo packs. Requires NTnet connection and the messenger enabled to work. add: Coupons are no longer only limited to goodies, but may also apply discount to some other packs as well. /🆑 <sup>*minus the photocopier fee</sup> --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com> * The Coupon Master PDA app --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com> Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com>
136 lines
4.9 KiB
Plaintext
136 lines
4.9 KiB
Plaintext
/**
|
|
* can_run_on_flags bitflags
|
|
* Used by programs to tell what type of ModPC it can run on.
|
|
* Everything a program can run on needs valid icons for each individual one.
|
|
*/
|
|
///Runs on everything.
|
|
#define PROGRAM_ALL ALL
|
|
///Can run on Modular PC Consoles
|
|
#define PROGRAM_CONSOLE (1<<0)
|
|
///Can run on Laptops.
|
|
#define PROGRAM_LAPTOP (1<<1)
|
|
///Can run on PDAs.
|
|
#define PROGRAM_PDA (1<<2)
|
|
|
|
/**
|
|
* program_flags
|
|
* Used by programs to tell the ModPC any special functions it has.
|
|
*/
|
|
///If the program requires NTNet to be online for it to work.
|
|
#define PROGRAM_REQUIRES_NTNET (1<<0)
|
|
///The program can be downloaded from the default NTNet downloader store.
|
|
#define PROGRAM_ON_NTNET_STORE (1<<1)
|
|
///The program can only be downloaded from the Syndinet store, usually nukie/emagged pda.
|
|
#define PROGRAM_ON_SYNDINET_STORE (1<<2)
|
|
///The program is unique and will delete itself upon being transferred to ensure only one copy exists.
|
|
#define PROGRAM_UNIQUE_COPY (1<<3)
|
|
///The program is a header and will show up at the top of the ModPC's UI.
|
|
#define PROGRAM_HEADER (1<<4)
|
|
///The program will run despite the ModPC not having any power in it.
|
|
#define PROGRAM_RUNS_WITHOUT_POWER (1<<5)
|
|
|
|
//Program categories
|
|
#define PROGRAM_CATEGORY_DEVICE "Device Tools"
|
|
#define PROGRAM_CATEGORY_EQUIPMENT "Equipment"
|
|
#define PROGRAM_CATEGORY_GAMES "Games"
|
|
#define PROGRAM_CATEGORY_SECURITY "Security & Records"
|
|
#define PROGRAM_CATEGORY_ENGINEERING "Engineering"
|
|
#define PROGRAM_CATEGORY_SUPPLY "Supply"
|
|
#define PROGRAM_CATEGORY_SCIENCE "Science"
|
|
|
|
///The default amount a program should take in cell use.
|
|
#define PROGRAM_BASIC_CELL_USE 15
|
|
|
|
///This app grants a minor protection against being PDA bombed if installed.
|
|
///(can sometimes prevent it from being sent, while wasting a PDA bomb from the sender).
|
|
#define DETOMATIX_RESIST_MINOR 1
|
|
///This app grants a larger protection against being PDA bombed if installed.
|
|
///(can sometimes prevent it from being sent, while wasting a PDA bomb from the sender).
|
|
#define DETOMATIX_RESIST_MAJOR 2
|
|
///This app gives a diminished protection against being PDA bombed if installed.
|
|
#define DETOMATIX_RESIST_MALUS -4
|
|
|
|
/**
|
|
* NTNet transfer speeds, used when downloading/uploading a file/program.
|
|
* The define is how fast it will download an app every program's process_tick.
|
|
*/
|
|
///Used for wireless devices with low signal.
|
|
#define NTNETSPEED_LOWSIGNAL 0.5
|
|
///Used for wireless devices with high signal.
|
|
#define NTNETSPEED_HIGHSIGNAL 1
|
|
///Used for laptops with a high signal, or computers, which is connected regardless of z level.
|
|
#define NTNETSPEED_ETHERNET 2
|
|
|
|
/**
|
|
* NTNet connection signals
|
|
* Used to calculate the defines above from NTNet Downloader, this is how
|
|
* good a ModPC's signal is.
|
|
*/
|
|
///When you're away from the station/mining base and not on a console, you can't access the internet.
|
|
#define NTNET_NO_SIGNAL 0
|
|
///Low signal, so away from the station, but still connected
|
|
#define NTNET_LOW_SIGNAL 1
|
|
///On station with good signal.
|
|
#define NTNET_GOOD_SIGNAL 2
|
|
///Using a Computer or Laptop with good signal, ethernet-connected.
|
|
#define NTNET_ETHERNET_SIGNAL 3
|
|
|
|
/// The default ringtone of the Messenger app.
|
|
#define MESSENGER_RINGTONE_DEFAULT "beep"
|
|
|
|
/// The maximum length of the ringtone of the Messenger app.
|
|
#define MESSENGER_RINGTONE_MAX_LENGTH 20
|
|
|
|
/**
|
|
* PDA Themes
|
|
* For these to work, the defines must be defined in tgui/styles/themes/[define].scss
|
|
*/
|
|
|
|
///Default NtOS PDA theme
|
|
#define PDA_THEME_NTOS "ntos"
|
|
#define PDA_THEME_DARK_MODE "ntos_darkmode"
|
|
#define PDA_THEME_RETRO "ntOS95"
|
|
#define PDA_THEME_SYNTH "ntos_synth"
|
|
#define PDA_THEME_TERMINAL "ntos_terminal"
|
|
|
|
///Emagged/Syndicate NtOS (SyndiOS) PDA theme
|
|
#define PDA_THEME_SYNDICATE "syndicate"
|
|
|
|
//Maintenance-loot themes
|
|
#define PDA_THEME_CAT "ntos_cat"
|
|
#define PDA_THEME_LIGHT_MODE "ntos_lightmode"
|
|
#define PDA_THEME_SPOOKY "ntos_spooky"
|
|
|
|
//Defines for the names of all the themes
|
|
#define PDA_THEME_NTOS_NAME "NtOS"
|
|
#define PDA_THEME_DARK_MODE_NAME "NtOS Dark Mode"
|
|
#define PDA_THEME_RETRO_NAME "Retro"
|
|
#define PDA_THEME_SYNTH_NAME "Synth"
|
|
#define PDA_THEME_TERMINAL_NAME "Terminal"
|
|
#define SYNDICATE_THEME_NAME "Syndicate"
|
|
#define CAT_THEME_NAME "Cat"
|
|
#define LIGHT_THEME_NAME "NtOS Light Mode"
|
|
#define ELDRITCH_THEME_NAME "Eldritch"
|
|
|
|
///List of PDA themes that are accessible to everyone by default.
|
|
GLOBAL_LIST_INIT(default_pda_themes, list(
|
|
PDA_THEME_NTOS_NAME = PDA_THEME_NTOS,
|
|
PDA_THEME_DARK_MODE_NAME = PDA_THEME_DARK_MODE,
|
|
PDA_THEME_RETRO_NAME = PDA_THEME_RETRO,
|
|
PDA_THEME_SYNTH_NAME = PDA_THEME_SYNTH,
|
|
PDA_THEME_TERMINAL_NAME = PDA_THEME_TERMINAL,
|
|
))
|
|
|
|
///List of PDA themes that are accessible to everyone by default.
|
|
GLOBAL_LIST_INIT(pda_name_to_theme, list(
|
|
PDA_THEME_NTOS_NAME = PDA_THEME_NTOS,
|
|
PDA_THEME_DARK_MODE_NAME = PDA_THEME_DARK_MODE,
|
|
PDA_THEME_RETRO_NAME = PDA_THEME_RETRO,
|
|
PDA_THEME_SYNTH_NAME = PDA_THEME_SYNTH,
|
|
PDA_THEME_TERMINAL_NAME = PDA_THEME_TERMINAL,
|
|
SYNDICATE_THEME_NAME = PDA_THEME_SYNDICATE,
|
|
CAT_THEME_NAME = PDA_THEME_CAT,
|
|
LIGHT_THEME_NAME = PDA_THEME_LIGHT_MODE,
|
|
ELDRITCH_THEME_NAME = PDA_THEME_SPOOKY,
|
|
))
|