Skip to content

Commit

Permalink
Merge branch 'master' into XM43E1-alt2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaga-404 authored Mar 2, 2024
2 parents a82f520 + 5ebac75 commit 2bd532a
Show file tree
Hide file tree
Showing 160 changed files with 6,390 additions and 3,096 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
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
8 changes: 8 additions & 0 deletions 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
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 @@ -238,11 +238,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 @@ -310,6 +317,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
64 changes: 54 additions & 10 deletions code/datums/supply_packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,15 @@

//------------------------Sentries Ammo----------------

/datum/supply_packs/ammo_sentry
name = "UA 571-C sentry ammunition (x2)"
/datum/supply_packs/ammo_sentry_shotgun
name = "UA 12-G sentry shotgun ammunition (x2)"
contains = list(
/obj/item/ammo_magazine/sentry,
/obj/item/ammo_magazine/sentry,
/obj/item/ammo_magazine/sentry/shotgun,
/obj/item/ammo_magazine/sentry/shotgun,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "\improper sentry ammo crate"
containername = "\improper sentry shotgun ammo crate"
group = "Ammo"

/datum/supply_packs/ammo_sentry_flamer
Expand All @@ -368,15 +368,37 @@
containername = "\improper sentry flamer ammo crate"
group = "Ammo"

/datum/supply_packs/ammo_sentry_shotgun
name = "UA 12-G sentry shotgun ammunition (x2)"
/datum/supply_packs/ammo_mini_sentry_flamer
name = "UA 45-F mini sentry flamer ammunition (x2)"
contains = list(
/obj/item/ammo_magazine/sentry/shotgun,
/obj/item/ammo_magazine/sentry/shotgun,
/obj/item/ammo_magazine/sentry_flamer/mini,
/obj/item/ammo_magazine/sentry_flamer/mini,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "\improper sentry shotgun ammo crate"
containername = "\improper mini sentry flamer ammo crate"
group = "Ammo"

/datum/supply_packs/ammo_glob_sentry_flamer
name = "UA 60-FP sentry plasma incinerator tank (x2)"
contains = list(
/obj/item/ammo_magazine/sentry_flamer/glob,
/obj/item/ammo_magazine/sentry_flamer/glob,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "\improper sentry plasma incinerator ammo crate"
group = "Ammo"

/datum/supply_packs/ammo_sentry
name = "UA 571-C sentry ammunition (x2)"
contains = list(
/obj/item/ammo_magazine/sentry,
/obj/item/ammo_magazine/sentry,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "\improper sentry ammo crate"
group = "Ammo"

//------------------------M240 flamer tanks----------------
Expand Down Expand Up @@ -419,6 +441,28 @@
containertype = /obj/structure/closet/crate/ammo/alt/flame
group = "Ammo"

//------------------------Mounted guns ammo----------------
/datum/supply_packs/ammo_m2c
name = "M2C ammunition crate (x2)"
contains = list(
/obj/item/ammo_magazine/m2c,
/obj/item/ammo_magazine/m2c,
)
cost = 25
containertype = /obj/structure/closet/crate/ammo
containername = "\improper m2c ammunition crate"
group = "Ammo"

/datum/supply_packs/ammo_m56d
name = "M56D drum magazine crate (x1)"
contains = list(
/obj/item/ammo_magazine/m56d,
)
cost = 25
containertype = /obj/structure/closet/crate/ammo
containername = "\improper m56d drum magazine crate"
group = "Ammo"

//This crate has a little bit of everything, mostly okay stuff, but it does have some really unique picks.
/datum/supply_packs/ammo_surplus
name = "Surplus ammo crate (various USCM magazines x10)"
Expand Down
22 changes: 18 additions & 4 deletions code/game/area/almayer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,23 @@
/area/almayer/shipboard/brig/armory
name = "\improper Brig Armory"

/area/almayer/shipboard/brig/main_office
name = "\improper Brig Main Office"
/area/almayer/shipboard/brig/mp_bunks
name = "\improper Brig MP Bunks"

/area/almayer/shipboard/brig/starboard_hallway
name = "\improper Brig Starboard Hallway"

/area/almayer/shipboard/brig/perma
name = "\improper Brig Perma Cells"

/area/almayer/shipboard/brig/cryo
name = "\improper Brig Cryo Pods"

/area/almayer/shipboard/brig/surgery
name = "\improper Brig Surgery"
/area/almayer/shipboard/brig/medical
name = "\improper Brig Medical"

/area/almayer/shipboard/brig/interrogation
name = "\improper Brig Interrogation Room"

/area/almayer/shipboard/brig/general_equipment
name = "\improper Brig General Equipment"
Expand All @@ -262,11 +268,15 @@
/area/almayer/shipboard/brig/execution
name = "\improper Brig Execution Room"

/area/almayer/shipboard/brig/execution_storage
name = "\improper Brig Execution Storage"

/area/almayer/shipboard/brig/cic_hallway
name = "\improper Brig CiC Hallway"

/area/almayer/shipboard/brig/dress
name = "\improper CIC Dress Uniform Room"

/area/almayer/shipboard/brig/processing
name = "\improper Brig Processing and Holding"

Expand All @@ -278,6 +288,10 @@
name = "\improper Brig Chief MP Office"
icon_state = "chiefmpoffice"

/area/almayer/shipboard/brig/warden_office
name = "\improper Brig Warden Office"
icon_state = "chiefmpoffice"

/area/almayer/shipboard/sea_office
name = "\improper Lower Deck Senior Enlisted Advisor Office"
icon_state = "chiefmpoffice"
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/cm_initialize.dm
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ Additional game mode variables.
var/marine_pop_size = 0
var/uscm_personnel_count = 0
for(var/mob/living/carbon/human/human as anything in GLOB.alive_human_list)
if(human.faction == FACTION_USCM)
if(human.faction == FACTION_MARINE)
uscm_personnel_count++
var/datum/job/job = GET_MAPPED_ROLE(human.job)
marine_pop_size += GLOB.RoleAuthority.calculate_role_weight(job)
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/civilians/other/survivors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@

if(hostile)
to_chat(survivor, SPAN_HIGHDANGER("You are HOSTILE to the USCM!"))
else if(survivor.faction == FACTION_CLF)
to_chat(survivor, SPAN_HIGHDANGER("You are HOSTILE to the USCM, but NOT to other survivors!"))
else
to_chat(survivor, SPAN_XENOHIGHDANGER("You are NON-HOSTILE to the USCM!"))

Expand Down
Loading

0 comments on commit 2bd532a

Please sign in to comment.