Skip to content

Commit

Permalink
Merge branch 'master' into balance/orphanage_hive_weeds
Browse files Browse the repository at this point in the history
  • Loading branch information
TeDGamer authored Sep 11, 2023
2 parents ca3ba1f + 51463b1 commit 4d78f10
Show file tree
Hide file tree
Showing 169 changed files with 1,478 additions and 1,085 deletions.
23 changes: 16 additions & 7 deletions code/__DEFINES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define ARES_RECORD_SECURITY "Security Update"
#define ARES_RECORD_MAINTENANCE "Maintenance Ticket"
#define ARES_RECORD_ACCESS "Access Ticket"
#define ARES_RECORD_FLIGHT "Flight Record"

/// Not by ARES logged through marine_announcement()
#define ARES_LOG_NONE 0
Expand All @@ -34,13 +35,14 @@
/// Logged in the security updates
#define ARES_LOG_SECURITY 2

/// Access levels specifically for Working Joe management console
#define APOLLO_ACCESS_REQUEST 0
#define APOLLO_ACCESS_REPORTER 1
#define APOLLO_ACCESS_TEMP 2
#define APOLLO_ACCESS_AUTHED 3
#define APOLLO_ACCESS_JOE 4
#define APOLLO_ACCESS_DEBUG 5
// Access levels specifically for Working Joe management console
#define APOLLO_ACCESS_LOGOUT 0
#define APOLLO_ACCESS_REQUEST 1
#define APOLLO_ACCESS_REPORTER 2
#define APOLLO_ACCESS_TEMP 3
#define APOLLO_ACCESS_AUTHED 4
#define APOLLO_ACCESS_JOE 5
#define APOLLO_ACCESS_DEBUG 6

/// Ticket statuses, both for Access and Maintenance
/// Pending assignment/rejection
Expand All @@ -54,6 +56,13 @@
/// Completed by WJs
#define TICKET_COMPLETED "completed"

/// Granted Access Ticket
#define TICKET_GRANTED "granted"
/// Revoked Access Ticket
#define TICKET_REVOKED "revoked"
/// Self-Returned Access Ticket
#define TICKET_RETURNED "returned"

/// Checks for if buttons can be used, these may yet be removed and internalised to the UI programming
#define TICKET_OPEN "OPEN"
#define TICKET_CLOSED "CLOSED"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ var/MAX_EXPLOSION_RANGE = 14
/// Used in /obj/structure/pipes/vents/proc/create_gas
#define VENT_GAS_SMOKE "Smoke"
#define VENT_GAS_CN20 "CN20 Nerve Gas"
#define VENT_GAS_CN20_XENO "CN20-X Nerve Gas"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define COMSIG_HUMAN_REVIVED "human_revived"
/// From /mob/living/carbon/human/bullet_act
#define COMSIG_HUMAN_PRE_BULLET_ACT "human_pre_bullet_act"
/// From /mob/living/carbon/human/bullet_act(): (damage_result, ammo_flags, obj/item/projectile/P)
/// From /mob/living/carbon/human/bullet_act(): (damage_result, ammo_flags, obj/projectile/P)
#define COMSIG_HUMAN_BULLET_ACT "human_bullet_act"
#define COMPONENT_CANCEL_BULLET_ACT (1<<0)

Expand Down
12 changes: 6 additions & 6 deletions code/__DEFINES/dcs/signals/atom/signals_projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
#define COMSIG_AMMO_POINT_BLANK "ammo_point_blank"
#define COMPONENT_CANCEL_AMMO_POINT_BLANK (1<<0)

/// From /obj/item/projectile/handle_mob(): (mob/living/target)
/// From /obj/projectile/handle_mob(): (mob/living/target)
#define COMSIG_BULLET_PRE_HANDLE_MOB "bullet_pre_handle_mob"
/// From /obj/item/projectile/handle_mob(): (mob/living/target)
/// From /obj/projectile/handle_mob(): (mob/living/target)
#define COMSIG_BULLET_POST_HANDLE_MOB "bullet_post_handle_mob"
/// From /obj/item/projectile/handle_obj(): (obj/target, did_hit)
/// From /obj/projectile/handle_obj(): (obj/target, did_hit)
#define COMSIG_BULLET_POST_HANDLE_OBJ "bullet_post_handle_obj"
/// From /obj/item/projectile/handle_obj(): (obj/target)
/// From /obj/projectile/handle_obj(): (obj/target)
#define COMSIG_BULLET_PRE_HANDLE_OBJ "bullet_pre_handle_obj"
/// From /obj/item/projectile/scan_a_turf(): (turf/target)
/// From /obj/projectile/scan_a_turf(): (turf/target)
#define COMSIG_BULLET_POST_HANDLE_TURF "bullet_post_handle_turf"
/// From /obj/item/projectile/scan_a_turf(): (turf/target)
/// From /obj/projectile/scan_a_turf(): (turf/target)
#define COMSIG_BULLET_PRE_HANDLE_TURF "bullet_pre_handle_turf"
#define COMPONENT_BULLET_PASS_THROUGH (1<<0)
#define COMSIG_BULLET_TERMINAL "bullet_terminal"
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/vv.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,6 @@
#define VV_HK_TOGGLEPOWER "togglepower"

#define VV_HK_ADD_ITEMS_TO_VENDOR "add_items_to_vendor"

// /obj/structure/pipes/vents
#define VV_HK_GAS "release_gas"
2 changes: 1 addition & 1 deletion code/__DEFINES/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
#define XENO_BURIED_LARVA_TIME_LIMIT (30 MINUTES)

/// The time when xenos can start taking over comm towers
#define XENO_COMM_ACQUISITION_TIME (90 MINUTES)
#define XENO_COMM_ACQUISITION_TIME (55 MINUTES)

/// The time it takes for a pylon to give one larva while activated
#define XENO_PYLON_ACTIVATION_COOLDOWN (5 MINUTES)
Expand Down
16 changes: 8 additions & 8 deletions code/controllers/subsystem/projectiles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ SUBSYSTEM_DEF(projectiles)
priority = SS_PRIORITY_PROJECTILES

/// List of projectiles handled by the subsystem
VAR_PRIVATE/list/obj/item/projectile/projectiles
VAR_PRIVATE/list/obj/projectile/projectiles
/// List of projectiles on hold due to sleeping
VAR_PRIVATE/list/obj/item/projectile/sleepers
VAR_PRIVATE/list/obj/projectile/sleepers
/// List of projectiles handled this controller firing
VAR_PRIVATE/list/obj/item/projectile/flying
VAR_PRIVATE/list/obj/projectile/flying

/*
* Scheduling notes:
Expand Down Expand Up @@ -42,14 +42,14 @@ SUBSYSTEM_DEF(projectiles)
flying = projectiles.Copy()
flying -= sleepers
while(flying.len)
var/obj/item/projectile/projectile = flying[flying.len]
var/obj/projectile/projectile = flying[flying.len]
flying.len--
var/delta_time = wait * world.tick_lag * (1 SECONDS)
handle_projectile_flight(projectile, delta_time)
if(MC_TICK_CHECK)
return

/datum/controller/subsystem/projectiles/proc/handle_projectile_flight(obj/item/projectile/projectile, delta_time)
/datum/controller/subsystem/projectiles/proc/handle_projectile_flight(obj/projectile/projectile, delta_time)
PRIVATE_PROC(TRUE)
set waitfor = FALSE
// We're in double-check land here because there ARE rulebreakers.
Expand All @@ -66,15 +66,15 @@ SUBSYSTEM_DEF(projectiles)
stop_projectile(projectile) // Ideally this was already done thru process()
qdel(projectile)

/datum/controller/subsystem/projectiles/proc/process_wrapper(obj/item/projectile/projectile, delta_time)
/datum/controller/subsystem/projectiles/proc/process_wrapper(obj/projectile/projectile, delta_time)
// set waitfor=TRUE
. = PROC_RETURN_SLEEP
. = projectile.process(delta_time)
sleepers -= projectile // Recover from sleep

/datum/controller/subsystem/projectiles/proc/queue_projectile(obj/item/projectile/projectile)
/datum/controller/subsystem/projectiles/proc/queue_projectile(obj/projectile/projectile)
projectiles |= projectile
/datum/controller/subsystem/projectiles/proc/stop_projectile(obj/item/projectile/projectile)
/datum/controller/subsystem/projectiles/proc/stop_projectile(obj/projectile/projectile)
projectiles -= projectile
flying -= projectile // avoids problems with deleted projs
projectile.speed = 0
4 changes: 2 additions & 2 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ SUBSYSTEM_DEF(ticker)
if(CONFIG_GET(flag/autooocmute))
ooc_allowed = FALSE

round_start_time = world.time

CHECK_TICK
for(var/I in round_start_events)
var/datum/callback/cb = I
Expand All @@ -222,9 +224,7 @@ SUBSYSTEM_DEF(ticker)
equip_characters()

GLOB.data_core.manifest()

log_world("Game start took [(world.timeofday - init_start) / 10]s")
round_start_time = world.time
//SSdbcore.SetRoundStart()

current_state = GAME_STATE_PLAYING
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/cluster_stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
SIGNAL_HANDLER
L += "Cluster Stack: [cluster_stacks]/[MAX_CLUSTER_STACKS]"

/datum/component/cluster_stack/proc/apply_cluster_stacks(mob/living/L, damage_result, ammo_flags, obj/item/projectile/P)
/datum/component/cluster_stack/proc/apply_cluster_stacks(mob/living/L, damage_result, ammo_flags, obj/projectile/P)
SIGNAL_HANDLER
if(cluster_stacks >= MAX_CLUSTER_STACKS)
var/old_dmg_cont = damage_counter
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/bullet_trait/bullet_trait.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# A PROTOTYPE FOR MAKING ANY BULLET TRAITS

Element representing traits that can be applied to bullets upon being fired
* Must be attached to a projectile (`/obj/item/projectile` in `projectile.dm`)
* Must be attached to a projectile (`/obj/projectile` in `projectile.dm`)
* Allows for the customization of bullet behavior based on ammo types or guns (or other things)

By convention, bullet_traits should be named bullet_trait_[insert rest of name here]
Expand All @@ -16,7 +16,7 @@ By convention, bullet_traits should be named bullet_trait_[insert rest of name h
/datum/element/bullet_trait/databaseAttach(datum/target)
. = ..()
// All bullet traits can only be applied to projectiles
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE
[handling here]
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/bullet_trait/damage_boost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile))
*/
/datum/element/bullet_trait_damage_boost/Attach(datum/target, damage_mult, list/damage_boosted_atoms)
. = ..()
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE

src.damage_mult = damage_mult
Expand All @@ -66,7 +66,7 @@ GLOBAL_LIST_INIT(damage_boost_vehicles, typecacheof(/obj/vehicle/multitile))
//add more cases for other interactions (switch doesn't seem to work with istype)
else return 0

/datum/element/bullet_trait_damage_boost/proc/handle_bullet(obj/item/projectile/P, atom/A)
/datum/element/bullet_trait_damage_boost/proc/handle_bullet(obj/projectile/P, atom/A)
SIGNAL_HANDLER

atom_type = check_type(A)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/elements/bullet_trait/iff.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// This is the iff_group
/obj/item/projectile/var/runtime_iff_group
/obj/projectile/var/runtime_iff_group

/datum/element/bullet_trait_iff
// General bullet trait vars
Expand All @@ -13,7 +13,7 @@

/datum/element/bullet_trait_iff/Attach(datum/target, iff_group)
. = ..()
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE

if(!iff_group)
Expand All @@ -39,7 +39,7 @@
/datum/element/bullet_trait_iff/proc/set_iff(datum/target, mob/living/carbon/human/firer)
SIGNAL_HANDLER

var/obj/item/projectile/P = target
var/obj/projectile/P = target
P.runtime_iff_group = get_user_iff_group(firer)

// We have a "cache" to avoid getting ID card iff every shot,
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/bullet_trait/ignored_range.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/datum/element/bullet_trait_ignored_range/Attach(datum/target, range_to_ignore)
. = ..()
ignored_range = range_to_ignore
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE

RegisterSignal(target, COMSIG_BULLET_CHECK_MOB_SKIPPING, PROC_REF(check_distance))
Expand All @@ -22,7 +22,7 @@

return ..()

/datum/element/bullet_trait_ignored_range/proc/check_distance(obj/item/projectile/P, mob/living/carbon/human/projectile_target)
/datum/element/bullet_trait_ignored_range/proc/check_distance(obj/projectile/P, mob/living/carbon/human/projectile_target)
SIGNAL_HANDLER

if(P.distance_travelled <= ignored_range)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/elements/bullet_trait/incendiary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/datum/element/bullet_trait_incendiary/Attach(datum/target, reagent = /datum/reagent/napalm/ut, stacks = 20)
. = ..()
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE

if(ispath(reagent))
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/bullet_trait/penetrating/heavy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

src.damage_lost_per_pen = damage_lost_per_pen

/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_movables(obj/item/projectile/bullet, atom/movable/hit_movable, did_hit)
/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_movables(obj/projectile/bullet, atom/movable/hit_movable, did_hit)
if(did_hit)
var/slow_mult = 1
if(ismob(hit_movable))
Expand All @@ -35,7 +35,7 @@

return COMPONENT_BULLET_PASS_THROUGH

/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_turf(obj/item/projectile/bullet, turf/closed/wall/hit_wall)
/datum/element/bullet_trait_penetrating/heavy/handle_passthrough_turf(obj/projectile/bullet, turf/closed/wall/hit_wall)
bullet.distance_travelled += distance_loss_per_hit
bullet.damage -= damage_lost_per_pen

Expand Down
6 changes: 3 additions & 3 deletions code/datums/elements/bullet_trait/penetrating/penetrating.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/datum/element/bullet_trait_penetrating/Attach(datum/target, distance_loss_per_hit = 3)
. = ..()
if(!istype(target, /obj/item/projectile))
if(!istype(target, /obj/projectile))
return ELEMENT_INCOMPATIBLE

src.distance_loss_per_hit = distance_loss_per_hit
Expand All @@ -27,13 +27,13 @@
))
return ..()

/datum/element/bullet_trait_penetrating/proc/handle_passthrough_movables(obj/item/projectile/P, atom/movable/A, did_hit)
/datum/element/bullet_trait_penetrating/proc/handle_passthrough_movables(obj/projectile/P, atom/movable/A, did_hit)
SIGNAL_HANDLER
if(did_hit)
P.distance_travelled += distance_loss_per_hit
return COMPONENT_BULLET_PASS_THROUGH

/datum/element/bullet_trait_penetrating/proc/handle_passthrough_turf(obj/item/projectile/P, turf/closed/wall/T)
/datum/element/bullet_trait_penetrating/proc/handle_passthrough_turf(obj/projectile/P, turf/closed/wall/T)
SIGNAL_HANDLER
P.distance_travelled += distance_loss_per_hit

Expand Down
10 changes: 8 additions & 2 deletions code/datums/emergency_calls/cryo_marines.dm
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@


//whiskey outpost extra marines
/datum/emergency_call/cryo_squad
name = "Marine Cryo Reinforcements (Squad)"
mob_max = 10
mob_min = 1
probability = 0
objectives = "Assist the USCM forces"
max_engineers = 4
max_engineers = 2
max_medics = 2
name_of_spawn = /obj/effect/landmark/ert_spawns/distress_cryo
shuttle_id = ""
Expand Down Expand Up @@ -95,3 +94,10 @@

/obj/effect/landmark/ert_spawns/distress_cryo
name = "Distress_Cryo"

/datum/emergency_call/cryo_squad/tech
name = "Marine Cryo Reinforcements (Tech)"
mob_max = 5
max_engineers = 1
max_medics = 1
max_heavies = 0
43 changes: 43 additions & 0 deletions code/datums/emergency_calls/cryo_spec.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/datum/emergency_call/cryo_spec
name = "Marine Cryo Reinforcement (Spec)"
mob_max = 1
mob_min = 1
probability = 0
objectives = "Assist the USCM forces"
name_of_spawn = /obj/effect/landmark/ert_spawns/distress_cryo
shuttle_id = ""
spawn_max_amount = TRUE

/datum/emergency_call/cryo_spec/create_member(datum/mind/mind, turf/override_spawn_loc)
set waitfor = FALSE
if(SSmapping.configs[GROUND_MAP].map_name == MAP_WHISKEY_OUTPOST)
name_of_spawn = /obj/effect/landmark/ert_spawns/distress_wo
var/turf/spawn_loc = override_spawn_loc ? override_spawn_loc : get_spawn_point()

if(!istype(spawn_loc))
return //Didn't find a useable spawn point.

var/mob/living/carbon/human/human = new(spawn_loc)

if(mind)
mind.transfer_to(human, TRUE)
else
human.create_hud()

if(!mind)
for(var/obj/structure/machinery/cryopod/pod in view(7,human))
if(pod && !pod.occupant)
pod.go_in_cryopod(human, silent = TRUE)
break

sleep(5)
human.client?.prefs.copy_all_to(human, JOB_SQUAD_SPECIALIST, TRUE, TRUE)
arm_equipment(human, /datum/equipment_preset/uscm/spec/cryo, mind == null, TRUE)
to_chat(human, SPAN_ROLE_HEADER("You are a Weapons Specialist in the USCM"))
to_chat(human, SPAN_ROLE_BODY("Your squad is here to assist in the defence of the [SSmapping.configs[GROUND_MAP].map_name]. Listen to the chain of command."))
to_chat(human, SPAN_BOLDWARNING("If you wish to cryo or ghost upon spawning in, you must ahelp and inform staff so you can be replaced."))

sleep(10)
if(!mind)
human.free_for_ghosts()
to_chat(human, SPAN_BOLD("Objectives: [objectives]"))
1 change: 0 additions & 1 deletion code/datums/emergency_calls/emergency_call.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
var/choice = tgui_input_list(src, "Choose a distress beacon to join", "", beacons)

if(!choice)
to_chat(src, "Something seems to have gone wrong!")
return

if(!beacons[choice] || !(beacons[choice] in SSticker.mode.picked_calls))
Expand Down
Loading

0 comments on commit 4d78f10

Please sign in to comment.