Skip to content

Commit

Permalink
Merge branch 'dev-sierra' into upstream-pr-34790
Browse files Browse the repository at this point in the history
  • Loading branch information
AmShegars authored Nov 21, 2024
2 parents 90efbc4 + 1211843 commit ae61261
Show file tree
Hide file tree
Showing 188 changed files with 14,809 additions and 2,355 deletions.
3 changes: 2 additions & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@
#include "code\controllers\subsystems\initialization\culture.dm"
#include "code\controllers\subsystems\initialization\customitems.dm"
#include "code\controllers\subsystems\initialization\fabrication.dm"
#include "code\controllers\subsystems\initialization\icon_updates.dm"
#include "code\controllers\subsystems\initialization\materials.dm"
#include "code\controllers\subsystems\initialization\misc.dm"
#include "code\controllers\subsystems\initialization\misc_early.dm"
Expand All @@ -248,7 +249,6 @@
#include "code\controllers\subsystems\processing\disposals.dm"
#include "code\controllers\subsystems\processing\fast_process.dm"
#include "code\controllers\subsystems\processing\graphs.dm"
#include "code\controllers\subsystems\processing\icon_updates.dm"
#include "code\controllers\subsystems\processing\nano.dm"
#include "code\controllers\subsystems\processing\obj.dm"
#include "code\controllers\subsystems\processing\processing.dm"
Expand Down Expand Up @@ -3374,6 +3374,7 @@
#include "mods\_master_files\code\modules\culture_descriptor\religion\religions_vox.dm"
#include "mods\_master_files\code\modules\events\gravity.dm"
#include "mods\_master_files\code\modules\mob\living\life.dm"
#include "mods\_master_files\code\modules\mob\living\carbon\human\human_helpers.dm"
#include "mods\_master_files\code\modules\mob\new_player\new_player.dm"
#include "mods\_master_files\code\modules\overmap\distress.dm"
#include "mods\_master_files\code\modules\overmap\panicbutton.dm"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/skills.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@
#define SKILL_MEDICAL /singleton/hierarchy/skill/medical/medical
#define SKILL_ANATOMY /singleton/hierarchy/skill/medical/anatomy
#define SKILL_CHEMISTRY /singleton/hierarchy/skill/medical/chemistry
#define SKILL_VIROLOGY /singleton/hierarchy/skill/medical/chemistry/virology
3 changes: 2 additions & 1 deletion code/__defines/subsystem-priority.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// SS_TICKER
#define SS_PRIORITY_TIMER 30
#define SS_PRIORITY_OVERLAYS 20
#define SS_PRIORITY_ICON_UPDATE 10


// Normal
#define SS_PRIORITY_TICKER 100 // Gameticker.
Expand All @@ -27,6 +27,7 @@
#define SS_PRIORITY_CHAT 40 // Chat
#define SS_PRIORITY_AI 25 // Mob AI
#define SS_PRIORITY_ALARM 20 // Alarm processing.
#define SS_PRIORITY_ICON_UPDATE 20 // Queued icon updates. Mostly used by APCs and tables.
#define SS_PRIORITY_EVENT 20 // Event processing and queue handling.
#define SS_PRIORITY_SHUTTLE 20 // Shuttle movement.
#define SS_PRIORITY_CIRCUIT_COMP 20 // Processing circuit component do_work.
Expand Down
13 changes: 11 additions & 2 deletions code/_helpers/medical_scans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@
scan["paralysis"] = H.paralysis
scan["immune_system"] = H.virus_immunity()
scan["worms"] = H.has_brain_worms()

//SEIRAA-ADD [VIRUSOLOGY]
if (LAZYLEN(H.virus2))
scan["virus"] = TRUE
//SEIRAA-ADD
scan["reagents"] = list()

if(H.reagents.total_volume)
Expand Down Expand Up @@ -252,7 +255,13 @@
<tr><td colspan='2'>[SPAN_BAD("<center>Large growth detected in frontal lobe, possibly cancerous.</center>")]</td></tr>
*/
dat += "<tr><td colspan = '2'>Antibody levels and immune system perfomance are at [scan["immune_system"]*100]% of baseline.</td></tr>"

//SIERRA ADD [VIRUSOLOGY]
if (scan["virus"])
if(skill_level >= SKILL_TRAINED)
dat += "<tr><td colspan='2'><span class='bad'><center>Viral pathogen detected in blood stream.</center></span></td></tr>"
else
dat += "<tr><td colspan='2'><center>Viral pathogen detected in blood stream.</center></td></tr>"
//SIERRA ADD
if(scan["worms"])
dat += "<tr><td colspan='2'>[SPAN_BAD("<center>Large growth detected in frontal lobe, possibly cancerous.</center>")]</td></tr>"

Expand Down
10 changes: 6 additions & 4 deletions code/_helpers/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,20 @@
ChangeArea(target, get_area(source))
ChangeArea(source, base_area)
transport_turf_contents(source, target)

//change the old turfs
for(var/turf/source in translation)
source.ChangeTurf(base_turf ? base_turf : get_base_turf_by_area(source), 1, 1)
//[SIERRA-EDIT] Advanced Landing
var/old_turf = source.prev_type || base_turf || get_base_turf_by_area(source)
source.ChangeTurf(old_turf)
//[/SIERRA-EDIT] Advanced Landing

//Transports a turf from a source turf to a target turf, moving all of the turf's contents and making the target a copy of the source.
/proc/transport_turf_contents(turf/source, turf/target)
RETURN_TYPE(/turf)

var/target_type = target.type //[/SIERRA-ADD] Advanced Landing
var/turf/new_turf = target.ChangeTurf(source.type, 1, 1)
new_turf.transport_properties_from(source)

new_turf.prev_type = target_type //[/SIERRA-ADD] Advanced Landing
for(var/obj/O in source)
if (QDELETED(O))
testing("Failed to translate [O] to new turf as it was qdel'd.")
Expand Down
15 changes: 15 additions & 0 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -382,4 +382,19 @@

/obj/screen/movement/Click(location, control, params)
if(istype(usr))
var/list/modifiers = params2list(params)
if(modifiers["ctrl"])
usr?.face_direction()
update_icon()
return

usr.set_next_usable_move_intent()

/obj/screen/movement/on_update_icon()
. = ..()
var/image/chached_fixeye = image('packs/infinity/icons/mob/screen/facedir.dmi', icon_state = "facedir1")
if(!isnull(usr?.facing_dir))
src.dir = usr?.facing_dir
AddOverlays(chached_fixeye)
else
ClearOverlays()
2 changes: 1 addition & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ avoid code duplication. This includes items that may sometimes act as a standard

use_call = "use"
. = use_before(atom, user, click_params)
if (!. && user.a_intent == I_HURT)
if (!. && (user.a_intent == I_HURT || user.a_intent == I_DISARM))
use_call = "weapon"
. = atom.use_weapon(src, user, click_params)
if (!.)
Expand Down
79 changes: 79 additions & 0 deletions code/controllers/subsystems/initialization/icon_updates.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
SUBSYSTEM_DEF(icon_update)
name = "Icon Updates"
wait = 1
priority = SS_PRIORITY_ICON_UPDATE
init_order = SS_INIT_ICON_UPDATE
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT // If you make it not fire in lobby, you also have to remove atoms from queue in Destroy.

// Linked lists, queue_refs[x] should have null or args stored in queue_args[x]
var/list/queue_refs = list() // Atoms
var/list/queue_args = list() // null or args


/datum/controller/subsystem/icon_update/UpdateStat(time)
if (PreventUpdateStat(time))
return ..()
..("queue: [length(queue_refs)]")


/datum/controller/subsystem/icon_update/Initialize(start_uptime)
fire(FALSE, TRUE)


/datum/controller/subsystem/icon_update/fire(resumed = FALSE, no_mc_tick = FALSE)
if(!queue_refs.len)
suspend()
return

while (queue_refs.len)

if(Master.map_loading)
return

// Pops the atom and it's args
var/atom/A = queue_refs[queue_refs.len]
var/myArgs = queue_args[queue_args.len]

queue_refs.len -= 1
queue_args.len -= 1

if(QDELETED(A))
continue

A.icon_update_queued = FALSE

if (islist(myArgs))
A.update_icon(arglist(myArgs))
else
A.update_icon()

if (no_mc_tick)
CHECK_TICK
else if (MC_TICK_CHECK)
return

/atom
var/icon_update_queued = FALSE

/atom/proc/queue_icon_update(...)
// Skips if this is already queued
if(!icon_update_queued)

icon_update_queued = TRUE
SSicon_update.queue_refs.Add(src)

// Makes sure these are in sync, in case runtimes/badmin
var/length = length(SSicon_update.queue_refs)
SSicon_update.queue_args.len = length
SSicon_update.queue_args[length] = args.len ? args : null

// SSicon_update sleeps when it runs out of things in its
// queue, so wake it up.
if(!Master.map_loading) // Don't wake early if we're loading a map, it'll get woken up when the map loads.
SSicon_update.wake()

/datum/controller/subsystem/icon_update/StartLoadingMap()
suspend()

/datum/controller/subsystem/icon_update/StopLoadingMap()
wake()
62 changes: 0 additions & 62 deletions code/controllers/subsystems/processing/icon_updates.dm

This file was deleted.

17 changes: 17 additions & 0 deletions code/controllers/subsystems/supply.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ SUBSYSTEM_DEF(supply)
"crate" = "From exported crates",
"gep" = "From uploaded good explorer points",
"anomaly" = "From scanned and categorized anomalies",

//SIERRA-ADD VIRUSOLOGY
"virology_antibodies" = "From uploaded antibody data",
"virology_dishes" = "From exported virus dishes",
//SIERRA-ADD
"animal" = "From captured exotic alien fauna",
//[SIERRA-ADD] - ANOMALY - Добавляем категорию "Артефакты"
"artefacts" = "From artefacts",
Expand Down Expand Up @@ -121,13 +126,25 @@ SUBSYSTEM_DEF(supply)
if(istype(A, /obj/item/disk/survey))
var/obj/item/disk/survey/D = A
add_points_from_source(round(D.Value() * 0.05), "gep")
//SIERRA-ADD VIRUSOLOGY
// Sell virus dishes.
if(istype(A, /obj/item/virusdish))
//Obviously the dish must be unique and never sold before.
var/obj/item/virusdish/dish = A
if(dish.analysed && istype(dish.virus2) && dish.virus2.uniqueID)
if(!(dish.virus2.uniqueID in sold_virus_strains))
add_points_from_source(5, "virology_dishes")
sold_virus_strains += dish.virus2.uniqueID
//SIERRA-ADD
//[SIERRA-ADD] - ANOMALY - Продажа артефактов
if(istype(A, /obj/item/artefact))
var/obj/item/artefact/D = A
add_points_from_source(D.cargo_price, "artefacts")
SSanom.earned_cargo_points += D.cargo_price
if(istype(A, /obj/item/collector))
var/obj/item/collector/D = A
add_points_from_source(D.stored_artefact.cargo_price, "artefacts")
SSanom.earned_cargo_points += D.stored_artefact.cargo_price
//[SIERRA-ADD]

// Sell artefacts (in anomaly cages)
Expand Down
7 changes: 7 additions & 0 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,13 @@ var/global/list/additional_antag_types = list()
if(client.mob && client.mob.mind)
client.mob.mind.show_roundend_summary(departmental_goal_summary)

//[SIERRA-ADD] - ANOMALY
//Данный отрезок кода выведет информацию об моде АНОМАЛИИ в раунде
var/anomaly_output = SSanom.give_gameover_text()
if(anomaly_output)
text += anomaly_output
//[SIERRA-ADD]

to_world(text)

send2mainirc("A round of [src.name] has ended - [data["surviving_total"]] survivor\s, [data["ghosts"]] ghost\s.")
Expand Down
8 changes: 5 additions & 3 deletions code/game/machinery/embedded_controller/airlock_program.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@
cycleDoors(target_state)
state = STATE_IDLE
target_state = TARGET_NONE
playsound(master, 'sound/machines/airlockdone.ogg', 50)


if(STATE_DEPRESSURIZE)
Expand All @@ -271,6 +272,7 @@
cycleDoors(target_state)
state = STATE_IDLE
target_state = TARGET_NONE
playsound(master, 'sound/machines/airlockdone.ogg', 50)


memory["processing"] = (state != target_state)
Expand All @@ -283,20 +285,20 @@
state = STATE_IDLE
target_state = TARGET_INOPEN
memory["purge"] = cycle_to_external_air
playsound(master, 'sound/machines/warning-buzzer.ogg', 50)
playsound(master, 'sound/machines/airlockin.ogg', 50)
shutAlarm()

/datum/computer/file/embedded_program/airlock/proc/begin_dock_cycle()
state = STATE_IDLE
target_state = TARGET_INOPEN
playsound(master, 'sound/machines/warning-buzzer.ogg', 50)
playsound(master, 'sound/machines/airlockin.ogg', 50)
shutAlarm()

/datum/computer/file/embedded_program/airlock/proc/begin_cycle_out()
state = STATE_IDLE
target_state = TARGET_OUTOPEN
memory["purge"] = cycle_to_external_air
playsound(master, 'sound/machines/warning-buzzer.ogg', 50)
playsound(master, 'sound/machines/airlockout.ogg', 50)
shutAlarm()

/datum/computer/file/embedded_program/airlock/proc/close_doors()
Expand Down
3 changes: 1 addition & 2 deletions code/game/machinery/kitchen/smartfridge.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@
req_access = list(access_virology)
icon_contents = "chem"
accepted_types = list(
/obj/item/reagent_containers/glass/beaker/vial
)
/obj/item/reagent_containers/glass/beaker/vial, /obj/item/virusdish) //SIERRA-ADDED VIRUSOLOGY

/obj/machinery/smartfridge/chemistry
name = "\improper Smart Chemical Storage"
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/effects/gibs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var/fleshcolor //Used for gibbed humans.
var/bloodcolor //Used for gibbed humans.
var/datum/dna/MobDNA
var/virusProb = 20 //the chance for viruses to spread on the gibs [SIERRA-ADD] VIRUSOLOGY


/obj/gibspawner/New(location, datum/dna/_MobDNA, _fleshcolor, _bloodcolor)
Expand Down
Loading

0 comments on commit ae61261

Please sign in to comment.