Merge branch 'master' into upstream-merge-33621
This commit is contained in:
@@ -185,7 +185,7 @@
|
||||
var/pollid = href_list["pollid"]
|
||||
if(istext(pollid))
|
||||
pollid = text2num(pollid)
|
||||
if(isnum(pollid) && IsInteger(pollid))
|
||||
if(isnum(pollid) && ISINTEGER(pollid))
|
||||
src.poll_player(pollid)
|
||||
return
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
rating = null
|
||||
else
|
||||
rating = text2num(href_list["o[optionid]"])
|
||||
if(!isnum(rating) || !IsInteger(rating))
|
||||
if(!isnum(rating) || !ISINTEGER(rating))
|
||||
return
|
||||
|
||||
if(!vote_on_numval_poll(pollid, optionid, rating))
|
||||
|
||||
@@ -462,7 +462,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
views |= i
|
||||
var/new_view = input("Choose your new view", "Modify view range", 7) as null|anything in views
|
||||
if(new_view)
|
||||
client.change_view(Clamp(new_view, 7, max_view))
|
||||
client.change_view(CLAMP(new_view, 7, max_view))
|
||||
else
|
||||
client.change_view(CONFIG_GET(string/default_view))
|
||||
|
||||
@@ -471,7 +471,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = TRUE
|
||||
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
|
||||
if(input)
|
||||
client.change_view(Clamp(client.view + input, 7, max_view))
|
||||
client.rescale_view(input, 15, (max_view*2)+1)
|
||||
|
||||
/mob/dead/observer/verb/boo()
|
||||
set category = "Ghost"
|
||||
|
||||
48
code/modules/mob/emote.dm
Normal file
48
code/modules/mob/emote.dm
Normal file
@@ -0,0 +1,48 @@
|
||||
//The code execution of the emote datum is located at code/datums/emotes.dm
|
||||
/mob/emote(act, m_type = null, message = null)
|
||||
act = lowertext(act)
|
||||
var/param = message
|
||||
var/custom_param = findchar(act, " ")
|
||||
if(custom_param)
|
||||
param = copytext(act, custom_param + 1, length(act) + 1)
|
||||
act = copytext(act, 1, custom_param)
|
||||
|
||||
var/datum/emote/E
|
||||
E = E.emote_list[act]
|
||||
if(!E)
|
||||
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
|
||||
return
|
||||
E.run_emote(src, param, m_type)
|
||||
|
||||
/datum/emote/flip
|
||||
key = "flip"
|
||||
key_third_person = "flips"
|
||||
restraint_check = TRUE
|
||||
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
|
||||
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
|
||||
|
||||
/datum/emote/flip/run_emote(mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.SpinAnimation(7,1)
|
||||
|
||||
/datum/emote/spin
|
||||
key = "spin"
|
||||
key_third_person = "spins"
|
||||
restraint_check = TRUE
|
||||
mob_type_allowed_typecache = list(/mob/living, /mob/dead/observer)
|
||||
mob_type_ignore_stat_typecache = list(/mob/dead/observer)
|
||||
|
||||
/datum/emote/spin/run_emote(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
user.spin(20, 1)
|
||||
|
||||
if(iscyborg(user) && user.has_buckled_mobs())
|
||||
var/mob/living/silicon/robot/R = user
|
||||
GET_COMPONENT_FROM(riding_datum, /datum/component/riding, R)
|
||||
if(riding_datum)
|
||||
for(var/mob/M in R.buckled_mobs)
|
||||
riding_datum.force_dismount(M)
|
||||
else
|
||||
R.unbuckle_all_mobs()
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/handle_blood()
|
||||
if(bodytemperature >= 225 && !(disabilities & NOCLONE)) //cryosleep or husked people do not pump the blood.
|
||||
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
|
||||
//Blood regeneration if there is some space
|
||||
if(blood_volume < BLOOD_VOLUME_NORMAL)
|
||||
blood_volume += 0.1 // regenerate blood VERY slowly
|
||||
@@ -27,8 +27,7 @@
|
||||
if(NOBLOOD in dna.species.species_traits)
|
||||
bleed_rate = 0
|
||||
return
|
||||
|
||||
if(bodytemperature >= 225 && !(disabilities & NOCLONE)) //cryosleep or husked people do not pump the blood.
|
||||
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
|
||||
|
||||
//Blood regeneration if there is some space
|
||||
if(blood_volume < BLOOD_VOLUME_NORMAL && !(NOHUNGER in dna.species.species_traits))
|
||||
@@ -201,13 +200,13 @@
|
||||
return "blood"
|
||||
|
||||
/mob/living/carbon/monkey/get_blood_id()
|
||||
if(!(disabilities & NOCLONE))
|
||||
if(!(has_disability(DISABILITY_NOCLONE)))
|
||||
return "blood"
|
||||
|
||||
/mob/living/carbon/human/get_blood_id()
|
||||
if(dna.species.exotic_blood)
|
||||
return dna.species.exotic_blood
|
||||
else if((NOBLOOD in dna.species.species_traits) || (disabilities & NOCLONE))
|
||||
else if((NOBLOOD in dna.species.species_traits) || (has_disability(DISABILITY_NOCLONE)))
|
||||
return
|
||||
return "blood"
|
||||
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
if(!brainmob.stored_dna)
|
||||
brainmob.stored_dna = new /datum/dna/stored(brainmob)
|
||||
C.dna.copy_dna(brainmob.stored_dna)
|
||||
if(L.disabilities & NOCLONE)
|
||||
brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body
|
||||
if(L.has_disability(DISABILITY_NOCLONE))
|
||||
brainmob.disabilities[DISABILITY_NOCLONE] = L.disabilities[DISABILITY_NOCLONE]
|
||||
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
|
||||
if(ZI)
|
||||
brainmob.set_species(ZI.old_species) //For if the brain is cloned
|
||||
@@ -154,7 +154,7 @@
|
||||
var/adjusted_amount
|
||||
if(amount >= 0 && maximum)
|
||||
var/brainloss = get_brain_damage()
|
||||
var/new_brainloss = Clamp(brainloss + amount, 0, maximum)
|
||||
var/new_brainloss = CLAMP(brainloss + amount, 0, maximum)
|
||||
if(brainloss > new_brainloss) //brainloss is over the cap already
|
||||
return 0
|
||||
adjusted_amount = new_brainloss - brainloss
|
||||
@@ -195,8 +195,10 @@
|
||||
var/trauma_type
|
||||
if(ispath(trauma))
|
||||
trauma_type = trauma
|
||||
SSblackbox.record_feedback("tally", "traumas", 1, trauma_type)
|
||||
traumas += new trauma_type(arglist(list(src, permanent) + arguments))
|
||||
else
|
||||
SSblackbox.record_feedback("tally", "traumas", 1, trauma.type)
|
||||
traumas += trauma
|
||||
trauma.permanent = permanent
|
||||
|
||||
@@ -209,6 +211,7 @@
|
||||
possible_traumas += BT
|
||||
|
||||
var/trauma_type = pick(possible_traumas)
|
||||
SSblackbox.record_feedback("tally", "traumas", 1, trauma_type)
|
||||
traumas += new trauma_type(src, permanent)
|
||||
|
||||
//Cure a random trauma of a certain subtype
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
||||
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
|
||||
|
||||
/////////////////////////////////// EYE_BLIND ////////////////////////////////////
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Doesn't work on other aliens/AI.*/
|
||||
var/plasma_cost = 0
|
||||
var/check_turf = FALSE
|
||||
has_action = TRUE
|
||||
datum/action/spell_action/alien/action
|
||||
base_action = /datum/action/spell_action/alien
|
||||
action_icon = 'icons/mob/actions/actions_xeno.dmi'
|
||||
action_icon_state = "spell_default"
|
||||
action_background_icon_state = "bg_alien"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
||||
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
|
||||
|
||||
/////////////////////////////////// STUN ////////////////////////////////////
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/mob/living/carbon/alien/AdjustStun(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
move_delay_add = Clamp(move_delay_add + round(amount/2), 0, 10)
|
||||
move_delay_add = CLAMP(move_delay_add + round(amount/2), 0, 10)
|
||||
|
||||
@@ -157,6 +157,8 @@
|
||||
if(!throwable_mob.buckled)
|
||||
thrown_thing = throwable_mob
|
||||
stop_pulling()
|
||||
if(has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(src, "<span class='notice'>You gently let go of [throwable_mob].</span>")
|
||||
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
|
||||
var/turf/end_T = get_turf(target)
|
||||
if(start_T && end_T)
|
||||
@@ -168,6 +170,10 @@
|
||||
thrown_thing = I
|
||||
dropItemToGround(I)
|
||||
|
||||
if(has_disability(DISABILITY_PACIFISM) && I.throwforce)
|
||||
to_chat(src, "<span class='notice'>You set [I] down gently on the ground.</span>")
|
||||
return
|
||||
|
||||
if(thrown_thing)
|
||||
visible_message("<span class='danger'>[src] has thrown [thrown_thing].</span>")
|
||||
add_logs(src, thrown_thing, "has thrown")
|
||||
@@ -403,7 +409,7 @@
|
||||
dropItemToGround(I)
|
||||
|
||||
var/modifier = 0
|
||||
if(disabilities & CLUMSY)
|
||||
if(has_disability(DISABILITY_CLUMSY))
|
||||
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
|
||||
|
||||
switch(rand(1,100)+modifier) //91-100=Nothing special happens
|
||||
@@ -768,7 +774,7 @@
|
||||
reagents.addiction_list = list()
|
||||
cure_all_traumas(TRUE, TRUE)
|
||||
..()
|
||||
// heal ears after healing disabilities, since ears check DEAF disability
|
||||
// heal ears after healing disabilities, since ears check DISABILITY_DEAF disability
|
||||
// when healing.
|
||||
restoreEars()
|
||||
|
||||
|
||||
@@ -306,10 +306,10 @@
|
||||
|
||||
if(eyes.eye_damage > 20)
|
||||
if(prob(eyes.eye_damage - 20))
|
||||
if(become_nearsighted())
|
||||
if(!has_disability(DISABILITY_NEARSIGHT))
|
||||
to_chat(src, "<span class='warning'>Your eyes start to burn badly!</span>")
|
||||
else if(prob(eyes.eye_damage - 25))
|
||||
if(become_blind())
|
||||
if(!has_disability(DISABILITY_BLIND))
|
||||
to_chat(src, "<span class='warning'>You can't see anything!</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
/mob/living/carbon/adjustStaminaLoss(amount, updating_stamina = 1)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
staminaloss = Clamp(staminaloss + amount, 0, maxHealth*2)
|
||||
staminaloss = CLAMP(staminaloss + amount, 0, maxHealth*2)
|
||||
if(updating_stamina)
|
||||
update_stamina()
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
update_stamina()
|
||||
|
||||
/mob/living/carbon/getBrainLoss()
|
||||
. = BRAIN_DAMAGE_DEATH
|
||||
. = 0
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
. = B.get_brain_damage()
|
||||
@@ -207,6 +207,7 @@
|
||||
/mob/living/carbon/adjustBrainLoss(amount, maximum = BRAIN_DAMAGE_DEATH)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
var/prev_brainloss = getBrainLoss()
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
return
|
||||
@@ -224,6 +225,13 @@
|
||||
else
|
||||
gain_trauma_type(BRAIN_TRAUMA_SEVERE)
|
||||
|
||||
if(prev_brainloss < 40 && brainloss >= 40)
|
||||
to_chat(src, "<span class='warning'>You feel lightheaded.</span>")
|
||||
else if(prev_brainloss < 120 && brainloss >= 120)
|
||||
to_chat(src, "<span class='warning'>You feel less in control of your thoughts.</span>")
|
||||
else if(prev_brainloss < 180 && brainloss >= 180)
|
||||
to_chat(src, "<span class='warning'>You can feel your mind flickering on and off...</span>")
|
||||
|
||||
/mob/living/carbon/setBrainLoss(amount)
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
|
||||
@@ -43,33 +43,34 @@
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
var/temp = getBruteLoss()
|
||||
if(temp)
|
||||
if (temp < 25)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
if(!(user == src && src.hal_screwyhud == SCREWYHUD_HEALTHY)) //fake healthy
|
||||
if(temp)
|
||||
if (temp < 25)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
|
||||
temp = getFireLoss()
|
||||
if(temp)
|
||||
if (temp < 25)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
temp = getFireLoss()
|
||||
if(temp)
|
||||
if (temp < 25)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
|
||||
temp = getCloneLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_is] slightly deformed.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_is] <b>moderately</b> deformed!\n"
|
||||
else
|
||||
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
|
||||
temp = getCloneLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_is] slightly deformed.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_is] <b>moderately</b> deformed!\n"
|
||||
else
|
||||
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
|
||||
|
||||
if(disabilities & DUMB)
|
||||
if(has_disability(DISABILITY_DUMB))
|
||||
msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n"
|
||||
|
||||
if(fire_stacks > 0)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/proc/Drain()
|
||||
become_husk()
|
||||
disabilities |= NOCLONE
|
||||
become_husk(CHANGELING_DRAIN)
|
||||
add_disability(DISABILITY_NOCLONE, CHANGELING_DRAIN)
|
||||
blood_volume = 0
|
||||
return 1
|
||||
|
||||
@@ -187,31 +187,32 @@
|
||||
else if(l_limbs_missing >= 2 && r_limbs_missing >= 2)
|
||||
msg += "[t_He] [p_do()]n't seem all there.\n"
|
||||
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else if(temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
if(!(user == src && src.hal_screwyhud == SCREWYHUD_HEALTHY)) //fake healthy
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor bruising.\n"
|
||||
else if(temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> bruising!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe bruising!</B>\n"
|
||||
|
||||
temp = getFireLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
temp = getFireLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor burns.\n"
|
||||
else if (temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> burns!\n"
|
||||
else
|
||||
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
|
||||
|
||||
temp = getCloneLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor cellular damage.\n"
|
||||
else if(temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> cellular damage!\n"
|
||||
else
|
||||
msg += "<b>[t_He] [t_has] severe cellular damage!</b>\n"
|
||||
temp = getCloneLoss()
|
||||
if(temp)
|
||||
if(temp < 25)
|
||||
msg += "[t_He] [t_has] minor cellular damage.\n"
|
||||
else if(temp < 50)
|
||||
msg += "[t_He] [t_has] <b>moderate</b> cellular damage!\n"
|
||||
else
|
||||
msg += "<b>[t_He] [t_has] severe cellular damage!</b>\n"
|
||||
|
||||
|
||||
if(fire_stacks > 0)
|
||||
@@ -272,7 +273,7 @@
|
||||
msg += "[t_He] look[p_s()] like a drunken mess.\n"
|
||||
if(91.01 to INFINITY)
|
||||
msg += "[t_He] [t_is] a shitfaced, slobbering wreck.\n"
|
||||
|
||||
|
||||
for (var/I in src.vore_organs)
|
||||
var/datum/belly/B = vore_organs[I]
|
||||
msg += B.get_examine_msg()
|
||||
@@ -284,7 +285,7 @@
|
||||
if(stat == UNCONSCIOUS)
|
||||
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n"
|
||||
else
|
||||
if(disabilities & DUMB)
|
||||
if(has_disability(DISABILITY_DUMB))
|
||||
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
|
||||
if(InCritical())
|
||||
msg += "[t_He] [t_is] barely conscious.\n"
|
||||
@@ -349,7 +350,7 @@
|
||||
msg += "<a href='?src=[REF(src)];hud=s;add_comment=1'>\[Add comment\]</a>\n"
|
||||
if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
|
||||
msg += "[print_flavor_text()]\n"
|
||||
|
||||
|
||||
msg += "*---------*</span>"
|
||||
|
||||
to_chat(user, msg)
|
||||
|
||||
@@ -89,15 +89,15 @@
|
||||
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!istype(I, /obj/item/clothing))
|
||||
var/final_block_chance = I.block_chance - (Clamp((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
var/final_block_chance = I.block_chance - (CLAMP((armour_penetration-I.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
|
||||
if(I.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
|
||||
return 1
|
||||
if(wear_suit)
|
||||
var/final_block_chance = wear_suit.block_chance - (Clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
var/final_block_chance = wear_suit.block_chance - (CLAMP((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
if(wear_suit.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
|
||||
return 1
|
||||
if(w_uniform)
|
||||
var/final_block_chance = w_uniform.block_chance - (Clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
var/final_block_chance = w_uniform.block_chance - (CLAMP((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
|
||||
if(w_uniform.hit_reaction(src, AM, attack_text, final_block_chance, damage, attack_type))
|
||||
return 1
|
||||
return 0
|
||||
@@ -140,8 +140,8 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling))
|
||||
vore_attack(user, pulling)
|
||||
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(DISABILITY_FAT)) && ismonkey(pulling))
|
||||
devour_mob(pulling)
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
if(disabilities & MONKEYLIKE)
|
||||
if(has_disability(DISABILITY_MONKEYLIKE))
|
||||
return FALSE
|
||||
return TRUE//Humans can use guns and such
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
if(TRAITS & TRAIT_SMART)
|
||||
smartness = 75
|
||||
else if(TRAITS & TRAIT_DUMB)
|
||||
disabilities |= CLUMSY
|
||||
add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
|
||||
smartness = 25
|
||||
|
||||
if(TRAITS & TRAIT_MEAN)
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
if(G.tint)
|
||||
update_tint()
|
||||
if(G.vision_correction)
|
||||
if(disabilities & NEARSIGHT)
|
||||
if(has_disability(DISABILITY_NEARSIGHT))
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
adjust_eye_damage(0)
|
||||
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
|
||||
|
||||
@@ -125,7 +125,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
randname += " [pick(GLOB.last_names)]"
|
||||
|
||||
return randname
|
||||
|
||||
|
||||
//Called when cloning, copies some vars that should be kept
|
||||
/datum/species/proc/copy_properties_from(datum/species/old_species)
|
||||
return
|
||||
@@ -312,7 +312,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(!HD) //Decapitated
|
||||
return
|
||||
|
||||
if(H.disabilities & HUSK)
|
||||
if(H.has_disability(DISABILITY_HUSK))
|
||||
return
|
||||
var/datum/sprite_accessory/S
|
||||
var/list/standing = list()
|
||||
@@ -452,8 +452,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/list/standing = list()
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
|
||||
if(HD && !(H.disabilities & HUSK))
|
||||
if(HD && !(H.has_disability(DISABILITY_HUSK)))
|
||||
// lipstick
|
||||
if(H.lip_style && (LIPS in species_traits))
|
||||
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
|
||||
@@ -724,7 +723,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(S.center)
|
||||
accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y)
|
||||
|
||||
if(!(H.disabilities & HUSK))
|
||||
if(!(H.has_disability(DISABILITY_HUSK)))
|
||||
if(!forced_colour)
|
||||
switch(S.color_src)
|
||||
if(MUTCOLORS)
|
||||
@@ -1101,18 +1100,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
////////
|
||||
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||
|
||||
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(H.disabilities & FAT)//I share your pain, past coder.
|
||||
//The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder.
|
||||
if(H.overeatduration < 100)
|
||||
to_chat(H, "<span class='notice'>You feel fit again!</span>")
|
||||
H.disabilities &= ~FAT
|
||||
H.remove_disability(DISABILITY_FAT, OBESITY)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
else
|
||||
if(H.overeatduration > 500)
|
||||
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
|
||||
H.disabilities |= FAT
|
||||
H.add_disability(DISABILITY_FAT, OBESITY)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
|
||||
@@ -1269,7 +1267,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
. += (health_deficiency / 25)
|
||||
if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares.
|
||||
. += hungry / 50
|
||||
if(H.disabilities & FAT)
|
||||
if(H.has_disability(DISABILITY_FAT))
|
||||
. += (1.5 - flight)
|
||||
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
|
||||
. += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR
|
||||
@@ -1315,11 +1313,14 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
|
||||
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(user.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
|
||||
return FALSE
|
||||
if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s attack!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
if(attacker_style && attacker_style.harm_act(user,target))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
|
||||
var/atk_verb = user.dna.species.attack_verb
|
||||
@@ -1344,7 +1345,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
playsound(target.loc, user.dna.species.miss_sound, 25, 1, -1)
|
||||
target.visible_message("<span class='danger'>[user] has attempted to [atk_verb] [target]!</span>",\
|
||||
"<span class='userdanger'>[user] has attempted to [atk_verb] [target]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
var/armor_block = target.run_armor_check(affecting, "melee")
|
||||
@@ -1366,8 +1367,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else if(target.lying)
|
||||
target.forcesay(GLOB.hit_appends)
|
||||
|
||||
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
var/aim_for_mouth = user.zone_selected == "mouth"
|
||||
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
|
||||
@@ -1390,7 +1389,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
if(target.w_uniform)
|
||||
target.w_uniform.add_fingerprint(user)
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
|
||||
var/randomized_zone = ran_zone(user.zone_selected)
|
||||
target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
|
||||
var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
|
||||
var/randn = rand(1, 100)
|
||||
if(randn <= 25)
|
||||
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
@@ -1511,8 +1512,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.confused = max(H.confused, 20)
|
||||
H.adjustBrainLoss(20)
|
||||
H.adjust_blurriness(10)
|
||||
if(prob(20))
|
||||
if(prob(10))
|
||||
H.gain_trauma(/datum/brain_trauma/mild/concussion)
|
||||
else
|
||||
if(!I.is_sharp())
|
||||
H.adjustBrainLoss(I.force / 5)
|
||||
|
||||
if(prob(I.force + ((100 - H.health)/2)) && H != user)
|
||||
var/datum/antagonist/rev/rev = H.mind.has_antag_datum(/datum/antagonist/rev)
|
||||
|
||||
@@ -90,10 +90,9 @@
|
||||
id = "xeno"
|
||||
say_mod = "hisses"
|
||||
default_color = "00FF00"
|
||||
species_traits = list(MUTCOLORS,LIPS,DIGITIGRADE,PIERCEIMMUNE,SPECIES_ORGANIC)
|
||||
species_traits = list(MUTCOLORS,LIPS,DIGITIGRADE,SPECIES_ORGANIC)
|
||||
mutant_bodyparts = list("xenotail", "xenohead", "xenodorsal", "taur","mam_body_markings")
|
||||
default_features = list("xenotail"="xeno","xenohead"="standard","xenodorsal"="standard","mcolor" = "0F0","mcolor2" = "0F0","mcolor3" = "0F0","taur" = "None","mam_body_markings" = "xeno")
|
||||
heatmod = 1.3
|
||||
attack_verb = "slash"
|
||||
attack_sound = 'sound/weapons/slash.ogg'
|
||||
miss_sound = 'sound/weapons/slashmiss.ogg'
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
var/new_y = P.starting.y + pick(0, 0, 0, 0, 0, -1, 1, -2, 2)
|
||||
var/turf/target = get_turf(P.starting)
|
||||
// redirect the projectile
|
||||
P.preparePixelProjectile(locate(Clamp(target.x + new_x, 1, world.maxx), Clamp(target.y + new_y, 1, world.maxy), H.z), H)
|
||||
P.preparePixelProjectile(locate(CLAMP(target.x + new_x, 1, world.maxx), CLAMP(target.y + new_y, 1, world.maxy), H.z), H)
|
||||
return -1
|
||||
return 0
|
||||
|
||||
@@ -725,7 +725,7 @@
|
||||
/obj/structure/cloth_pile/proc/revive()
|
||||
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
|
||||
return
|
||||
if(cloth_golem.suiciding || cloth_golem.disabilities & NOCLONE)
|
||||
if(cloth_golem.suiciding || cloth_golem.has_disability(DISABILITY_NOCLONE))
|
||||
QDEL_NULL(cloth_golem)
|
||||
return
|
||||
|
||||
|
||||
@@ -19,6 +19,11 @@
|
||||
if(H)
|
||||
H.endTailWag()
|
||||
|
||||
/datum/species/human/spec_stun(mob/living/carbon/human/H,amount)
|
||||
if(H)
|
||||
H.endTailWag()
|
||||
. = ..()
|
||||
|
||||
/datum/species/human/space_move(mob/living/carbon/human/H)
|
||||
var/obj/item/device/flightpack/F = H.get_flightpack()
|
||||
if(istype(F) && (F.flight) && F.allow_thrust(0.01, src))
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
if(H)
|
||||
H.endTailWag()
|
||||
|
||||
/datum/species/lizard/spec_stun(mob/living/carbon/human/H,amount)
|
||||
if(H)
|
||||
H.endTailWag()
|
||||
. = ..()
|
||||
|
||||
/*
|
||||
Lizard subspecies: ASHWALKERS
|
||||
*/
|
||||
|
||||
@@ -94,8 +94,8 @@
|
||||
to_chat(victim, "<span class='danger'>[H] is draining your blood!</span>")
|
||||
to_chat(H, "<span class='notice'>You drain some blood!</span>")
|
||||
playsound(H, 'sound/items/drink.ogg', 30, 1, -2)
|
||||
victim.blood_volume = Clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
H.blood_volume = Clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
victim.blood_volume = CLAMP(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
H.blood_volume = CLAMP(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM)
|
||||
if(!victim.blood_volume)
|
||||
to_chat(H, "<span class='warning'>You finish off [victim]'s blood supply!</span>")
|
||||
|
||||
|
||||
@@ -609,7 +609,7 @@ generate/load female uniform sprites matching all previously decided variables
|
||||
if(BP.dmg_overlay_type)
|
||||
. += "-[BP.dmg_overlay_type]"
|
||||
|
||||
if(disabilities & HUSK)
|
||||
if(has_disability(DISABILITY_HUSK))
|
||||
. += "-husk"
|
||||
|
||||
/mob/living/carbon/human/load_limb_from_cache()
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
//TOXINS/PLASMA
|
||||
if(Toxins_partialpressure > safe_tox_max)
|
||||
var/ratio = (breath_gases[/datum/gas/plasma][MOLES]/safe_tox_max) * 10
|
||||
adjustToxLoss(Clamp(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
|
||||
adjustToxLoss(CLAMP(ratio, MIN_TOXIC_GAS_DAMAGE, MAX_TOXIC_GAS_DAMAGE))
|
||||
throw_alert("too_much_tox", /obj/screen/alert/too_much_tox)
|
||||
else
|
||||
clear_alert("too_much_tox")
|
||||
|
||||
@@ -120,16 +120,19 @@
|
||||
/mob/living/carbon/monkey/proc/should_target(var/mob/living/L)
|
||||
|
||||
if(L == src)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(has_disability(DISABILITY_PACIFISM))
|
||||
return FALSE
|
||||
|
||||
if(enemies[L])
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// target non-monkey mobs when aggressive, with a small probability of monkey v monkey
|
||||
if(aggressive && (!istype(L, /mob/living/carbon/monkey/) || prob(MONKEY_AGGRESSIVE_MVM_PROB)))
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/monkey/proc/handle_combat()
|
||||
// Don't do any AI if inside another mob (devoured)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(!HD) //Decapitated
|
||||
return
|
||||
|
||||
if(disabilities & HUSK)
|
||||
if(has_disability(DISABILITY_HUSK))
|
||||
return
|
||||
|
||||
var/hair_hidden = 0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
|
||||
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, DISABILITY_NEARSIGHT disability, and DISABILITY_HUSK disability.
|
||||
|
||||
/mob/living/carbon/damage_eyes(amount)
|
||||
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
|
||||
@@ -59,48 +59,13 @@
|
||||
clear_alert("high")
|
||||
|
||||
/mob/living/carbon/adjust_disgust(amount)
|
||||
disgust = Clamp(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
disgust = CLAMP(disgust+amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
|
||||
/mob/living/carbon/set_disgust(amount)
|
||||
disgust = Clamp(amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
disgust = CLAMP(amount, 0, DISGUST_LEVEL_MAXEDOUT)
|
||||
|
||||
/mob/living/carbon/cure_blind()
|
||||
if(disabilities & BLIND)
|
||||
disabilities &= ~BLIND
|
||||
adjust_blindness(-1)
|
||||
return 1
|
||||
/mob/living/carbon/become_blind()
|
||||
if(!(disabilities & BLIND))
|
||||
disabilities |= BLIND
|
||||
blind_eyes(1)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/cure_nearsighted()
|
||||
if(disabilities & NEARSIGHT)
|
||||
disabilities &= ~NEARSIGHT
|
||||
clear_fullscreen("nearsighted")
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/become_nearsighted()
|
||||
if(!(disabilities & NEARSIGHT))
|
||||
disabilities |= NEARSIGHT
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/cure_husk()
|
||||
if(disabilities & HUSK)
|
||||
disabilities &= ~HUSK
|
||||
status_flags &= ~DISFIGURED
|
||||
update_body()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/become_husk()
|
||||
if(disabilities & HUSK)
|
||||
return
|
||||
disabilities |= HUSK
|
||||
status_flags |= DISFIGURED //makes them unknown
|
||||
update_body()
|
||||
return 1
|
||||
////////////////////////////////////////TRAUMAS/////////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/proc/get_traumas()
|
||||
. = list()
|
||||
|
||||
@@ -290,7 +290,7 @@
|
||||
else
|
||||
. += "-robotic"
|
||||
|
||||
if(disabilities & HUSK)
|
||||
if(has_disability(DISABILITY_HUSK))
|
||||
. += "-husk"
|
||||
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
/mob/living/proc/adjustBruteLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = Clamp((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
bruteloss = CLAMP((bruteloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -168,7 +168,7 @@
|
||||
/mob/living/proc/adjustOxyLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
oxyloss = Clamp((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
oxyloss = CLAMP((oxyloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -187,7 +187,7 @@
|
||||
/mob/living/proc/adjustToxLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
toxloss = Clamp((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
toxloss = CLAMP((toxloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -206,7 +206,7 @@
|
||||
/mob/living/proc/adjustFireLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
fireloss = Clamp((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
fireloss = CLAMP((fireloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
@@ -217,7 +217,7 @@
|
||||
/mob/living/proc/adjustCloneLoss(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
cloneloss = Clamp((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
cloneloss = CLAMP((cloneloss + (amount * CONFIG_GET(number/damage_multiplier))), 0, maxHealth * 2)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
84
code/modules/mob/living/inhand_holder.dm
Normal file
84
code/modules/mob/living/inhand_holder.dm
Normal file
@@ -0,0 +1,84 @@
|
||||
//Generic system for picking up mobs.
|
||||
//Currently works for head and hands.
|
||||
/obj/item/clothing/head/mob_holder
|
||||
name = "bugged mob"
|
||||
desc = "Yell at coderbrush."
|
||||
icon = null
|
||||
icon_state = ""
|
||||
flags_1 = DROPDEL_1
|
||||
var/mob/living/held_mob
|
||||
var/can_head = TRUE
|
||||
var/destroying = FALSE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Initialize(mapload, mob/living/M, _worn_state, head_icon, lh_icon, rh_icon, _can_head = TRUE)
|
||||
. = ..()
|
||||
can_head = _can_head
|
||||
if(head_icon)
|
||||
alternate_worn_icon = head_icon
|
||||
if(_worn_state)
|
||||
item_state = _worn_state
|
||||
if(lh_icon)
|
||||
lefthand_file = lh_icon
|
||||
if(rh_icon)
|
||||
righthand_file = rh_icon
|
||||
if(!can_head)
|
||||
slot_flags = NONE
|
||||
deposit(M)
|
||||
|
||||
/obj/item/clothing/head/mob_holder/Destroy()
|
||||
destroying = TRUE
|
||||
if(held_mob)
|
||||
release(FALSE)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/proc/deposit(mob/living/L)
|
||||
if(!istype(L))
|
||||
return FALSE
|
||||
L.setDir(SOUTH)
|
||||
update_visuals(L)
|
||||
held_mob = L
|
||||
L.forceMove(src)
|
||||
name = L.name
|
||||
desc = L.desc
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/proc/update_visuals(mob/living/L)
|
||||
appearance = L.appearance
|
||||
|
||||
/obj/item/clothing/head/mob_holder/proc/release(del_on_release = TRUE)
|
||||
if(!held_mob)
|
||||
if(del_on_release && !destroying)
|
||||
qdel(src)
|
||||
return FALSE
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
to_chat(L, "<span class='warning'>[held_mob] wriggles free!</span>")
|
||||
L.dropItemToGround(src)
|
||||
held_mob.forceMove(get_turf(src))
|
||||
held_mob.reset_perspective()
|
||||
held_mob.setDir(SOUTH)
|
||||
held_mob.visible_message("<span class='warning'>[held_mob] uncurls!</span>")
|
||||
held_mob = null
|
||||
if(del_on_release && !destroying)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/head/mob_holder/relaymove()
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/container_resist()
|
||||
release()
|
||||
|
||||
/obj/item/clothing/head/mob_holder/drone/deposit(mob/living/L)
|
||||
. = ..()
|
||||
if(!isdrone(L))
|
||||
qdel(src)
|
||||
name = "drone (hiding)"
|
||||
desc = "This drone is scared and has curled up into a ball!"
|
||||
|
||||
/obj/item/clothing/head/mob_holder/drone/update_visuals(mob/living/L)
|
||||
var/mob/living/simple_animal/drone/D = L
|
||||
if(!D)
|
||||
return ..()
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "[D.visualAppearence]_hat"
|
||||
@@ -54,7 +54,7 @@
|
||||
handle_environment(environment)
|
||||
|
||||
handle_fire()
|
||||
|
||||
|
||||
// Vore code for belly processes
|
||||
handle_internal_contents()
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
/mob/living/proc/handle_disabilities()
|
||||
//Eyes
|
||||
if(eye_blind) //blindness, heals slowly over time
|
||||
if(!stat && !(disabilities & BLIND))
|
||||
if(!stat && !(has_disability(DISABILITY_BLIND)))
|
||||
eye_blind = max(eye_blind-1,0)
|
||||
if(client && !eye_blind)
|
||||
clear_alert("blind")
|
||||
@@ -137,6 +137,9 @@
|
||||
eye_blurry = max(eye_blurry-1, 0)
|
||||
if(client && !eye_blurry)
|
||||
clear_fullscreen("blurry")
|
||||
if(has_disability(DISABILITY_PACIFISM) && a_intent == INTENT_HARM)
|
||||
to_chat(src, "<span class='notice'>You don't feel like harming anybody.</span>")
|
||||
a_intent_change(INTENT_HELP)
|
||||
|
||||
/mob/living/proc/update_damage_hud()
|
||||
return
|
||||
|
||||
@@ -343,8 +343,15 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
// Living mobs use can_inject() to make sure that the mob is not syringe-proof in general.
|
||||
/mob/living/proc/can_inject()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/is_injectable(allowmobs = TRUE)
|
||||
return (allowmobs && reagents && can_inject())
|
||||
|
||||
/mob/living/is_drawable(allowmobs = TRUE)
|
||||
return (allowmobs && reagents && can_inject())
|
||||
|
||||
/mob/living/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
@@ -809,9 +816,12 @@
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
/mob/living/proc/can_use_guns(obj/item/G)
|
||||
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
|
||||
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return FALSE
|
||||
if(has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(src, "<span class='notice'>You don't want to risk harming anyone!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/update_stamina()
|
||||
@@ -918,7 +928,7 @@
|
||||
update_fire()
|
||||
|
||||
/mob/living/proc/adjust_fire_stacks(add_fire_stacks) //Adjusting the amount of fire_stacks we have on person
|
||||
fire_stacks = Clamp(fire_stacks + add_fire_stacks, -20, 20)
|
||||
fire_stacks = CLAMP(fire_stacks + add_fire_stacks, -20, 20)
|
||||
if(on_fire && fire_stacks <= 0)
|
||||
ExtinguishMob()
|
||||
|
||||
@@ -1054,4 +1064,32 @@
|
||||
|
||||
/mob/living/onTransitZ(old_z,new_z)
|
||||
..()
|
||||
update_z(new_z)
|
||||
update_z(new_z)
|
||||
|
||||
/mob/living/MouseDrop(mob/over)
|
||||
. = ..()
|
||||
var/mob/living/user = usr
|
||||
if(!istype(over) || !istype(user))
|
||||
return
|
||||
if(!over.Adjacent(src) || (user != src) || !canUseTopic(over))
|
||||
return
|
||||
if(can_be_held)
|
||||
mob_try_pickup(over)
|
||||
|
||||
/mob/living/proc/mob_pickup(mob/living/L)
|
||||
return
|
||||
|
||||
/mob/living/proc/mob_try_pickup(mob/living/user)
|
||||
if(!ishuman(user))
|
||||
return
|
||||
if(user.get_active_held_item())
|
||||
to_chat(user, "<span class='warning'>Your hands are full!</span>")
|
||||
return FALSE
|
||||
if(buckled)
|
||||
to_chat(user, "<span class='warning'>[src] is buckled to something!</span>")
|
||||
return FALSE
|
||||
user.visible_message("<span class='notice'>[user] starts trying to scoop up [src]!</span>")
|
||||
if(!do_after(user, 20, target = src))
|
||||
return FALSE
|
||||
mob_pickup(user)
|
||||
return TRUE
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
|
||||
/obj/item/proc/get_volume_by_throwforce_and_or_w_class()
|
||||
if(throwforce && w_class)
|
||||
return Clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
return CLAMP((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100
|
||||
else if(w_class)
|
||||
return Clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
return CLAMP(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -127,14 +127,19 @@
|
||||
|
||||
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
|
||||
if(user == src || anchored || !isturf(user.loc))
|
||||
return 0
|
||||
return FALSE
|
||||
if(!user.pulling || user.pulling != src)
|
||||
user.start_pulling(src, supress_message)
|
||||
return
|
||||
|
||||
if(!(status_flags & CANPUSH))
|
||||
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(user.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
|
||||
return FALSE
|
||||
|
||||
grippedby(user)
|
||||
|
||||
//proc to upgrade a simple pull into a more aggressive grab.
|
||||
@@ -188,83 +193,101 @@
|
||||
M.Feedstop()
|
||||
return // can't attack while eating!
|
||||
|
||||
if(has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if (stat != DEAD)
|
||||
add_logs(M, src, "attacked")
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
|
||||
"<span class='userdanger'>The [M.name] glomps [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/attack_animal(mob/living/simple_animal/M)
|
||||
M.face_atom(src)
|
||||
if(M.melee_damage_upper == 0)
|
||||
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
if(M.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.attack_sound)
|
||||
playsound(loc, M.attack_sound, 50, 1, 1)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
|
||||
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
add_logs(M, src, "attacked")
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if (M.a_intent == INTENT_HARM)
|
||||
if(M.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
|
||||
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
to_chat(M, "<span class='warning'>You can't bite with your mouth covered!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
if (prob(75))
|
||||
add_logs(M, src, "attacked")
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[M.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
switch(L.a_intent)
|
||||
if("help")
|
||||
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
else
|
||||
if(L.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(L, "<span class='notice'>You don't want to hurt anyone!</span>")
|
||||
return
|
||||
|
||||
L.do_attack_animation(src)
|
||||
if(prob(90))
|
||||
add_logs(L, src, "attacked")
|
||||
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
visible_message("<span class='danger'>[L.name] has attempted to bite [src]!</span>", \
|
||||
"<span class='userdanger'>[L.name] has attempted to bite [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
switch(M.a_intent)
|
||||
if ("help")
|
||||
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
|
||||
return 0
|
||||
|
||||
return FALSE
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
return 0
|
||||
return FALSE
|
||||
if("harm")
|
||||
if(M.has_disability(DISABILITY_PACIFISM))
|
||||
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
|
||||
return FALSE
|
||||
M.do_attack_animation(src)
|
||||
return 1
|
||||
return TRUE
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
@@ -347,7 +370,7 @@
|
||||
|
||||
//called when the mob receives a bright flash
|
||||
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
|
||||
if(get_eye_protection() < intensity && (override_blindness_check || !(disabilities & BLIND)))
|
||||
if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(DISABILITY_BLIND))))
|
||||
overlay_fullscreen("flash", type)
|
||||
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
|
||||
return 1
|
||||
|
||||
@@ -79,4 +79,5 @@
|
||||
|
||||
var/list/obj/effect/proc_holder/abilities = list()
|
||||
|
||||
var/registered_z
|
||||
var/registered_z
|
||||
var/can_be_held = FALSE //whether this can be picked up and held.
|
||||
|
||||
@@ -20,11 +20,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
"t" = "Syndicate",
|
||||
"y" = "CentCom",
|
||||
|
||||
// Species
|
||||
"b" = "binary",
|
||||
"g" = "changeling",
|
||||
"a" = "alientalk",
|
||||
|
||||
// Admin
|
||||
"p" = "admin",
|
||||
"d" = "deadmin",
|
||||
@@ -55,11 +50,6 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
"å" = "Syndicate",
|
||||
"í" = "CentCom",
|
||||
|
||||
// Species
|
||||
"è" = "binary",
|
||||
"ï" = "changeling",
|
||||
"ô" = "alientalk",
|
||||
|
||||
// Admin
|
||||
"ç" = "admin",
|
||||
"â" = "deadmin",
|
||||
@@ -72,7 +62,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
/mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE)
|
||||
var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE)
|
||||
var/key = get_key(message)
|
||||
var/talk_key = get_key(message)
|
||||
|
||||
var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE)
|
||||
|
||||
@@ -81,13 +71,14 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
if(!message || message == "")
|
||||
return
|
||||
|
||||
var/datum/saymode/saymode = SSradio.saymodes[talk_key]
|
||||
var/message_mode = get_message_mode(message)
|
||||
var/original_message = message
|
||||
var/in_critical = InCritical()
|
||||
|
||||
if(one_character_prefix[message_mode])
|
||||
message = copytext(message, 2)
|
||||
else if(message_mode)
|
||||
else if(message_mode || saymode)
|
||||
message = copytext(message, 3)
|
||||
if(findtext(message, " ", 1, 2))
|
||||
message = copytext(message, 2)
|
||||
@@ -135,11 +126,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
// AIs use inherent channels for the holopad. Most inherent channels
|
||||
// ignore the language argument however.
|
||||
|
||||
var/datum/saymode/SM = SSradio.saymodes[key]
|
||||
if(key && SM)
|
||||
if(!SM.handle_message(src, message, language) && !message_mode)
|
||||
return
|
||||
|
||||
if(saymode && !saymode.handle_message(src, message, language))
|
||||
return
|
||||
|
||||
if(!can_speak_vocal(message))
|
||||
to_chat(src, "<span class='warning'>You find yourself unable to speak!</span>")
|
||||
@@ -285,7 +273,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return 1
|
||||
|
||||
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
|
||||
if(disabilities & MUTE)
|
||||
if(has_disability(DISABILITY_MUTE))
|
||||
return 0
|
||||
|
||||
if(is_muzzled())
|
||||
@@ -343,6 +331,15 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
return message
|
||||
|
||||
/mob/living/proc/radio(message, message_mode, list/spans, language)
|
||||
var/obj/item/implant/radio/imp = locate() in src
|
||||
if(imp && imp.radio.on)
|
||||
if(message_mode == MODE_HEADSET)
|
||||
imp.radio.talk_into(src, message, , spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(message_mode == MODE_DEPARTMENT || message_mode in GLOB.radiochannels)
|
||||
imp.radio.talk_into(src, message, message_mode, spans, language)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
switch(message_mode)
|
||||
if(MODE_WHISPER)
|
||||
return ITALICS
|
||||
@@ -364,6 +361,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
|
||||
if(MODE_BINARY)
|
||||
return ITALICS | REDUCE_RANGE //Does not return 0 since this is only reached by humans, not borgs or AIs.
|
||||
|
||||
return 0
|
||||
|
||||
/mob/living/say_mod(input, message_mode)
|
||||
|
||||
@@ -430,20 +430,17 @@
|
||||
|
||||
|
||||
/mob/living/silicon/ai/proc/switchCamera(obj/machinery/camera/C)
|
||||
if(QDELETED(C))
|
||||
return FALSE
|
||||
|
||||
if(!tracking)
|
||||
cameraFollow = null
|
||||
|
||||
if (!C)
|
||||
return FALSE
|
||||
|
||||
if(!src.eyeobj)
|
||||
if(QDELETED(eyeobj))
|
||||
view_core()
|
||||
return
|
||||
// ok, we're alive, camera is good and in our network...
|
||||
eyeobj.setLoc(get_turf(C))
|
||||
//machine = src
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/ai/proc/botcall()
|
||||
|
||||
@@ -80,8 +80,7 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new)
|
||||
// Removes a camera from a chunk.
|
||||
|
||||
/datum/cameranet/proc/removeCamera(obj/machinery/camera/c)
|
||||
if(c.can_use())
|
||||
majorChunkChange(c, 0)
|
||||
majorChunkChange(c, 0)
|
||||
|
||||
// Add a camera to a chunk.
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
health = 500
|
||||
maxHealth = 500
|
||||
layer = BELOW_MOB_LAYER
|
||||
can_be_held = TRUE
|
||||
|
||||
var/network = "SS13"
|
||||
var/obj/machinery/camera/current = null
|
||||
@@ -57,7 +58,10 @@
|
||||
var/canholo = TRUE
|
||||
var/obj/item/card/id/access_card = null
|
||||
var/chassis = "repairbot"
|
||||
var/list/possible_chassis = list("cat", "mouse", "monkey", "corgi", "fox", "repairbot", "rabbit")
|
||||
var/list/possible_chassis = list("cat" = TRUE, "mouse" = TRUE, "monkey" = TRUE, "corgi" = FALSE, "fox" = FALSE, "repairbot" = TRUE, "rabbit" = TRUE) //assoc value is whether it can be picked up.
|
||||
var/static/item_head_icon = 'icons/mob/pai_item_head.dmi'
|
||||
var/static/item_lh_icon = 'icons/mob/pai_item_lh.dmi'
|
||||
var/static/item_rh_icon = 'icons/mob/pai_item_rh.dmi'
|
||||
|
||||
var/emitterhealth = 20
|
||||
var/emittermaxhealth = 20
|
||||
@@ -138,7 +142,7 @@
|
||||
/mob/living/silicon/pai/proc/process_hack()
|
||||
|
||||
if(cable && cable.machine && istype(cable.machine, /obj/machinery/door) && cable.machine == hackdoor && get_dist(src, hackdoor) <= 1)
|
||||
hackprogress = Clamp(hackprogress + 4, 0, 100)
|
||||
hackprogress = CLAMP(hackprogress + 4, 0, 100)
|
||||
else
|
||||
temp = "Door Jack: Connection to airlock has been lost. Hack aborted."
|
||||
hackprogress = 0
|
||||
@@ -283,8 +287,8 @@
|
||||
|
||||
|
||||
/mob/living/silicon/pai/process()
|
||||
emitterhealth = Clamp((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
hit_slowdown = Clamp((hit_slowdown - 1), 0, 100)
|
||||
emitterhealth = CLAMP((emitterhealth + emitterregen), -50, emittermaxhealth)
|
||||
hit_slowdown = CLAMP((hit_slowdown - 1), 0, 100)
|
||||
|
||||
/mob/living/silicon/pai/generateStaticOverlay()
|
||||
return
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
return FALSE //No we're not flammable
|
||||
|
||||
/mob/living/silicon/pai/proc/take_holo_damage(amount)
|
||||
emitterhealth = Clamp((emitterhealth - amount), -50, emittermaxhealth)
|
||||
emitterhealth = CLAMP((emitterhealth - amount), -50, emittermaxhealth)
|
||||
if(emitterhealth < 0)
|
||||
fold_in(force = TRUE)
|
||||
to_chat(src, "<span class='userdanger'>The impact degrades your holochassis!</span>")
|
||||
|
||||
@@ -68,9 +68,12 @@
|
||||
lay_down()
|
||||
|
||||
/mob/living/silicon/pai/proc/choose_chassis()
|
||||
if(!isturf(loc) && loc != card)
|
||||
to_chat(src, "<span class='boldwarning'>You can not change your holochassis composite while not on the ground or in your card!</span>")
|
||||
return FALSE
|
||||
var/choice = input(src, "What would you like to use for your holochassis composite?") as null|anything in possible_chassis
|
||||
if(!choice)
|
||||
return 0
|
||||
return FALSE
|
||||
chassis = choice
|
||||
icon_state = "[chassis]"
|
||||
if(resting)
|
||||
@@ -103,3 +106,16 @@
|
||||
/mob/living/silicon/pai/movement_delay()
|
||||
. = ..()
|
||||
. += 1 //A bit slower than humans, so they're easier to smash
|
||||
|
||||
/mob/living/silicon/pai/mob_pickup(mob/living/L)
|
||||
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, chassis, item_head_icon, item_lh_icon, item_rh_icon)
|
||||
if(!L.put_in_hands(holder))
|
||||
qdel(holder)
|
||||
else
|
||||
L.visible_message("<span class='warning'>[L] scoops up [src]!</span>")
|
||||
|
||||
/mob/living/silicon/pai/mob_try_pickup(mob/living/user)
|
||||
if(!possible_chassis[chassis])
|
||||
to_chat(user, "<span class='wraning'>[src]'s current form isn't able to be carried!</span>")
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(cell && cell.charge)
|
||||
if(cell.charge <= 100)
|
||||
uneq_all()
|
||||
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
var/amt = CLAMP((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
|
||||
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
|
||||
else
|
||||
uneq_all()
|
||||
@@ -50,6 +50,7 @@
|
||||
if(!mind.special_role)
|
||||
mind.special_role = "traitor"
|
||||
SSticker.mode.traitors += mind
|
||||
mind.add_antag_datum(/datum/antagonist/auto_custom) // ????
|
||||
|
||||
|
||||
/mob/living/silicon/robot/update_health_hud()
|
||||
|
||||
@@ -205,15 +205,14 @@
|
||||
"Medical" = /obj/item/robot_module/medical, \
|
||||
"Miner" = /obj/item/robot_module/miner, \
|
||||
"Janitor" = /obj/item/robot_module/janitor, \
|
||||
"Service" = /obj/item/robot_module/butler, \
|
||||
"MediHound" = /obj/item/robot_module/medihound, \
|
||||
"Security K9" = /obj/item/robot_module/k9, \
|
||||
"Scrub Puppy" = /obj/item/robot_module/scrubpup)
|
||||
"Service" = /obj/item/robot_module/butler)
|
||||
if(!CONFIG_GET(flag/disable_peaceborg))
|
||||
modulelist["Peacekeeper"] = /obj/item/robot_module/peacekeeper
|
||||
if(!CONFIG_GET(flag/disable_secborg))
|
||||
modulelist["Security"] = /obj/item/robot_module/security
|
||||
|
||||
modulelist += get_cit_modules() //Citadel change - adds Citadel's borg modules.
|
||||
|
||||
var/input_module = input("Please, select a module!", "Robot", null, null) as null|anything in modulelist
|
||||
if(!input_module || module.type != /obj/item/robot_module)
|
||||
return
|
||||
@@ -593,39 +592,25 @@
|
||||
/mob/living/silicon/robot/update_icons()
|
||||
cut_overlays()
|
||||
icon_state = module.cyborg_base_icon
|
||||
if(module.cyborg_base_icon == "medihound")
|
||||
icon = 'icons/mob/widerobot.dmi'
|
||||
pixel_x = -16
|
||||
if(sleeper_g == 1)
|
||||
add_overlay("msleeper_g")
|
||||
if(sleeper_r == 1)
|
||||
add_overlay("msleeper_r")
|
||||
if(stat == DEAD)
|
||||
icon_state = "medihound-wreck"
|
||||
|
||||
if(module.cyborg_base_icon == "k9")
|
||||
icon = 'icons/mob/widerobot.dmi'
|
||||
pixel_x = -16
|
||||
if(laser == 1)
|
||||
add_overlay("laser")
|
||||
if(disabler == 1)
|
||||
add_overlay("disabler")
|
||||
if(sleeper_g == 1)
|
||||
add_overlay("ksleeper_g")
|
||||
if(sleeper_r == 1)
|
||||
add_overlay("ksleeper_r")
|
||||
if(stat == DEAD)
|
||||
icon_state = "k9-wreck"
|
||||
//Citadel changes start here - Allows modules to use different icon files, and allows modules to specify a pixel offset
|
||||
icon = (module.cyborg_icon_override ? module.cyborg_icon_override : initial(icon))
|
||||
|
||||
if(module.cyborg_base_icon == "scrubpup")
|
||||
icon = 'icons/mob/widerobot.dmi'
|
||||
pixel_x = -16
|
||||
if(sleeper_g == 1)
|
||||
add_overlay("jsleeper_g")
|
||||
if(sleeper_r == 1)
|
||||
add_overlay("jsleeper_r")
|
||||
if(stat == DEAD)
|
||||
icon_state = "scrubpup-wreck"
|
||||
if(laser)
|
||||
add_overlay("laser")//Is this even used???
|
||||
if(disabler)
|
||||
add_overlay("disabler")//ditto
|
||||
|
||||
if(sleeper_g && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_g")
|
||||
if(sleeper_r && module.sleeper_overlay)
|
||||
add_overlay("[module.sleeper_overlay]_r")
|
||||
if(stat == DEAD && module.has_snowflake_deadsprite)
|
||||
icon_state = "[module.cyborg_base_icon]-wreck"
|
||||
|
||||
if(module.cyborg_pixel_offset)
|
||||
pixel_x = module.cyborg_pixel_offset
|
||||
//End of citadel changes
|
||||
|
||||
if(module.cyborg_base_icon == "robot")
|
||||
icon = 'icons/mob/robots.dmi'
|
||||
@@ -1023,6 +1008,7 @@
|
||||
designation = module.name
|
||||
if(hands)
|
||||
hands.icon_state = module.moduleselect_icon
|
||||
hands.icon = (module.moduleselect_alternate_icon ? module.moduleselect_alternate_icon : initial(hands.icon)) //CITADEL CHANGE - allows module select icons to use a different icon file
|
||||
if(module.can_be_pushed)
|
||||
status_flags |= CANPUSH
|
||||
else
|
||||
|
||||
@@ -336,31 +336,6 @@
|
||||
can_be_pushed = FALSE
|
||||
hat_offset = 3
|
||||
|
||||
/obj/item/robot_module/k9
|
||||
name = "Security K-9 Unit module"
|
||||
basic_modules = list(
|
||||
/obj/item/restraints/handcuffs/cable/zipties/cyborg/dog,
|
||||
/obj/item/dogborg/jaws/big,
|
||||
/obj/item/dogborg/pounce,
|
||||
/obj/item/clothing/mask/gas/sechailer/cyborg,
|
||||
/obj/item/soap/tongue,
|
||||
/obj/item/device/analyzer/nose,
|
||||
/obj/item/device/dogborg/sleeper/K9,
|
||||
/obj/item/gun/energy/disabler/cyborg,
|
||||
/obj/item/pinpointer/crew)
|
||||
emag_modules = list(/obj/item/gun/energy/laser/cyborg)
|
||||
ratvar_modules = list(/obj/item/clockwork/slab/cyborg/security,
|
||||
/obj/item/clockwork/weapon/ratvarian_spear)
|
||||
cyborg_base_icon = "k9"
|
||||
moduleselect_icon = "k9"
|
||||
can_be_pushed = FALSE
|
||||
hat_offset = INFINITY
|
||||
|
||||
/obj/item/robot_module/k9/do_transform_animation()
|
||||
..()
|
||||
to_chat(loc,"<span class='userdanger'>While you have picked the security-k9 module, you still have to follow your laws, NOT Space Law. \
|
||||
For Asimov, this means you must follow criminals' orders unless there is a law 1 reason not to.</span>")
|
||||
|
||||
/obj/item/robot_module/security/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
|
||||
..()
|
||||
var/obj/item/gun/energy/e_gun/advtaser/cyborg/T = locate(/obj/item/gun/energy/e_gun/advtaser/cyborg) in basic_modules
|
||||
@@ -372,59 +347,6 @@
|
||||
else
|
||||
T.charge_tick = 0
|
||||
|
||||
/obj/item/robot_module/medihound
|
||||
name = "MediHound module"
|
||||
basic_modules = list(
|
||||
/obj/item/dogborg/jaws/small,
|
||||
/obj/item/device/analyzer/nose,
|
||||
/obj/item/soap/tongue,
|
||||
/obj/item/device/healthanalyzer,
|
||||
/obj/item/device/dogborg/sleeper/medihound,
|
||||
/obj/item/twohanded/shockpaddles/hound,
|
||||
/obj/item/stack/medical/gauze/cyborg,
|
||||
/obj/item/device/sensor_device)
|
||||
emag_modules = list(/obj/item/dogborg/pounce)
|
||||
ratvar_modules = list(/obj/item/clockwork/slab/cyborg/medical,
|
||||
/obj/item/clockwork/weapon/ratvarian_spear)
|
||||
cyborg_base_icon = "medihound"
|
||||
moduleselect_icon = "medihound"
|
||||
can_be_pushed = FALSE
|
||||
hat_offset = INFINITY
|
||||
|
||||
/obj/item/robot_module/medihound/do_transform_animation()
|
||||
..()
|
||||
to_chat(loc, "<span class='userdanger'>Under ASIMOV, you are an enforcer of the PEACE and preventer of HUMAN HARM. \
|
||||
You are not a security module and you are expected to follow orders and prevent harm above all else. Space law means nothing to you.</span>")
|
||||
|
||||
/obj/item/robot_module/scrubpup
|
||||
name = "Janitor"
|
||||
basic_modules = list(
|
||||
/obj/item/dogborg/jaws/small,
|
||||
/obj/item/device/analyzer/nose,
|
||||
/obj/item/soap/tongue/scrubpup,
|
||||
/obj/item/device/lightreplacer/cyborg,
|
||||
/obj/item/device/dogborg/sleeper/compactor)
|
||||
emag_modules = list(/obj/item/dogborg/pounce)
|
||||
ratvar_modules = list(
|
||||
/obj/item/clockwork/slab/cyborg/janitor,
|
||||
/obj/item/clockwork/replica_fabricator/cyborg)
|
||||
cyborg_base_icon = "scrubpup"
|
||||
moduleselect_icon = "scrubpup"
|
||||
hat_offset = INFINITY
|
||||
clean_on_move = TRUE
|
||||
|
||||
/obj/item/robot_module/scrubpup/respawn_consumable(mob/living/silicon/robot/R, coeff = 1)
|
||||
..()
|
||||
var/obj/item/device/lightreplacer/LR = locate(/obj/item/device/lightreplacer) in basic_modules
|
||||
if(LR)
|
||||
for(var/i in 1 to coeff)
|
||||
LR.Charge(R)
|
||||
|
||||
/obj/item/robot_module/scrubpup/do_transform_animation()
|
||||
..()
|
||||
to_chat(loc,"<span class='userdanger'>As tempting as it might be, do not begin binging on important items. Eat your garbage responsibly. People are not included under Garbage.</span>")
|
||||
|
||||
|
||||
/obj/item/robot_module/security/do_transform_animation()
|
||||
..()
|
||||
to_chat(loc, "<span class='userdanger'>While you have picked the security module, you still have to follow your laws, NOT Space Law. \
|
||||
|
||||
@@ -321,9 +321,9 @@
|
||||
sleep(50)
|
||||
if(mode == BOT_REPAIRING && src.loc == target_turf)
|
||||
if(autotile) //Build the floor and include a tile.
|
||||
target_turf.ChangeTurf(/turf/open/floor/plasteel)
|
||||
target_turf.PlaceOnTop(/turf/open/floor/plasteel)
|
||||
else //Build a hull plating without a floor tile.
|
||||
target_turf.ChangeTurf(/turf/open/floor/plating)
|
||||
target_turf.PlaceOnTop(/turf/open/floor/plating)
|
||||
|
||||
else
|
||||
var/turf/open/floor/F = target_turf
|
||||
|
||||
@@ -360,8 +360,14 @@
|
||||
..()
|
||||
|
||||
/datum/action/innate/seek_master/Activate()
|
||||
if(!SSticker.mode.eldergod)
|
||||
the_construct.master = GLOB.blood_target
|
||||
var/datum/antagonist/cult/C = owner.mind.has_antag_datum(/datum/antagonist/cult)
|
||||
if(!C)
|
||||
return
|
||||
var/datum/objective/eldergod/summon_objective = locate() in C.cult_team.objectives
|
||||
|
||||
if(summon_objective.check_completion())
|
||||
the_construct.master = C.cult_team.blood_target
|
||||
|
||||
if(!the_construct.master)
|
||||
to_chat(the_construct, "<span class='cultitalic'>You have no master to seek!</span>")
|
||||
the_construct.seeking = FALSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/mob/living/simple_animal/proc/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
if(!forced && (status_flags & GODMODE))
|
||||
return FALSE
|
||||
bruteloss = Clamp(bruteloss + amount, 0, maxHealth)
|
||||
bruteloss = CLAMP(bruteloss + amount, 0, maxHealth)
|
||||
if(updating_health)
|
||||
updatehealth()
|
||||
return amount
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
var/obj/item/inventory_back
|
||||
var/nofur = 0 //Corgis that have risen past the material plane of existence.
|
||||
gold_core_spawnable = FRIENDLY_SPAWN
|
||||
can_be_held = TRUE
|
||||
|
||||
/mob/living/simple_animal/pet/dog/pug
|
||||
name = "\improper pug"
|
||||
@@ -121,7 +122,12 @@
|
||||
..()
|
||||
update_corgi_fluff()
|
||||
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/mob_pickup(mob/living/L)
|
||||
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, "corgi", null, 'icons/mob/pets_held_lh.dmi', 'icons/mob/pets_held_rh.dmi', FALSE)
|
||||
if(!L.put_in_hands(holder))
|
||||
qdel(holder)
|
||||
else
|
||||
L.visible_message("<span class='warning'>[L] scoops up [src]!</span>")
|
||||
|
||||
/mob/living/simple_animal/pet/dog/corgi/Topic(href, href_list)
|
||||
if(usr.stat)
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
dextrous = TRUE
|
||||
dextrous_hud_type = /datum/hud/dextrous/drone
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
can_be_held = TRUE
|
||||
var/staticChoice = "static"
|
||||
var/list/staticChoices = list("static", "blank", "letter", "animal")
|
||||
var/picked = FALSE //Have we picked our visual appearence (+ colour if applicable)
|
||||
@@ -67,7 +68,6 @@
|
||||
var/seeStatic = 1 //Whether we see static instead of mobs
|
||||
var/visualAppearence = MAINTDRONE //What we appear as
|
||||
var/hacked = FALSE //If we have laws to destroy the station
|
||||
var/can_be_held = TRUE //if assholes can pick us up
|
||||
var/flavortext = \
|
||||
"\n<big><span class='warning'>DO NOT INTERFERE WITH THE ROUND AS A DRONE OR YOU WILL BE DRONE BANNED</span></big>\n"+\
|
||||
"<span class='notify'>Drones are a ghost role that are allowed to fix the station and build things. Interfering with the round as a drone is against the rules.</span>\n"+\
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
//DRONES AS ITEMS//
|
||||
///////////////////
|
||||
//Drone shells
|
||||
//Drones as hats
|
||||
|
||||
|
||||
//DRONE SHELL
|
||||
/obj/item/drone_shell
|
||||
@@ -45,45 +43,3 @@
|
||||
D.admin_spawned = admin_spawned
|
||||
D.key = user.key
|
||||
qdel(src)
|
||||
|
||||
|
||||
//DRONE HOLDER
|
||||
/obj/item/clothing/head/drone_holder//Only exists in someones hand.or on their head
|
||||
name = "drone (hiding)"
|
||||
desc = "This drone is scared and has curled up into a ball."
|
||||
icon = 'icons/mob/drone.dmi'
|
||||
icon_state = "drone_maint_hat"
|
||||
var/mob/living/simple_animal/drone/drone //stored drone
|
||||
|
||||
/obj/item/clothing/head/drone_holder/proc/uncurl()
|
||||
if(!drone)
|
||||
return
|
||||
|
||||
if(isliving(loc))
|
||||
var/mob/living/L = loc
|
||||
to_chat(L, "<span class='warning'>[drone] is trying to escape!</span>")
|
||||
if(!do_after(drone, 50, target = L))
|
||||
return
|
||||
L.dropItemToGround(src)
|
||||
|
||||
contents -= drone
|
||||
drone.forceMove(drop_location())
|
||||
drone.reset_perspective()
|
||||
drone.setDir(SOUTH )//Looks better
|
||||
drone.visible_message("<span class='warning'>[drone] uncurls!</span>")
|
||||
drone = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/clothing/head/drone_holder/relaymove()
|
||||
uncurl()
|
||||
|
||||
/obj/item/clothing/head/drone_holder/container_resist(mob/living/user)
|
||||
uncurl()
|
||||
|
||||
|
||||
/obj/item/clothing/head/drone_holder/proc/updateVisualAppearence(mob/living/simple_animal/drone/D)
|
||||
if(!D)
|
||||
return
|
||||
icon_state = "[D.visualAppearence]_hat"
|
||||
. = icon_state
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
|
||||
/mob/living/simple_animal/drone/cogscarab/Login()
|
||||
..()
|
||||
add_servant_of_ratvar(src, TRUE)
|
||||
add_servant_of_ratvar(src, TRUE, GLOB.servants_active)
|
||||
to_chat(src,"<b>You yourself are one of these servants, and will be able to utilize almost anything they can[GLOB.ratvar_awakens ? "":", <i>excluding a clockwork slab</i>"].</b>") // this can't go with flavortext because i'm assuming it requires them to be ratvar'd
|
||||
|
||||
/mob/living/simple_animal/drone/cogscarab/binarycheck()
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
if("Nothing")
|
||||
return
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/attack_hand(mob/user)
|
||||
if(ishuman(user))
|
||||
if(stat == DEAD || status_flags & GODMODE || !can_be_held)
|
||||
@@ -49,11 +48,8 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You pick [src] up.</span>")
|
||||
drop_all_held_items()
|
||||
var/obj/item/clothing/head/drone_holder/DH = new /obj/item/clothing/head/drone_holder(src)
|
||||
DH.updateVisualAppearence(src)
|
||||
DH.drone = src
|
||||
var/obj/item/clothing/head/mob_holder/drone/DH = new(get_turf(src), src)
|
||||
user.put_in_hands(DH)
|
||||
forceMove(DH)
|
||||
|
||||
/mob/living/simple_animal/drone/proc/try_reactivate(mob/living/user)
|
||||
var/mob/dead/observer/G = get_ghost()
|
||||
|
||||
@@ -235,7 +235,8 @@
|
||||
LoseTarget()
|
||||
return 0
|
||||
if(target in possible_targets)
|
||||
if(target.z != z)
|
||||
var/turf/T = get_turf(src)
|
||||
if(target.z != T.z)
|
||||
LoseTarget()
|
||||
return 0
|
||||
var/target_distance = get_dist(targets_from,target)
|
||||
@@ -417,7 +418,7 @@ mob/living/simple_animal/hostile/proc/DestroySurroundings() // for use with mega
|
||||
if(buckled)
|
||||
buckled.attack_animal(src)
|
||||
if(!isturf(targets_from.loc) && targets_from.loc != null)//Did someone put us in something?
|
||||
var/atom/A = get_turf(targets_from)
|
||||
var/atom/A = targets_from.loc
|
||||
A.attack_animal(src)//Bang on it till we get out
|
||||
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ Difficulty: Hard
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
|
||||
..()
|
||||
move_to_delay = Clamp((health/maxHealth) * 10, 5, 10)
|
||||
move_to_delay = CLAMP((health/maxHealth) * 10, 5, 10)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire()
|
||||
anger_modifier = Clamp(((maxHealth - health)/60),0,20)
|
||||
anger_modifier = CLAMP(((maxHealth - health)/60),0,20)
|
||||
if(charging)
|
||||
return
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
@@ -57,7 +57,7 @@ Difficulty: Very Hard
|
||||
L.dust()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/colossus/OpenFire()
|
||||
anger_modifier = Clamp(((maxHealth - health)/50),0,20)
|
||||
anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
|
||||
ranged_cooldown = world.time + 120
|
||||
|
||||
if(enrage(target))
|
||||
@@ -558,7 +558,7 @@ Difficulty: Very Hard
|
||||
H.regenerate_limbs()
|
||||
H.regenerate_organs()
|
||||
H.revive(1,0)
|
||||
H.disabilities |= NOCLONE //Free revives, but significantly limits your options for reviving except via the crystal
|
||||
H.add_disability(DISABILITY_NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal
|
||||
H.grab_ghost(force = TRUE)
|
||||
|
||||
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
|
||||
@@ -719,7 +719,7 @@ Difficulty: Very Hard
|
||||
if(isliving(A) && holder_animal)
|
||||
var/mob/living/L = A
|
||||
L.notransform = 1
|
||||
L.disabilities |= MUTE
|
||||
L.add_disability(DISABILITY_MUTE, STASIS_MUTE)
|
||||
L.status_flags |= GODMODE
|
||||
L.mind.transfer_to(holder_animal)
|
||||
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
|
||||
@@ -729,7 +729,7 @@ Difficulty: Very Hard
|
||||
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
for(var/mob/living/L in src)
|
||||
L.disabilities &= ~MUTE
|
||||
L.remove_disability(DISABILITY_MUTE, STASIS_MUTE)
|
||||
L.status_flags &= ~GODMODE
|
||||
L.notransform = 0
|
||||
if(holder_animal)
|
||||
|
||||
@@ -101,7 +101,7 @@ Difficulty: Medium
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/OpenFire()
|
||||
if(swooping)
|
||||
return
|
||||
anger_modifier = Clamp(((maxHealth - health)/50),0,20)
|
||||
anger_modifier = CLAMP(((maxHealth - health)/50),0,20)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
if(prob(15 + anger_modifier) && !client)
|
||||
@@ -227,10 +227,10 @@ Difficulty: Medium
|
||||
|
||||
//ensure swoop direction continuity.
|
||||
if(negative)
|
||||
if(IsInRange(x, initial_x + 1, initial_x + DRAKE_SWOOP_DIRECTION_CHANGE_RANGE))
|
||||
if(ISINRANGE(x, initial_x + 1, initial_x + DRAKE_SWOOP_DIRECTION_CHANGE_RANGE))
|
||||
negative = FALSE
|
||||
else
|
||||
if(IsInRange(x, initial_x - DRAKE_SWOOP_DIRECTION_CHANGE_RANGE, initial_x - 1))
|
||||
if(ISINRANGE(x, initial_x - DRAKE_SWOOP_DIRECTION_CHANGE_RANGE, initial_x - 1))
|
||||
negative = TRUE
|
||||
new /obj/effect/temp_visual/dragon_flight/end(loc, negative)
|
||||
new /obj/effect/temp_visual/dragon_swoop(loc)
|
||||
|
||||
@@ -187,7 +187,7 @@ Difficulty: Hard
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/proc/calculate_rage() //how angry we are overall
|
||||
did_reset = FALSE //oh hey we're doing SOMETHING, clearly we might need to heal if we recall
|
||||
anger_modifier = Clamp(((maxHealth - health) / 42),0,50)
|
||||
anger_modifier = CLAMP(((maxHealth - health) / 42),0,50)
|
||||
burst_range = initial(burst_range) + round(anger_modifier * 0.08)
|
||||
beam_range = initial(beam_range) + round(anger_modifier * 0.12)
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
for(var/F in RANGE_TURFS(1, src))
|
||||
if(ismineralturf(F))
|
||||
var/turf/closed/mineral/M = F
|
||||
M.ChangeTurf(M.turf_type,FALSE,FALSE,TRUE)
|
||||
M.ChangeTurf(M.turf_type, null, CHANGETURF_IGNORE_AIR)
|
||||
gps = new /obj/item/device/gps/internal(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/spawner/lavaland/Destroy()
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
/mob/living/simple_animal/updatehealth()
|
||||
..()
|
||||
health = Clamp(health, 0, maxHealth)
|
||||
health = CLAMP(health, 0, maxHealth)
|
||||
|
||||
/mob/living/simple_animal/update_stat()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
step_away(M,src)
|
||||
M.Friends = Friends.Copy()
|
||||
babies += M
|
||||
M.mutation_chance = Clamp(mutation_chance+(rand(5,-5)),0,100)
|
||||
M.mutation_chance = CLAMP(mutation_chance+(rand(5,-5)),0,100)
|
||||
SSblackbox.record_feedback("tally", "slime_babies_born", 1, M.colour)
|
||||
|
||||
var/mob/living/simple_animal/slime/new_slime = pick(babies)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
||||
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
|
||||
|
||||
|
||||
////////////////////////////// STUN ////////////////////////////////////
|
||||
@@ -137,3 +137,79 @@
|
||||
to_chat(src, "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>")
|
||||
priority_absorb_key["stuns_absorbed"] += amount
|
||||
return TRUE
|
||||
|
||||
/////////////////////////////////// DISABILITIES ////////////////////////////////////
|
||||
|
||||
/mob/living/proc/add_disability(disability, source)
|
||||
if(!disabilities[disability])
|
||||
disabilities[disability] = list(source)
|
||||
else
|
||||
disabilities[disability] |= list(source)
|
||||
|
||||
/mob/living/proc/remove_disability(disability, list/sources)
|
||||
if(!disabilities[disability])
|
||||
return
|
||||
|
||||
if(!islist(sources))
|
||||
sources = list(sources)
|
||||
|
||||
if(LAZYLEN(sources))
|
||||
for(var/S in sources)
|
||||
if(S in disabilities[disability])
|
||||
disabilities[disability] -= S
|
||||
else
|
||||
disabilities[disability] = list()
|
||||
|
||||
if(!LAZYLEN(disabilities[disability]))
|
||||
disabilities -= disability
|
||||
|
||||
/mob/living/proc/has_disability(disability, list/sources)
|
||||
if(!disabilities[disability])
|
||||
return FALSE
|
||||
|
||||
. = FALSE
|
||||
|
||||
if(LAZYLEN(sources))
|
||||
for(var/S in sources)
|
||||
if(S in disabilities[disability])
|
||||
return TRUE
|
||||
else
|
||||
if(LAZYLEN(disabilities[disability]))
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/remove_all_disabilities()
|
||||
disabilities = list()
|
||||
|
||||
/////////////////////////////////// DISABILITY PROCS ////////////////////////////////////
|
||||
|
||||
/mob/living/proc/cure_blind(list/sources)
|
||||
remove_disability(DISABILITY_BLIND, sources)
|
||||
if(!has_disability(DISABILITY_BLIND))
|
||||
adjust_blindness(-1)
|
||||
|
||||
/mob/living/proc/become_blind(source)
|
||||
if(!has_disability(DISABILITY_BLIND))
|
||||
blind_eyes(1)
|
||||
add_disability(DISABILITY_BLIND, source)
|
||||
|
||||
/mob/living/proc/cure_nearsighted(list/sources)
|
||||
remove_disability(DISABILITY_NEARSIGHT, sources)
|
||||
if(!has_disability(DISABILITY_NEARSIGHT))
|
||||
clear_fullscreen("nearsighted")
|
||||
|
||||
/mob/living/proc/become_nearsighted(source)
|
||||
if(!has_disability(DISABILITY_NEARSIGHT))
|
||||
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
|
||||
add_disability(DISABILITY_NEARSIGHT, source)
|
||||
|
||||
/mob/living/proc/cure_husk(list/sources)
|
||||
remove_disability(DISABILITY_HUSK, sources)
|
||||
if(!has_disability(DISABILITY_HUSK))
|
||||
status_flags &= ~DISFIGURED
|
||||
update_body()
|
||||
|
||||
/mob/living/proc/become_husk(source)
|
||||
if(!has_disability(DISABILITY_HUSK))
|
||||
status_flags |= DISFIGURED //makes them unknown
|
||||
update_body()
|
||||
add_disability(DISABILITY_HUSK, source)
|
||||
@@ -45,6 +45,10 @@
|
||||
|
||||
client.change_view(CONFIG_GET(string/default_view)) // Resets the client.view in case it was changed.
|
||||
|
||||
if(client.player_details.player_actions.len)
|
||||
for(var/datum/action/A in client.player_details.player_actions)
|
||||
A.Grant(src)
|
||||
|
||||
if(!GLOB.individual_log_list[ckey])
|
||||
GLOB.individual_log_list[ckey] = logging
|
||||
else
|
||||
|
||||
@@ -260,13 +260,13 @@
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = A
|
||||
else
|
||||
if(isturf(loc))
|
||||
if(isturf(loc) && (!A || loc == A))
|
||||
client.eye = client.mob
|
||||
client.perspective = MOB_PERSPECTIVE
|
||||
else
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
client.eye = loc
|
||||
return 1
|
||||
client.eye = A
|
||||
return 1
|
||||
|
||||
/mob/living/reset_perspective(atom/A)
|
||||
if(..())
|
||||
@@ -362,7 +362,7 @@
|
||||
|
||||
add_logs(src, M, "grabbed", addition="passive grab")
|
||||
if(!supress_message)
|
||||
visible_message("<span class='warning'>[src] has grabbed [M] passively!</span>")
|
||||
visible_message("<span class='warning'>[src] has grabbed [M][(zone_selected == "l_arm" || zone_selected == "r_arm")? " by their hands":" passively"]!</span>")
|
||||
if(!iscarbon(src))
|
||||
M.LAssailant = null
|
||||
else
|
||||
|
||||
@@ -363,7 +363,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(M.mind in SSticker.mode.cult)
|
||||
return 2
|
||||
if("nuclear")
|
||||
if(M.mind in SSticker.mode.syndicates)
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/nukeop,TRUE))
|
||||
return 2
|
||||
if("changeling")
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/changeling,TRUE))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
//Here are the procs used to modify status effects of a mob.
|
||||
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
|
||||
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
|
||||
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
|
||||
|
||||
/////////////////////////////////// STUN ////////////////////////////////////
|
||||
|
||||
@@ -160,8 +160,12 @@
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND))
|
||||
if((stat != CONSCIOUS && stat != SOFT_CRIT))
|
||||
blind_minimum = 1
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.has_disability(DISABILITY_BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = max(eye_blind+amount, blind_minimum)
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
@@ -177,8 +181,12 @@
|
||||
overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
|
||||
else if(eye_blind)
|
||||
var/blind_minimum = 0
|
||||
if((stat != CONSCIOUS && stat != SOFT_CRIT) || (disabilities & BLIND))
|
||||
if(stat != CONSCIOUS && stat != SOFT_CRIT)
|
||||
blind_minimum = 1
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.has_disability(DISABILITY_BLIND))
|
||||
blind_minimum = 1
|
||||
eye_blind = blind_minimum
|
||||
if(!eye_blind)
|
||||
clear_alert("blind")
|
||||
@@ -227,31 +235,6 @@
|
||||
/mob/proc/set_disgust(amount)
|
||||
return
|
||||
|
||||
/////////////////////////////////// BLIND DISABILITY ////////////////////////////////////
|
||||
|
||||
/mob/proc/cure_blind() //when we want to cure the BLIND disability only.
|
||||
return
|
||||
|
||||
/mob/proc/become_blind()
|
||||
return
|
||||
|
||||
/////////////////////////////////// NEARSIGHT DISABILITY ////////////////////////////////////
|
||||
|
||||
/mob/proc/cure_nearsighted()
|
||||
return
|
||||
|
||||
/mob/proc/become_nearsighted()
|
||||
return
|
||||
|
||||
|
||||
//////////////////////////////// HUSK DISABILITY ///////////////////////////:
|
||||
|
||||
/mob/proc/cure_husk()
|
||||
return
|
||||
|
||||
/mob/proc/become_husk()
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user