Skip to content

Commit

Permalink
Merge branch 'master' into opendream_lint
Browse files Browse the repository at this point in the history
  • Loading branch information
FluffyGhoster committed Jun 26, 2023
2 parents 1a23e13 + 3d97fff commit 0abf376
Show file tree
Hide file tree
Showing 56 changed files with 776 additions and 451 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/byond.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: BYOND tests
name: CI Suite

on:
merge_group:
branches:
- master
push:
branches:
- master
Expand Down Expand Up @@ -46,6 +48,32 @@ jobs:
with:
outputFile: output-annotations.txt

# TODO: Move that to the linters at some point
tgui-test:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-22.04
steps:
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14

- name: Checkout Repository
uses: actions/checkout@v3

- name: Restore Yarn cache
uses: actions/cache@v3
with:
path: tgui/.yarn/cache
key: ${{ runner.os }}-yarn-${{ hashFiles('tgui/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-
${{ runner.os }}-
- name: Lint TGUI
run: |
tools/build/build --ci lint tgui-test
unit-test-linux:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/update_tgs_dmapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update TGS DMAPI

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
update-dmapi:
runs-on: ubuntu-20.04
name: Update the TGS DMAPI
steps:
- name: Clone
uses: actions/checkout@v3

- name: Branch
run: |
git branch -f tgs-dmapi-update
git checkout tgs-dmapi-update
git reset --hard master
- name: Apply DMAPI update
uses: tgstation/tgs-dmapi-updater@v2
with:
header-path: 'code/__defines/tgs.dm'
library-path: 'code/modules/tgs'

- name: Commit and Push
continue-on-error: true
run: |
git config --local user.email "[email protected]"
git config --local user.name "AuroraBuildBot"
git add .
git commit -m 'Update TGS DMAPI'
git push -f -u origin tgs-dmapi-update
- name: Create Pull Request
uses: repo-sync/pull-request@v2
if: ${{ success() }}
with:
source_branch: "tgs-dmapi-update"
destination_branch: "master"
pr_title: "Automatic TGS DMAPI Update"
pr_body: "This pull request updates the TGS DMAPI to the latest version. Please note any changes that may be breaking or unimplemented in your codebase by checking what changes are in the definitions file: code/__DEFINES/tgs.dm before merging."
pr_label: "Tools"
pr_allow_empty: false
github_token: ${{ secrets.BOT_TOKEN_AURORA }}
4 changes: 2 additions & 2 deletions code/controllers/subsystems/statpanel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var/datum/controller/subsystem/statpanels/SSstatpanels
update_actions = TRUE

// We're not on a spell tab per se, but we have something fitting.
if(!length(target.spell_tabs) && locate(/obj/item/rig) in target_mob.contents)
if(!length(target.spell_tabs) && istype(target_mob.back, /obj/item/rig))
update_actions = TRUE

if(update_actions && num_fires % default_wait == 0)
Expand Down Expand Up @@ -109,7 +109,7 @@ var/datum/controller/subsystem/statpanels/SSstatpanels
target.stat_panel.send_message("update_mc", list(mc_data = mc_data, "coord_entry" = coord_entry))

/// Set up the various action tabs.
/datum/controller/subsystem/statpanels/proc/set_action_tabs (client/target, mob/target_mob)
/datum/controller/subsystem/statpanels/proc/set_action_tabs(client/target, mob/target_mob)
var/list/actions = target_mob.get_actions_for_statpanel()
target.spell_tabs.Cut()

Expand Down
1 change: 1 addition & 0 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
new_character.make_vampire()
if(active)
new_character.key = key //now transfer the key to link the client to our new body


/datum/mind/proc/store_memory(new_text)
. = length(memory + new_text)
Expand Down
2 changes: 2 additions & 0 deletions code/game/gamemodes/changeling/implements/powers/body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
QDEL_IN(effect, 10)
H.forceMove(ling)
H.status_flags |= GODMODE
ling.client.init_verbs()

feedback_add_details("changeling_powers", "LF")
return TRUE
Expand Down Expand Up @@ -511,6 +512,7 @@
M.forceMove(ling) //move inside the new dude to hide him.
ling.occupant = M
M.status_flags |= GODMODE //dont want him to die or breathe or do ANYTHING
ling.client.init_verbs()

// Chiropteran Screech
/mob/proc/resonant_shriek()
Expand Down
4 changes: 2 additions & 2 deletions code/game/gamemodes/cult/cultify/obj.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
return B

/obj/item/material/sword/cultify()
var/obj/item/melee/cultblade/CBT = new /obj/item/melee/cultblade(get_turf(src)) // AHAHAHAHAHAHAHA - Geeves
var/obj/item/melee/cultblade/A = new /obj/item/melee/cultblade(get_turf(src))
qdel(src)
return CBT
return A

/obj/item/storage/backpack/cultify()
var/obj/item/storage/backpack/cultpack/CP = new /obj/item/storage/backpack/cultpack(get_turf(src))
Expand Down
6 changes: 6 additions & 0 deletions code/game/machinery/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -549,3 +549,9 @@ Class Procs:
return
else
visible_message(SPAN_DANGER("\The [src] was hit by \the [AM]."))

/obj/machinery/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(. < UI_INTERACTIVE)
if(user.machine)
user.unset_machine()
7 changes: 3 additions & 4 deletions code/game/machinery/suit_cycler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,9 @@
if(panel_open)
wires.Interact(user)


user << browse(dat, "window=suit_cycler")
onclose(user, "suit_cycler")
return
var/datum/browser/suit_cycler = new(user, "suit_cycler", "Suit Cycler", 450, 500)
suit_cycler.set_content(dat)
suit_cycler.open()

/obj/machinery/suit_cycler/Topic(href, href_list)
if(!Adjacent(usr) && !issilicon(usr))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/devices/transfer_valve.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
/obj/item/device/transfer_valve/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "TransferVavle", ui_x=540, ui_y=165)
ui = new(user, src, "TransferValve", ui_x=540, ui_y=165)
ui.open()

/obj/item/device/transfer_valve/ui_data(mob/user)
Expand Down
4 changes: 4 additions & 0 deletions code/modules/admin/verbs/bluespacetech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
addtimer(CALLBACK(src, PROC_REF(bst_post_spawn), bst), 5)
addtimer(CALLBACK(src, PROC_REF(bst_spawn_cooldown)), 5 SECONDS)

bst.client.init_verbs()

log_debug("Bluespace Tech Spawned: X:[bst.x] Y:[bst.y] Z:[bst.z] User:[src]")

feedback_add_details("admin_verb","BST")
Expand Down Expand Up @@ -166,13 +168,15 @@
if(key)
if(client.holder && client.holder.original_mob)
client.holder.original_mob.key = key
client.init_verbs()
else
var/mob/abstract/observer/ghost = new(src) //Transfer safety to observer spawning proc.
ghost.key = key
ghost.mind.name = "[ghost.key] BSTech"
ghost.name = "[ghost.key] BSTech"
ghost.real_name = "[ghost.key] BSTech"
ghost.voice_name = "[ghost.key] BSTech"
ghost.client.init_verbs()

/mob/living/carbon/human/bst/proc/bsc() //because we all have our unrealistic snowflakes right?
if(set_species(SPECIES_TAJARA))
Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/spacesuits/rig/rig.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
update_icon(1)
if(is_in_cycler)
initiator.loc.update_icon()
SSstatpanels.set_action_tabs(initiator.client, initiator)

/obj/item/rig/proc/update_component_sealed()
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
Expand Down Expand Up @@ -768,6 +769,7 @@

/obj/item/rig/dropped(var/mob/user)
..()
SSstatpanels.set_action_tabs(user.client, user)
null_wearer(user)


Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/abstract/new_player/menu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,7 @@
remove_verb(observer, /mob/abstract/observer/verb/toggle_antagHUD)
observer.ckey = ckey
observer.initialise_postkey()
observer.client.init_verbs()
qdel(src)

/mob/abstract/new_player/proc/show_lore_summary()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/abstract/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,8 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)

new_character.key = key //Manually transfer the key to log them in

new_character.client.init_verbs()

return new_character

/mob/abstract/new_player/proc/ViewManifest()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/abstract/observer/observer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,10 @@ Works together with spawning an observer, noted above.

ghost.ckey = ckey
ghost.initialise_postkey(should_set_timer)
ghost.client?.init_verbs()
if(ghost.client)
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
remove_verb(ghost, /mob/abstract/observer/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
ghost.client.init_verbs()
return ghost

/*
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/living/carbon/alien/diona/progression.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
set_stat(CONSCIOUS)
gestalt = adult

adult.client.init_verbs()

//What do you call a person with no arms or no legs?
var/list/organ_removal_priorities = list(BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
var/limbs_to_remove = (6 - limbs_can_grow)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,7 @@
if(H.brainmob.real_name == src.real_name)
if(H.brainmob.mind)
H.brainmob.mind.transfer_to(src)
H.brainmob.client.init_verbs()
qdel(H)

losebreath = 0
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/silicon/robot/drone/drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
to_chat(src, "<b>Systems rebooted</b>. Loading base pattern maintenance protocol... <b>loaded</b>.")
full_law_reset()
welcome_drone()
client.init_verbs()

/mob/living/silicon/robot/drone/proc/welcome_drone()
to_chat(src, SPAN_NOTICE("<b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."))
Expand Down
6 changes: 3 additions & 3 deletions code/modules/mob/living/silicon/robot/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
show_laws(0)

if(client.prefs.toggles_secondary & HOTKEY_DEFAULT)
winset(src, null, "mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#D3B5B5")
winset(src, null, "mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true")
else
winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
winset(src, null, "mainwindow.macro=borgmacro hotkey_toggle.is-checked=false input.focus=true")

// Forces synths to select an icon relevant to their module
if(module && !icon_selected)
choose_icon()
set_intent(a_intent) // to set the eye colour
set_intent(a_intent) // to set the eye colour
3 changes: 3 additions & 0 deletions code/modules/mob/living/silicon/robot/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1291,3 +1291,6 @@
to_chat(src, SPAN_NOTICE("You have given up life and succumbed to death."))
else
to_chat(src, SPAN_NOTICE("You are not injured enough to succumb to death!"))

/mob/living/silicon/robot/GetIdCard()
return id_card
4 changes: 2 additions & 2 deletions code/modules/mob/login.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@

//set macro to normal incase it was overriden (like cyborg currently does)
if(client.prefs.toggles_secondary & HOTKEY_DEFAULT)
winset(src, null, "mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#D3B5B5")
winset(src, null, "mainwindow.macro=hotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true")
else
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true")
MOB_STOP_THINKING(src)

clear_important_client_contents(client)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,7 @@
M.key = key
if(M.mind)
M.mind.reset()
M.client.init_verbs()
return

/client/verb/changes()
Expand All @@ -551,7 +552,9 @@
var/datum/asset/changelog = get_asset_datum(/datum/asset/simple/changelog)
changelog.send(src)

src << browse('html/changelog.html', "window=changes;size=675x650")
var/datum/browser/changelog_win = new(src, "changes", "Changelog", 675, 650)
changelog_win.set_content('html/changelog.html')
changelog_win.open()
if(prefs.lastchangelog != changelog_hash)
prefs.lastchangelog = changelog_hash
prefs.save_preferences()
Expand Down
4 changes: 4 additions & 0 deletions code/modules/mob/transform_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@
O.add_ai_verbs()

O.rename_self("ai",1)

O.client.init_verbs()
spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
return O
Expand Down Expand Up @@ -194,6 +196,8 @@

callHook("borgify", list(O))
O.Namepick()
if(O.client)
O.client.init_verbs()

spawn(0) // Mobs still instantly del themselves, thus we need to spawn or O will never be returned
qdel(src)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
// On-click handling. Turns on the computer if it's off and opens the GUI.
/obj/item/modular_computer/attack_self(mob/user)
if(enabled && screen_on)
user.set_machine(src)
ui_interact(user)
else if(!enabled && screen_on)
turn_on(user)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,9 @@
. = TRUE

update_icon()

/obj/item/modular_computer/ui_status(mob/user, datum/ui_state/state)
. = ..()
if(. < UI_INTERACTIVE)
if(user.machine)
user.unset_machine()
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
tgui_theme = "hephaestus"
ui_auto_update = FALSE

/datum/computer_file/program/rcon_console/ui_static_data(mob/user)
/datum/computer_file/program/rcon_console/ui_data(mob/user)
var/list/data = initial_data()

var/list/smeslist = list()
Expand Down
Loading

0 comments on commit 0abf376

Please sign in to comment.