Skip to content

Commit

Permalink
Merge branch 'master-offs' into mergeupstream
Browse files Browse the repository at this point in the history
  • Loading branch information
dj-34 committed Mar 4, 2024
2 parents d42b1f3 + 7ae3bf6 commit 06ac8a2
Show file tree
Hide file tree
Showing 368 changed files with 2,434 additions and 1,924 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,9 @@ jobs:
python -m tools.ci.check_icon_conflicts
python -m tools.ci.check_icon_dupenames
python -m tools.maplint.source --github
DREAMCHECKER_EXIT_CODE=0
~/dreamchecker > ${GITHUB_WORKSPACE}/output-annotations.txt 2>&1 || DREAMCHECKER_EXIT_CODE=$?
echo 'DREAMCHECKER_ANNOTATED=1' >> "$GITHUB_ENV"
exit $DREAMCHECKER_EXIT_CODE
- name: Annotate Lints
uses: yogstation13/DreamAnnotate@v2
if: ${{ always() && env.DREAMCHECKER_ANNOTATED == '1' }}
with:
outputFile: output-annotations.txt
- name: Run DreamChecker
shell: bash
run: ~/dreamchecker 2>&1 | bash tools/ci/annotate_dm.sh

odlint:
name: Lint with OpenDream
Expand Down
2 changes: 1 addition & 1 deletion _build_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file has all the information on what versions of libraries are thrown into the code
# For dreamchecker
export SPACEMANDMM_TAG=suite-1.7.1
export SPACEMANDMM_TAG=suite-1.8
# For TGUI
export NODE_VERSION=20
# Stable Byond Major
Expand Down
20 changes: 10 additions & 10 deletions _maps/map_files/generic/centcomm.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,7 @@
/obj/structure/lattice,
/obj/machinery/light/small,
/turf/space,
/area/space/nearstation)
/area/space/nearstation/centcom)
"fr" = (
/obj/docking_port/stationary/transit{
dir = 4;
Expand Down Expand Up @@ -4568,7 +4568,7 @@
/area/shuttle/administration)
"ps" = (
/turf/simulated/mineral/ancient/outer,
/area/space/nearstation)
/area/space/nearstation/centcom)
"pt" = (
/obj/machinery/door/airlock/hatch{
name = "Armory"
Expand Down Expand Up @@ -5803,7 +5803,7 @@
"tL" = (
/obj/structure/lattice,
/turf/space,
/area/space/nearstation)
/area/space/nearstation/centcom)
"tM" = (
/obj/structure/chair/comfy/shuttle{
dir = 8
Expand Down Expand Up @@ -7018,7 +7018,7 @@
"ya" = (
/obj/effect/mob_spawn/human/corpse/clown/corpse,
/turf/simulated/floor/plating/asteroid/ancient/airless,
/area/space/nearstation)
/area/space/nearstation/centcom)
"yc" = (
/obj/structure/table/reinforced,
/obj/item/lighter/zippo/contractor,
Expand All @@ -7029,7 +7029,7 @@
/turf/simulated/floor/plating/airless{
icon_state = "asteroidplating"
},
/area/space/nearstation)
/area/space/nearstation/centcom)
"yg" = (
/mob/living/silicon/decoy{
name = "A.L.I.C.E."
Expand Down Expand Up @@ -7110,7 +7110,7 @@
/turf/simulated/floor/plating/airless{
icon_state = "asteroidplating"
},
/area/space/nearstation)
/area/space/nearstation/centcom)
"yL" = (
/obj/machinery/computer/card,
/turf/simulated/floor/plasteel,
Expand Down Expand Up @@ -10851,7 +10851,7 @@
"Mu" = (
/obj/item/coin/antagtoken,
/turf/simulated/floor/plating/asteroid/ancient/airless,
/area/space/nearstation)
/area/space/nearstation/centcom)
"Mv" = (
/obj/machinery/recharge_station/upgraded,
/turf/simulated/floor/plasteel{
Expand Down Expand Up @@ -11598,7 +11598,7 @@
/area/shuttle/escape)
"OK" = (
/turf/simulated/floor/plating/asteroid/ancient/airless,
/area/space/nearstation)
/area/space/nearstation/centcom)
"OL" = (
/obj/structure/curtain/open/shower,
/obj/machinery/shower{
Expand Down Expand Up @@ -13971,7 +13971,7 @@
/turf/simulated/floor/plating/airless{
icon_state = "asteroidplating"
},
/area/space/nearstation)
/area/space/nearstation/centcom)
"Xt" = (
/obj/machinery/door/airlock/centcom{
name = "CentCom Customs"
Expand Down Expand Up @@ -14329,7 +14329,7 @@
"YI" = (
/obj/effect/decal/remains/human,
/turf/simulated/floor/plating/asteroid/ancient/airless,
/area/space/nearstation)
/area/space/nearstation/centcom)
"YJ" = (
/obj/machinery/door/window/classic/normal{
name = "Cell B";
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ GLOBAL_LIST_INIT(turfs_pass_meteor, typecacheof(list(
)))

#define ispassmeteorturf(A) (is_type_in_typecache(A, GLOB.turfs_pass_meteor))

#define is_screen_atom(A) istype(A, /atom/movable/screen)
3 changes: 3 additions & 0 deletions code/__DEFINES/reagents_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
#define SYRINGE_DRAW 0
#define SYRINGE_INJECT 1
#define SYRINGE_BROKEN 2

/// Like O- blood but doesn't contribute to blood_volume or vampire nutrition
#define BLOOD_TYPE_FAKE_BLOOD "Vh Null"
1 change: 1 addition & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@

#define STATUS_EFFECT_MAGIC_DISGUISE /datum/status_effect/magic_disguise

#define STATUS_EFFECT_PEPPERSPRAYED /datum/status_effect/pepper_spray

//#define STATUS_EFFECT_NECROPOLIS_CURSE /datum/status_effect/necropolis_curse
//#define CURSE_BLINDING 1 //makes the edges of the target's screen obscured
Expand Down
8 changes: 0 additions & 8 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,6 @@

return candidates

/proc/ScreenText(obj/O, maptext="", screen_loc="CENTER-7,CENTER-7", maptext_height=480, maptext_width=480)
if(!isobj(O)) O = new /obj/screen/text()
O.maptext = maptext
O.maptext_height = maptext_height
O.maptext_width = maptext_width
O.screen_loc = screen_loc
return O

/proc/remove_images_from_clients(image/I, list/show_to)
for(var/client/C in show_to)
C.images -= I
Expand Down
3 changes: 2 additions & 1 deletion code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ Returns 1 if the chain up to the area contains the given typepath
atoms += A
return atoms

/datum/coords //Simple datum for storing coordinates.
/// Simple datum for storing coordinates.
/datum/coords
var/x_pos
var/y_pos
var/z_pos
Expand Down
10 changes: 5 additions & 5 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -463,23 +463,23 @@
else direction = WEST
dir = direction

/obj/screen/click_catcher
/atom/movable/screen/click_catcher
icon = 'icons/mob/screen_gen.dmi'
icon_state = "catcher"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER"

/obj/screen/click_catcher/MouseEntered(location, control, params)
/atom/movable/screen/click_catcher/MouseEntered(location, control, params)
return

/obj/screen/click_catcher/MouseExited(location, control, params)
/atom/movable/screen/click_catcher/MouseExited(location, control, params)
return

#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.

/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
/atom/movable/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
Expand All @@ -494,7 +494,7 @@
M.Scale(px/sx, py/sy)
transform = M

/obj/screen/click_catcher/Click(location, control, params)
/atom/movable/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["middle"] && iscarbon(usr))
var/mob/living/carbon/C = usr
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/drag_drop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ FALSE if not
return
var/lagging = could_be_click_lag()
drag_start = 0
if(!(istype(over, /obj/screen) || (loc && loc == over.loc)))
if(!(is_screen_atom(over) || (loc && loc == over.loc)))
if(!Adjacent(usr) || !over.Adjacent(usr)) // should stop you from dragging through windows
if(lagging)
usr.ClickOn(src, params)
Expand Down
42 changes: 21 additions & 21 deletions code/_onclick/hud/action_button.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/obj/screen/movable/action_button
/atom/movable/screen/movable/action_button
desc = "CTRL-Shift click on this button to bind it to a hotkey."
var/datum/action/linked_action
var/actiontooltipstyle = ""
screen_loc = null
var/ordered = TRUE
var/datum/keybinding/mob/trigger_action_button/linked_keybind

/obj/screen/movable/action_button/MouseDrop(over_object)
/atom/movable/screen/movable/action_button/MouseDrop(over_object)
if(locked && could_be_click_lag()) // in case something bad happend and game realised we dragged our ability instead of pressing it
Click()
drag_start = 0
Expand All @@ -16,8 +16,8 @@
to_chat(usr, "<span class='warning'>Action button \"[name]\" is locked, unlock it first.</span>")
closeToolTip(usr)
return
if((istype(over_object, /obj/screen/movable/action_button) && !istype(over_object, /obj/screen/movable/action_button/hide_toggle)))
var/obj/screen/movable/action_button/B = over_object
if((istype(over_object, /atom/movable/screen/movable/action_button) && !istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle)))
var/atom/movable/screen/movable/action_button/B = over_object
var/list/actions = usr.actions
actions.Swap(actions.Find(linked_action), actions.Find(B.linked_action))
moved = FALSE
Expand All @@ -26,13 +26,13 @@
B.ordered = TRUE
closeToolTip(usr)
usr.update_action_buttons()
else if(istype(over_object, /obj/screen/movable/action_button/hide_toggle))
else if(istype(over_object, /atom/movable/screen/movable/action_button/hide_toggle))
closeToolTip(usr)
else
closeToolTip(usr)
return ..()

/obj/screen/movable/action_button/Click(location,control,params)
/atom/movable/screen/movable/action_button/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["ctrl"] && modifiers["shift"])
INVOKE_ASYNC(src, PROC_REF(set_to_keybind), usr)
Expand Down Expand Up @@ -63,7 +63,7 @@
animate(src, transform = matrix(), time = 0.4 SECONDS, alpha = 255)
return TRUE

/obj/screen/movable/action_button/proc/set_to_keybind(mob/user)
/atom/movable/screen/movable/action_button/proc/set_to_keybind(mob/user)
var/keybind_to_set_to = uppertext(input(user, "What keybind do you want to set this action button to?") as text)
if(keybind_to_set_to)
if(linked_keybind)
Expand All @@ -78,10 +78,10 @@
clean_up_keybinds(user)
to_chat(user, "<span class='info'>Your active keybinding on [src] has been cleared.</span>")

/obj/screen/movable/action_button/AltClick(mob/user)
/atom/movable/screen/movable/action_button/AltClick(mob/user)
return linked_action.AltTrigger()

/obj/screen/movable/action_button/proc/clean_up_keybinds(mob/owner)
/atom/movable/screen/movable/action_button/proc/clean_up_keybinds(mob/owner)
if(linked_keybind)
owner.client.active_keybindings[linked_keybind.binded_to] -= (linked_keybind)
if(!length(owner.client.active_keybindings[linked_keybind.binded_to]))
Expand All @@ -90,21 +90,21 @@
QDEL_NULL(linked_keybind)

//Hide/Show Action Buttons ... Button
/obj/screen/movable/action_button/hide_toggle
/atom/movable/screen/movable/action_button/hide_toggle
name = "Hide Buttons"
desc = "Shift-click any button to reset its position, and Control-click it to lock/unlock its position. Alt-click this button to reset all buttons to their default positions."
icon = 'icons/mob/actions/actions.dmi'
icon_state = "bg_default"
var/hidden = FALSE

/obj/screen/movable/action_button/hide_toggle/MouseDrop(over_object)
if(istype(over_object, /obj/screen/movable/action_button))
/atom/movable/screen/movable/action_button/hide_toggle/MouseDrop(over_object)
if(istype(over_object, /atom/movable/screen/movable/action_button))
closeToolTip(usr)
else
closeToolTip(usr)
return ..()

/obj/screen/movable/action_button/hide_toggle/Click(location,control,params)
/atom/movable/screen/movable/action_button/hide_toggle/Click(location, control, params)
var/list/modifiers = params2list(params)

if(modifiers["alt"])
Expand All @@ -121,17 +121,17 @@
update_icon(UPDATE_OVERLAYS)
usr.update_action_buttons()

/obj/screen/movable/action_button/hide_toggle/AltClick(mob/user)
/atom/movable/screen/movable/action_button/hide_toggle/AltClick(mob/user)
for(var/V in user.actions)
var/datum/action/A = V
var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
B.moved = FALSE
if(moved)
moved = FALSE
user.update_action_buttons(TRUE)
to_chat(user, "<span class='notice'>Action button positions have been reset.</span>")

/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
/atom/movable/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(mob/living/user)
if(isalien(user))
icon = 'icons/mob/actions/actions.dmi'
icon_state = "bg_alien"
Expand All @@ -146,13 +146,13 @@
color = user.client.prefs.UI_style_color
update_icon(UPDATE_OVERLAYS)

/obj/screen/movable/action_button/hide_toggle/update_overlays()
/atom/movable/screen/movable/action_button/hide_toggle/update_overlays()
. = ..()
var/image/img = image(initial(icon), src, hidden ? "show" : "hide")
img.appearance_flags = RESET_COLOR | RESET_ALPHA
. += img

/obj/screen/movable/action_button/MouseEntered(location, control, params)
/atom/movable/screen/movable/action_button/MouseEntered(location, control, params)
. = ..()
if(!QDELETED(src))
if(!linked_keybind)
Expand All @@ -164,7 +164,7 @@
desc_information = desc_information.Join(" ")
openToolTip(usr, src, params, title = name, content = desc_information, theme = actiontooltipstyle)

/obj/screen/movable/action_button/MouseExited()
/atom/movable/screen/movable/action_button/MouseExited()
closeToolTip(usr)

/mob/proc/update_action_buttons_icon()
Expand Down Expand Up @@ -192,7 +192,7 @@
A.override_location() // If the action has a location override, call it
A.UpdateButtonIcon()

var/obj/screen/movable/action_button/B = A.button
var/atom/movable/screen/movable/action_button/B = A.button
if(B.ordered)
button_number++
if(!B.moved)
Expand Down Expand Up @@ -227,7 +227,7 @@

return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6"

/datum/hud/proc/SetButtonCoords(obj/screen/button,number)
/datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number)
var/row = round((number-1)/AB_MAX_COLUMNS)
var/col = ((number - 1)%(AB_MAX_COLUMNS)) + 1
var/x_offset = 32*(col-1) + 4 + 2*col
Expand Down
Loading

0 comments on commit 06ac8a2

Please sign in to comment.