-
-
Notifications
You must be signed in to change notification settings - Fork 454
/
monkey.dm
167 lines (139 loc) · 5.71 KB
/
monkey.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
/mob/living/carbon/monkey
name = "monkey"
verb_say = "chimpers"
initial_language_holder = /datum/language_holder/monkey
icon = 'icons/mob/monkey.dmi'
icon_state = "monkey1"
held_state = "monkey"
gender = NEUTER
pass_flags = PASSTABLE
ventcrawler = VENTCRAWLER_NUDE
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
mob_size = MOB_SIZE_HUMAN //monkeeeee
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1)
type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/monkey
gib_type = /obj/effect/decal/cleanable/blood/gibs
unique_name = TRUE
blocks_emissive = EMISSIVE_BLOCK_UNIQUE
bodyparts = list(/obj/item/bodypart/chest/monkey, /obj/item/bodypart/head/monkey, /obj/item/bodypart/l_arm/monkey,
/obj/item/bodypart/r_arm/monkey, /obj/item/bodypart/r_leg/monkey, /obj/item/bodypart/l_leg/monkey)
hud_type = /datum/hud/monkey
blood_volume = BLOOD_VOLUME_MONKEY // Yogs -- Makes monkeys/xenos have different amounts of blood from normal carbonbois
can_be_held = TRUE
/mob/living/carbon/monkey/Initialize(mapload, cubespawned=FALSE, mob/spawner)
add_verb(src, /mob/living/proc/mob_sleep)
add_verb(src, /mob/living/proc/lay_down)
if(unique_name) //used to exclude pun pun
gender = pick(MALE, FEMALE)
real_name = name
//initialize limbs
create_bodyparts()
create_internal_organs()
. = ..()
if (cubespawned)
var/cap = CONFIG_GET(number/monkeycap)
if (LAZYLEN(SSmobs.cubemonkeys) > cap)
if (spawner)
to_chat(spawner, span_warning("Bluespace harmonics prevent the spawning of more than [cap] monkeys on the station at one time!"))
return INITIALIZE_HINT_QDEL
SSmobs.cubemonkeys += src
create_dna(src)
dna.initialize_dna(random_blood_type())
AddComponent(/datum/component/bloodysoles/feet)
/mob/living/carbon/monkey/Destroy()
SSmobs.cubemonkeys -= src
return ..()
/mob/living/carbon/monkey/create_internal_organs()
internal_organs += new /obj/item/organ/appendix
internal_organs += new /obj/item/organ/lungs
internal_organs += new /obj/item/organ/heart
internal_organs += new /obj/item/organ/brain
internal_organs += new /obj/item/organ/tongue
internal_organs += new /obj/item/organ/eyes
internal_organs += new /obj/item/organ/ears
internal_organs += new /obj/item/organ/liver
internal_organs += new /obj/item/organ/stomach
..()
/mob/living/carbon/monkey/on_reagent_change()
. = ..()
remove_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE)
var/amount
if(reagents.has_reagent(/datum/reagent/medicine/morphine))
amount = -1
if(reagents.has_reagent(/datum/reagent/consumable/energy_drink/nuka_cola))
amount = -1
if(amount)
add_movespeed_modifier(MOVESPEED_ID_MONKEY_REAGENT_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = amount)
/mob/living/carbon/monkey/updatehealth()
. = ..()
var/slow = 0
if(!HAS_TRAIT(src, TRAIT_IGNOREDAMAGESLOWDOWN))
var/health_deficiency = (maxHealth - health)
if(health_deficiency >= 45)
slow += (health_deficiency / 25)
add_movespeed_modifier(MOVESPEED_ID_MONKEY_HEALTH_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = slow)
/mob/living/carbon/monkey/adjust_bodytemperature(amount)
. = ..()
var/slow = 0
if (bodytemperature < 283.222)
slow += ((283.222 - bodytemperature) / 10) * 1.75
add_movespeed_modifier(MOVESPEED_ID_MONKEY_TEMPERATURE_SPEEDMOD, TRUE, 100, override = TRUE, multiplicative_slowdown = slow)
/mob/living/carbon/monkey/get_status_tab_items()
. = ..()
. += "Combat Mode: [combat_mode ? "On" : "Off"]"
. += "Move Mode: [m_intent]"
if(client && mind)
var/datum/antagonist/changeling/changeling = mind.has_antag_datum(/datum/antagonist/changeling)
if(changeling)
. += ""
. += "Chemical Storage: [changeling.chem_charges]/[changeling.chem_storage]"
. += "Absorbed DNA: [changeling.absorbedcount]"
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
if(mind && is_monkey(mind))
return TRUE
return FALSE
/mob/living/carbon/monkey/reagent_check(datum/reagent/R) //can metabolize all reagents
return FALSE
/mob/living/carbon/monkey/canBeHandcuffed()
return TRUE
/mob/living/carbon/monkey/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
if(judgement_criteria & JUDGE_EMAGGED)
return 10 //Everyone is a criminal!
var/threatcount = 0
//Securitrons can't identify monkeys
if( !(judgement_criteria & JUDGE_IGNOREMONKEYS) && (judgement_criteria & JUDGE_IDCHECK) )
threatcount += 4
//Lasertag bullshit
if(lasercolor)
if(lasercolor == "b")//Lasertag turrets target the opposing team, how great is that? -Sieve
if(is_holding_item_of_type(/obj/item/gun/energy/laser/redtag))
threatcount += 4
if(lasercolor == "r")
if(is_holding_item_of_type(/obj/item/gun/energy/laser/bluetag))
threatcount += 4
return threatcount
//Check for weapons
if( (judgement_criteria & JUDGE_WEAPONCHECK) && weaponcheck )
for(var/obj/item/I in held_items) //if they're holding a gun
if(weaponcheck.Invoke(I))
threatcount += 4
if(weaponcheck.Invoke(back)) //if a weapon is present in the back slot
threatcount += 4 //trigger look_for_perp() since they're nonhuman and very likely hostile
//mindshield implants imply trustworthyness
if(HAS_TRAIT(src, TRAIT_MINDSHIELD))
threatcount -= 1
return threatcount
/mob/living/carbon/monkey/IsVocal()
if(!getorganslot(ORGAN_SLOT_LUNGS))
return 0
return 1
/mob/living/carbon/monkey/can_use_guns(obj/item/G)
return TRUE
/mob/living/carbon/monkey/angry
aggressive = TRUE
/mob/living/carbon/monkey/angry/Initialize(mapload)
. = ..()
if(prob(10))
var/obj/item/clothing/head/helmet/justice/escape/helmet = new(src)
equip_to_slot_or_del(helmet,ITEM_SLOT_HEAD)
helmet.attack_self(src) // todo encapsulate toggle