Skip to content

Commit

Permalink
Merge branch 'Bubberstation:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MosleyTheMalO authored Sep 26, 2024
2 parents 0e139c4 + ab73b21 commit c2d0b46
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 8 deletions.
13 changes: 7 additions & 6 deletions code/datums/storage/storage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
if(user.active_storage == src && user.client)
seeing += user
else
is_using -= user
hide_contents(user)
return seeing

/**
Expand Down Expand Up @@ -1056,8 +1056,6 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
* * mob/to_hide - the mob to hide the storage from
*/
/datum/storage/proc/hide_contents(mob/to_hide)
if(!to_hide.client)
return TRUE
if(to_hide.active_storage == src)
to_hide.active_storage = null

Expand All @@ -1070,8 +1068,9 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)

is_using -= to_hide

to_hide.client.screen -= storage_interfaces[to_hide].list_ui_elements()
to_hide.client.screen -= real_location.contents
if(to_hide.client)
to_hide.client.screen -= storage_interfaces[to_hide].list_ui_elements()
to_hide.client.screen -= real_location.contents
QDEL_NULL(storage_interfaces[to_hide])
storage_interfaces -= to_hide

Expand Down Expand Up @@ -1102,7 +1101,9 @@ GLOBAL_LIST_EMPTY(cached_storage_typecaches)
var/columns = clamp(max_slots, 1, screen_max_columns)
var/rows = clamp(CEILING(adjusted_contents / columns, 1) + additional_row, 1, screen_max_rows)

for (var/ui_user in storage_interfaces)
for (var/mob/ui_user as anything in storage_interfaces)
if (isnull(storage_interfaces[ui_user]))
continue
storage_interfaces[ui_user].update_position(screen_start_x, screen_pixel_x, screen_start_y, screen_pixel_y, columns, rows)

var/current_x = screen_start_x
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-2118.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "LT3"
delete-after: True
changes:
- qol: "New vote reminder notification, enabled for storyteller votes"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-2123.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "LT3"
delete-after: True
changes:
- image: "Added a moth to your taskbar"
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-2124.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "ReturnToZender"
delete-after: True
changes:
- balance: "NTC no longer gets Stardust shells, they get only their laser."
2 changes: 1 addition & 1 deletion interface/skin.dmf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ window "mainwindow"
is-default = true
saved-params = "pos;size;is-minimized;is-maximized"
statusbar = false
icon = 'icons\\ui_icons\\common\\tg_32.png'
icon = 'modular_zubbers\\icons\\UI_Icons\\common\\bubber_32.png'
macro = "default"
menu = "menu"
elem "split"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,4 +151,4 @@
new /obj/item/storage/photo_album/personal(src)
new /obj/item/bedsheet/centcom(src)
new /obj/item/storage/bag/garment/nanotrasen_consultant(src)
new /obj/item/storage/toolbox/guncase/skyrat/pistol/trappiste_small_case/firefly(src)
//new /obj/item/storage/toolbox/guncase/skyrat/pistol/trappiste_small_case/firefly(src) //Bubber Edit: I don't want it
34 changes: 34 additions & 0 deletions modular_zubbers/code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/datum/vote
/// Provide a reminder notification to those who haven't voted
var/vote_reminder = FALSE
/// Has the vote reminder fired yet
var/reminder_fired = FALSE

/// Bubber vote fire proc, original at code/controllers/subsystem/vote.dm
/datum/controller/subsystem/vote/fire()
if(!current_vote)
return

current_vote.time_remaining = round((current_vote.started_time + CONFIG_GET(number/vote_period) - world.time) / 10)
if(current_vote.time_remaining < 0)
end_vote()
return

// We give a reminder to latejoiners who may have missed the original vote notification.
if(!current_vote.vote_reminder || current_vote.reminder_fired)
return

if(current_vote.time_remaining > 45)
return

current_vote.reminder_fired = TRUE

for(var/client/late_voter as anything in GLOB.clients)
if(LAZYFIND(voted, late_voter.ckey)) // Skip people who already voted
continue

if(current_vote.vote_sound && (late_voter.prefs.read_preference(/datum/preference/toggle/sound_announcements)))
SEND_SOUND(late_voter, sound(current_vote.vote_sound))

to_chat(late_voter, span_yellowteamradio(span_soapbox("It's time to make your choices for [current_vote.name]! Type 'vote' or click <a href='byond://winset?command=vote'>here</a> to place your votes.")))

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
has_desc = TRUE
count_method = VOTE_COUNT_METHOD_MULTI
winner_method = VOTE_WINNER_METHOD_SIMPLE
vote_reminder = TRUE

/datum/vote/storyteller/New()
. = ..()
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8612,6 +8612,7 @@
#include "modular_zubbers\code\controllers\subsystem\air.dm"
#include "modular_zubbers\code\controllers\subsystem\mapping.dm"
#include "modular_zubbers\code\controllers\subsystem\research.dm"
#include "modular_zubbers\code\controllers\subsystem\vote.dm"
#include "modular_zubbers\code\controllers\subsystem\processing\sol_subsystem.dm"
#include "modular_zubbers\code\datums\action.dm"
#include "modular_zubbers\code\datums\akula_overrides.dm"
Expand Down

0 comments on commit c2d0b46

Please sign in to comment.