mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
@@ -19,6 +19,7 @@
|
||||
var/light_range = null // How far the light for the above var goes. Not implemented yet.
|
||||
var/light_intensity = null // Ditto. Not implemented yet.
|
||||
var/mob_overlay_state = null // Icon_state for an overlay to apply to a (human) mob while this exists. This is actually implemented.
|
||||
var/client_color = null // If set, the client will have the world be shown in this color, from their perspective.
|
||||
|
||||
// Now for all the different effects.
|
||||
// Percentage modifiers are expressed as a multipler. (e.g. +25% damage should be written as 1.25)
|
||||
@@ -43,6 +44,7 @@
|
||||
var/metabolism_percent // Adjusts the mob's metabolic rate, which affects reagent processing. Won't affect mobs without reagent processing.
|
||||
var/icon_scale_percent // Makes the holder's icon get scaled up or down.
|
||||
var/attack_speed_percent // Makes the holder's 'attack speed' (click delay) shorter or longer.
|
||||
var/pain_immunity // Makes the holder not care about pain while this is on. Only really useful to human mobs.
|
||||
|
||||
/datum/modifier/New(var/new_holder, var/new_origin)
|
||||
holder = new_holder
|
||||
@@ -52,6 +54,11 @@
|
||||
origin = weakref(holder)
|
||||
..()
|
||||
|
||||
// Checks if the modifier should be allowed to be applied to the mob before attaching it.
|
||||
// Override for special criteria, e.g. forbidding robots from receiving it.
|
||||
/datum/modifier/proc/can_apply(var/mob/living/L)
|
||||
return TRUE
|
||||
|
||||
// Checks to see if this datum should continue existing.
|
||||
/datum/modifier/proc/check_if_valid()
|
||||
if(expire_at && expire_at < world.time) // Is our time up?
|
||||
@@ -66,8 +73,14 @@
|
||||
holder.update_modifier_visuals()
|
||||
if(icon_scale_percent) // Correct the scaling.
|
||||
holder.update_transform()
|
||||
if(client_color)
|
||||
holder.update_client_color()
|
||||
qdel(src)
|
||||
|
||||
// Override this for special effects when it gets added to the mob.
|
||||
/datum/modifier/proc/on_applied()
|
||||
return
|
||||
|
||||
// Override this for special effects when it gets removed.
|
||||
/datum/modifier/proc/on_expire()
|
||||
return
|
||||
@@ -114,15 +127,21 @@
|
||||
|
||||
// If we're at this point, the mob doesn't already have it, or it does but stacking is allowed.
|
||||
var/datum/modifier/mod = new modifier_type(src, origin)
|
||||
if(!mod.can_apply(src))
|
||||
qdel(mod)
|
||||
return
|
||||
if(expire_at)
|
||||
mod.expire_at = world.time + expire_at
|
||||
if(mod.on_created_text)
|
||||
to_chat(src, mod.on_created_text)
|
||||
modifiers.Add(mod)
|
||||
mod.on_applied()
|
||||
if(mod.mob_overlay_state)
|
||||
update_modifier_visuals()
|
||||
if(mod.icon_scale_percent)
|
||||
update_transform()
|
||||
if(mod.client_color)
|
||||
update_client_color()
|
||||
|
||||
return mod
|
||||
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
// File for modifier defines that don't fit anywhere else. Since this is a misc file, it's doomed to get filled with everything like all the others.
|
||||
|
||||
|
||||
/*
|
||||
Berserk is a modifier that grants vastly increased melee capability for a short period of time, easily allowing the
|
||||
holder to do more than twice the damage they would normally do, as it both increases outgoing melee damage, and
|
||||
reduces their attack delay. The screen will also turn deep red and the holder will get larger in size.
|
||||
|
||||
The modifier also gives some defenses, in that it gives additional max health (this can bite them in the ass later since
|
||||
its not permanent), makes them move slightly faster, cancels disabling effects when it triggers, and reduces the power of
|
||||
future disables by a very large amount. It also suppresses pain until it expires, however berserking while under massive pain
|
||||
is likely to cause them to pass out when exhaustion hits.
|
||||
|
||||
Due to the intense rage felt by the holder, the focus needed to use ranged weapons is lost, making accuracy with them
|
||||
massively reduced. The holder also feels less of a need to evade attacks and will be easier to hit.
|
||||
|
||||
Berserk can be extended by having another instance try to affect the holder while in the middle of a berserk.
|
||||
|
||||
After the modifier expires, a second modifier representing exhaustion is placed, which inflicts massive maluses and prevents
|
||||
further berserks until it expires. This generally means that someone getting caught while exhausted will be much easier to fight,
|
||||
as they will be much slower, attack slower, do less melee damage, be easier to hit, and disabling effects will affect them harder.
|
||||
|
||||
Berserking causes the holder to feel hungrier. If they are starving, this modifier cannot be applied. Diona cannot
|
||||
be berserked, or those who are suffering from exhaustion. Non-Drone Synthetics that receive the berserk modifier will
|
||||
instead get a version that has no benefits, but will not cost nutrition or cause exhaustion. Drones cannot receive berserk, as
|
||||
they are emotionless automatrons.
|
||||
|
||||
Berserk is a somewhat rare modifier to obtain freely (and for good reason), however here are ways to see it in action;
|
||||
- Red Slimes will berserk if they go rabid.
|
||||
- Red slime core reactions will berserk slimes that can see the user in addition to making them go rabid.
|
||||
- Red slime core reactions will berserk prometheans that can see the user.
|
||||
- Bears will berserk when losing a fight.
|
||||
- Changelings can evolve a 2 point ability to use a changeling-specific variant of Berserk, that replaces the text with a 'we' variant.
|
||||
Recursive Enhancement allows the changeling to instead used an improved variant that features less exhaustion time and less nutrition drain.
|
||||
- Xenoarch artifacts may have forced berserking as one of their effects. This is especially fun if an artifact that makes hostile mobs is nearby.
|
||||
Will cause three brainloss in those affected due to the artifact meddling with their mind.
|
||||
- A rare alien artifact might be found on the Surface, or obtained from Xenoarch, that causes berserking when it thinks
|
||||
the wearer is in danger, however in addition to the usual drawbacks, each use causes three brainloss in the user, due to how
|
||||
the artifact triggers the rage.
|
||||
|
||||
*/
|
||||
|
||||
/datum/modifier/berserk
|
||||
name = "berserk"
|
||||
desc = "You are filled with an overwhelming rage."
|
||||
client_color = "#FF0000" // Make everything red!
|
||||
mob_overlay_state = "berserk"
|
||||
|
||||
on_created_text = "<span class='critical'>You feel an intense and overwhelming rage overtake you as you go berserk!</span>"
|
||||
on_expired_text = "<span class='notice'>The blaze of rage inside you has ran out.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
// The good stuff.
|
||||
slowdown = -1 // Move a bit faster.
|
||||
attack_speed_percent = 0.66 // Attack at 2/3 the normal delay.
|
||||
outgoing_melee_damage_percent = 1.5 // 50% more damage from melee.
|
||||
max_health_percent = 1.5 // More health as a buffer, however the holder might fall into crit after this expires if they're mortally wounded.
|
||||
disable_duration_percent = 0.25 // Disables only last 25% as long.
|
||||
icon_scale_percent = 1.2 // Look scarier.
|
||||
pain_immunity = TRUE // Avoid falling over from shock (at least until it expires).
|
||||
|
||||
// The less good stuff.
|
||||
accuracy = -5 // Aiming requires focus.
|
||||
accuracy_dispersion = 3 // Ditto.
|
||||
evasion = -3 // Too angry to dodge.
|
||||
|
||||
var/nutrition_cost = 150
|
||||
var/exhaustion_duration = 2 MINUTES // How long the exhaustion modifier lasts after it expires. Set to 0 to not apply one.
|
||||
var/last_shock_stage = 0
|
||||
|
||||
|
||||
// For changelings.
|
||||
/datum/modifier/berserk/changeling
|
||||
on_created_text = "<span class='critical'>We feel an intense and overwhelming rage overtake us as we go berserk!</span>"
|
||||
on_expired_text = "<span class='notice'>The blaze of rage inside us has ran out.</span>"
|
||||
|
||||
// For changelings who bought the Recursive Enhancement evolution.
|
||||
/datum/modifier/berserk/changeling/recursive
|
||||
exhaustion_duration = 1 MINUTE
|
||||
nutrition_cost = 75
|
||||
|
||||
|
||||
/datum/modifier/berserk/on_applied()
|
||||
if(ishuman(holder)) // Most other mobs don't really use nutrition and can't get it back.
|
||||
holder.nutrition = max(0, holder.nutrition - nutrition_cost)
|
||||
holder.visible_message("<span class='critical'>\The [holder] descends into an all consuming rage!</span>")
|
||||
|
||||
// End all stuns.
|
||||
holder.SetParalysis(0)
|
||||
holder.SetStunned(0)
|
||||
holder.SetWeakened(0)
|
||||
holder.setHalLoss(0)
|
||||
holder.lying = 0
|
||||
holder.update_canmove()
|
||||
|
||||
// Temporarily end pain.
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
last_shock_stage = H.shock_stage
|
||||
H.shock_stage = 0
|
||||
|
||||
/datum/modifier/berserk/on_expire()
|
||||
if(exhaustion_duration > 0 && holder.stat != DEAD)
|
||||
holder.add_modifier(/datum/modifier/berserk_exhaustion, exhaustion_duration)
|
||||
|
||||
if(prob(last_shock_stage))
|
||||
to_chat(holder, "<span class='warning'>You pass out from the pain you were suppressing.</span>")
|
||||
holder.Paralyse(5)
|
||||
|
||||
if(ishuman(holder))
|
||||
var/mob/living/carbon/human/H = holder
|
||||
H.shock_stage = last_shock_stage
|
||||
|
||||
/datum/modifier/berserk/can_apply(var/mob/living/L)
|
||||
if(L.stat)
|
||||
to_chat(L, "<span class='warning'>You can't be unconscious or dead to berserk.</span>")
|
||||
return FALSE // It would be weird to see a dead body get angry all of a sudden.
|
||||
|
||||
if(!L.is_sentient())
|
||||
return FALSE // Drones don't feel anything.
|
||||
|
||||
if(L.has_modifier_of_type(/datum/modifier/berserk_exhaustion))
|
||||
to_chat(L, "<span class='warning'>You recently berserked, and cannot do so again while exhausted.</span>")
|
||||
return FALSE // On cooldown.
|
||||
|
||||
if(L.isSynthetic())
|
||||
L.add_modifier(/datum/modifier/berserk_synthetic, 30 SECONDS)
|
||||
return FALSE // Borgs can get angry but their metal shell can't be pushed harder by just being mad. Same for Posibrains.
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.species.name == "Diona")
|
||||
to_chat(L, "<span class='warning'>You feel strange for a moment, but it passes.</span>")
|
||||
return FALSE // Happy trees aren't affected by blood rages.
|
||||
|
||||
if(L.nutrition < nutrition_cost)
|
||||
to_chat(L, "<span class='warning'>You are too hungry to berserk.</span>")
|
||||
return FALSE // Too hungry to enrage.
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/modifier/berserk/tick()
|
||||
if(holder.stat == DEAD)
|
||||
expire(silent = TRUE)
|
||||
|
||||
|
||||
// Applied when berserk expires. Acts as a downside as well as the cooldown for berserk.
|
||||
/datum/modifier/berserk_exhaustion
|
||||
name = "exhaustion"
|
||||
desc = "You recently exerted yourself extremely hard, and need a rest."
|
||||
|
||||
on_created_text = "<span class='warning'>You feel extremely exhausted.</span>"
|
||||
on_expired_text = "<span class='notice'>You feel less exhausted now.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
slowdown = 2
|
||||
attack_speed_percent = 1.5
|
||||
outgoing_melee_damage_percent = 0.6
|
||||
disable_duration_percent = 1.5
|
||||
evasion = -2
|
||||
|
||||
/datum/modifier/berserk_exhaustion/on_applied()
|
||||
holder.visible_message("<span class='warning'>\The [holder] looks exhausted.</span>")
|
||||
|
||||
|
||||
// Synth version with no benefits due to a loss of focus inside a metal shell, which can't be pushed harder just be being mad.
|
||||
// Fortunately there is no exhaustion or nutrition cost.
|
||||
/datum/modifier/berserk_synthetic
|
||||
name = "recklessness"
|
||||
desc = "You are filled with an overwhelming rage, however your metal shell prevents taking advantage of this."
|
||||
client_color = "#FF0000" // Make everything red!
|
||||
mob_overlay_state = "berserk"
|
||||
|
||||
on_created_text = "<span class='danger'>You feel an intense and overwhelming rage overtake you as you go berserk! \
|
||||
Unfortunately, your lifeless body cannot benefit from this. You feel reckless...</span>"
|
||||
on_expired_text = "<span class='notice'>The blaze of rage inside your mind has ran out.</span>"
|
||||
stacks = MODIFIER_STACK_EXTEND
|
||||
|
||||
// Just being mad isn't gonna overclock your body when you're a beepboop.
|
||||
accuracy = -5 // Aiming requires focus.
|
||||
accuracy_dispersion = 3 // Ditto.
|
||||
evasion = -3 // Too angry to dodge.
|
||||
@@ -95,6 +95,10 @@ var/list/slot_equipment_priority = list( \
|
||||
//Returns the thing in our inactive hand
|
||||
/mob/proc/get_inactive_hand()
|
||||
|
||||
// Override for your specific mob's hands or lack thereof.
|
||||
/mob/proc/is_holding_item_of_type(typepath)
|
||||
return FALSE
|
||||
|
||||
//Puts the item into your l_hand if possible and calls all necessary triggers/updates. returns 1 on success.
|
||||
/mob/proc/put_in_l_hand(var/obj/item/W)
|
||||
if(lying || !istype(W))
|
||||
|
||||
@@ -296,6 +296,9 @@
|
||||
/mob/living/bot/proc/explode()
|
||||
qdel(src)
|
||||
|
||||
/mob/living/bot/is_sentient()
|
||||
return FALSE
|
||||
|
||||
/******************************************************************/
|
||||
// Navigation procs
|
||||
// Used for A-star pathfinding
|
||||
|
||||
@@ -1519,12 +1519,20 @@
|
||||
/mob/living/carbon/human/can_feel_pain(var/obj/item/organ/check_organ)
|
||||
if(isSynthetic())
|
||||
return 0
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(M.pain_immunity == TRUE)
|
||||
return 0
|
||||
if(check_organ)
|
||||
if(!istype(check_organ))
|
||||
return 0
|
||||
return check_organ.organ_can_feel_pain()
|
||||
return !(species.flags & NO_PAIN)
|
||||
|
||||
/mob/living/carbon/human/is_sentient()
|
||||
if(get_FBP_type() == FBP_DRONE)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/is_muzzled()
|
||||
return (wear_mask && (istype(wear_mask, /obj/item/clothing/mask/muzzle) || istype(src.wear_mask, /obj/item/weapon/grenade)))
|
||||
|
||||
|
||||
@@ -352,3 +352,10 @@ This saves us from having to call add_fingerprint() any time something is put in
|
||||
if(slot_l_ear) return l_ear
|
||||
if(slot_r_ear) return r_ear
|
||||
return ..()
|
||||
|
||||
|
||||
/mob/living/carbon/human/is_holding_item_of_type(typepath)
|
||||
for(var/obj/item/I in list(l_hand, r_hand))
|
||||
if(istype(I, typepath))
|
||||
return I
|
||||
return FALSE
|
||||
@@ -167,19 +167,7 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
ma_compiled.overlays += list_layers
|
||||
|
||||
//4: Apply transforms based on situation
|
||||
if(lying && !species.prone_icon) //Only rotate them if we're not drawing a specific icon for being prone.
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(90)
|
||||
M.Scale(size_multiplier) //VOREStation Edit. Look at Polaris pull #4267 to see things edited.
|
||||
M.Translate(1,-6)
|
||||
ma_compiled.transform = M
|
||||
ma_compiled.layer = MOB_LAYER -0.1 //VOREStation Edit. Laying people under other people. LEWD.
|
||||
else
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(size_multiplier) //VOREStation Edit.
|
||||
M.Translate(0, 16*(size_multiplier-1)) //VOREStation Edit.
|
||||
ma_compiled.transform = M
|
||||
ma_compiled.layer = MOB_LAYER //VOREStation Edit. Unset laying layer. UNLEWD.
|
||||
update_transform(ma_compiled, FALSE)
|
||||
|
||||
//4.5 Set layer to PLANE_WORLD to make sure its not magically FLOAT_PLANE due to byond madness
|
||||
ma_compiled.plane = PLANE_WORLD
|
||||
@@ -187,6 +175,44 @@ Please contact me on #coderbus IRC. ~Carn x
|
||||
//5: Set appearance once
|
||||
appearance = ma_compiled
|
||||
|
||||
/mob/living/carbon/human/update_transform(var/mutable_appearance/passed_ma)
|
||||
var/mutable_appearance/ma
|
||||
if(passed_ma)
|
||||
ma = passed_ma
|
||||
else
|
||||
ma = new(src)
|
||||
|
||||
/* VOREStation Edit START - TODO - Consider switching to icon_scale
|
||||
// First, get the correct size.
|
||||
var/desired_scale = icon_scale
|
||||
|
||||
desired_scale *= species.icon_scale
|
||||
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.icon_scale_percent))
|
||||
desired_scale *= M.icon_scale_percent
|
||||
*/
|
||||
var/desired_scale = size_multiplier
|
||||
//VOREStation Edit End
|
||||
|
||||
// Regular stuff again.
|
||||
if(lying && !species.prone_icon) //Only rotate them if we're not drawing a specific icon for being prone.
|
||||
var/matrix/M = matrix()
|
||||
M.Turn(90)
|
||||
M.Scale(desired_scale)
|
||||
M.Translate(1,-6)
|
||||
ma.transform = M
|
||||
ma.layer = MOB_LAYER -0.1 // Fix for a byond bug where turf entry order no longer matters
|
||||
else
|
||||
var/matrix/M = matrix()
|
||||
M.Scale(desired_scale)
|
||||
M.Translate(0, 16*(desired_scale-1))
|
||||
ma.transform = M
|
||||
ma.layer = MOB_LAYER // Fix for a byond bug where turf entry order no longer matters
|
||||
|
||||
if(!passed_ma)
|
||||
appearance = ma
|
||||
|
||||
//Update the layers from the defines above
|
||||
/mob/living/carbon/human/update_icons_layers(var/update_icons = 1)
|
||||
list_layers.Cut()
|
||||
|
||||
@@ -175,4 +175,4 @@
|
||||
return
|
||||
visible_message("<span class='danger'>[usr] manages to unbuckle themself!</span>",
|
||||
"<span class='notice'>You successfully unbuckle yourself.</span>")
|
||||
buckled.user_unbuckle_mob(src)
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
|
||||
@@ -865,7 +865,7 @@ default behaviour is:
|
||||
|
||||
/mob/living/proc/escape_buckle()
|
||||
if(buckled)
|
||||
buckled.user_unbuckle_mob(src)
|
||||
buckled.user_unbuckle_mob(src, src)
|
||||
|
||||
/mob/living/proc/resist_grab()
|
||||
var/resisting = 0
|
||||
@@ -994,11 +994,14 @@ default behaviour is:
|
||||
if(is_physically_disabled())
|
||||
lying = 0
|
||||
canmove = 1
|
||||
pixel_y = V.mob_offset_y - 5
|
||||
if(!V.riding_datum) // If it has a riding datum, the datum handles moving the pixel_ vars.
|
||||
pixel_y = V.mob_offset_y - 5
|
||||
else
|
||||
if(buckled.buckle_lying != -1) lying = buckled.buckle_lying
|
||||
if(buckled.buckle_lying != -1)
|
||||
lying = buckled.buckle_lying
|
||||
canmove = 1
|
||||
pixel_y = V.mob_offset_y
|
||||
if(!V.riding_datum) // If it has a riding datum, the datum handles moving the pixel_ vars.
|
||||
pixel_y = V.mob_offset_y
|
||||
else if(buckled)
|
||||
anchored = 1
|
||||
canmove = 0
|
||||
@@ -1056,6 +1059,10 @@ default behaviour is:
|
||||
/mob/living/proc/equip_post_job()
|
||||
return
|
||||
|
||||
// Used to check if something is capable of thought, in the traditional sense.
|
||||
/mob/living/proc/is_sentient()
|
||||
return TRUE
|
||||
|
||||
/* //VOREStation Edit. We have a better system in place.
|
||||
/mob/living/update_transform()
|
||||
// First, get the correct size.
|
||||
@@ -1069,4 +1076,42 @@ default behaviour is:
|
||||
M.Scale(desired_scale)
|
||||
M.Translate(0, 16*(desired_scale-1))
|
||||
src.transform = M
|
||||
animate(src, transform = M, time = 10)
|
||||
*/ //VOREStation Edit
|
||||
|
||||
// This handles setting the client's color variable, which makes everything look a specific color.
|
||||
// This proc is here so it can be called without needing to check if the client exists, or if the client relogs.
|
||||
/mob/living/update_client_color()
|
||||
if(!client)
|
||||
return
|
||||
|
||||
var/list/colors_to_blend = list()
|
||||
for(var/datum/modifier/M in modifiers)
|
||||
if(!isnull(M.client_color))
|
||||
colors_to_blend += M.client_color
|
||||
|
||||
if(colors_to_blend.len)
|
||||
var/final_color
|
||||
if(colors_to_blend.len == 1) // If it's just one color we can skip all of this work.
|
||||
final_color = colors_to_blend[1]
|
||||
|
||||
else // Otherwise we need to do some messy additive blending.
|
||||
var/R = 0
|
||||
var/G = 0
|
||||
var/B = 0
|
||||
|
||||
for(var/C in colors_to_blend)
|
||||
var/RGB = hex2rgb(C)
|
||||
R = between(0, R + RGB[1], 255)
|
||||
G = between(0, G + RGB[2], 255)
|
||||
B = between(0, B + RGB[3], 255)
|
||||
final_color = rgb(R,G,B)
|
||||
|
||||
if(final_color)
|
||||
var/old_color = client.color // Don't know if BYOND has an internal optimization to not care about animate() calls that effectively do nothing.
|
||||
if(final_color != old_color) // Gonna do a check just incase.
|
||||
animate(client, color = final_color, time = 10)
|
||||
|
||||
else // No colors, so remove the client's color.
|
||||
animate(client, color = null, time = 10)
|
||||
|
||||
|
||||
@@ -794,5 +794,10 @@ var/list/ai_verbs_default = list(
|
||||
if(rig)
|
||||
rig.force_rest(src)
|
||||
|
||||
/mob/living/silicon/ai/is_sentient()
|
||||
// AI cores don't store what brain was used to build them so we're just gonna assume they can think to some degree.
|
||||
// If that is ever fixed please update this proc.
|
||||
return TRUE
|
||||
|
||||
#undef AI_CHECK_WIRELESS
|
||||
#undef AI_CHECK_RADIO
|
||||
|
||||
@@ -67,6 +67,9 @@ var/list/mob_hat_cache = list()
|
||||
hat.loc = get_turf(src)
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/is_sentient()
|
||||
return FALSE
|
||||
|
||||
/mob/living/silicon/robot/drone/construction
|
||||
icon_state = "constructiondrone"
|
||||
law_type = /datum/ai_laws/construction_drone
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
handle_actions()
|
||||
handle_instability()
|
||||
// For some reason borg Life() doesn't call ..()
|
||||
handle_modifiers()
|
||||
handle_light()
|
||||
|
||||
if(client)
|
||||
@@ -328,8 +329,9 @@
|
||||
weaponlock_time = 120
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(paralysis || stunned || weakened || buckled || lockdown || resting || !is_component_functioning("actuator")) canmove = 0 //VOREStation edit for resting.
|
||||
else canmove = 1
|
||||
..() // Let's not reinvent the wheel.
|
||||
if(lockdown || !is_component_functioning("actuator"))
|
||||
canmove = FALSE
|
||||
return canmove
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
|
||||
@@ -1096,3 +1096,6 @@
|
||||
src << "Hack attempt detected."
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/is_sentient()
|
||||
return braintype != "Drone"
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
// For growing flowers
|
||||
src.modules += new /obj/item/weapon/material/minihoe(src)
|
||||
src.modules += new /obj/item/weapon/material/hatchet(src)
|
||||
src.modules += new /obj/item/weapon/material/knife/machete/hatchet(src)
|
||||
src.modules += new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/plants(src)
|
||||
src.modules += new /obj/item/weapon/robot_harvester(src)
|
||||
|
||||
@@ -156,6 +156,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/crowbar/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/extinguisher(src)
|
||||
src.modules += new /obj/item/device/gps/robot(src)
|
||||
vr_new() // Vorestation Edit: For modules in robot_modules_vr.dm
|
||||
|
||||
/obj/item/weapon/robot_module/robot/standard
|
||||
@@ -520,9 +521,6 @@ var/global/list/robot_modules = list(
|
||||
T.update_icon()
|
||||
else
|
||||
T.charge_tick = 0
|
||||
var/obj/item/weapon/melee/baton/robot/B = locate() in src.modules
|
||||
if(B && B.bcell)
|
||||
B.bcell.give(amount)
|
||||
|
||||
/obj/item/weapon/robot_module/robot/janitor
|
||||
name = "janitorial robot module"
|
||||
@@ -601,7 +599,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/weapon/gripper/service(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/glass/bucket(src)
|
||||
src.modules += new /obj/item/weapon/material/minihoe(src)
|
||||
src.modules += new /obj/item/weapon/material/hatchet(src)
|
||||
src.modules += new /obj/item/weapon/material/knife/machete/hatchet(src)
|
||||
src.modules += new /obj/item/device/analyzer/plant_analyzer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/plants(src)
|
||||
src.modules += new /obj/item/weapon/robot_harvester(src)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Hivebots are tuned towards how many default lasers are needed to kill them.
|
||||
// As such, if laser damage is ever changed, you should change this define.
|
||||
#define LASERS_TO_KILL *40
|
||||
#define LASERS_TO_KILL *30
|
||||
|
||||
// Default hivebot is melee, and a bit more meaty, so it can meatshield for their ranged friends.
|
||||
/mob/living/simple_animal/hostile/hivebot
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
intelligence_level = SA_ANIMAL
|
||||
cooperative = 1
|
||||
|
||||
maxHealth = 60
|
||||
health = 60
|
||||
maxHealth = 120
|
||||
health = 120
|
||||
turns_per_move = 5
|
||||
see_in_dark = 6
|
||||
stop_when_pulled = 0
|
||||
@@ -43,9 +43,20 @@
|
||||
|
||||
meat_type = /obj/item/weapon/reagent_containers/food/snacks/bearmeat
|
||||
|
||||
var/stance_step = 0
|
||||
// var/stance_step = 0
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/handle_stance()
|
||||
/mob/living/simple_animal/hostile/bear/handle_stance(var/new_stance)
|
||||
// Below was a bunch of code that made this specific mob be 'alert' and will hurt you when it gets closer.
|
||||
// It's commented out because it made infinite loops and the AI is going to be moved/rewritten sometime soon (famous last words)
|
||||
// and it would be better if this 'alert before attacking' behaviour was on the parent instead of a specific type of mob anyways.
|
||||
|
||||
// Instead we're just gonna get angry if we're dying.
|
||||
..(new_stance)
|
||||
if(stance == STANCE_ATTACK || stance == STANCE_ATTACKING)
|
||||
if((health / maxHealth) <= 0.5) // At half health, and fighting someone currently.
|
||||
add_modifier(/datum/modifier/berserk, 30 SECONDS)
|
||||
|
||||
/*
|
||||
switch(stance)
|
||||
if(STANCE_TIRED)
|
||||
stop_automated_movement = 1
|
||||
@@ -87,6 +98,7 @@
|
||||
return
|
||||
else
|
||||
..()
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/update_icons()
|
||||
..()
|
||||
@@ -103,7 +115,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
custom_emote(1,"stares alertly at [.]")
|
||||
handle_stance(STANCE_ALERT)
|
||||
// handle_stance(STANCE_ALERT)
|
||||
|
||||
/mob/living/simple_animal/hostile/bear/PunchTarget()
|
||||
if(!Adjacent(target_mob))
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/giant_spider/proc/add_eyes()
|
||||
if(!eye_layer)
|
||||
var/overlay_layer = LIGHTING_LAYER+0.1
|
||||
eye_layer = image(icon, "[icon_state]-eyes", overlay_layer)
|
||||
eye_layer = image(icon, "[icon_state]-eyes")
|
||||
eye_layer.plane = PLANE_LIGHTING_ABOVE
|
||||
|
||||
overlays += eye_layer
|
||||
|
||||
|
||||
@@ -244,12 +244,9 @@
|
||||
|
||||
////////////////Glow//////////////////
|
||||
/mob/living/simple_animal/construct/proc/add_glow()
|
||||
overlays = 0
|
||||
var/overlay_layer = LIGHTING_LAYER+0.1
|
||||
if(layer != MOB_LAYER)
|
||||
overlay_layer=TURF_LAYER+0.2
|
||||
|
||||
overlays += image(icon,"glow-[icon_state]",overlay_layer)
|
||||
var/image/eye_glow = image(icon,"glow-[icon_state]")
|
||||
eye_glow.plane = PLANE_LIGHTING_ABOVE
|
||||
overlays += eye_glow
|
||||
set_light(2, -2, l_color = "#FFFFFF")
|
||||
|
||||
////////////////HUD//////////////////////
|
||||
|
||||
@@ -1481,6 +1481,9 @@
|
||||
return
|
||||
set_target(new_target)
|
||||
|
||||
/mob/living/simple_animal/is_sentient()
|
||||
return intelligence_level != SA_PLANT && intelligence_level != SA_ROBOTIC
|
||||
|
||||
//Commands, reactions, etc
|
||||
/mob/living/simple_animal/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
..()
|
||||
|
||||
@@ -44,11 +44,12 @@
|
||||
if(istype(L, /mob/living/carbon) && L.getCloneLoss() >= L.getMaxHealth() * 1.5 || istype(L, /mob/living/simple_animal) && L.stat == DEAD)
|
||||
to_chat(src, "This subject does not have an edible life energy...")
|
||||
return FALSE
|
||||
if(L.buckled_mob)
|
||||
if(istype(L.buckled_mob, /mob/living/simple_animal/slime))
|
||||
if(L.buckled_mob != src)
|
||||
to_chat(src, "\The [L.buckled_mob] is already feeding on this subject...")
|
||||
return FALSE
|
||||
if(L.has_buckled_mobs())
|
||||
for(var/A in L.buckled_mobs)
|
||||
if(istype(A, /mob/living/simple_animal/slime))
|
||||
if(A != src)
|
||||
to_chat(src, "\The [A] is already feeding on this subject...")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/slime/proc/start_consuming(var/mob/living/L)
|
||||
|
||||
@@ -469,6 +469,10 @@
|
||||
enrage() // How dare you try to control the red slime.
|
||||
say("Grrr...!")
|
||||
|
||||
/mob/living/simple_animal/slime/red/enrage()
|
||||
..()
|
||||
add_modifier(/datum/modifier/berserk, 30 SECONDS)
|
||||
|
||||
|
||||
/mob/living/simple_animal/slime/green
|
||||
desc = "This slime is radioactive."
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
reload_fullscreen() // Reload any fullscreen overlays this mob has.
|
||||
add_click_catcher()
|
||||
update_client_color()
|
||||
|
||||
if(!plane_holder) //Lazy
|
||||
plane_holder = new(src) //Not a location, it takes it and saves it.
|
||||
|
||||
@@ -1122,4 +1122,12 @@ mob/proc/yank_out_object()
|
||||
if(!check_has_body_select())
|
||||
return
|
||||
var/obj/screen/zone_sel/selector = mob.zone_sel
|
||||
selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones))
|
||||
selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones))
|
||||
|
||||
// This handles setting the client's color variable, which makes everything look a specific color.
|
||||
// This proc is here so it can be called without needing to check if the client exists, or if the client relogs.
|
||||
// This is for inheritence since /mob/living will serve most cases. If you need ghosts to use this you'll have to implement that yourself.
|
||||
/mob/proc/update_client_color()
|
||||
if(client && client.color)
|
||||
animate(client, color = null, time = 10)
|
||||
return
|
||||
@@ -167,6 +167,12 @@
|
||||
src.m_flag = 1
|
||||
if ((A != src.loc && A && A.z == src.z))
|
||||
src.last_move = get_dir(A, src.loc)
|
||||
if(.)
|
||||
Moved(A, direct)
|
||||
return
|
||||
|
||||
// Called on a successful Move().
|
||||
/atom/movable/proc/Moved(atom/oldloc)
|
||||
return
|
||||
|
||||
/client/proc/Move_object(direct)
|
||||
@@ -535,23 +541,23 @@
|
||||
|
||||
/mob/proc/update_gravity()
|
||||
return
|
||||
|
||||
/*
|
||||
// The real Move() proc is above, but touching that massive block just to put this in isn't worth it.
|
||||
/mob/Move(var/newloc, var/direct)
|
||||
. = ..(newloc, direct)
|
||||
if(.)
|
||||
post_move(newloc, direct)
|
||||
|
||||
*/
|
||||
// Called when a mob successfully moves.
|
||||
// Would've been an /atom/movable proc but it caused issues.
|
||||
/mob/proc/post_move(var/newloc, var/direct)
|
||||
/mob/Moved(atom/oldloc)
|
||||
for(var/obj/O in contents)
|
||||
O.on_loc_moved(newloc, direct)
|
||||
O.on_loc_moved(oldloc)
|
||||
|
||||
// Received from post_move(), useful for items that need to know that their loc just moved.
|
||||
/obj/proc/on_loc_moved(var/newloc, var/direct)
|
||||
// Received from Moved(), useful for items that need to know that their loc just moved.
|
||||
/obj/proc/on_loc_moved(atom/oldloc)
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/on_loc_moved(var/newloc, var/direct)
|
||||
/obj/item/weapon/storage/on_loc_moved(atom/oldloc)
|
||||
for(var/obj/O in contents)
|
||||
O.on_loc_moved(newloc, direct)
|
||||
O.on_loc_moved(oldloc)
|
||||
Reference in New Issue
Block a user