Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1ab675b

Browse filesBrowse files
authored
Minor rewrite to slimeperson jelly blood (yogstation13#22446)
1 parent 4df20a8 commit 1ab675b
Copy full SHA for 1ab675b

10 files changed

+28-20Lines changed: 28 additions & 20 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/__DEFINES/DNA.dm‎

Copy file name to clipboardExpand all lines: code/__DEFINES/DNA.dm
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@
192192
#define HAIRCOLOR 26
193193
#define FACEHAIRCOLOR 27
194194
#define MUTCOLORS_SECONDARY 28
195+
/// doesn't care about their blood level through normal means, but still has it
196+
#define STABLEBLOOD 29
195197

196198
//organ slots
197199
#define ORGAN_SLOT_BRAIN "brain"
Collapse file

‎code/datums/blood_types.dm‎

Copy file name to clipboardExpand all lines: code/datums/blood_types.dm
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,11 @@
7979
color = "#cbee63" //slightly more yellowy than regular liquid electricity because of the grey scale image used
8080
compatible_types = list(/datum/blood_type/electricity)
8181

82+
/datum/blood_type/jelly
83+
name = "J"
84+
color = COLOR_DARK_MODERATE_LIME_GREEN
85+
compatible_types = list(/datum/blood_type/jelly)
86+
8287
////////////////////////////////////////////////////////////////
8388
//-----------------Wonky simplemob(?) bloodtypes--------------//
8489
////////////////////////////////////////////////////////////////
Collapse file

‎code/datums/traits/good.dm‎

Copy file name to clipboardExpand all lines: code/datums/traits/good.dm
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
temp -= ORGAN_SLOT_LIVER
326326
if(HAS_TRAIT_FROM(H, TRAIT_NOBREATH, SPECIES_TRAIT))
327327
temp -= ORGAN_SLOT_LUNGS
328-
if(NOBLOOD in H.dna?.species.species_traits)
328+
if((NOBLOOD in H.dna?.species.species_traits) || (STABLEBLOOD in H.dna?.species.species_traits))
329329
temp -= ORGAN_SLOT_HEART
330330
var/organ_type = organ_list[pick(temp)]
331331
var/obj/item/organ/prosthetic = new organ_type(quirk_holder)
@@ -350,8 +350,9 @@
350350
temp -= ORGAN_SLOT_LIVER
351351
if(TRAIT_NOBREATH in species.inherent_traits)
352352
temp -= ORGAN_SLOT_LUNGS
353-
if(NOBLOOD in species.species_traits)
353+
if((NOBLOOD in species.species_traits) || (STABLEBLOOD in species.species_traits))
354354
temp -= ORGAN_SLOT_HEART
355+
qdel(species)
355356
if(temp.len <= 0)
356357
return "You have no organs to replace!"
357358

Collapse file

‎code/datums/traits/neutral.dm‎

Copy file name to clipboardExpand all lines: code/datums/traits/neutral.dm
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,9 @@
421421
/datum/quirk/cyberorgan/heart/check_quirk(datum/preferences/prefs)
422422
var/datum/species/species_type = prefs.read_preference(/datum/preference/choiced/species)
423423
var/datum/species/species = new species_type
424-
if(NOBLOOD in species.species_traits) // species with NOBLOOD don't have a heart
424+
var/disallowed_trait = ((NOBLOOD in species.species_traits) || (STABLEBLOOD in species.species_traits)) // species with NOBLOOD don't have a heart
425+
qdel(species)
426+
if(disallowed_trait)
425427
return "You don't have a heart!"
426428
return ..()
427429

Collapse file

‎code/modules/mob/living/blood.dm‎

Copy file name to clipboardExpand all lines: code/modules/mob/living/blood.dm
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Takes care blood loss and regeneration
2626
/mob/living/carbon/human/handle_blood()
2727

28-
if(NOBLOOD in dna.species.species_traits || bleedsuppress || (HAS_TRAIT(src, TRAIT_FAKEDEATH)))
28+
if((NOBLOOD in dna.species.species_traits) || bleedsuppress || (HAS_TRAIT(src, TRAIT_FAKEDEATH)) || (STABLEBLOOD in dna.species.species_traits))
2929
return
3030

3131
if(mind && IS_BLOODSUCKER(src)) // Prevents Bloodsuckers from naturally regenerating Blood - Even while on masquerade
Collapse file

‎code/modules/mob/living/carbon/human/species_types/jellypeople.dm‎

Copy file name to clipboardExpand all lines: code/modules/mob/living/carbon/human/species_types/jellypeople.dm
+10-12Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
default_color = "00FF90"
77
say_mod = "chirps"
88
bubble_icon = BUBBLE_SLIME
9-
species_traits = list(MUTCOLORS, EYECOLOR, NOBLOOD, HAIR)
9+
species_traits = list(MUTCOLORS, EYECOLOR, STABLEBLOOD, HAIR, HAS_FLESH)
1010
inherent_traits = list(TRAIT_TOXINLOVER)
1111
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/slime
1212
exotic_blood = /datum/reagent/toxin/slimejelly
13+
exotic_bloodtype = "J" //this isn't used for anything other than bloodsplatter colours
1314
mutanttongue = /obj/item/organ/tongue/slime
1415
mutantlungs = /obj/item/organ/lungs/slime
1516
damage_overlay_type = ""
@@ -199,7 +200,7 @@
199200
plural_form = "Slimepeople"
200201
id = SPECIES_SLIMEPERSON
201202
default_color = "00FFFF"
202-
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD)
203+
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,STABLEBLOOD, HAS_FLESH)
203204
say_mod = "says"
204205
hair_color = "mutcolor"
205206
hair_alpha = 150
@@ -213,7 +214,7 @@
213214
var/list/mob/living/carbon/bodies
214215

215216
/datum/species/jelly/slime/on_species_loss(mob/living/carbon/C)
216-
bodies -= C // This means that the other bodies maintain a link
217+
LAZYREMOVE(bodies, C)// This means that the other bodies maintain a link
217218
// so if someone mindswapped into them, they'd still be shared.
218219
bodies = null
219220
C.blood_volume = min(C.blood_volume, BLOOD_VOLUME_NORMAL(C))
@@ -222,10 +223,7 @@
222223
/datum/species/jelly/slime/on_species_gain(mob/living/carbon/C, datum/species/old_species)
223224
..()
224225
if(ishuman(C))
225-
if(!bodies || !bodies.len)
226-
bodies = list(C)
227-
else
228-
bodies |= C
226+
LAZYADD(bodies, C)
229227

230228

231229
//If you're cloned you get your body pool back
@@ -298,7 +296,7 @@
298296
H.notransform = 0
299297

300298
var/datum/species/jelly/slime/origin_datum = H.dna.species
301-
origin_datum.bodies |= spare
299+
LAZYADD(origin_datum.bodies, spare)
302300

303301
var/datum/species/jelly/slime/spare_datum = spare.dna.species
304302
spare_datum.bodies = origin_datum.bodies
@@ -423,11 +421,11 @@
423421
var/datum/species/jelly/slime/SS = H.dna.species
424422

425423
if(QDELETED(dupe)) //Is there a body?
426-
SS.bodies -= dupe
424+
LAZYREMOVE(SS.bodies, dupe)
427425
return FALSE
428426

429427
if(!isslimeperson(dupe)) //Is it a slimeperson?
430-
SS.bodies -= dupe
428+
LAZYREMOVE(SS.bodies, dupe)
431429
return FALSE
432430

433431
if(H.stat != CONSCIOUS) //Are we alive and awake?
@@ -436,10 +434,10 @@
436434
if(dupe.stat != CONSCIOUS) //Is it alive and awake?
437435
return FALSE
438436

439-
if(dupe.mind && dupe.mind.active) //Is it unoccupied?
437+
if(dupe?.mind?.active) //Is it unoccupied?
440438
return FALSE
441439

442-
if(!(dupe in SS.bodies)) //Do we actually own it?
440+
if(!LAZYFIND(SS.bodies, dupe)) //Do we actually own it?
443441
return FALSE
444442

445443
return TRUE
Collapse file

‎code/modules/mob/living/carbon/life.dm‎

Copy file name to clipboardExpand all lines: code/modules/mob/living/carbon/life.dm
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ GLOBAL_LIST_INIT(ballmer_windows_me_msg, list("Yo man, what if, we like, uh, put
549549
/mob/living/carbon/proc/needs_heart()
550550
if(HAS_TRAIT(src, TRAIT_STABLEHEART))
551551
return FALSE
552-
if(dna && dna.species && (NOBLOOD in dna.species.species_traits)) //not all carbons have species!
552+
if(dna?.species && ((NOBLOOD in dna.species.species_traits) || (STABLEBLOOD in dna.species.species_traits))) //not all carbons have species!
553553
return FALSE
554554
return TRUE
555555

Collapse file

‎code/modules/reagents/chemistry/reagents/toxin_reagents.dm‎

Copy file name to clipboardExpand all lines: code/modules/reagents/chemistry/reagents/toxin_reagents.dm
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
/datum/reagent/toxin/slimejelly
129129
name = "Slime Jelly"
130130
description = "A gooey semi-liquid produced from one of the deadliest lifeforms in existence. SO REAL."
131-
color = "#801E28" // rgb: 128, 30, 40
131+
color = COLOR_DARK_MODERATE_LIME_GREEN // rgb: 128, 30, 40
132132
toxpwr = 0
133133
taste_description = "slime"
134134
taste_mult = 1.3
Collapse file

‎code/modules/surgery/organs/heart.dm‎

Copy file name to clipboardExpand all lines: code/modules/surgery/organs/heart.dm
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
failed = TRUE
109109

110110
/obj/item/organ/heart/get_availability(datum/species/species)
111-
return !(NOBLOOD in species.species_traits)
111+
return !((NOBLOOD in species.species_traits) || (STABLEBLOOD in species.species_traits))
112112

113113
/obj/item/organ/heart/cursed
114114
name = "cursed heart"
Collapse file

‎yogstation/code/modules/mob/living/carbon/human/human.dm‎

Copy file name to clipboardExpand all lines: yogstation/code/modules/mob/living/carbon/human/human.dm
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
race = /datum/species/vox
2121

2222
/mob/living/carbon/human/get_blood_state()
23-
if(NOBLOOD in dna.species.species_traits) //Can't have blood problems if your species doesn't have any blood, innit?
23+
if((NOBLOOD in dna.species.species_traits) || (STABLEBLOOD in dna.species.species_traits)) //Can't have blood problems if your species doesn't have any blood, innit?
2424
return BLOOD_SAFE
2525
. = ..()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.