Skip to content

Commit

Permalink
TGS Test Merge (#5829)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jul 17, 2024
2 parents fb24712 + 9c9dfb5 commit 3c7b574
Show file tree
Hide file tree
Showing 43 changed files with 2,404 additions and 18 deletions.
61 changes: 61 additions & 0 deletions code/__DEFINES/borer_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/// Chemical categories
#define BORER_CAT_HEAL "Medicines"
#define BORER_CAT_PUNISH "Motivators"
#define BORER_CAT_STIM "Stimulants"
#define BORER_CAT_SELF "Self Protection"
#define BORER_CAT_REPLICATED "Replicated"

///Amount of chemicals needed for a borer to reproduce, provided reproduction is toggled.
#define BORER_LARVAE_COST 400
/// Amount of chemicals needed for a borer to replicate a chemical.
#define BORER_REPLICATE_COST 350

#define ACTION_SET_HOSTLESS "actions_hostless"
#define ACTION_SET_HUMANOID "actions_human"
#define ACTION_SET_XENO "actions_xeno"
#define ACTION_SET_CONTROL "actions_control"

/// Borer target bitflags
#define BORER_TARGET_HUMANS (1<<0)
#define BORER_TARGET_XENOS (1<<1)
#define BORER_TARGET_YAUTJA (1<<2)

DEFINE_BITFIELD(borer_flags_targets, list(
"TARGET_HUMANS" = BORER_TARGET_HUMANS,
"TARGET_XENOS" = BORER_TARGET_XENOS,
"TARGET_YAUTJA" = BORER_TARGET_YAUTJA,
))

/// Borer active/toggle-able ability flags.
/// Middle of crawling into a new host
#define BORER_PROCESS_INFESTING (1<<0)
/// Middle of taking control of a host body
#define BORER_PROCESS_BONDING (1<<1)
/// Sleeps to purify contaminant
#define BORER_ABILITY_HIBERNATING (1<<2)
/// Hiding or not. (Changes layer)
#define BORER_ABILITY_HIDE (1<<3)

DEFINE_BITFIELD(borer_flags_actives, list(
"PROCESS_INFESTING" = BORER_PROCESS_INFESTING,
"PROCESS_BONDING" = BORER_PROCESS_BONDING,
"ACTIVE_HIBERNATING" = BORER_ABILITY_HIBERNATING,
"ACTIVE_HIDING" = BORER_ABILITY_HIDE,
))

///Borer is in control of their host.
#define BORER_STATUS_CONTROLLING (1<<0)
///Anti-Parasite or Anti-Enzyme chemicals can stop borers from acting.
#define BORER_STATUS_DOCILE (1<<1)
/// Middle of leaving a host
#define BORER_STATUS_LEAVING (1<<2)

DEFINE_BITFIELD(borer_flags_status, list(
"STATUS_CONTROLLING" = BORER_STATUS_CONTROLLING,
"STATUS_DOCILE" = BORER_STATUS_DOCILE,
"STATUS_LEAVING" = BORER_STATUS_LEAVING,
))


#define DEATH_CAUSE_PRIMARIES "No living Primaries."
#define DEATH_CAUSE_UNKNOWN "Unknown"
1 change: 1 addition & 0 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
#define CHEM_EFFECT_HYPER_THROTTLE (1<<2) //universal understand but not speech
#define CHEM_EFFECT_ORGAN_STASIS (1<<3) //peri stabiliser
#define CHEM_EFFECT_NO_BLEEDING (1<<4) //replacement for quickclot
#define CHEM_EFFECT_ANTI_PARASITE (1<<5) //PROPERTY_ANTIPARASITIC


//Blood plasma
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/language.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define LANGUAGE_APOLLO "APOLLO Link"

#define LANGUAGE_TELEPATH "Telepath Implant"
#define LANGUAGE_BORER "Cortical Link"

#define ALL_HUMAN_LANGUAGES list(LANGUAGE_ENGLISH, LANGUAGE_JAPANESE, LANGUAGE_CHINESE, LANGUAGE_RUSSIAN, LANGUAGE_GERMAN, LANGUAGE_SPANISH)

Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define HUNTER_CLAN "25" //Displays a colored icon to represent ingame Hunter Clans
#define HUNTER_HUD "26" //Displays various statuses on mobs for Hunters to identify targets
#define HOLOCARD_HUD "27" //Displays the holocards set by medical personnel
#define HUD_BRAINWORM "28" //Displays infested HUD for brainworms.

//data HUD (medhud, sechud) defines
#define MOB_HUD_SECURITY_BASIC 1
Expand All @@ -47,6 +48,7 @@
#define MOB_HUD_HUNTER 16
#define MOB_HUD_HUNTER_CLAN 17
#define MOB_HUD_EXECUTE 18
#define MOB_HUD_BRAINWORM 19

//for SL/FTL/LZ targeting on locator huds
#define TRACKER_SL "track_sl"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/typecheck/xenos.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//Xenomorph Hud Test APOPHIS 22MAY2015
#define isxeno(A) (istype(A, /mob/living/carbon/xenomorph))
#define isborer(A) (istype(A, /mob/living/carbon/cortical_borer))
#define iscaptivemind(A) (istype(A, /mob/living/captive_brain))

#define isxeno_human(A) (isxeno(A) || ishuman(A))
//ask walter if i should turn into castechecks
Expand Down
4 changes: 4 additions & 0 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@
moblist.Add(M)
for(var/mob/living/carbon/xenomorph/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/cortical_borer/M in sortmob)
moblist.Add(M)
for(var/mob/living/captive_brain/M in sortmob)
moblist.Add(M)
for(var/mob/dead/observer/M in sortmob)
moblist.Add(M)
for(var/mob/new_player/M in sortmob)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/emergency_calls/custom.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
return

M.transfer_to(H, TRUE)

to_chat(H, SPAN_ALERT("[objectives]"))
players_to_offer -= H

return
Expand Down
40 changes: 37 additions & 3 deletions code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
MOB_HUD_HUNTER = new /datum/mob_hud/hunter_hud(),
MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan(),
MOB_HUD_EXECUTE = new /datum/mob_hud/execute_hud(),
MOB_HUD_BRAINWORM = new /datum/mob_hud/brainworm(),
))

/datum/mob_hud
Expand Down Expand Up @@ -152,7 +153,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(

//medical hud used by ghosts
/datum/mob_hud/medical/observer
hud_icons = list(HEALTH_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_CULTIST)
hud_icons = list(HEALTH_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_CULTIST, HUD_BRAINWORM)


//infection status that appears on humans, viewed by xenos only and observers.
Expand All @@ -177,6 +178,8 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
/datum/mob_hud/hunter_hud
hud_icons = list(HUNTER_HUD)

/datum/mob_hud/brainworm
hud_icons = list(HEALTH_HUD_XENO, PLASMA_HUD, PHEROMONE_HUD, QUEEN_OVERWATCH_HUD, ARMOR_HUD_XENO, XENO_STATUS_HUD, XENO_BANISHED_HUD, HEALTH_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_CULTIST, HUD_BRAINWORM)
//Security

/datum/mob_hud/security
Expand Down Expand Up @@ -233,7 +236,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(

/mob/living/carbon/xenomorph/add_to_all_mob_huds()
for(var/datum/mob_hud/hud in GLOB.huds)
if(!istype(hud, /datum/mob_hud/xeno))
if(!istype(hud, /datum/mob_hud/xeno) && !istype(hud, /datum/mob_hud/brainworm))
continue
hud.add_to_hud(src)

Expand All @@ -253,7 +256,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(

/mob/living/carbon/xenomorph/remove_from_all_mob_huds()
for(var/datum/mob_hud/hud in GLOB.huds)
if(istype(hud, /datum/mob_hud/xeno))
if(istype(hud, /datum/mob_hud/xeno) || istype(hud, /datum/mob_hud/brainworm))
hud.remove_from_hud(src)
hud.remove_hud_from(src, src)
else if (istype(hud, /datum/mob_hud/xeno_infection))
Expand Down Expand Up @@ -297,6 +300,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
CRASH("hud_list lacks HEALTH_HUD_XENO despite not being deleted in med_hud_set_health()")

var/image/holder = hud_list[HEALTH_HUD_XENO]
var/image/holder2 = hud_list[HUD_BRAINWORM]

var/health_hud_type = "xenohealth"
if(stat == DEAD)
Expand All @@ -312,6 +316,19 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
amount = -1 //don't want the 'zero health' icon when we are crit
holder.icon_state = "[health_hud_type][amount]"

holder2.icon_state = null
if(has_brain_worms())
var/worm_icon = "hudbrainwormhost"
switch(borer.generation)
if(0)
worm_icon = "hudbrainwormhostb"
if(1)
worm_icon = "hudbrainwormhostg"
holder2.icon_state = worm_icon
holder2.pixel_x = 9
holder2.pixel_y = -8


/mob/living/carbon/xenomorph/proc/overlay_shields()
var/image/holder = hud_list[HEALTH_HUD_XENO]
holder.overlays.Cut()
Expand Down Expand Up @@ -374,10 +391,12 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(
holder2.overlays.Cut()
var/image/holder3 = hud_list[STATUS_HUD_XENO_INFECTION]
var/image/holder4 = hud_list[STATUS_HUD_XENO_CULTIST]
var/image/holder5 = hud_list[HUD_BRAINWORM]

holder2.color = null
holder3.color = null
holder4.color = null
holder5.color = null

holder2.alpha = alpha
holder3.alpha = alpha
Expand Down Expand Up @@ -491,6 +510,21 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list(

return

var/mob/living/carbon/cortical_borer/brainworm = has_brain_worms()
holder5.icon_state = null
if(brainworm)
var/worm_icon = "hudbrainwormhost"
switch(brainworm.generation)
if(0)
worm_icon = "hudbrainwormhostb"
if(1)
worm_icon = "hudbrainwormhostg"
holder5.icon_state = worm_icon
if(brainworm.borer_flags_status & BORER_STATUS_CONTROLLING)
holder.icon_state = "hudbrainworm"
if(!holder2_set)
holder2.icon_state = "hudbrainworm"
return

for(var/datum/disease/D in viruses)
if(!D.hidden[SCANNER])
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/medical_pod/bodyscanner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@
if(occ["sdisabilities"] & NEARSIGHTED)
dat += SET_CLASS("Retinal misalignment detected.", INTERFACE_RED)
dat += "<BR>"
if(connected.occupant.has_brain_worms())
dat += SET_CLASS("Cranial anomoly detected.", INTERFACE_RED)
dat += "<BR>"

dat += "</body></html>"
return dat
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ GLOBAL_LIST_INIT(admin_verbs_minor_event, list(
/client/proc/toggle_hardcore_perma,
/client/proc/toggle_bypass_joe_restriction,
/client/proc/toggle_joe_respawns,
/client/proc/borer_broadcast,
))

GLOBAL_LIST_INIT(admin_verbs_major_event, list(
Expand Down
4 changes: 4 additions & 0 deletions code/modules/admin/player_panel/player_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@
M_job = "Monkey"
else if(isxeno(M))
M_job = "Alien"
else if(isborer(M))
M_job = "Brainslug"
else
M_job = "Carbon-based"
else if(isSilicon(M)) //silicon
Expand All @@ -212,6 +214,8 @@
M_job = "Corgi"
else
M_job = "Animal"
else if(iscaptivemind(M))
M_job = "Captive Mind"
else
M_job = "Living"
else if(istype(M,/mob/new_player))
Expand Down
Loading

0 comments on commit 3c7b574

Please sign in to comment.