Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into resprites-2-24
Browse files Browse the repository at this point in the history
  • Loading branch information
nauticall committed Mar 1, 2024
2 parents 806a59a + 45b899f commit 5f9d3e3
Show file tree
Hide file tree
Showing 189 changed files with 10,007 additions and 6,160 deletions.
8 changes: 4 additions & 4 deletions .github/guides/AUTODOC.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# dmdoc
[DOCUMENTATION]: **PUT DOCUMENTATION LINK HERE**
[DOCUMENTATION]: https://docs.cm-ss13.com/

[BYOND]: https://secure.byond.com/

[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/src/dmdoc
[DMDOC]: https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dmdoc

[DMDOC] is a documentation generator for DreamMaker, the scripting language
of the [BYOND] game engine. It produces simple static HTML files based on
Expand All @@ -13,9 +13,9 @@ We use **dmdoc** to generate [DOCUMENTATION] for our code, and that documentatio
is automatically generated and built on every new commit to the master branch

This gives new developers a clickable reference [DOCUMENTATION] they can browse to better help
gain understanding of the /tg/station codebase structure and api reference.
gain understanding of the CM-SS13 codebase structure and api reference.

## Documenting code on /tg/station
## Documenting code on CM-SS13
We use block comments to document procs and classes, and we use `///` line comments
when documenting individual variables.

Expand Down
8 changes: 6 additions & 2 deletions code/__DEFINES/dcs/signals/atom/mob/signals_mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,13 @@
#define COMSIG_MOB_PRE_CLICK "mob_pre_click"
#define COMPONENT_INTERRUPT_CLICK (1<<0)

///from base of /mob/Login(): ()
/// From base of /mob/Login(), called when a client logs into this mob: ()
/// Not to be confused with [COMSIG_MOB_LOGGED_IN]
#define COMSIG_MOB_LOGIN "mob_login"
///from base of /mob/Logout(): ()
/// From base of /mob/Login(), called after a client logs into this mob: ()
/// Not to be confused with [COMSIG_MOB_LOGIN]
#define COMSIG_MOB_LOGGED_IN "mob_logged_in"
/// From base of /mob/Logout(): ()
#define COMSIG_MOB_LOGOUT "mob_logout"

/// From /mob/proc/change_real_name(): (old_name, new_name)
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/dcs/signals/signals_client.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
/// Called after one or more verbs are added: (list of verbs added)
#define COMSIG_CLIENT_VERB_REMOVED "client_verb_removed"

/// Called after a client logs into a mob: (mob)
#define COMSIG_CLIENT_MOB_LOGIN "client_mob_changed"
/// Called from /mob/Login() after a client logs into a mob: (mob)
#define COMSIG_CLIENT_MOB_LOGGED_IN "client_mob_logged_in"

/// Called when something is added to a client's screen : /client/proc/add_to_screen(screen_add)
#define COMSIG_CLIENT_SCREEN_ADD "client_screen_add"
Expand Down
6 changes: 4 additions & 2 deletions code/__DEFINES/dcs/signals/signals_global.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@

#define COMSIG_GLOB_REMOVE_VOTE_BUTTON "!remove_vote_button"

#define COMSIG_GLOB_CLIENT_LOGIN "!client_login"
/// Called from /client/New() when a client logs in to the game: (client)
#define COMSIG_GLOB_CLIENT_LOGGED_IN "!client_logged_in"

#define COMSIG_GLOB_MOB_LOGIN "!mob_login"
/// Called from /mob/Login() when a client logs into a mob: (mob)
#define COMSIG_GLOB_MOB_LOGGED_IN "!mob_logged_in"

///from /datum/controller/subsystem/ticker/PostSetup
#define COMSIG_GLOB_POST_SETUP "!post_setup"
Expand Down
5 changes: 5 additions & 0 deletions code/__DEFINES/dropships.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@
#define DROPSHIP_MIN_AUTO_DELAY 10 SECONDS
#define DROPSHIP_AUTO_RETRY_COOLDOWN 20 SECONDS
#define DROPSHIP_MEDEVAC_COOLDOWN 20 SECONDS

//Hatches states
#define SHUTTLE_DOOR_BROKEN -1
#define SHUTTLE_DOOR_UNLOCKED 0
#define SHUTTLE_DOOR_LOCKED 1
2 changes: 1 addition & 1 deletion code/__DEFINES/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#define MOB_HUD_XENO_INFECTION 6
#define MOB_HUD_XENO_STATUS 7
#define MOB_HUD_XENO_HOSTILE 8
#define MOB_HUD_FACTION_USCM 9
#define MOB_HUD_FACTION_MARINE 9
#define MOB_HUD_FACTION_OBSERVER 10
#define MOB_HUD_FACTION_UPP 11
#define MOB_HUD_FACTION_WY 12
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ DEFINE_BITFIELD(whitelist_status, list(
#define FACTION_LIST_MERCENARY list(FACTION_MERCENARY)
#define FACTION_LIST_MARSHAL list(FACTION_MARSHAL)
#define FACTION_LIST_DUTCH list(FACTION_DUTCH)
#define FACTION_LIST_SURVIVOR_WY list(FACTION_SURVIVOR, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_WY list(FACTION_MARINE, FACTION_PMC, FACTION_WY_DEATHSQUAD, FACTION_WY)
#define FACTION_LIST_MARINE_UPP list(FACTION_MARINE, FACTION_UPP)
#define FACTION_LIST_MARINE_TWE list(FACTION_MARINE, FACTION_TWE)
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/sentry_laptop_configurations.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define FACTION_USCM "USCM"
#define FACTION_WEYLAND "WY"
#define FACTION_HUMAN "HUMAN"
#define FACTION_COLONY "COLONY"
Expand Down
4 changes: 2 additions & 2 deletions 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 "7.1.0"
#define TGS_DMAPI_VERSION "7.1.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 @@ -496,7 +496,7 @@
/// 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()
return

/**
* Trigger an event in TGS. Requires TGS version >= 6.3.0. Returns [TRUE] if the event was triggered successfully, [FALSE] otherwise. This function may sleep!
*
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#define MARINE_CAN_BUY_COMBAT_ARMOR "combat_armor"
#define MARINE_CAN_BUY_KIT "kit"
#define MARINE_CAN_BUY_DRESS "dress"
#define CIVILIAN_CAN_BUY_BACKPACK "civilian_backpack"
#define CIVILIAN_CAN_BUY_UTILITY "civilian_utility"

#define MARINE_CAN_BUY_ALL list(MARINE_CAN_BUY_UNIFORM = 1, MARINE_CAN_BUY_SHOES = 1, MARINE_CAN_BUY_HELMET = 1, MARINE_CAN_BUY_ARMOR = 1, MARINE_CAN_BUY_GLOVES = 1, MARINE_CAN_BUY_EAR = 1, MARINE_CAN_BUY_BACKPACK = 1, MARINE_CAN_BUY_POUCH = 2, MARINE_CAN_BUY_BELT = 1, MARINE_CAN_BUY_GLASSES = 1, MARINE_CAN_BUY_MASK = 1, MARINE_CAN_BUY_ESSENTIALS = 1, MARINE_CAN_BUY_SECONDARY = 1, MARINE_CAN_BUY_ATTACHMENT = 1, MARINE_CAN_BUY_MRE = 1, MARINE_CAN_BUY_ACCESSORY = 1, MARINE_CAN_BUY_COMBAT_SHOES = 1, MARINE_CAN_BUY_COMBAT_HELMET = 1, MARINE_CAN_BUY_COMBAT_ARMOR = 1, MARINE_CAN_BUY_KIT = 1, MARINE_CAN_BUY_DRESS = 99)

Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mapping_globals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ GLOBAL_LIST_EMPTY(teleporter_landmarks)

GLOBAL_LIST_INIT(cardinals, list(NORTH, SOUTH, EAST, WEST))
GLOBAL_LIST_EMPTY(nightmare_landmarks)
GLOBAL_LIST_EMPTY(nightmare_landmark_tags_removed)

GLOBAL_LIST_EMPTY(ship_areas)

Expand Down
7 changes: 5 additions & 2 deletions code/controllers/configuration/config_entry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#define KEY_MODE_TEXT 0
#define KEY_MODE_TYPE 1
#define KEY_MODE_TEXT_UNALTERED 2

/datum/config_entry
var/name //read-only, this is determined by the last portion of the derived entry type
Expand Down Expand Up @@ -153,15 +154,17 @@
var/key_value = null

if(key_pos || value_mode == VALUE_MODE_FLAG)
key_name = lowertext(copytext(str_val, 1, key_pos))
key_name = copytext(str_val, 1, key_pos)
if(key_mode != KEY_MODE_TEXT_UNALTERED)
key_name = lowertext(key_name)
if(key_pos)
key_value = copytext(str_val, key_pos + length(str_val[key_pos]))
var/new_key
var/new_value
var/continue_check_value
var/continue_check_key
switch(key_mode)
if(KEY_MODE_TEXT)
if(KEY_MODE_TEXT, KEY_MODE_TEXT_UNALTERED)
new_key = key_name
continue_check_key = new_key
if(KEY_MODE_TYPE)
Expand Down
11 changes: 11 additions & 0 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,3 +629,14 @@ This maintains a list of ip addresses that are able to bypass topic filtering.
/datum/config_entry/flag/guest_ban

/datum/config_entry/flag/auto_profile

/// Relay Ping Browser configuration
/datum/config_entry/keyed_list/connection_relay_ping
splitter = "|"
key_mode = KEY_MODE_TEXT_UNALTERED
value_mode = VALUE_MODE_TEXT

/datum/config_entry/keyed_list/connection_relay_con
splitter = "|"
key_mode = KEY_MODE_TEXT_UNALTERED
value_mode = VALUE_MODE_TEXT
10 changes: 9 additions & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ SUBSYSTEM_DEF(ticker)

var/current_state = GAME_STATE_STARTUP //State of current round used by process()
var/force_ending = FALSE //Round was ended by admin intervention

/// If TRUE, there is no lobby phase, the game starts immediately.
var/start_immediately = FALSE

var/bypass_checks = FALSE //Bypass mode init checks
var/setup_failed = FALSE //If the setup has failed at any point
var/setup_started = FALSE
Expand Down Expand Up @@ -80,6 +84,10 @@ SUBSYSTEM_DEF(ticker)
var/mob/new_player/player = i
if(player.ready) // TODO: port this == PLAYER_READY_TO_PLAY)
++totalPlayersReady

if(start_immediately)
time_left = 0

if(time_left < 0 || delay_start)
return

Expand Down Expand Up @@ -207,7 +215,7 @@ SUBSYSTEM_DEF(ticker)
CHECK_TICK
mode.announce()
if(mode.taskbar_icon)
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGIN, PROC_REF(handle_mode_icon))
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGGED_IN, PROC_REF(handle_mode_icon))
set_clients_taskbar_icon(mode.taskbar_icon)

if(GLOB.perf_flags & PERF_TOGGLE_LAZYSS)
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ SUBSYSTEM_DEF(vote)
voting.Cut()
remove_action_buttons()

UnregisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGIN)
UnregisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGGED_IN)

for(var/c in GLOB.player_list)
update_static_data(c)
Expand Down Expand Up @@ -373,7 +373,7 @@ SUBSYSTEM_DEF(vote)
if(send_clients_vote)
C.mob.vote()

RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGIN, PROC_REF(handle_client_joining))
RegisterSignal(SSdcs, COMSIG_GLOB_CLIENT_LOGGED_IN, PROC_REF(handle_client_joining))
SStgui.update_uis(src)
return TRUE
return FALSE
Expand Down Expand Up @@ -525,7 +525,7 @@ GLOBAL_LIST_INIT(possible_vote_types, list(
if(!(params["vote_type"] in GLOB.possible_vote_types))
return

if(!check_rights(R_ADMIN))
if(!check_rights(R_MOD))
var/list/vote_type = GLOB.possible_vote_types[params["vote_type"]]
if(vote_type["admin_only"])
return
Expand Down
13 changes: 7 additions & 6 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
/// that will be given to a projectile with the current ammo datum
var/list/list/traits_to_give

var/flamer_reagent_type = /datum/reagent/napalm/ut
var/flamer_reagent_id = "utnapthal"

/// The flicker that plays when a bullet hits a target. Usually red. Can be nulled so it doesn't show up at all.
var/hit_effect_color = "#FF0000"
Expand Down Expand Up @@ -237,11 +237,12 @@

P.fire_at(new_target, original_P.firer, original_P.shot_from, P.ammo.max_range, P.ammo.shell_speed, original_P.original) //Fire!

/datum/ammo/proc/drop_flame(turf/T, datum/cause_data/cause_data) // ~Art updated fire 20JAN17
if(!istype(T))
/datum/ammo/proc/drop_flame(turf/turf, datum/cause_data/cause_data) // ~Art updated fire 20JAN17
if(!istype(turf))
return
if(locate(/obj/flamer_fire) in T)
if(locate(/obj/flamer_fire) in turf)
return

var/datum/reagent/R = new flamer_reagent_type()
new /obj/flamer_fire(T, cause_data, R)
var/datum/reagent/chemical = GLOB.chemical_reagents_list[flamer_reagent_id]

new /obj/flamer_fire(turf, cause_data, chemical)
4 changes: 2 additions & 2 deletions code/datums/ammo/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
drop_flame(get_turf(P), P.weapon_cause_data)

/datum/ammo/flamethrower/tank_flamer
flamer_reagent_type = /datum/reagent/napalm/blue
flamer_reagent_id = "napalmx"

/datum/ammo/flamethrower/sentry_flamer
flags_ammo_behavior = AMMO_IGNORE_ARMOR|AMMO_IGNORE_COVER|AMMO_FLAME
flamer_reagent_type = /datum/reagent/napalm/blue
flamer_reagent_id = "napalmx"

accuracy = HIT_ACCURACY_TIER_8
accurate_range = 6
Expand Down
26 changes: 17 additions & 9 deletions code/datums/diseases/black_goo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
#define ZOMBIE_INFECTION_STAGE_ONE 1
#define ZOMBIE_INFECTION_STAGE_TWO 2
#define ZOMBIE_INFECTION_STAGE_THREE 3
#define ZOMBIE_INFECTION_STAGE_FOUR 4
#define SLOW_INFECTION_RATE 1
#define FAST_INFECTION_RATE 7
#define STAGE_LEVEL_THRESHOLD 360
#define MESSAGE_COOLDOWN_TIME 1 MINUTES

/datum/disease/black_goo
name = "Black Goo"
max_stages = 3
max_stages = 4
cure = "Anti-Zed"
cure_id = "antiZed"
spread = "Bites"
Expand Down Expand Up @@ -120,17 +121,23 @@
stage_level += 42

if(ZOMBIE_INFECTION_STAGE_THREE)
//check if the mob is already a zombie and just return to avoid weird stuff, edge case if zombie_is_transforming deoesn't work.
// if zombie or transforming we upgrade it to stage four.
if(iszombie(infected_mob))
stage++
return

if(infected_mob.stat == DEAD && stage_counter != stage)
to_chat(infected_mob, SPAN_CENTERBOLD("Your zombie infection is now at stage three! Zombie transformation begin!"))
stage_counter = stage
hidden = list(0,0)
// if not a zombie(above check) and isn't transforming then we transform you into a zombie.
if(!zombie_is_transforming)
// if your dead we inform you that you're going to turn into a zombie.
if(infected_mob.stat == DEAD && stage_counter != stage)
to_chat(infected_mob, SPAN_CENTERBOLD("Your zombie infection is now at stage three! Zombie transformation begin!"))
stage_counter = stage
zombie_transform(infected_mob)
infected_mob.next_move_slowdown = max(infected_mob.next_move_slowdown, 2)
hidden = list(0,0)
infected_mob.next_move_slowdown = max(infected_mob.next_move_slowdown, 2)

if(ZOMBIE_INFECTION_STAGE_FOUR)
return
// final stage of infection it's to avoid running the above test once you're a zombie for now. maybe more later.

/datum/disease/black_goo/proc/zombie_transform(mob/living/carbon/human/human)
set waitfor = 0
Expand All @@ -149,7 +156,7 @@
playsound(human.loc, 'sound/hallucinations/wail.ogg', 25, 1)
human.jitteriness = 0
human.set_species(SPECIES_ZOMBIE)
stage = 3
stage = 4
human.faction = FACTION_ZOMBIE
zombie_is_transforming = FALSE

Expand Down Expand Up @@ -309,6 +316,7 @@
#undef ZOMBIE_INFECTION_STAGE_ONE
#undef ZOMBIE_INFECTION_STAGE_TWO
#undef ZOMBIE_INFECTION_STAGE_THREE
#undef ZOMBIE_INFECTION_STAGE_FOUR
#undef STAGE_LEVEL_THRESHOLD
#undef SLOW_INFECTION_RATE
#undef FAST_INFECTION_RATE
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
MOB_HUD_XENO_INFECTION = new /datum/mob_hud/xeno_infection(),
MOB_HUD_XENO_STATUS = new /datum/mob_hud/xeno(),
MOB_HUD_XENO_HOSTILE = new /datum/mob_hud/xeno_hostile(),
MOB_HUD_FACTION_USCM = new /datum/mob_hud/faction(),
MOB_HUD_FACTION_MARINE = new /datum/mob_hud/faction(),
MOB_HUD_FACTION_OBSERVER = new /datum/mob_hud/faction/observer(),
MOB_HUD_FACTION_UPP = new /datum/mob_hud/faction/upp(),
MOB_HUD_FACTION_WY = new /datum/mob_hud/faction/wy(),
Expand Down
Loading

0 comments on commit 5f9d3e3

Please sign in to comment.