Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into exploration-conne…
Browse files Browse the repository at this point in the history
…ctions
  • Loading branch information
MarkusLarsson421 committed Sep 8, 2024
2 parents 8c52116 + 9c06c40 commit bad2604
Show file tree
Hide file tree
Showing 16 changed files with 77 additions and 30 deletions.
10 changes: 5 additions & 5 deletions code/__DEFINES/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@
#define RCD_FURNISHING 6
#define RCD_LADDER 7

#define RCD_UPGRADE_FRAMES 0
#define RCD_UPGRADE_SIMPLE_CIRCUITS 1
#define RCD_UPGRADE_SILO_LINK 2
#define RCD_UPGRADE_FURNISHING 3
#define RCD_UPGRADE_FRAMES (1<<0)
#define RCD_UPGRADE_SIMPLE_CIRCUITS (1<<1)
#define RCD_UPGRADE_SILO_LINK (1<<2)
#define RCD_UPGRADE_FURNISHING (1<<3)

#define RPD_UPGRADE_UNWRENCH 0
#define RPD_UPGRADE_UNWRENCH (1<<0)

#define RCD_WINDOW_FULLTILE "full tile"
#define RCD_WINDOW_DIRECTIONAL "directional"
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
#define INIT_ORDER_XKEYSCORE -10
#define INIT_ORDER_STICKY_BAN -10
#define INIT_ORDER_LIGHTING -20
#define INIT_ORDER_SHUTTLE -21
#define INIT_ORDER_SHUTTLE -21 // After atoms have been initialised to prevent mix-ups
#define INIT_ORDER_ZCOPY -22 // this should go after lighting and most objects being placed
#define INIT_ORDER_MINOR_MAPPING -40
#define INIT_ORDER_PATH -50
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/async_map_generator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ SUBSYSTEM_DEF(async_map_generator)
name = "Async Map Generator"
wait = 1
flags = SS_TICKER | SS_NO_INIT
init_stage = INITSTAGE_EARLY
// We need to be running while shuttles are loading
runlevels = ALL

/// List of all currently executing generator datums
Expand Down
29 changes: 14 additions & 15 deletions code/datums/elements/movetype_handler.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#define DO_FLOATING_ANIM(target) \
animate(target, pixel_y = 2, time = 1 SECONDS, loop = -1, flags = ANIMATION_RELATIVE);\
animate(pixel_y = -2, time = 1 SECONDS, flags = ANIMATION_RELATIVE)

/**
* An element that enables and disables movetype bitflags as movetype traits are added and removed.
* An element that enables and disables movetype bitflags whenever the relative traits are added or removed.
* It also handles the +2/-2 pixel y anim loop typical of mobs possessing the FLYING or FLOATING movetypes.
* This element is necessary for the TRAIT_MOVE_ traits to work correctly. So make sure to include it when
* manipulating those traits on non-living movables.
* This element is necessary for the TRAIT_MOVE_ traits to work correctly, so make sure to attach this element
* before adding them to non-living movables.
*/
/datum/element/movetype_handler
element_flags = ELEMENT_DETACH
Expand All @@ -26,7 +30,7 @@
attached_atoms[movable_target] = TRUE

if(movable_target.movement_type & (FLOATING|FLYING) && !HAS_TRAIT(movable_target, TRAIT_NO_FLOATING_ANIM))
float(movable_target)
DO_FLOATING_ANIM(movable_target)

/datum/element/movetype_handler/Detach(datum/source)
UnregisterSignal(source, GLOB.movement_type_addtrait_signals)
Expand All @@ -46,7 +50,7 @@
if(source.movement_type & flag)
return
if(!(source.movement_type & (FLOATING|FLYING)) && (trait == TRAIT_MOVE_FLYING || trait == TRAIT_MOVE_FLOATING) && !paused_floating_anim_atoms[source] && !HAS_TRAIT(source, TRAIT_NO_FLOATING_ANIM))
float(source)
DO_FLOATING_ANIM(source)
source.movement_type |= flag
SEND_SIGNAL(source, COMSIG_MOVETYPE_FLAG_ENABLED, flag)

Expand All @@ -70,7 +74,7 @@
/datum/element/movetype_handler/proc/on_no_floating_anim_trait_loss(atom/movable/source, trait)
SIGNAL_HANDLER
if(source.movement_type & (FLOATING|FLYING) && !paused_floating_anim_atoms[source])
float(source)
DO_FLOATING_ANIM(source)

///Pauses the floating animation for the duration of the timer... plus [tickrate - (world.time + timer) % tickrate] to be precise.
/datum/element/movetype_handler/proc/pause_floating_anim(atom/movable/source, timer)
Expand All @@ -84,24 +88,19 @@
/datum/element/movetype_handler/process()
for(var/_paused in paused_floating_anim_atoms)
var/atom/movable/paused = _paused
if(!paused)
paused_floating_anim_atoms -= paused
else if(paused_floating_anim_atoms[paused] < world.time)
if(paused_floating_anim_atoms[paused] < world.time)
if(paused.movement_type & (FLOATING|FLYING) && !HAS_TRAIT(paused, TRAIT_NO_FLOATING_ANIM))
float(paused)
DO_FLOATING_ANIM(paused)
paused_floating_anim_atoms -= paused
if(!length(paused_floating_anim_atoms))
STOP_PROCESSING(SSdcs, src)

///Floats the movable up and down. Not a comsig proc.
/datum/element/movetype_handler/proc/float(atom/movable/target)
animate(target, pixel_y = 2, time = 10, loop = -1, flags = ANIMATION_RELATIVE)
animate(pixel_y = -2, time = 10, loop = -1, flags = ANIMATION_RELATIVE)

/// Stops the above. Also not a comsig proc.
/datum/element/movetype_handler/proc/stop_floating(atom/movable/target)
var/final_pixel_y = target.base_pixel_y
if(isliving(target)) //Living mobs also have a 'body_position_pixel_y_offset' variable that has to be taken into account here.
var/mob/living/living_target = target
final_pixel_y += living_target.body_position_pixel_y_offset
animate(target, pixel_y = final_pixel_y, time = 1 SECONDS)

#undef DO_FLOATING_ANIM
4 changes: 2 additions & 2 deletions code/datums/map_generators/map_placer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@
model_cache = placing_template.modelCache
set_stage(GENERATE_STAGE_BUILD_COORDINATES_START)
return
//Set these all to be the same reference
model_cache = placing_template.modelCache = list()
// Build the model cache by ourselves
model_cache = list()
set_stage(GENERATE_STAGE_BUILD_CACHE)
//Set the grid models
grid_models = placing_template.grid_models
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

/obj/machinery/atmospherics/components/trinary/mixer/process_atmos()
..()
if(!on || !(nodes[1] && nodes[2] && nodes[3] && parents[1] && parents[2] && parents[3]) && !is_operational)
if(!on || !(nodes[1] && nodes[2] && nodes[3]) || !is_operational)
return

//Get those gases, mah boiiii
Expand Down
4 changes: 4 additions & 0 deletions code/modules/clothing/masks/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@

/obj/item/clothing/mask/bandana/attack_self(mob/user)
adjustmask(user)
if (mask_adjusted)
worn_icon = 'icons/mob/clothing/head/costume.dmi'
else
worn_icon = 'icons/mob/clothing/mask.dmi'

/obj/item/clothing/mask/bandana/AltClick(mob/user)
if(!user.canUseTopic(src, BE_CLOSE))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/neck/_neck.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
icon_state = "cross"

/obj/item/clothing/neck/neckerchief
icon = 'icons/obj/clothing/masks.dmi' //In order to reuse the bandana sprite
worn_icon = "empty_bandana"
w_class = WEIGHT_CLASS_TINY
var/sourceBandanaType

Expand Down
3 changes: 1 addition & 2 deletions code/modules/mob/living/carbon/carbon_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@
ADD_TRAIT(src, TRAIT_IMMOBILIZED, LACKING_LOCOMOTION_APPENDAGES_TRAIT)

/mob/living/carbon/on_movement_type_flag_enabled(datum/source, flag)
var/old_movetype = movement_type
. = ..()
if(flag & (FLYING | FLOATING) && !(old_movetype & (FLYING | FLOATING)))
if(flag & (FLYING | FLOATING) && (movement_type & (FLYING | FLOATING) == flag))
remove_movespeed_modifier(/datum/movespeed_modifier/limbless)
REMOVE_TRAIT(src, TRAIT_FLOORED, LACKING_LOCOMOTION_APPENDAGES_TRAIT)
REMOVE_TRAIT(src, TRAIT_IMMOBILIZED, LACKING_LOCOMOTION_APPENDAGES_TRAIT)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2275,12 +2275,12 @@ GLOBAL_LIST_EMPTY(features_by_species)
var/datum/gas_mixture/current = H.loc.return_air()
if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85)) //as long as there's reasonable pressure and no gravity, flight is possible
return TRUE
if(H.movement_type & (FLYING|FLOATING))
if(H.movement_type & FLYING)
return TRUE
return FALSE

/datum/species/proc/negates_gravity(mob/living/carbon/human/H)
if(H.movement_type & (FLYING|FLOATING))
if(H.movement_type & FLYING)
return TRUE
return FALSE

Expand Down
1 change: 0 additions & 1 deletion code/modules/security/workshop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
desc = "a computer used to control the workshop in the prison"

mapped_start_area = /area/holodeck/prison
linked = /area/holodeck/prison //linked area
program_type = /datum/map_template/holodeck/prison //load workshop programs
req_access = list(ACCESS_SECURITY)
var/startup
Expand Down
24 changes: 24 additions & 0 deletions html/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,30 @@
-->
<div class="commit sansserif">

<h2 class="date">08 September 2024</h2>
<h3 class="author">Ghommie, XeonMations updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fixed space movement</li>
<li class="bugfix">Proper floating animations when in no gravity</li>
<li class="bugfix">Possibly fixed an oversight which involved highpop and floating animations</li>
</ul>
<h3 class="author">Patience updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Bandanas can now be worn in the head/neck slots without error texture</li>
</ul>
<h3 class="author">PowerfulBacon updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">Fixes flaky tests not running</li>
<li class="bugfix">Fixes a race condition in the prison holodeck.</li>
<li class="bugfix">Fixes shuttle loading taking 30 seconds.</li>
<li class="bugfix">Fixes race condition in atmos processing which results in unit tests failing due to shuttles loading post-roundstart.</li>
<li class="bugfix">Fixes a maploading race condition that would result in invalid caches being used while loading maps.</li>
</ul>
<h3 class="author">SuperPantsHero updated:</h3>
<ul class="changes bgimages16">
<li class="bugfix">fixed RCD and RPD upgrades</li>
</ul>

<h2 class="date">07 September 2024</h2>
<h3 class="author">ToasterBiome updated:</h3>
<ul class="changes bgimages16">
Expand Down
17 changes: 17 additions & 0 deletions html/changelogs/.all_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44115,3 +44115,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.
2024-09-07:
ToasterBiome:
- bugfix: Centcom Ban DB is now accessible again through PP
2024-09-08:
Ghommie, XeonMations:
- bugfix: Fixed space movement
- bugfix: Proper floating animations when in no gravity
- bugfix: Possibly fixed an oversight which involved highpop and floating animations
Patience:
- bugfix: Bandanas can now be worn in the head/neck slots without error texture
PowerfulBacon:
- bugfix: Fixes flaky tests not running
- bugfix: Fixes a race condition in the prison holodeck.
- bugfix: Fixes shuttle loading taking 30 seconds.
- bugfix: Fixes race condition in atmos processing which results in unit tests failing
due to shuttles loading post-roundstart.
- bugfix: Fixes a maploading race condition that would result in invalid caches
being used while loading maps.
SuperPantsHero:
- bugfix: fixed RCD and RPD upgrades
Binary file modified icons/mob/clothing/neck.dmi
Binary file not shown.
Binary file modified icons/obj/clothing/neck.dmi
Binary file not shown.
3 changes: 3 additions & 0 deletions tools/pull_request_hooks/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}

0 comments on commit bad2604

Please sign in to comment.