Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into emotes
Browse files Browse the repository at this point in the history
  • Loading branch information
silicons committed Sep 21, 2024
2 parents 218dde6 + 102cb6f commit d3d5c80
Show file tree
Hide file tree
Showing 63 changed files with 379,200 additions and 73 deletions.
5 changes: 5 additions & 0 deletions _mapload/victory.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#ifdef FORCE_MAP
#error Duplicate FORCE_MAP, what are you doing!?
#endif

#define FORCE_MAP "victory"
28 changes: 25 additions & 3 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
#include "code\__HELPERS\files\walk.dm"
#include "code\__HELPERS\game\depth.dm"
#include "code\__HELPERS\game\combat\arc.dm"
#include "code\__HELPERS\game\turfs\blocks.dm"
#include "code\__HELPERS\game\turfs\line.dm"
#include "code\__HELPERS\game\turfs\offsets.dm"
#include "code\__HELPERS\graphs\astar.dm"
Expand Down Expand Up @@ -3336,11 +3337,9 @@
#include "code\modules\maps\overmap\space\talon\talon_areas.dm"
#include "code\modules\maps\overmap\space\trade_station\trade_station.dm"
#include "code\modules\maps\overmap\space\trade_station\trade_station_jobs.dm"
#include "code\modules\maps\overmap\space\triumph\triumph.dm"
#include "code\modules\maps\templates\badmin_misc\fun.dm"
#include "code\modules\maps\templates\badmin_misc\templates.dm"
#include "code\modules\maps\templates\misc_presets\rift_shuttle_landmarks.dm"
#include "code\modules\maps\templates\misc_presets\triumph_shuttle_landmarks.dm"
#include "code\modules\maps\templates\shuttles\admin_spawn\_generic_shuttles.dm"
#include "code\modules\maps\templates\shuttles\admin_spawn\abductor.dm"
#include "code\modules\maps\templates\shuttles\admin_spawn\bearcat.dm"
Expand Down Expand Up @@ -3516,13 +3515,13 @@
#include "code\modules\mob\mob-custom_emote.dm"
#include "code\modules\mob\mob-damage.dm"
#include "code\modules\mob\mob-defense.dm"
#include "code\modules\mob\mob-iff.dm"
#include "code\modules\mob\mob-keybind-triggers.dm"
#include "code\modules\mob\mob-say-legacy.dm"
#include "code\modules\mob\mob-say-triggers.dm"
#include "code\modules\mob\mob-say.dm"
#include "code\modules\mob\mob.dm"
#include "code\modules\mob\mob_defines.dm"
#include "code\modules\mob\mob-iff.dm"
#include "code\modules\mob\mob_helpers.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
#include "code\modules\mob\mobility.dm"
Expand Down Expand Up @@ -4727,6 +4726,13 @@
#include "code\modules\shuttles\shuttles_vr.dm"
#include "code\modules\shuttles\shuttles_web.dm"
#include "code\modules\shuttles\web_datums.dm"
#include "code\modules\shuttles\effects\shuttle_landing.dm"
#include "code\modules\shuttles\shuttle\shuttle.dm"
#include "code\modules\shuttles\shuttle\shuttle_anchor.dm"
#include "code\modules\shuttles\shuttle\shuttle_area.dm"
#include "code\modules\shuttles\shuttle\shuttle_descriptor.dm"
#include "code\modules\shuttles\shuttle\shuttle_port.dm"
#include "code\modules\shuttles\shuttle\shuttle_template.dm"
#include "code\modules\species\abilites.dm"
#include "code\modules\species\character_species.dm"
#include "code\modules\species\physiology.dm"
Expand Down Expand Up @@ -5311,6 +5317,8 @@
#include "maps\sectors\virgo4_140\virgo4_140.dm"
#include "maps\sectors\wasteland_140\wasteland_140.dm"
#include "maps\sectors\wasteland_192\wasteland_192.dm"
#include "maps\shuttles\factions\corporations\nanotrasen\drone_prototype.dm"
#include "maps\shuttles\factions\corporations\nanotrasen\sci_vector.dm"
#include "maps\submaps\_helpers.dm"
#include "maps\submaps\_readme.dm"
#include "maps\submaps\level_specific\debrisfield_vr\debrisfield_things.dm"
Expand All @@ -5324,5 +5332,19 @@
#include "maps\triumph\sectors.dm"
#include "maps\triumph\shuttles.dm"
#include "maps\triumph\telecomms.dm"
#include "maps\triumph\triumph-overmap.dm"
#include "maps\triumph\triumph-sectors.dm"
#include "maps\triumph\triumph-shuttle-landmarks.dm"
#include "maps\triumph\triumph-turbolifts.dm"
#include "maps\triumph\triumph.dm"
#include "maps\victory\engines.dm"
#include "maps\victory\sectors.dm"
#include "maps\victory\shuttles.dm"
#include "maps\victory\telecomms.dm"
#include "maps\victory\victory-areas.dm"
#include "maps\victory\victory-overmap.dm"
#include "maps\victory\victory-sectors.dm"
#include "maps\victory\victory-shuttle-landmarks.dm"
#include "maps\victory\victory-turbolifts.dm"
#include "maps\victory\victory.dm"
// END_INCLUDE
4 changes: 2 additions & 2 deletions code/__DEFINES/_flags/turf_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// This is used in literally one place, turf.dm, to block ethwereal jaunt.
#define NO_JAUNT (1<<0)
/// Unused reservation turf
#define UNUSED_RESERVATION_TURF (1<<2)
#define TURF_FLAG_UNUSED_RESERVATION (1<<2)
/// queued for planet turf addition
#define TURF_PLANET_QUEUED (1<<3)
/// registered to a planet
Expand All @@ -28,7 +28,7 @@

DEFINE_BITFIELD(turf_flags, list(
BITFIELD(NO_JAUNT),
BITFIELD(UNUSED_RESERVATION_TURF),
BITFIELD(TURF_FLAG_UNUSED_RESERVATION),
BITFIELD(TURF_PLANET_QUEUED),
BITFIELD(TURF_PLANET_REGISTERED),
BITFIELD(TURF_ZONE_REBUILD_QUEUED),
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/_planes+layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@
*/
#define DEBUG_PLANE 23
#define DEBUG_LAYER_AREA_OVERLAYS 100
#define DEBUG_LAYER_SHUTTLE_MARKERS 500

/**
*! -- Ghost Plane
Expand Down
83 changes: 83 additions & 0 deletions code/__HELPERS/game/turfs/blocks.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 Citadel Station Developers *//

/**
* get turfs bordering a block of turfs
*
* * returned list will be empty if distance = 0
* * returned list will have all nulls incurred by turfs being outside world border
* * returned list **has no particular order.**
*
* @params
* * ll_x - lowerleft x
* * ll_y - lowerleft y
* * ur_x - upperright x
* * ur_y - upperright y
* * z - z level
* * distance - border distance
*
* @return list() if distance = 0, list of turfs otherwise. turfs outside of world border will be null.
*/
/proc/border_of_turf_block(ll_x, ll_y, ur_x, ur_y, z, distance)
if(distance <= 0)
return list()
. = block(
ll_x - distance,
ll_y - distance,
z,
ll_x - 1,
ur_y + distance,
) + block(
ur_x + 1,
ll_y - distance,
z,
ur_x + distance,
ur_y + distance,
) + block(
ll_x,
ur_y + 1,
z,
ur_x,
ur_y + distance,
) + block(
ll_x,
ll_y - distance,
z,
ur_x,
ll_y - 1,
)

/**
* get turfs bordering a block of turfs
*
* * returned list will be empty if distance = 0
* * returned list will have all nulls incurred by turfs being outside world border
* * returned list is in clockwise order from the **upper left** turf, spiralling outwards from there.
*
* @params
* * ll_x - lowerleft x
* * ll_y - lowerleft y
* * ur_x - upperright x
* * ur_y - upperright y
* * z - z level
* * distance - border distance
*
* @return list() if distance = 0, list of turfs otherwise. turfs outside of world border will be null.
*/
/proc/border_of_turf_block_spiral_outwards_clockwise(ll_x, ll_y, ur_x, ur_y, z, distance)
if(distance <= 0)
return list()
. = list()
for(var/radius in distance)
// gather top left to right
for(var/x in (ll_x - radius) to (ur_x + radius))
. += locate(x, ur_y + radius, z)
// gather right top to bottom excluding top and bottom turf
for(var/y in (ur_y + radius - 1) to (ll_y - radius + 1) step -1)
. += locate(ur_x + radius, y, z)
// gather bottom right to left
for(var/x in (ur_x + radius) to (ll_x - radius) step -1)
. += locate(x, ll_y - radius, z)
// gather left bottom to top excluding top and bottom turf
for(var/y in (ll_y - radius + 1) to (ur_y + radius - 1))
. += locate(ll_x - radius, y, z)
2 changes: 1 addition & 1 deletion code/__HELPERS/game/turfs/line.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//
//* Copyright (c) 2024 Citadel Station Developers *//

/**
* line drawing algorithm
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/game/turfs/offsets.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//* This file is explicitly licensed under the MIT license. *//
//* Copyright (c) 2024 silicons *//
//* Copyright (c) 2024 Citadel Station Developers *//

/**
* get coordinate and direction tuple when entity is moved relative with a 'block' movement,
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/mapping/reservations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
/datum/controller/subsystem/mapping/proc/reserve_turfs(list/turf/turfs)
for(var/turf/T as anything in turfs)
T.empty(RESERVED_TURF_TYPE, RESERVED_TURF_TYPE)
T.turf_flags |= UNUSED_RESERVATION_TURF
T.turf_flags |= TURF_FLAG_UNUSED_RESERVATION
CHECK_TICK
// todo: area.assimilate_turfs?
reservation_unallocated_area.contents.Add(turfs)
Expand Down
7 changes: 0 additions & 7 deletions code/game/area/Off Station Areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,6 @@
name = "\improper Reading Room"
/area/triumph/surfacebase/vacant_site
name = "\improper Vacant Site"
//Shuttle crashes
/area/shuttle/triumph/crash1
name = "\improper Crash Site 1"
icon_state = "shuttle2"
/area/shuttle/triumph/crash2
name = "\improper Crash Site 2"
icon_state = "shuttle2"

// Class D world areas
/area/class_d
Expand Down
3 changes: 0 additions & 3 deletions code/game/area/Space Station 13 areas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
name = "Tool Storage Maintenance"
icon_state = "maint_tool_storage"

/area/maintenance/triumph_midpoint
name = "\improper Triumph Midpoint Maint"

/area/maintenance/locker_room
name = "\improper Locker Room Maintenance"

Expand Down
4 changes: 4 additions & 0 deletions code/game/area/area.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
/// default initial gas mix
var/initial_gas_mix = GAS_STRING_STP

//* Identity *//
/// player-facing name, overrides name when / if necessary.
var/display_name

//? nightshift
/// nightshift level
/// in general, nightshift must be at or above this level for it to proc on areas.
Expand Down
10 changes: 0 additions & 10 deletions code/game/objects/effects/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@
. = ..()
animate(src, alpha = 0, time = time_to_die - 1)

/obj/effect/temporary_effect/shuttle_landing
name = "shuttle landing"
desc = "You better move if you don't want to go splat!"
icon_state = "shuttle_warning_still"
time_to_die = 4.9 SECONDS

/obj/effect/temporary_effect/shuttle_landing/Initialize(mapload)
flick("shuttle_warning", src) // flick() forces the animation to always begin at the start.
. = ..()

// The manifestation of Zeus's might. Or just a really unlucky day.
// This is purely a visual effect, this isn't the part of the code that hurts things.
/obj/effect/temporary_effect/lightning_strike
Expand Down
19 changes: 16 additions & 3 deletions code/modules/mapping/turf_reservation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,19 @@
release()
return ..()

/datum/turf_reservation/proc/get_approximately_center_turf()
return locate(
bottom_left_coords[1] + floor(top_right_coords[1] - bottom_left_coords[1]),
bottom_left_coords[2] + floor(top_right_coords[2] - bottom_left_coords[2]),
bottom_left_coords[3],
)

/datum/turf_reservation/proc/is_atom_inside(atom/A)
A = get_turf(A)
return A.z == bottom_left_coords[3] && \
A.x >= bottom_left_coords[1] && A.x <= top_right_coords[1] && \
A.y >= bottom_left_coords[2] && A.y <= top_right_coords[2]

/datum/turf_reservation/proc/release()
if(border)
SSmapping.reserve_turfs(block(locate(
Expand Down Expand Up @@ -170,7 +183,7 @@
1 + (inner_y - 1) * TURF_CHUNK_RESOLUTION,
level_index,
)
if(!(checking.turf_flags & UNUSED_RESERVATION_TURF))
if(!(checking.turf_flags & TURF_FLAG_UNUSED_RESERVATION))
passing = FALSE
break
if(!passing)
Expand Down Expand Up @@ -245,7 +258,7 @@
SSmapping.reservation_blocking_op = FALSE
return FALSE
for(var/turf/T as anything in final)
T.turf_flags &= ~UNUSED_RESERVATION_TURF
T.turf_flags &= ~TURF_FLAG_UNUSED_RESERVATION
if(T.type != turf_type)
T.ChangeTurf(turf_type, turf_type)

Expand All @@ -262,7 +275,7 @@
// todo: take_turfs
src.border_area.contents.Add(final_border)
for(var/turf/T as anything in final_border)
T.turf_flags &= ~UNUSED_RESERVATION_TURF
T.turf_flags &= ~TURF_FLAG_UNUSED_RESERVATION
// get just the first layer, but also init them at the same time
var/list/turf/final_immediate_border
// left
Expand Down
14 changes: 0 additions & 14 deletions code/modules/maps/overmap/space/centcom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@
start_y = pick(8, 9, 11, 12)
*/

/obj/overmap/entity/visitable/sector/centcom_triumph
name = "NDV Marksman"
desc = "The NDV Marksman is a Nanotrasen supercarrier that serves as the flagship for the eponymous Marksman Fleet."
scanner_desc = @{"[i]Information[/i]: The NDV Marksman is a Nanotrasen supercarrier that serves as the flagship for the eponymous Marksman Fleet."}
in_space = 1
known = TRUE
icon = 'icons/modules/overmap/tiled.dmi'
icon_state = "fleet"
color = "#007396"

initial_restricted_waypoints = list(
"NDV Quicksilver" = list("specops_hangar")
)

// ERT Shuttle can be found at '/maps/overmap/shuttles/specialops.dm'

// EXCLUSIVE NAV POINT FOR DOCKING INSIDE (ERT SHUTTLE ONLY)
Expand Down
14 changes: 7 additions & 7 deletions code/modules/maps/overmap/space/trade_station/trade_station.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,47 +69,47 @@

// Shuttle landmarks. Need to be removed at some point and generic waypoints used

/obj/effect/shuttle_landmark/triumph/trade
/obj/effect/shuttle_landmark/trade
name = "Near Nebula Gas Food Mart"
landmark_tag = "nebula_space_SW"
base_turf = /turf/space
base_area = /area/space

// EXCLUSIVE TRADE PORT NAV POINTS

/obj/effect/shuttle_landmark/triumph/trade/mining
/obj/effect/shuttle_landmark/trade/mining
name = "Nebula Gas Landing Pad 2"
landmark_tag = "nebula_pad_2"
base_turf = /turf/simulated/shuttle/floor/black/airless
base_area = /area/tradeport/pads

/obj/effect/shuttle_landmark/triumph/trade/excursion
/obj/effect/shuttle_landmark/trade/excursion
name = "Nebula Gas Landing Pad 3"
landmark_tag = "nebula_pad_3"
base_turf = /turf/simulated/shuttle/floor/black/airless
base_area = /area/tradeport/pads

/obj/effect/shuttle_landmark/triumph/trade/pirate
/obj/effect/shuttle_landmark/trade/pirate
name = "Nebula Gas Landing Pad 4"
landmark_tag = "nebula_pad_4"
base_turf = /turf/simulated/shuttle/floor/black/airless
base_area = /area/tradeport/pads

/obj/effect/shuttle_landmark/triumph/trade/emt
/obj/effect/shuttle_landmark/trade/emt
name = "Nebula Gas Landing Pad 5"
landmark_tag = "nebula_pad_5"
base_turf = /turf/simulated/shuttle/floor/black/airless
base_area = /area/tradeport/pads

/obj/effect/shuttle_landmark/triumph/trade/civvie
/obj/effect/shuttle_landmark/trade/civvie
name = "Nebula Gas Landing Pad 6"
landmark_tag = "nebula_pad_6"
base_turf = /turf/simulated/shuttle/floor/black/airless
base_area = /area/tradeport/pads

// EXCLUSIVE TRADE PORT NAV POINT FOR DOCKING INSIDE

/obj/effect/shuttle_landmark/triumph/trade/hangar
/obj/effect/shuttle_landmark/trade/hangar
name = "Beruang Hangar"
landmark_tag = "tradeport_hangar"
docking_controller = "tradeport_hangar_dock"
Expand Down
Loading

0 comments on commit d3d5c80

Please sign in to comment.