Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Xander3359 committed Dec 19, 2023
2 parents ed6b26f + 4197945 commit f1a61ac
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 41 deletions.
4 changes: 2 additions & 2 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,11 @@ will handle it, but:
for(var/client/C in show_to)
C.images += I
animate(I, transform = 0, alpha = 255, time = 0.5 SECONDS, easing = ELASTIC_EASING)
addtimer(CALLBACK(GLOBAL_PROC, TYPE_PROC_REF(/, fade_out), I), duration - 0.5 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(fade_out), I), duration - 0.5 SECONDS)

/proc/fade_out(image/I, list/show_to)
animate(I, alpha = 0, time = 0.5 SECONDS, easing = EASE_IN)
addtimer(CALLBACK(GLOBAL_PROC, TYPE_PROC_REF(/, remove_images_from_clients), I, show_to), 0.5 SECONDS)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(remove_images_from_clients), I, show_to), 0.5 SECONDS)

//takes an input_key, as text, and the list of keys already used, outputting a replacement key in the format of "[input_key] ([number_of_duplicates])" if it finds a duplicate
//use this for lists of things that might have the same name, like mobs or objects, that you plan on giving to a player as input
Expand Down
3 changes: 3 additions & 0 deletions code/_onclick/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
/obj/structure/xeno/trap/AIMiddleClick(mob/living/silicon/ai/user)
user.ai_ping(src, COOLDOWN_AI_PING_NORMAL)

/obj/structure/xeno/baneling_pod/AIMiddleClick(mob/living/silicon/ai/user)
user.ai_ping(src, COOLDOWN_AI_PING_LOW)

/* acid */

/obj/effect/xenomorph/acid/AIMiddleClick(mob/living/silicon/ai/user)
Expand Down
4 changes: 1 addition & 3 deletions code/controllers/subsystem/minimaps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ SUBSYSTEM_DEF(minimaps)
var/list/hashed_minimaps = list()

/datum/controller/subsystem/minimaps/Initialize()
initialized = TRUE
for(var/datum/space_level/z_level AS in SSmapping.z_list)
load_new_z(null, z_level)
//RegisterSignal(SSdcs, COMSIG_GLOB_NEW_Z, PROC_REF(load_new_z))

initialized = TRUE

return SS_INIT_SUCCESS

Expand Down
6 changes: 6 additions & 0 deletions code/datums/gamemodes/campaign/campaign_mission.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@
for(var/i in GLOB.quick_loadouts)
var/datum/outfit/quick/outfit = GLOB.quick_loadouts[i]
outfit.quantity = initial(outfit.quantity)
for(var/mob/living/carbon/human/corpse AS in GLOB.dead_human_list) //clean up all the bodies and refund normal roles if required
if(corpse.z != mission_z_level)
continue
if(!HAS_TRAIT(corpse, TRAIT_UNDEFIBBABLE) && corpse.job.job_cost)
corpse.job.add_job_positions(1)
qdel(corpse)

///Unregisters all signals when the mission finishes
/datum/campaign_mission/proc/unregister_mission_signals()
Expand Down
25 changes: 15 additions & 10 deletions code/datums/gamemodes/campaign/faction_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,26 @@ GLOBAL_LIST_INIT(campaign_mission_pool, list(

generate_new_mission()
update_static_data_for_all_viewers()
addtimer(CALLBACK(src, PROC_REF(return_to_base)), AFTER_MISSION_TELEPORT_DELAY)
addtimer(CALLBACK(src, PROC_REF(return_to_base), completed_mission), AFTER_MISSION_TELEPORT_DELAY)
addtimer(CALLBACK(src, PROC_REF(get_selector)), AFTER_MISSION_LEADER_DELAY) //if the leader died, we load a new one after a bit to give respawns some time

///Returns all faction members back to base after the mission is completed
/datum/faction_stats/proc/return_to_base()
/datum/faction_stats/proc/return_to_base(datum/campaign_mission/completed_mission)
for(var/mob/living/carbon/human/human_mob AS in GLOB.alive_human_list_faction[faction])
if(!human_mob.job.job_cost) //asset based roles are one use
human_mob.ghostize()
qdel(human_mob)
if(human_mob.z != completed_mission.mission_z_level && human_mob.job.job_cost)
human_mob.revive(TRUE)
human_mob.overlay_fullscreen_timer(0.5 SECONDS, 10, "roundstart1", /atom/movable/screen/fullscreen/black)
human_mob.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in)
human_mob.forceMove(pick(GLOB.spawns_by_job[human_mob.job.type]))
human_mob.Stun(1 SECONDS) //so you don't accidentally shoot your team etc
continue
human_mob.revive(TRUE)
human_mob.overlay_fullscreen_timer(0.5 SECONDS, 10, "roundstart1", /atom/movable/screen/fullscreen/black)
human_mob.overlay_fullscreen_timer(2 SECONDS, 20, "roundstart2", /atom/movable/screen/fullscreen/spawning_in)
human_mob.forceMove(pick(GLOB.spawns_by_job[human_mob.job.type]))
human_mob.Stun(1 SECONDS) //so you don't accidentally shoot your team etc

var/mob/dead/observer/ghost = human_mob.ghostize()
if(human_mob.job.job_cost) //We don't refund ally roles
human_mob.job.add_job_positions(1)
qdel(human_mob)
var/datum/game_mode/mode = SSticker.mode
mode.player_respawn(ghost) //auto open the respawn screen

///Generates status tab info for the mission
/datum/faction_stats/proc/get_status_tab_items(mob/source, list/items)
Expand Down
1 change: 1 addition & 0 deletions code/datums/gamemodes/campaign/missions/base_rescue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
map_light_levels = list(225, 150, 100, 75)
objectives_total = 1
min_destruction_amount = 1
max_game_time = 15 MINUTES
shutter_open_delay = list(
MISSION_STARTING_FACTION = 60 SECONDS,
MISSION_HOSTILE_FACTION = 0,
Expand Down
2 changes: 1 addition & 1 deletion code/datums/keybinding/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
quick_equip_slot = 5

/datum/keybinding/human/unique_action
hotkey_keys = list("Space")
hotkey_keys = list("C")
name = "unique_action"
full_name = "Perform unique action"
keybind_signal = COMSIG_KB_UNIQUEACTION
Expand Down
3 changes: 2 additions & 1 deletion code/datums/personal_statistics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ The alternative is scattering them everywhere under their respective objects whi
if(!ckey)
return FALSE
var/datum/personal_statistics/personal_statistics = GLOB.personal_statistics_list[ckey]
personal_statistics.recycle_points_denied += trash.get_export_value()
var/list/exported_value = trash.get_export_value()
personal_statistics.recycle_points_denied += exported_value[1]
return TRUE

///Separate record keeping proc to reduce copy pasta
Expand Down
9 changes: 4 additions & 5 deletions code/game/objects/machinery/computer/nt_access.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// -- generate override code computer
//TODO: Make a parent computer to remove all the nuke disk copy paste
/obj/item/circuitboard/computer/nt_access
name = "circuit board (nuke disk generator)"
build_path = /obj/machinery/computer/nt_access
Expand All @@ -15,11 +16,9 @@
resistance_flags = INDESTRUCTIBLE|UNACIDABLE
layer = ABOVE_MOB_LAYER
///Time needed for the machine to generate the disc
var/segment_time = 1.5 MINUTES
var/segment_time = 1 MINUTES
///Time to start a segment
var/start_time = 15 SECONDS
///Time to print a disk
var/printing_time = 15 SECONDS
var/start_time = 5 SECONDS
///Total number of times the hack is required
var/total_segments = 5
///What segment we are on, (once this hits total, disk is printed)
Expand Down Expand Up @@ -128,7 +127,7 @@
busy = TRUE

usr.visible_message("[usr] started a program to send the [code_color] security override command.", "You started a program to send the [code_color] security override command.")
if(!do_after(usr, printing_time, NONE, src, BUSY_ICON_GENERIC, null, null, CALLBACK(src, TYPE_PROC_REF(/datum, process))))
if(!do_after(usr, start_time, NONE, src, BUSY_ICON_GENERIC, null, null, CALLBACK(src, TYPE_PROC_REF(/datum, process))))
busy = FALSE
return

Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/machinery/squad_supply/supply_beacon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
/obj/item/beacon/supply_beacon/onTransitZ(old_z,new_z)
. = ..()
//Assumes doMove sets loc before onTransitZ
beacon_datum.drop_location = loc
if(beacon_datum)
beacon_datum.drop_location = loc

/obj/item/beacon/supply_beacon/activate(mob/living/carbon/human/H)
var/area/A = get_area(H)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/modular_armor/attachments/modules.dm
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
SIGNAL_HANDLER
if(comms_setup != COMMS_SETUP)
return
inplace_interference[1] = max(0, inplace_interference - 1)
inplace_interference[1] = max(0, inplace_interference[1] - 1)

/obj/item/armor_module/module/antenna/activate(mob/living/user)
if(comms_setup == COMMS_SETTING)
Expand Down
39 changes: 22 additions & 17 deletions code/modules/requisitions/supply_export.dm
Original file line number Diff line number Diff line change
@@ -1,56 +1,61 @@
///Function that sells whatever object this is to the faction_selling; returns a /datum/export_report if successful
/atom/movable/proc/supply_export(faction_selling)
var/points = get_export_value()
var/list/points = get_export_value()
if(!points)
return FALSE

SSpoints.supply_points[faction_selling] += points
SSpoints.dropship_points += points * 0.1
SSpoints.supply_points[faction_selling] += points[1]
SSpoints.dropship_points += points[2]
return new /datum/export_report(points, name, faction_selling)

/mob/living/carbon/human/supply_export(faction_selling)
if(!can_sell_human_body(src, faction_selling))
return new /datum/export_report(0, name, faction_selling)
return ..()

///Getter to obtain the req point value of whatever this is
/**
* Getter proc for the point value of this object
*
* Returns:
* * A list where the first value is the number of req points and the second number is the number of cas points.
*/
/atom/movable/proc/get_export_value()
return 0
. = list(0,0)

/mob/living/carbon/human/get_export_value()
switch(job.job_category)
if(JOB_CAT_ENGINEERING, JOB_CAT_MEDICAL, JOB_CAT_REQUISITIONS)
. = 200
. = list(200, 20)
if(JOB_CAT_MARINE)
. = 300
. = list(300, 30)
if(JOB_CAT_SILICON)
. = 800
. = list(800, 80)
if(JOB_CAT_COMMAND)
. = 1000
. = list(1000, 100)
return

/mob/living/carbon/xenomorph/get_export_value()
switch(tier)
if(XENO_TIER_MINION)
. = 50
. = list(50, 5)
if(XENO_TIER_ZERO)
. = 70
. = list(70, 7)
if(XENO_TIER_ONE)
. = 150
. = list(150, 15)
if(XENO_TIER_TWO)
. = 300
. = list(300, 30)
if(XENO_TIER_THREE)
. = 500
. = list(500, 50)
if(XENO_TIER_FOUR)
. = 1000
. = list(1000, 100)
return

//I hate it but it's how it was so I'm not touching it further than this
/mob/living/carbon/xenomorph/shrike/get_export_value()
return 500
return list(500, 50)

/obj/item/reagent_containers/food/snacks/req_pizza/get_export_value()
return 10
return list(10, 0)

/// Return TRUE if the relation between the two factions are bad enough that a bounty is on the human_to_sell head
/proc/can_sell_human_body(mob/living/carbon/human/human_to_sell, seller_faction)
Expand Down
4 changes: 4 additions & 0 deletions html/changelogs/AutoChangeLog-pr-14656.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
author: "Lumipharon"
delete-after: True
changes:
- qol: "Campaign: Players still on their home z-level will be teleported to spawn instead of ghosted at mission end"
19 changes: 19 additions & 0 deletions html/changelogs/archive/2023-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,22 @@
2023-12-16:
Pariah919:
- balance: Skirmish Rifle has been buffed to 40 magazine capacity instead of 30.
2023-12-17:
DeltaFire15:
- bugfix: The antenna module now actually does what it says it does.
ivanmixo:
- qol: Rebound unique action to C by default (instead of space)
- rscdel: Pizza doesn't net cas points anymore
2023-12-18:
ivanmixo:
- code_imp: Fix more 515 regex fuckup
- bugfix: Miners, gens and other stuff should actually show up on minimap now
2023-12-19:
Helg2:
- rscadd: You can now ping the baneling pod as AI.
Lumipharon:
- balance: Made the timings for the base rescue mission easier for SOM
- balance: 'Campaign: All players are ghosted at the end of a mission'
ivanmixo:
- bugfix: Fixed export denied personal stat
- bugfix: Fixed a supply beacon runtime

0 comments on commit f1a61ac

Please sign in to comment.