-
-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
2,458 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
// todo: maybe orchestrate this with lists and timers on shuttle_transit_cycle? | ||
/obj/effect/temporary_effect/shuttle_landing | ||
name = "shuttle landing" | ||
desc = "A massive entity is about to land here. You should not be here." | ||
icon = 'icons/modules/shuttles/effects/shuttle_landing.dmi' | ||
icon_state = "still" | ||
time_to_die = 4.9 SECONDS | ||
|
||
/obj/effect/temporary_effect/shuttle_landing/Initialize(mapload, time_to_dock) | ||
if(!isnull(time_to_dock)) | ||
time_to_die = time_to_dock | ||
run_animation() | ||
return ..() | ||
|
||
/obj/effect/temporary_effect/shuttle_landing/proc/run_animation() | ||
var/half_time = time_to_die / 2 | ||
|
||
var/matrix/using_matrix = matrix() | ||
using_matrix.Scale(0.1, 0.1) | ||
|
||
transform = using_matrix | ||
alpha = 75 | ||
|
||
using_matrix.Scale(10, 10) | ||
animate(src, time = half_time, transform = using_matrix, alpha = 150) | ||
|
||
animate(src, time = half_time, alpha = 255) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
/** | ||
* # Shuttles | ||
* | ||
* Core datum for shuttles. | ||
* | ||
* ## Controllers | ||
* | ||
* All shuttle behaviors are now in controllers whenever possible. The base datum just handles the actual shuttle itself. | ||
* Moving to transit and staying in transit? That's a controller thing. Temporary dynamic transit? That's a controller thing, too. | ||
* | ||
* todo: nestable-shuttle support ? e.g. transport ship on a shuttle ; this is not optimal for performance but sure is cool | ||
* todo: multi-z shuttles; is this even possible? very long term. | ||
* todo: areas is a shit system. this is probably not fixable, because how else would we do bounding boxes? | ||
* todo: it would sure be nice to be able to dynamically expand shuttles in-game though; probably a bad idea too. | ||
* todo: serialize/deserialize, but should it be on this side or the map tempalte side? we want save/loadable. | ||
*/ | ||
/datum/shuttle | ||
//* Intrinsics *// | ||
/// our unique template id; this is *not* our ID and is *not* unique! | ||
var/template_id | ||
/// our descriptor instance; this is what determines how we act | ||
/// to our controller, as well as things like overmaps. | ||
var/datum/shuttle_descriptor/descriptor | ||
|
||
//* Identity *// | ||
/// real / code name | ||
var/name = "Unnamed Shuttle" | ||
/// description for things like admin interfaces | ||
var/desc = "Some kind of shuttle. The coder forgot to set this." | ||
|
||
//* Structure *// | ||
/// if set, we generate a ceiling above the shuttle of this type, on the bottom of the turf stack. | ||
// todo: vv hook this | ||
var/ceiling_type = /turf/simulated/shuttle_ceiling |
Oops, something went wrong.