Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into more-516-stuff
  • Loading branch information
Absolucy committed Dec 25, 2024
2 parents 695aead + e02822d commit 80efa27
Show file tree
Hide file tree
Showing 80 changed files with 404 additions and 131 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@
/turf/open/floor/engine,
/area/ruin/syndicate_lava_base/testlab)
"rX" = (
/obj/machinery/atmospherics/components/unary/passive_vent,
/obj/structure/lattice/catwalk,
/obj/machinery/atmospherics/components/unary/outlet_injector/on,
/turf/template_noop,
/area/ruin/syndicate_lava_base/testlab)
"sa" = (
Expand Down
7 changes: 6 additions & 1 deletion _maps/map_files/Blueshift/Blueshift.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -4701,6 +4701,10 @@
/obj/effect/turf_decal/tile/blue/fourcorners,
/turf/open/floor/iron/white,
/area/station/medical/treatment_center)
"aWw" = (
/obj/structure/fans/tiny,
/turf/open/floor/plating,
/area/station/hallway/secondary/entry)
"aWA" = (
/obj/structure/cable,
/obj/effect/landmark/start/hangover,
Expand Down Expand Up @@ -55519,6 +55523,7 @@
/obj/effect/mapping_helpers/airlock/cyclelink_helper{
dir = 8
},
/obj/structure/fans/tiny,
/turf/open/floor/plating,
/area/station/hallway/secondary/entry)
"kKp" = (
Expand Down Expand Up @@ -170231,7 +170236,7 @@ ahn
cXo
cXo
rMe
ivx
aWw
rMe
gLc
gLc
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Always compile, always use that verb, and always make sure that it works for wha
#define MAP_MAXZ 6

/// Path for the next_map.json file, if someone, for some messed up reason, wants to change it.
#define PATH_TO_NEXT_MAP_JSON "data/next_map.json"
#define PATH_TO_NEXT_MAP_JSON (world.GetConfig("env", "AUXTOOLS_DEBUG_DLL") ? "data/next_map.json" : "data/next_map.[world.port].json") // monkestation edit: messed up cat here, i changed it (added world.port to it if there's no debugger attached)

/// List of directories we can load map .json files from
#define MAP_DIRECTORY_MAPS "_maps"
Expand Down
10 changes: 10 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
/// if it only allows one, and new instances just instead refresh the timer
#define STATUS_EFFECT_REFRESH 3

/// Use in status effect "duration" to make it last forever
#define STATUS_EFFECT_PERMANENT -1
/// Use in status effect "tick_interval" to prevent it from calling tick()
#define STATUS_EFFECT_NO_TICK -1

/// Indicates this status effect is an abstract type, ie not instantiated
/// Doesn't actually do anything in practice, primarily just a marker / used in unit tests,
/// so don't worry if your abstract status effect doesn't actually set this
#define STATUS_EFFECT_ID_ABSTRACT "abstract"

///Processing flags - used to define the speed at which the status will work
///This is fast - 0.2s between ticks (I believe!)
#define STATUS_EFFECT_FAST_PROCESS 0
Expand Down
29 changes: 28 additions & 1 deletion code/__DEFINES/tgs.dm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tgstation-server DMAPI
// The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in IETF RFC 2119.

#define TGS_DMAPI_VERSION "7.3.0"
#define TGS_DMAPI_VERSION "7.3.1"

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

Expand Down Expand Up @@ -58,6 +58,11 @@
#define TGS_FILE2TEXT_NATIVE file2text
#endif

// SpacemanDMM compatibility
#ifndef CAN_BE_REDEFINED
#define CAN_BE_REDEFINED(X)
#endif

// EVENT CODES

/// Before a reboot mode change, extras parameters are the current and new reboot mode enums.
Expand Down Expand Up @@ -160,6 +165,7 @@
* * http_handler - Optional user defined [/datum/tgs_http_handler].
*/
/world/proc/TgsNew(datum/tgs_event_handler/event_handler, minimum_required_security_level = TGS_SECURITY_ULTRASAFE, datum/tgs_http_handler/http_handler)
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -170,13 +176,15 @@
* This function should not be called before ..() in [/world/proc/New].
*/
/world/proc/TgsInitializationComplete()
CAN_BE_REDEFINED(TRUE)
return

/// Consumers MUST run this macro at the start of [/world/proc/Topic].
#define TGS_TOPIC var/tgs_topic_return = TgsTopic(args[1]); if(tgs_topic_return) return tgs_topic_return

/// Consumers MUST call this as late as possible in [world/proc/Reboot] (BEFORE ..()).
/world/proc/TgsReboot()
CAN_BE_REDEFINED(TRUE)
return

// DATUM DEFINITIONS
Expand Down Expand Up @@ -214,6 +222,7 @@
* Returns [TRUE]/[FALSE] based on if the [/datum/tgs_version] contains wildcards.
*/
/datum/tgs_version/proc/Wildcard()
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -222,6 +231,7 @@
* other_version - The [/datum/tgs_version] to compare against.
*/
/datum/tgs_version/proc/Equals(datum/tgs_version/other_version)
CAN_BE_REDEFINED(TRUE)
return

/// Represents a merge of a GitHub pull request.
Expand Down Expand Up @@ -459,16 +469,19 @@

/// Returns the maximum supported [/datum/tgs_version] of the DMAPI.
/world/proc/TgsMaximumApiVersion()
CAN_BE_REDEFINED(TRUE)
return

/// Returns the minimum supported [/datum/tgs_version] of the DMAPI.
/world/proc/TgsMinimumApiVersion()
CAN_BE_REDEFINED(TRUE)
return

/**
* Returns [TRUE] if DreamDaemon was launched under TGS, the API matches, and was properly initialized. [FALSE] will be returned otherwise.
*/
/world/proc/TgsAvailable()
CAN_BE_REDEFINED(TRUE)
return

// No function below this succeeds if it TgsAvailable() returns FALSE or if TgsNew() has yet to be called.
Expand All @@ -480,6 +493,7 @@
* If TGS has not requested a [TGS_REBOOT_MODE_SHUTDOWN] DreamDaemon will be launched again.
*/
/world/proc/TgsEndProcess()
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -490,6 +504,7 @@
* admin_only: If [TRUE], message will be sent to admin connected chats. Vice-versa applies.
*/
/world/proc/TgsTargetedChatBroadcast(datum/tgs_message_content/message, admin_only = FALSE)
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -500,6 +515,7 @@
* user: The [/datum/tgs_chat_user] to PM.
*/
/world/proc/TgsChatPrivateMessage(datum/tgs_message_content/message, datum/tgs_chat_user/user)
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -510,42 +526,52 @@
* channels - Optional list of [/datum/tgs_chat_channel]s to restrict the message to.
*/
/world/proc/TgsChatBroadcast(datum/tgs_message_content/message, list/channels = null)
CAN_BE_REDEFINED(TRUE)
return

/// Returns the current [/datum/tgs_version] of TGS if it is running the server, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsVersion()
CAN_BE_REDEFINED(TRUE)
return

/// Returns the running engine type
/world/proc/TgsEngine()
CAN_BE_REDEFINED(TRUE)
return

/// Returns the current [/datum/tgs_version] of the DMAPI being used if it was activated, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsApiVersion()
CAN_BE_REDEFINED(TRUE)
return

/// Returns the name of the TGS instance running the game if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsInstanceName()
CAN_BE_REDEFINED(TRUE)
return

/// Return the current [/datum/tgs_revision_information] of the running server if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsRevision()
CAN_BE_REDEFINED(TRUE)
return

/// Returns the current BYOND security level as a TGS_SECURITY_ define if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsSecurityLevel()
CAN_BE_REDEFINED(TRUE)
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()
CAN_BE_REDEFINED(TRUE)
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()
CAN_BE_REDEFINED(TRUE)
return

/// Returns a list of connected [/datum/tgs_chat_channel]s if TGS is present, null otherwise. This function may sleep if the call to [/world/proc/TgsNew] is sleeping!
/world/proc/TgsChatChannelInfo()
CAN_BE_REDEFINED(TRUE)
return

/**
Expand All @@ -556,6 +582,7 @@
* wait_for_completion - If set, this function will not return until the event has run to completion.
*/
/world/proc/TgsTriggerEvent(event_name, list/parameters, wait_for_completion = FALSE)
CAN_BE_REDEFINED(TRUE)
return

/*
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/monkestation/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
#define TRAIT_BYPASS_COMPRESS_CHECK "can_compress_anyways"
/// This item is considered "trash" (and will be eaten by cleaner slimes)
#define TRAIT_TRASH_ITEM "trash_item"
/// This item came from a gift.
#define TRAIT_GIFT_ITEM "gift_item"

// /atom/movable
/// Things with this trait can pass through wooden barricades.
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/~monkestation/vv.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#define VV_HK_EXAMINE_GIFT "examine_gift"
8 changes: 8 additions & 0 deletions code/__HELPERS/~monkestation-helpers/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@
default_typecache ||= typecacheof(list(/obj/effect, /atom/movable/screen))
typecache = default_typecache
return typecache_filter_list_reverse(src.contents, typecache)

/// Returns a list of all items in our contents that were obtained from gifts.
/atom/proc/get_all_gift_contents() as /list
RETURN_TYPE(/list/obj/item)
. = list()
for(var/obj/item/thing as anything in get_all_contents_type(/obj/item))
if(!QDELETED(thing) && HAS_TRAIT(thing, TRAIT_GIFT_ITEM))
. += thing
13 changes: 7 additions & 6 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -611,24 +611,31 @@ GLOBAL_LIST_INIT(traits_by_type, list(
),
/obj/item = list(
"TRAIT_APC_SHOCKING" = TRAIT_APC_SHOCKING,
"TRAIT_ASSISTED_BREATHING" = TRAIT_ASSISTED_BREATHING,
"TRAIT_BASIC_QUALITY_BAIT" = TRAIT_BASIC_QUALITY_BAIT,
"TRAIT_BELT_SATCHEL" = TRAIT_BELT_SATCHEL,
"TRAIT_BLIND_TOOL" = TRAIT_BLIND_TOOL,
"TRAIT_BYPASS_COMPRESS_CHECK" = TRAIT_BYPASS_COMPRESS_CHECK,
"TRAIT_CUSTOM_TAP_SOUND" = TRAIT_CUSTOM_TAP_SOUND,
"TRAIT_DANGEROUS_OBJECT" = TRAIT_DANGEROUS_OBJECT,
"TRAIT_FEATHERED" = TRAIT_FEATHERED,
"TRAIT_FISHING_BAIT" = TRAIT_FISHING_BAIT,
"TRAIT_FOOD_GRILLED" = TRAIT_FOOD_GRILLED,
"TRAIT_GIFT_ITEM" = TRAIT_GIFT_ITEM,
"TRAIT_GOOD_QUALITY_BAIT" = TRAIT_GOOD_QUALITY_BAIT,
"TRAIT_GREAT_QUALITY_BAIT" = TRAIT_GREAT_QUALITY_BAIT,
"TRAIT_HAUNTED" = TRAIT_HAUNTED,
"TRAIT_HONKSPAMMING" = TRAIT_HONKSPAMMING,
"TRAIT_INNATELY_FANTASTICAL_ITEM" = TRAIT_INNATELY_FANTASTICAL_ITEM,
"TRAIT_INSTANTLY_PROCESSES_BOULDERS" = TRAIT_INSTANTLY_PROCESSES_BOULDERS,
"TRAIT_LABOURED_BREATHING" = TRAIT_LABOURED_BREATHING,
"TRAIT_MAT_TRANSMUTED" = TRAIT_MAT_TRANSMUTED,
"TRAIT_MAY_CONTAIN_BLENDED_DUST" = TRAIT_MAY_CONTAIN_BLENDED_DUST,
"TRAIT_NEEDS_TWO_HANDS" = TRAIT_NEEDS_TWO_HANDS,
"TRAIT_NODROP" = TRAIT_NODROP,
"TRAIT_NON_IMPORTANT_SHOE_BLOCK" = TRAIT_NON_IMPORTANT_SHOE_BLOCK,
"TRAIT_NO_BARCODES" = TRAIT_NO_BARCODES,
"TRAIT_NO_ORGAN_DECAY" = TRAIT_NO_ORGAN_DECAY,
"TRAIT_NO_STORAGE_INSERT" = TRAIT_NO_STORAGE_INSERT,
"TRAIT_NO_TELEPORT" = TRAIT_NO_TELEPORT,
"TRAIT_OMNI_BAIT" = TRAIT_OMNI_BAIT,
Expand All @@ -639,17 +646,11 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_T_RAY_VISIBLE" = TRAIT_T_RAY_VISIBLE,
"TRAIT_UNCATCHABLE" = TRAIT_UNCATCHABLE,
"TRAIT_WIELDED" = TRAIT_WIELDED,
"TRAIT_FEATHERED" = TRAIT_FEATHERED,
"TRAIT_NON_IMPORTANT_SHOE_BLOCK" = TRAIT_NON_IMPORTANT_SHOE_BLOCK,
"TRAIT_LABOURED_BREATHING" = TRAIT_LABOURED_BREATHING,
"TRAIT_ASSISTED_BREATHING" = TRAIT_ASSISTED_BREATHING,
"TRAIT_NO_ORGAN_DECAY" = TRAIT_NO_ORGAN_DECAY,
/* "TRAIT_BAIT_UNCONSUMABLE" = TRAIT_BAIT_UNCONSUMABLE, */
/* "TRAIT_BAKEABLE" = TRAIT_BAKEABLE, */
/* "TRAIT_BYPASS_RANGED_ARMOR" = TRAIT_BYPASS_RANGED_ARMOR, */
/* "TRAIT_CONTRABAND_BLOCKER" = TRAIT_CONTRABAND_BLOCKER, */
/* "TRAIT_GERM_SENSITIVE" = TRAIT_GERM_SENSITIVE, */
"TRAIT_INSTANTLY_PROCESSES_BOULDERS" = TRAIT_INSTANTLY_PROCESSES_BOULDERS,
/* "TRAIT_ITEM_OBJECTIVE_BLOCKED" = TRAIT_ITEM_OBJECTIVE_BLOCKED, */
/* "TRAIT_NO_SIDE_KICK" = TRAIT_NO_SIDE_KICK, */
),
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/organ_set_bonus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

/datum/status_effect/organ_set_bonus
id = "organ_set_bonus"
duration = -1
tick_interval = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = STATUS_EFFECT_NO_TICK
alert_type = null
///how many organs the carbon with this has in the set
var/organs = 0
Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/_status_effect.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// When set initially / in on_creation, this is how long the status effect lasts in deciseconds.
/// While processing, this becomes the world.time when the status effect will expire.
/// -1 = infinite duration.
var/duration = -1
var/duration = STATUS_EFFECT_PERMANENT
/// When set initially / in on_creation, this is how long between [proc/tick] calls in deciseconds.
/// While processing, this becomes the world.time when the next tick will occur.
/// -1 = will stop processing, if duration is also unlimited (-1).
Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/agent_pinpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/datum/status_effect/agent_pinpointer
id = "agent_pinpointer"
duration = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = PINPOINTER_PING_TIME
alert_type = /atom/movable/screen/alert/status_effect/agent_pinpointer
///The minimum range to start pointing towards your target.
Expand Down
15 changes: 8 additions & 7 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/datum/status_effect/his_grace
id = "his_grace"
duration = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = 4
alert_type = /atom/movable/screen/alert/status_effect/his_grace
var/bloodlust = 0
Expand Down Expand Up @@ -86,7 +86,7 @@

/datum/status_effect/cult_master
id = "The Cult Master"
duration = -1
duration = STATUS_EFFECT_PERMANENT
alert_type = null
on_remove_on_mob_delete = TRUE
var/alive = TRUE
Expand Down Expand Up @@ -116,7 +116,7 @@
/datum/status_effect/blooddrunk
id = "blooddrunk"
duration = 10
tick_interval = -1 // monkestation edit
tick_interval = STATUS_EFFECT_NO_TICK // monkestation edit
alert_type = /atom/movable/screen/alert/status_effect/blooddrunk

/atom/movable/screen/alert/status_effect/blooddrunk
Expand Down Expand Up @@ -211,7 +211,7 @@
/datum/status_effect/hippocratic_oath
id = "Hippocratic Oath"
status_type = STATUS_EFFECT_UNIQUE
duration = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = 25
alert_type = null

Expand Down Expand Up @@ -423,6 +423,7 @@
duration = 2 SECONDS
status_type = STATUS_EFFECT_REPLACE
show_duration = TRUE
alert_type = null

/datum/status_effect/speed_boost/on_creation(mob/living/new_owner, set_duration)
if(isnum(set_duration))
Expand Down Expand Up @@ -475,7 +476,7 @@

/datum/status_effect/nest_sustenance
id = "nest_sustenance"
duration = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = 0.4 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/nest_sustenance

Expand Down Expand Up @@ -504,8 +505,8 @@
*/
/datum/status_effect/blessing_of_insanity
id = "blessing_of_insanity"
duration = -1
tick_interval = -1
duration = STATUS_EFFECT_PERMANENT
tick_interval = STATUS_EFFECT_NO_TICK
alert_type = /atom/movable/screen/alert/status_effect/blessing_of_insanity

/atom/movable/screen/alert/status_effect/blessing_of_insanity
Expand Down
Loading

0 comments on commit 80efa27

Please sign in to comment.