Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndroBetel committed Apr 28, 2024
1 parent 0a0e85e commit f6c9c53
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
29 changes: 29 additions & 0 deletions code/game/machinery/computer/camera_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,35 @@
circuit = /obj/item/circuitboard/computer/cameras/tv
var/obj/item/device/camera/broadcasting/broadcastingcamera = null

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/attackby(obj/item/I, mob/user)
if(!broadcastingcamera)
return

if(istype(I, /obj/item/spacecash))
var/obj/item/spacecash/spacecash = I
if(spacecash.counterfeit)
return

if(!broadcastingcamera.donationsaccount)
to_chat(user, SPAN_WARNING("Streamer is not accepting donations at this time."))
return

var/message = tgui_input_text(user, "What would you like to message the streamer? (48 Characters MAX)", "What?", max_length = 48)
!broadcastingcamera.donationsaccount.money += spacecash.worth
streamer.play_screen_text("<span class='langchat' style=font-size:16pt;text-align:center valign='top'><u>You've received a new donation!</u></span><br>" + message, /atom/movable/screen/text/screen_text/command_order, pick("#FF0000", "#008000", "#C71585", "#0000FF"))

Check failure on line 229 in code/game/machinery/computer/camera_console.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "streamer"

Check warning on line 229 in code/game/machinery/computer/camera_console.dm

View workflow job for this annotation

GitHub Actions / Run Linters

proc call requires static type: "play_screen_text"
playsound(broadcastingcamera, 'sound/machines/ping.ogg', 25)

var/datum/transaction/T = new()
T.target_name = acc.owner_name

Check failure on line 233 in code/game/machinery/computer/camera_console.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "acc"

Check warning on line 233 in code/game/machinery/computer/camera_console.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "owner_name"
T.purpose = "Donation"
T.amount = spacecash:worth
T.date = GLOB.current_date_string
T.time = worldtime2text()
!broadcastingcamera.donationsaccount.transaction_log.Add(T)
qdel(spacecash)

..()

/obj/structure/machinery/computer/cameras/wooden_tv/broadcast/Destroy()
broadcastingcamera = null
return ..()
Expand Down
9 changes: 9 additions & 0 deletions code/modules/paperwork/photography.dm
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,15 @@
w_class = SIZE_HUGE
flags_equip_slot = NO_FLAGS //cannot be equiped
var/obj/structure/machinery/camera/correspondent/linked_cam
var/datum/money_account/donationsaccount

/obj/item/device/camera/broadcasting/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/card/id))
var/obj/item/card/id/id = I
if(!id.associated_account_number)
return
donationsaccount = get_account(id.associated_account_number)
to_chat(user, SPAN_NOTICE("Account linked for donations!"))

/obj/item/device/camera/broadcasting/Initialize(mapload, ...)
. = ..()
Expand Down

0 comments on commit f6c9c53

Please sign in to comment.