Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EVENT PR] Brainslugs (Again) #3321

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2d8e0c6
Ported Paradise SS13 Cortical Borers
realforest2001 Mar 3, 2023
f42b25e
Modernisation
realforest2001 Apr 2, 2023
7d23cfa
fixes for hivemind
realforest2001 Apr 2, 2023
7448ba8
Fixes, modernisation & help information
realforest2001 Apr 3, 2023
febf0d9
Brain follow, help details & follow tweak.
realforest2001 Apr 3, 2023
251271e
reproduction consistencies and hearing fix
realforest2001 Apr 3, 2023
5fc3926
bitflags!
realforest2001 Apr 6, 2023
b944587
Gen1 buff
realforest2001 Apr 6, 2023
edf8385
icon changes
realforest2001 Apr 6, 2023
18bb8c7
rebase
realforest2001 May 11, 2023
d34b5a1
Ported Paradise SS13 Cortical Borers
realforest2001 Mar 3, 2023
efc095d
Modernisation
realforest2001 Apr 2, 2023
fb3fb7f
fixes for hivemind
realforest2001 Apr 2, 2023
df59bfc
Fixes, modernisation & help information
realforest2001 Apr 3, 2023
fe0a6df
Brain follow, help details & follow tweak.
realforest2001 Apr 3, 2023
bcd5c9a
reproduction consistencies and hearing fix
realforest2001 Apr 3, 2023
8938afd
bitflags!
realforest2001 Apr 6, 2023
f42a7c6
Gen1 buff
realforest2001 Apr 6, 2023
13070fa
icon changes
realforest2001 Apr 6, 2023
e6c00d9
rebase
realforest2001 May 11, 2023
fe521f8
Merge remote-tracking branch 'origin/forest/projects/carbonslugs' int…
realforest2001 May 14, 2023
f4a57da
I will kill prettier. This is stupid.
realforest2001 May 14, 2023
59463a1
Merge remote-tracking branch 'cmss13-devs/master' into a/slugscarbon
realforest2001 Jul 25, 2023
91b3604
hud fix
realforest2001 Jul 25, 2023
a710b46
fixes
realforest2001 Jul 25, 2023
ce3bfb2
fixes the fixes
realforest2001 Jul 25, 2023
5791bca
Merge remote-tracking branch 'cmss13-devs/master' into a/slugscarbon
realforest2001 Aug 22, 2023
37a31d5
hudconflict
realforest2001 Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions code/__DEFINES/borer_defines.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/// Chemical categories
#define BORER_CAT_HEAL "Medicines"
#define BORER_CAT_PUNISH "Motivators"
#define BORER_CAT_STIM "Stimulants"
#define BORER_CAT_SELF "Self Protection"

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

#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)
/// Middle of leaving a host
#define BORER_PROCESS_LEAVING (1<<2)
/// Hiding or not. (Changes layer)
#define BORER_ABILITY_HIDE (1<<3)
/// Sleeps to purify contaminant
#define BORER_ABILITY_HIBERNATING (1<<4)

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

#define BORER_STATUS_CONTROLLING (1<<0)
#define BORER_STATUS_DOCILE (1<<1)

DEFINE_BITFIELD(borer_flags_status, list(
"STATUS_CONTROLLING" = BORER_STATUS_CONTROLLING,
"STATUS_DOCILE" = BORER_STATUS_DOCILE,
))
1 change: 1 addition & 0 deletions code/__DEFINES/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,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 @@ -25,6 +25,7 @@
#define STATUS_HUD_XENO_CULTIST "24" // Whether they are a xeno cultist or not
#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 STATUS_HUD_BRAINWORM "27" //Displays infested HUD for brainworms.

//data HUD (medhud, sechud) defines
#define MOB_HUD_SECURITY_BASIC 1
Expand All @@ -44,6 +45,7 @@
#define MOB_HUD_FACTION_PMC 15
#define MOB_HUD_HUNTER 16
#define MOB_HUD_HUNTER_CLAN 17
#define MOB_HUD_BRAINWORM 18

//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 @@ -624,6 +624,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
30 changes: 26 additions & 4 deletions code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ var/list/datum/mob_hud/huds = list(
MOB_HUD_FACTION_CLF = new /datum/mob_hud/faction/clf(),
MOB_HUD_FACTION_PMC = new /datum/mob_hud/faction/pmc(),
MOB_HUD_HUNTER = new /datum/mob_hud/hunter_hud(),
MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan()
MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan(),
MOB_HUD_BRAINWORM = new /datum/mob_hud/brainworm(),
)

/datum/mob_hud
Expand Down Expand Up @@ -129,7 +130,7 @@ var/list/datum/mob_hud/huds = 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, STATUS_HUD_BRAINWORM)


//infection status that appears on humans, viewed by xenos only and observers.
Expand All @@ -151,6 +152,8 @@ var/list/datum/mob_hud/huds = 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, STATUS_HUD_BRAINWORM)
//Security

/datum/mob_hud/security
Expand Down Expand Up @@ -207,7 +210,7 @@ var/list/datum/mob_hud/huds = list(

/mob/living/carbon/xenomorph/add_to_all_mob_huds()
for(var/datum/mob_hud/hud in 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 @@ -230,7 +233,7 @@ var/list/datum/mob_hud/huds = list(
if(istype(hud, /datum/mob_hud/xeno))
hud.remove_from_hud(src)
hud.remove_hud_from(src)
else if (istype(hud, /datum/mob_hud/xeno_infection))
else if (istype(hud, /datum/mob_hud/xeno_infection) || istype(hud, /datum/mob_hud/brainworm))
hud.remove_hud_from(src)
if (xeno_hostile_hud)
xeno_hostile_hud = FALSE
Expand Down Expand Up @@ -266,6 +269,7 @@ var/list/datum/mob_hud/huds = list(

/mob/living/carbon/xenomorph/med_hud_set_health()
var/image/holder = hud_list[HEALTH_HUD_XENO]
var/image/holder2 = hud_list[STATUS_HUD_BRAINWORM]

var/health_hud_type = "xenohealth"
if(stat == DEAD)
Expand All @@ -281,6 +285,13 @@ var/list/datum/mob_hud/huds = 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())
holder2.icon_state = "hudbrainwormhost"
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 @@ -343,10 +354,12 @@ var/list/datum/mob_hud/huds = 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[STATUS_HUD_BRAINWORM]

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

holder4.icon_state = "hudblank"

Expand Down Expand Up @@ -449,6 +462,15 @@ var/list/datum/mob_hud/huds = list(

return

var/mob/living/carbon/cortical_borer/B = has_brain_worms()
holder5.icon_state = null
if(B)
holder5.icon_state = "hudbrainwormhost"
if(B.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 @@ -390,6 +390,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
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 @@ -201,6 +201,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 @@ -215,6 +217,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
Loading