Files
Bubberstation/code/modules/modular_computers/file_system/programs/bounty_board.dm
SkyratBot 699e9f8150 [MIRROR] TGUI Latejoin Menu! [MDB IGNORE] (#18025)
* TGUI Latejoin Menu!

* [PR PR] Fixes up the TGUI Latejoin Menu! (#18044)

* Makes Angel, Dragon and Robotic wings available in the preferences menu again (#18013)

Makes Angel, Dragon and Robotic wings available in the prefs menu again

* Automatic changelog for PR #18013 [ci skip]

* [MIRROR] Petrified human statues now drop a (stone) brain on destruction [MDB IGNORE] (#18026)

* Petrified human statues now drop a (stone) brain on destruction (#71816)

## About The Pull Request
Destroying a petrified human statue will now drop their brain, albeit a
little more statue-like.

![image](https://user-images.githubusercontent.com/41448081/206316168-e902d6e4-1cb8-4498-80c8-891c59ae638b.png)

Changed from original PR after talking w/ Fikou about it

## Why It's Good For The Game
While the combo *does* step on the toes of Smite, the statue+rod combo
is capable of fully removing you from the round without a way back very
quickly. This keeps the strength of the combo while not making it
entirely impossible to get back into the round.

## Changelog
🆑
balance: Destroying a petrified human statue will now drop their brain.
/🆑

* Petrified human statues now drop a (stone) brain on destruction

Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>

* Automatic changelog for PR #18026 [ci skip]

* [MIRROR] Chaplain armor beacon now uses radial + previews possible armor sets, plus some choice beacon code cleanup. [MDB IGNORE] (#18019)

* Chaplain armor beacon now uses radial + previews possible armor sets, plus some choice beacon code cleanup. (#71674)

## About The Pull Request

- The chaplain choice beacon now uses a radial to select the armor set,
instead of a list, giving the user a preview of what each looks like.

![image](https://user-images.githubusercontent.com/51863163/205417930-f5ceab11-6974-48a9-a871-abcb8228bcf2.png)

- Lots of additional cleanup to choice beacon code in general. Less copy
pasted code.
- All beacons now speak from the beacon with their message, instead of
some going by "headset message". Soul removed

## Why It's Good For The Game

I always forgot when selecting my armor which looks like what, and
choosing an ugly one is a pain since you only get one choice. This
should help chaplains get the armor they actually want without needing
to check the wiki.

## Changelog

🆑 Melbert
qol: The chaplain's armament beacon now displays a radial instead of a
text list, showing previews of what all the armor sets look like
qol: (Almost) all choice beacons now use a pod to send their item,
instead of just magicking it under your feet
code: Cleaned up some choice beacon code.
/🆑

Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>

* Chaplain armor beacon now uses radial + previews possible armor sets, plus some choice beacon code cleanup.

* update modular

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>

* Automatic changelog for PR #18019 [ci skip]

* [MIRROR] Fixed an improper proc ref. [MDB IGNORE] (#18031)

Fixed an improper proc ref.

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>

* Automatic changelog for PR #18031 [ci skip]

* Fiiix!

* Fuck

* [MIRROR] Windoors are vulnerable to a jaws of life [MDB IGNORE] (#18040)

* Windoors are vulnerable to a jaws of life (#71733)

## About The Pull Request
Windoors can be pried by a jaws of life now
## Why It's Good For The Game
Windoors are already immune to any kind of deconstruction outside of
bashing it, so making it immune to the jaws of life as well seems
excessive
## Changelog
🆑
balance: jaws of life can pry windoors
/🆑

Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com>

* Windoors are vulnerable to a jaws of life

Co-authored-by: texan-down-under <73374039+etherware-novice@users.noreply.github.com>
Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com>

* Automatic changelog for PR #18040 [ci skip]

* Automatic changelog compile [ci skip]

* [fix] fixes det revolver icons (#18049)

* Delete guns.dmi

* Add files via upload

* Automatic changelog for PR #18049 [ci skip]

* [MIRROR] Fixes fake links in Adminwho that led to "no_feedback_link" [MDB IGNORE] (#18027)

* Fixes fake links in Adminwho that led to "no_feedback_link" (#71804)

## About The Pull Request
Basically, sometimes, very rarely, it was possible for this to happen,
when it shouldn't be happening. I was wondering for a little while what
it was about, and then I finally downloaded my chat logs for a round and
realized what was going on. It should no longer happen.

## Why It's Good For The Game
Clickable links that lead nowhere (and thus don't do anything) aren't
very good for the game.

## Changelog

🆑 GoldenAlpharex
fix: There shouldn't be clickable names in Adminwho that don't do
anything anymore.
/🆑

* Fixes fake links in Adminwho that led to "no_feedback_link"

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>

* Fix: Self-Actualization Device Doubling Damage (#18015)

* Change adjustOrganLoss/BruteLoss/FireLoss to set

* Reverts my naive soluton

* Automatic changelog for PR #18027 [ci skip]

* Automatic changelog for PR #18015 [ci skip]

* Fix TGUI latejoin menu not closing properly, properly this time

* Oh yea, flavourtext requirement exists. Not that we actually have it enabled upstream.

* Revert "Merge remote-tracking branch 'upstream/upstream-merge-71883' into fixlatejoinmenu"

This reverts commit 3279e73418f95637162a2923b0431e9e26b43403, reversing
changes made to d46aab7b421fee94d49b57e863bfd8e0917fc43f.

* Fucking stupid code merge shit

* Cool newline bro

* Dumb stupid commented code

* Also this

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: texan-down-under <73374039+etherware-novice@users.noreply.github.com>
Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: RatFromTheJungle <62520989+RatFromTheJungle@users.noreply.github.com>
Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>

* fix

Co-authored-by: Rimi Nosha <riminosha@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
Co-authored-by: texan-down-under <73374039+etherware-novice@users.noreply.github.com>
Co-authored-by: Candycaneannihalator <candycane@ thisisnotarealaddr.com>
Co-authored-by: Changelogs <action@github.com>
Co-authored-by: RatFromTheJungle <62520989+RatFromTheJungle@users.noreply.github.com>
Co-authored-by: Dani Glore <fantasticdragons@gmail.com>
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-12-15 16:18:28 -05:00

136 lines
4.9 KiB
Plaintext

/datum/computer_file/program/bounty_board
filename = "bountyboard"
filedesc = "Bounty Board Request Network"
category = PROGRAM_CATEGORY_SUPL
program_icon_state = "bountyboard"
extended_desc = "A multi-platform network for placing requests across the station, with payment across the network being possible.."
requires_ntnet = TRUE
size = 10
tgui_id = "NtosBountyBoard"
///Reference to the currently logged in user.
var/datum/bank_account/current_user
///The station request datum being affected by UI actions.
var/datum/station_request/active_request
///Value of the currently bounty input
var/bounty_value = 1
///Text of the currently written bounty
var/bounty_text = ""
///Has the app been added to the network yet?
var/networked = FALSE
/datum/computer_file/program/bounty_board/ui_data(mob/user)
var/list/data = get_header_data()
var/list/formatted_requests = list()
var/list/formatted_applicants = list()
if(current_user)
data["user"] = list()
data["user"]["name"] = current_user.account_holder
if(current_user.account_job)
data["user"]["job"] = current_user.account_job.title
data["user"]["department"] = current_user.account_job.paycheck_department
else
data["user"]["job"] = "No Job"
data["user"]["department"] = DEPARTMENT_UNASSIGNED
else
data["user"] = list()
data["user"]["name"] = user.name
data["user"]["job"] = "N/A"
data["user"]["department"] = "N/A"
if(!networked)
GLOB.allbountyboards += computer
networked = TRUE
if(computer.computer_id_slot)
current_user = computer.computer_id_slot?.registered_account
for(var/i in GLOB.request_list)
if(!i)
continue
var/datum/station_request/request = i
formatted_requests += list(list("owner" = request.owner, "value" = request.value, "description" = request.description, "acc_number" = request.req_number))
if(request.applicants)
for(var/datum/bank_account/j in request.applicants)
formatted_applicants += list(list("name" = j.account_holder, "request_id" = request.owner_account.account_id, "requestee_id" = j.account_id))
if(current_user)
data["accountName"] = current_user.account_holder
data["requests"] = formatted_requests
data["applicants"] = formatted_applicants
data["bountyValue"] = bounty_value
data["bountyText"] = bounty_text
return data
/datum/computer_file/program/bounty_board/ui_act(action, list/params)
. = ..()
if(.)
return
var/current_ref_num = params["request"]
var/current_app_num = params["applicant"]
var/datum/bank_account/request_target
if(current_ref_num)
for(var/datum/station_request/i in GLOB.request_list)
if("[i.req_number]" == "[current_ref_num]")
active_request = i
break
if(active_request)
for(var/datum/bank_account/j in active_request.applicants)
if("[j.account_id]" == "[current_app_num]")
request_target = j
break
switch(action)
if("createBounty")
if(!current_user || !bounty_text)
playsound(src, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
for(var/datum/station_request/i in GLOB.request_list)
if("[i.req_number]" == "[current_user.account_id]")
computer.say("Account already has active bounty.")
return
var/datum/station_request/curr_request = new /datum/station_request(current_user.account_holder, bounty_value,bounty_text,current_user.account_id, current_user)
GLOB.request_list += list(curr_request)
for(var/obj/i in GLOB.allbountyboards)
i.say("New bounty has been added!")
playsound(i.loc, 'sound/effects/cashregister.ogg', 30, TRUE)
return TRUE
if("apply")
if(!current_user)
computer.say("Please swipe a valid ID first.")
return TRUE
if(current_user.account_holder == active_request.owner)
playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
active_request.applicants += list(current_user)
if("payApplicant")
if(!current_user)
return
if(!current_user.has_money(active_request.value) || (current_user.account_holder != active_request.owner))
playsound(computer, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
return
request_target.transfer_money(current_user, active_request.value, "Bounties: Request Completed")
computer.say("Paid out [active_request.value] credits.")
GLOB.request_list.Remove(active_request)
return TRUE
if("clear")
if(current_user)
current_user = null
computer.say("Account Reset.")
return TRUE
if("deleteRequest")
if(!current_user)
playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
if(active_request.owner != current_user.account_holder)
playsound(computer, 'sound/machines/buzz-sigh.ogg', 20, TRUE)
return TRUE
computer.say("Deleted current request.")
GLOB.request_list.Remove(active_request)
return TRUE
if("bountyVal")
bounty_value = text2num(params["bountyval"])
if(!bounty_value)
bounty_value = 1
if("bountyText")
bounty_text = (params["bountytext"])
. = TRUE
/datum/computer_file/program/bounty_board/Destroy()
GLOB.allbountyboards -= computer
. = ..()