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 c07b400

Browse filesBrowse files
Moltijoecowbot92
andauthored
[PORT]: Elementizes and Greyscales blood decals/overlays 2 (yogstation13#21126)
cause cowbot said it's good to go --------- Co-authored-by: cowbot92 <75333826+cowbot92@users.noreply.github.com>
1 parent 1a6f9ea commit c07b400
Copy full SHA for c07b400

70 files changed

+898-331Lines changed: 898 additions & 331 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎code/__DEFINES/colors.dm‎

Copy file name to clipboardExpand all lines: code/__DEFINES/colors.dm
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@
330330
#define SOFA_BROWN "#a75400"
331331
#define SOFA_MAROON "#830000"
332332

333+
/// Color used for default blood
334+
#define COLOR_BLOOD "#CC0000"
335+
333336
GLOBAL_LIST_INIT(cable_colors, list(
334337
CABLE_COLOR_BLUE = CABLE_HEX_COLOR_BLUE,
335338
CABLE_COLOR_CYAN = CABLE_HEX_COLOR_CYAN,
Collapse file

‎code/__DEFINES/dcs/flags.dm‎

Copy file name to clipboardExpand all lines: code/__DEFINES/dcs/flags.dm
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
/// You do not need this if you are only unregistering signals, for instance.
1515
/// You would need it if you are doing something like removing the target from a processing list.
1616
#define ELEMENT_DETACH_ON_HOST_DESTROY (1 << 0)
17+
18+
19+
// /datum/element flags
20+
/// Causes the detach proc to be called when the host object is being deleted
21+
#define ELEMENT_DETACH (1 << 0)
1722
/**
1823
* Only elements created with the same arguments given after `argument_hash_start_idx` share an element instance
1924
* The arguments are the same when the text and number values are the same and all other values have the same ref
Collapse file

‎code/__DEFINES/dcs/helpers.dm‎

Copy file name to clipboardExpand all lines: code/__DEFINES/dcs/helpers.dm
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
/// Every proc you pass to RegisterSignal must have this.
1111
#define SIGNAL_HANDLER SHOULD_NOT_SLEEP(TRUE)
1212

13+
/// Signifies that this proc is used to handle signals, but also sleeps.
14+
/// Do not use this for new work.
15+
#define SIGNAL_HANDLER_DOES_SLEEP
16+
1317
/// A wrapper for _AddElement that allows us to pretend we're using normal named arguments
1418
#define AddElement(arguments...) _AddElement(list(##arguments))
1519

Collapse file

‎code/__DEFINES/misc.dm‎

Copy file name to clipboardExpand all lines: code/__DEFINES/misc.dm
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,11 @@
115115
GLOBAL_LIST_EMPTY(bloody_footprints_cache)
116116

117117
//Bloody shoes/footprints
118-
#define MAX_SHOE_BLOODINESS 100
119-
#define BLOODY_FOOTPRINT_BASE_ALPHA 150
120-
#define BLOOD_GAIN_PER_STEP 100
121-
#define BLOOD_LOSS_PER_STEP 5
122-
#define BLOOD_LOSS_IN_SPREAD 20
123-
#define BLOOD_AMOUNT_PER_DECAL 20
118+
#define BLOODY_FOOTPRINT_BASE_ALPHA 80 /// Minimum alpha of footprints
119+
#define BLOOD_AMOUNT_PER_DECAL 50 /// How much blood a regular blood splatter contains
120+
#define BLOOD_ITEM_MAX 200 /// How much blood an item can have stuck on it
121+
#define BLOOD_POOL_MAX 300 /// How much blood a blood decal can contain
122+
#define BLOOD_FOOTPRINTS_MIN 5 /// How much blood a footprint need to at least contain
124123

125124
//Bloody shoe blood states
126125
#define BLOOD_STATE_HUMAN "blood"
Collapse file

‎code/__HELPERS/_lists.dm‎

Copy file name to clipboardExpand all lines: code/__HELPERS/_lists.dm
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,3 +737,15 @@
737737
///sort any value in a list
738738
/proc/sort_list(list/list_to_sort, cmp=/proc/cmp_text_asc)
739739
return sortTim(list_to_sort.Copy(), cmp)
740+
741+
742+
/// ORs two lazylists together without inserting errant nulls, returning a new list and not modifying the existing lists.
743+
#define LAZY_LISTS_OR(left_list, right_list)\
744+
(length(left_list)\
745+
? length(right_list)\
746+
? (left_list | right_list)\
747+
: left_list.Copy()\
748+
: length(right_list)\
749+
? right_list.Copy()\
750+
: null\
751+
)
Collapse file

‎code/__HELPERS/mobs.dm‎

Copy file name to clipboardExpand all lines: code/__HELPERS/mobs.dm
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/proc/random_blood_type()
2-
return pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
3-
41
/proc/random_eye_color()
52
switch(pick(20;"brown",20;"hazel",20;"grey",15;"blue",15;"green",1;"amber",1;"albino"))
63
if("brown")
Collapse file

‎code/_globalvars/lists/mobs.dm‎

Copy file name to clipboardExpand all lines: code/_globalvars/lists/mobs.dm
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ GLOBAL_LIST_EMPTY(mob_config_movespeed_type_lookup)
3939

4040
GLOBAL_LIST_EMPTY(emote_list)
4141

42+
GLOBAL_LIST_INIT(blood_types, generate_blood_types())
43+
44+
/proc/generate_blood_types()
45+
. = list()
46+
for(var/path in subtypesof(/datum/blood_type))
47+
var/datum/blood_type/new_type = new path()
48+
.[new_type.name] = new_type
49+
4250
/// Keys are the names of the accents, values are the name of their .json file.
4351
GLOBAL_LIST_INIT(accents_name2file, strings("accents.json", "accent_file_names", directory = "strings/accents"))
4452
/// List of all accents
Collapse file

‎code/datums/blood_types.dm‎

Copy file name to clipboard
+91Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/datum/blood_type
2+
/// Displayed name of the blood type.
3+
var/name = "?"
4+
/// Shown color of the blood type.
5+
var/color = COLOR_BLOOD
6+
/// Blood types that are safe to use with people that have this blood type.
7+
var/compatible_types = list()
8+
9+
/datum/blood_type/New()
10+
. = ..()
11+
compatible_types |= /datum/blood_type/universal
12+
13+
/datum/blood_type/universal
14+
name = "U"
15+
16+
/datum/blood_type/universal/New()
17+
. = ..()
18+
compatible_types |= subtypesof(/datum/blood_type)
19+
20+
////////////////////////////////////////////////////////////////
21+
//--------------------Normal human bloodtypes-----------------//
22+
////////////////////////////////////////////////////////////////
23+
/datum/blood_type/a_minus
24+
name = "A-"
25+
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/o_minus)
26+
27+
/datum/blood_type/a_plus
28+
name = "A+"
29+
compatible_types = list(/datum/blood_type/a_minus, /datum/blood_type/a_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus)
30+
31+
/datum/blood_type/b_minus
32+
name = "B-"
33+
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/o_minus, /datum/blood_type/universal)
34+
35+
/datum/blood_type/b_plus
36+
name = "B+"
37+
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/b_plus, /datum/blood_type/o_minus, /datum/blood_type/o_plus)
38+
39+
/datum/blood_type/ab_minus
40+
name = "AB-"
41+
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/a_minus, /datum/blood_type/ab_minus, /datum/blood_type/o_minus)
42+
43+
/datum/blood_type/ab_plus
44+
name = "AB+"
45+
compatible_types = list(/datum/blood_type/b_minus, /datum/blood_type/a_minus, /datum/blood_type/ab_minus, /datum/blood_type/o_minus)
46+
47+
/datum/blood_type/o_minus
48+
name = "O-"
49+
compatible_types = list(/datum/blood_type/o_minus)
50+
51+
/datum/blood_type/o_plus
52+
name = "O+"
53+
compatible_types = list(/datum/blood_type/o_minus, /datum/blood_type/o_plus)
54+
55+
////////////////////////////////////////////////////////////////
56+
//--------------------Other species bloodtypes----------------//
57+
////////////////////////////////////////////////////////////////
58+
/datum/blood_type/lizard
59+
name = "L"
60+
color = LIGHT_COLOR_BLUEGREEN
61+
compatible_types = list(/datum/blood_type/lizard)
62+
63+
64+
/datum/blood_type/universal/synthetic //Blood for preterni
65+
name = "Synthetic"
66+
color = LIGHT_COLOR_ELECTRIC_CYAN
67+
68+
/*
69+
The species have exotic blood, but with how dna is stored, they still need a blood type
70+
They're literally ONLY used to colour bloodsplats as far as I know (maybe it will be possible to podclone from bloodsplats)
71+
*/
72+
/datum/blood_type/xenomorph //for xenomorph gib dna and polysmorph bloodsplats
73+
name = "X"
74+
color = "#00FF32"
75+
compatible_types = list(/datum/blood_type/xenomorph)
76+
77+
/datum/blood_type/electricity
78+
name = "E"
79+
color = "#cbee63" //slightly more yellowy than regular liquid electricity because of the grey scale image used
80+
compatible_types = list(/datum/blood_type/electricity)
81+
82+
////////////////////////////////////////////////////////////////
83+
//-----------------Wonky simplemob(?) bloodtypes--------------//
84+
////////////////////////////////////////////////////////////////
85+
/datum/blood_type/animal //for simplemob gib dna
86+
name = "Y-"
87+
compatible_types = list(/datum/blood_type/animal)
88+
89+
/datum/blood_type/gorilla
90+
name = "G"
91+
compatible_types = list(/datum/blood_type/gorilla)

0 commit comments

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