Skip to content

Commit

Permalink
Merge branch 'master' into cmbtypo
Browse files Browse the repository at this point in the history
  • Loading branch information
QuickLode authored Oct 24, 2023
2 parents 2d3b2bf + e31a1d2 commit 9d9afac
Show file tree
Hide file tree
Showing 248 changed files with 12,056 additions and 10,784 deletions.
5 changes: 2 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
/tools/docker/ @Fira
/Dockerfile @Fira

# MorrowWolf
# Zonespace

/maps/map_files/LV522_Chances_Claim/LV522_Chances_Claim.dmm @morrowwolf
/code/modules/gear_presets/survivors.dm @morrowwolf
/code/modules/gear_presets/survivors.dm @zonespace27

# MULTIPLE OWNERS
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ body:
placeholder: "#1, #2, #3, etc"
validations:
required: true
- type: input
id: round-id
attributes:
label: Round ID
description: If known, what was the Round ID this bug was found on? Can be left blank if unknown or occured across multiple rounds.
placeholder: "12345"
- type: textarea
id: what-happened
attributes:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/ci_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,34 @@ jobs:
with:
outputFile: output-annotations.txt


odlint:
name: Lint with OpenDream
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get OpenDream Version
run: |
source dependencies.sh
echo "OPENDREAM_VERSION=$OPENDREAM_VERSION" >> $GITHUB_ENV
- name: Restore OpenDream cache
uses: actions/cache@v3
id: cache-od
with:
path: ~/OpenDream
key: ${{ runner.os }}-opendream-${{ env.OPENDREAM_VERSION }}
- name: Download OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/download_od.sh
- name: Setup OpenDream
if: steps.cache-od.outputs.cache-hit != 'true'
run: |
bash tools/ci/setup_od.sh
- name: Run OpenDream
run: |
bash tools/ci/run_od.sh
compile_all_maps:
if: "!contains(github.event.head_commit.message, '[ci skip]')"
name: Compile Maps
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ test_environment.txt
# byond-tracy backend, not shipped with the codebase so it shouldn't be maintained
prof.dll
libprof.so

# OpenDream compatibility stuff
colonialmarines.json
13 changes: 12 additions & 1 deletion code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ block( \
/// Only use the CEILING_PROTECTION_TIER_X defines for `protection_level`
#define CEILING_IS_PROTECTED(ceiling, protection_level) (ceiling >= protection_level)


// Default font settings
#define FONT_SIZE "5pt"
#define DEFAULT_FONT_COLOR "#09f"
Expand Down Expand Up @@ -493,6 +492,18 @@ block( \
#define TURF_PROTECTION_CAS 2
#define TURF_PROTECTION_OB 3

/// Convert a turf protection level to a ceiling protection level
/proc/get_ceiling_protection_level(turf_protection_level)
switch(turf_protection_level)
if(TURF_PROTECTION_OB)
return CEILING_PROTECTION_TIER_4
if(TURF_PROTECTION_CAS)
return CEILING_PROTECTION_TIER_3
if(TURF_PROTECTION_MORTAR)
return CEILING_PROTECTION_TIER_2
else
return CEILING_NO_PROTECTION

// Anything above the deck boundary is the upper deck, anything below is the lower deck
// This is exclusive, so anything ON the boundary is an edge case that's neither on the upper nor the lower deck
#define ALMAYER_DECK_BOUNDARY 101
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/bullet_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// list of args if there are any args
/// An entry to a list for giving projectiles bullet traits
/// Must be placed inside of a list
#define BULLET_TRAIT_ENTRY(trait, args...) trait = #args ? list(##args) : null
#define BULLET_TRAIT_ENTRY(trait, args...) trait = list(##args)
/// An entry to a list for giving projectiles bullet traits with a unique ID
/// Must be placed inside of a list
#define BULLET_TRAIT_ENTRY_ID(id, trait, args...) id = list(trait, ##args)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals/atom/mob/living/signals_human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#define COMSIG_HUMAN_UPDATE_SIGHT "human_update_sight"
#define COMPONENT_OVERRIDE_UPDATE_SIGHT (1<<0)

///from /mob/living/carbon/human/movement_delay()
#define COMSIG_HUMAN_MOVEMENT_CANCEL_INTERACTION "human_movement_cancel_interaction"
#define COMPONENT_HUMAN_MOVEMENT_KEEP_USING (1<<0)

///from /mob/living/carbon/human/update_sight()
#define COMSIG_HUMAN_POST_UPDATE_SIGHT "human_post_update_sight"
///from /mob/living/carbon/human/movement_delay(): (list/movedata)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ var/global/list/job_command_roles = JOB_COMMAND_ROLES_LIST
#define JOB_UPP_GENERAL "UPP Army General"

#define JOB_UPP_COMBAT_SYNTH "UPP Combat Synthetic"
#define JOB_UPP_SUPPORT_SYNTH "UPP Support Synthetic"

#define UPP_JOB_LIST list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER, JOB_UPP_POLICE, JOB_UPP_LT_OFFICER, JOB_UPP_LT_DOKTOR, JOB_UPP_SRLT_OFFICER, JOB_UPP_KPT_OFFICER, JOB_UPP_KOL_OFFICER, JOB_UPP_COMBAT_SYNTH)
#define UPP_JOB_GRUNT_LIST list(JOB_UPP, JOB_UPP_ENGI, JOB_UPP_MEDIC, JOB_UPP_SPECIALIST, JOB_UPP_LEADER, JOB_UPP_POLICE, JOB_UPP_CREWMAN)
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
#define ALMAYER_DROPSHIP_LZ1 "almayer-hangar-lz1"
#define ALMAYER_DROPSHIP_LZ2 "almayer-hangar-lz2"

#define DROPSHIP_FLYBY_ID "special_flight"
#define DROPSHIP_LZ1 "dropship-lz1"
#define DROPSHIP_LZ2 "dropship-lz2"

Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
#define SS_INIT_MINIMAP -34
#define SS_INIT_STATPANELS -98
#define SS_INIT_CHAT -100 //Should be last to ensure chat remains smooth during init.
#define SS_INIT_EARLYRUNTIMES -500 // Post-init notifier

// Subsystem fire priority, from lowest to highest priority
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
Expand Down
13 changes: 12 additions & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tgstation-server DMAPI

#define TGS_DMAPI_VERSION "6.5.3"
#define TGS_DMAPI_VERSION "6.6.0"

// All functions and datums outside this document are subject to change with any version and should not be relied on.

Expand Down Expand Up @@ -129,6 +129,13 @@
/// DreamDaemon Ultrasafe security level.
#define TGS_SECURITY_ULTRASAFE 2

/// DreamDaemon public visibility level.
#define TGS_VISIBILITY_PUBLIC 0
/// DreamDaemon private visibility level.
#define TGS_VISIBILITY_PRIVATE 1
/// DreamDaemon invisible visibility level.
#define TGS_VISIBILITY_INVISIBLE 2

//REQUIRED HOOKS

/**
Expand Down Expand Up @@ -458,6 +465,10 @@
/world/proc/TgsSecurityLevel()
return

/// Returns the current BYOND visibility level as a TGS_VISIBILITY_ define if TGS is present, null otherwise. Requires TGS to be using interop API version 5 or higher otherwise the string "___unimplemented" wil be returned. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsVisibility()
return

/// Returns a list of active [/datum/tgs_revision_information/test_merge]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsTestMerges()
return
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@
/// Can lockout blackmarket from ASRS console circuits.
#define TRAIT_TOOL_TRADEBAND "t_tool_tradeband"

/// Can hack ASRS consoles to access the black market
#define TRAIT_TOOL_BLACKMARKET_HACKER "t_tool_blackmarket_hacker"

// CLOTHING TRAITS
#define TRAIT_CLOTHING_HOOD "t_clothing_hood"

Expand Down
86 changes: 79 additions & 7 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -732,11 +732,12 @@ world
if (isnull(dir))
dir = thing.dir

if (ishuman(thing)) // Shitty workaround for a BYOND issue.
// Commented out because this is seemingly our source of bad icon operations
/* if (ishuman(thing)) // Shitty workaround for a BYOND issue.
var/icon/temp = icon2collapse
icon2collapse = icon()
icon2collapse.Insert(temp, dir = SOUTH)
dir = SOUTH
dir = SOUTH*/
else
if (isnull(dir))
dir = SOUTH
Expand Down Expand Up @@ -876,22 +877,93 @@ world
return image_to_center

//For creating consistent icons for human looking simple animals
/proc/get_flat_human_icon(icon_id, datum/equipment_preset/preset, datum/preferences/prefs, dummy_key, showDirs = GLOB.cardinals, outfit_override)
/proc/get_flat_human_icon(icon_id, equipment_preset_dresscode, datum/preferences/prefs, dummy_key, showDirs = GLOB.cardinals, outfit_override)
var/static/list/humanoid_icon_cache = list()
if(!icon_id || !humanoid_icon_cache[icon_id])
var/mob/living/carbon/human/dummy/body = generate_or_wait_for_human_dummy(dummy_key)

if(prefs)
prefs.copy_all_to(body)
arm_equipment(body, preset)
body.update_body()
body.update_hair()

// Assumption: Is a list
if(outfit_override)
for(var/obj/item/cur_item as anything in outfit_override)
body.equip_to_appropriate_slot(cur_item)

// Assumption: Is a string or path
if(equipment_preset_dresscode)
arm_equipment(body, equipment_preset_dresscode)

var/icon/out_icon = icon('icons/effects/effects.dmi', "nothing")
for(var/D in showDirs)
body.setDir(D)
for(var/dir in showDirs)
body.setDir(dir)
var/icon/partial = getFlatIcon(body)
out_icon.Insert(partial, dir = D)
out_icon.Insert(partial, dir = dir)

humanoid_icon_cache[icon_id] = out_icon
dummy_key ? unset_busy_human_dummy(dummy_key) : qdel(body)
return out_icon
else
return humanoid_icon_cache[icon_id]

/proc/get_flat_human_copy_icon(mob/living/carbon/human/original, equipment_preset_dresscode, showDirs = GLOB.cardinals, outfit_override)
var/mob/living/carbon/human/dummy/body = generate_or_wait_for_human_dummy(null)

if(original)
// From /datum/preferences/proc/copy_appearance_to
body.age = original.age
body.gender = original.gender
body.ethnicity = original.ethnicity
body.body_type = original.body_type

body.r_eyes = original.r_eyes
body.g_eyes = original.g_eyes
body.b_eyes = original.b_eyes

body.r_hair = original.r_hair
body.g_hair = original.g_hair
body.b_hair = original.b_hair

body.r_gradient = original.r_gradient
body.g_gradient = original.g_gradient
body.b_gradient = original.b_gradient
body.grad_style = original.grad_style

body.r_facial = original.r_facial
body.g_facial = original.g_facial
body.b_facial = original.b_facial

body.r_skin = original.r_skin
body.g_skin = original.g_skin
body.b_skin = original.b_skin

body.h_style = original.h_style
body.f_style = original.f_style

body.underwear = original.underwear
body.undershirt = original.undershirt

body.update_body()
body.update_hair()

// Assumption: Is a list
if(outfit_override)
for(var/obj/item/cur_item as anything in outfit_override)
body.equip_to_appropriate_slot(cur_item)

// Assumption: Is a string or path
if(equipment_preset_dresscode)
arm_equipment(body, equipment_preset_dresscode)

var/icon/out_icon = icon('icons/effects/effects.dmi', "nothing")
for(var/dir in showDirs)
body.setDir(dir)
var/icon/partial = getFlatIcon(body)
out_icon.Insert(partial, dir = dir)

// log_debug("get_flat_human_copy_icon called on ref=[REF(original)], instance=[original], type=[original.type], with [length(original.overlays)] overlays reduced to [length(body.overlays)] overlays")

qdel(body)
return out_icon
5 changes: 1 addition & 4 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
var/char = copytext(hex, i, i + 1)
switch(char)
if("0")
//Apparently, switch works with empty statements, yay! If that doesn't work, blame me, though. -- Urist
pass()
if("9", "8", "7", "6", "5", "4", "3", "2", "1")
num += text2num(char) * 16 ** power
if("a", "A")
Expand Down Expand Up @@ -77,7 +77,6 @@
hex += "E"
if(15.0)
hex += "F"
else
power--
while(length(hex) < placeholder)
hex = text("0[]", hex)
Expand Down Expand Up @@ -165,8 +164,6 @@
return 6
if("SOUTHWEST")
return 10
else
return

//Converts an angle (degrees) into an ss13 direction
/proc/angle2dir(degree)
Expand Down
11 changes: 11 additions & 0 deletions code/__odlint.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is included right at the start of the DME.
// Its purpose is to enable multiple lints (pragmas) that are supported by OpenDream to better validate the codebase
// These are essentially nitpicks the DM compiler should pick up on but doesnt

#ifndef SPACEMAN_DMM
#ifdef OPENDREAM
// These are in their own file as you need to do it with an include as a hack to avoid
// SpacemanDMM evaluating the #pragma lines, even if its outside a block it cares about
#include "__pragmas.dm"
#endif
#endif
27 changes: 27 additions & 0 deletions code/__pragmas.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//1000-1999
#pragma FileAlreadyIncluded error
#pragma MissingIncludedFile error
#pragma MisplacedDirective error
#pragma UndefineMissingDirective error
#pragma DefinedMissingParen error
#pragma ErrorDirective error
#pragma WarningDirective error
#pragma MiscapitalizedDirective error

//2000-2999
#pragma SoftReservedKeyword error
#pragma DuplicateVariable error
#pragma DuplicateProcDefinition error
#pragma TooManyArguments error
#pragma PointlessParentCall error
#pragma PointlessBuiltinCall error
#pragma SuspiciousMatrixCall error
#pragma MalformedRange error
#pragma InvalidRange error
#pragma InvalidSetStatement error
#pragma InvalidOverride error
#pragma DanglingVarType error
#pragma MissingInterpolatedExpression error

//3000-3999
#pragma EmptyBlock error
2 changes: 1 addition & 1 deletion code/_byond_version_compat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 514
#define MIN_COMPILER_BUILD 1588
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 514.1588 or higher
Expand Down
2 changes: 1 addition & 1 deletion code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define CBT
#endif

#if !defined(CBT) && !defined(SPACEMAN_DMM)
#if !defined(CBT) && !defined(SPACEMAN_DMM) && !defined(OPENDREAM)
#warn Building with Dream Maker is no longer supported and will result in errors.
#warn In order to build, run BUILD.bat in the bin directory.
#warn Consider switching to VSCode editor instead, where you can press Ctrl+Shift+B to build.
Expand Down
7 changes: 7 additions & 0 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@
return
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(!gear.len)
inventory_shown = FALSE
return //species without inv slots don't show items.
Expand Down Expand Up @@ -181,6 +185,9 @@
var/mob/living/carbon/human/H = mymob
var/mob/screenmob = viewer || H

if(!screenmob?.client)
return

if(H.hud_used)
if(H.hud_used.hud_shown)
if(H.s_store)
Expand Down
Loading

0 comments on commit 9d9afac

Please sign in to comment.