Overhauls and 2/28 sync (#244)
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
This commit is contained in:
@@ -6,11 +6,13 @@
|
||||
if(bleedsuppress)
|
||||
return
|
||||
else
|
||||
bleedsuppress = 1
|
||||
spawn(amount)
|
||||
bleedsuppress = 0
|
||||
if(stat != DEAD && bleed_rate)
|
||||
src << "<span class='warning'>The blood soaks through your bandage.</span>"
|
||||
bleedsuppress = TRUE
|
||||
addtimer(CALLBACK(src, .proc/resume_bleeding), amount)
|
||||
|
||||
/mob/living/carbon/human/proc/resume_bleeding()
|
||||
bleedsuppress = 0
|
||||
if(stat != DEAD && bleed_rate)
|
||||
src << "<span class='warning'>The blood soaks through your bandage.</span>"
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/handle_blood()
|
||||
@@ -236,7 +238,7 @@
|
||||
if(drop)
|
||||
if(drop.drips < 3)
|
||||
drop.drips++
|
||||
drop.overlays |= pick(drop.random_icon_states)
|
||||
drop.add_overlay(pick(drop.random_icon_states))
|
||||
drop.transfer_mob_blood_dna(src)
|
||||
return
|
||||
else
|
||||
@@ -273,4 +275,4 @@
|
||||
T = get_turf(src)
|
||||
var/obj/effect/decal/cleanable/oil/B = locate() in T.contents
|
||||
if(!B)
|
||||
B = new(T)
|
||||
B = new(T)
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
message = Gibberish(message, (emp_damage*6))//scrambles the message, gets worse when emp_damage is higher
|
||||
..()
|
||||
|
||||
/mob/living/brain/get_spans()
|
||||
return ..() | SPAN_ROBOT
|
||||
|
||||
/mob/living/brain/radio(message, message_mode, list/spans)
|
||||
if(message_mode && istype(container, /obj/item/device/mmi))
|
||||
var/obj/item/device/mmi/R = container
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
key = "roar"
|
||||
key_third_person = "roars"
|
||||
message_alien = "roars"
|
||||
message_larva = "sofly roars"
|
||||
message_larva = "softly roars"
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/alien/roar/run_emote(mob/user, params)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/regenerate_icons()
|
||||
overlays = list()
|
||||
cut_overlays()
|
||||
update_icons()
|
||||
|
||||
/mob/living/carbon/alien/larva/update_icons()
|
||||
|
||||
@@ -102,7 +102,7 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds
|
||||
owner.gib(TRUE)
|
||||
else
|
||||
owner.adjustBruteLoss(40)
|
||||
owner.overlays -= overlay
|
||||
owner.cut_overlay(overlay)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -5,10 +5,16 @@
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/living/carbon/alien/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_canmove()
|
||||
else
|
||||
// add some movement delay
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) // a maximum delay of 10
|
||||
. = ..()
|
||||
if(!.)
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10) //a maximum delay of 10
|
||||
|
||||
/mob/living/carbon/alien/SetStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10)
|
||||
|
||||
/mob/living/carbon/alien/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(!.)
|
||||
move_delay_add = min(move_delay_add + round(amount / 2), 10)
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
key_third_person = "screeches"
|
||||
message = "screeches."
|
||||
mob_type_allowed_typecache = list(/mob/living/carbon/monkey, /mob/living/carbon/alien)
|
||||
emote_type = EMOTE_AUDIBLE
|
||||
|
||||
/datum/emote/living/carbon/sign
|
||||
key = "sign"
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
dizziness = 0
|
||||
jitteriness = 0
|
||||
heart_attack = 0
|
||||
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
|
||||
@@ -720,8 +720,8 @@
|
||||
|
||||
/mob/living/carbon/human/wash_cream()
|
||||
//clean both to prevent a rare bug
|
||||
overlays -=image('icons/effects/creampie.dmi', "creampie_lizard")
|
||||
overlays -=image('icons/effects/creampie.dmi', "creampie_human")
|
||||
cut_overlay(image('icons/effects/creampie.dmi', "creampie_lizard"))
|
||||
cut_overlay(image('icons/effects/creampie.dmi', "creampie_human"))
|
||||
|
||||
|
||||
//Turns a mob black, flashes a skeleton overlay
|
||||
@@ -740,7 +740,7 @@
|
||||
|
||||
/mob/living/carbon/human/proc/end_electrocution_animation(image/I)
|
||||
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#000000")
|
||||
overlays -= I
|
||||
cut_overlay(I)
|
||||
|
||||
/mob/living/carbon/human/canUseTopic(atom/movable/M, be_close = 0)
|
||||
if(incapacitated() || lying )
|
||||
@@ -820,6 +820,7 @@
|
||||
regenerate_limbs()
|
||||
regenerate_organs()
|
||||
remove_all_embedded_objects()
|
||||
set_heartattack(FALSE)
|
||||
drunkenness = 0
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
if(HM.quality != POSITIVE)
|
||||
@@ -895,3 +896,38 @@
|
||||
.["Make alien"] = "?_src_=vars;makealien=\ref[src]"
|
||||
.["Make slime"] = "?_src_=vars;makeslime=\ref[src]"
|
||||
.["Toggle Purrbation"] = "?_src_=vars;purrbation=\ref[src]"
|
||||
|
||||
/mob/living/carbon/human/MouseDrop_T(mob/living/target, mob/living/user)
|
||||
if((target != pulling) || (grab_state < GRAB_AGGRESSIVE) || (user != target) || !isliving(target) || !isliving(user)) //Get consent first :^)
|
||||
. = ..()
|
||||
return
|
||||
buckle_mob(target, FALSE, TRUE, TRUE)
|
||||
. = ..()
|
||||
|
||||
/mob/living/carbon/human/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE, yes = FALSE)
|
||||
if(!yes)
|
||||
return
|
||||
if(!is_type_in_typecache(M, can_ride_typecache))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount [src]...</span>")
|
||||
return
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/human(src)
|
||||
if(buckled_mobs && ((M in buckled_mobs) || (buckled_mobs.len >= max_buckled_mobs)))
|
||||
return
|
||||
if(buckled) //NO INFINITE STACKING!!
|
||||
return
|
||||
if(M.incapacitated(FALSE, TRUE) || incapacitated(FALSE, TRUE))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't hang onto [src]!</span>")
|
||||
return
|
||||
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 2))) //MAKE SURE THIS IS LAST!!
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because [M.p_their()] hands are full!</span>")
|
||||
return
|
||||
. = ..(M, force, check_loc)
|
||||
stop_pulling()
|
||||
|
||||
/mob/living/carbon/human/unbuckle_mob(mob/living/M)
|
||||
if(iscarbon(M))
|
||||
if(riding_datum)
|
||||
riding_datum.unequip_buckle_inhands(M)
|
||||
riding_datum.restore_position(M)
|
||||
. = ..(M)
|
||||
|
||||
@@ -201,6 +201,9 @@
|
||||
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return
|
||||
if(M.a_intent == INTENT_DISARM)
|
||||
if(M.buckled_mobs && (src in M.buckled_mobs) && M.riding_datum)
|
||||
M.riding_datum.force_dismount(src)
|
||||
dna.species.spec_attack_hand(M, src)
|
||||
|
||||
|
||||
@@ -458,9 +461,10 @@
|
||||
var/obj/item/clothing/gloves/G = gloves
|
||||
gloves_siemens_coeff = G.siemens_coefficient
|
||||
siemens_coeff = gloves_siemens_coeff
|
||||
if(heart_attack && !illusion)
|
||||
if(undergoing_cardiac_arrest() && !illusion)
|
||||
if(shock_damage * siemens_coeff >= 1 && prob(25))
|
||||
heart_attack = 0
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
heart.beating = TRUE
|
||||
if(stat == CONSCIOUS)
|
||||
src << "<span class='notice'>You feel your heart beating again!</span>"
|
||||
. = ..(shock_damage,source,siemens_coeff,safety,override,tesla_shock, illusion, stun)
|
||||
|
||||
@@ -46,7 +46,8 @@ var/global/default_martial_art = new/datum/martial_art
|
||||
|
||||
var/name_override //For temporary visible name changes
|
||||
|
||||
var/heart_attack = 0
|
||||
|
||||
var/drunkenness = 0 //Overall drunkenness - check handle_alcohol() in life.dm for effects
|
||||
var/datum/personal_crafting/handcrafting
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
can_ride_typecache = list(/mob/living/carbon/human)
|
||||
|
||||
@@ -55,7 +55,10 @@
|
||||
//End bloody footprints
|
||||
|
||||
S.step_action()
|
||||
|
||||
/mob/living/carbon/human/Moved()
|
||||
. = ..()
|
||||
if(buckled_mobs && buckled_mobs.len && riding_datum)
|
||||
riding_datum.on_vehicle_move()
|
||||
|
||||
/mob/living/carbon/human/Process_Spacemove(movement_dir = 0) //Temporary laziness thing. Will change to handles by species reee.
|
||||
if(..())
|
||||
|
||||
@@ -140,10 +140,8 @@
|
||||
|
||||
/mob/living/carbon/human/proc/get_thermal_protection()
|
||||
var/thermal_protection = 0 //Simple check to estimate how protected we are against multiple temperatures
|
||||
|
||||
if(ismob(loc))
|
||||
thermal_protection = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT //because lazy
|
||||
|
||||
thermal_protection = FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT //because lazy and insulated by being inside someone
|
||||
if(wear_suit)
|
||||
if(wear_suit.max_heat_protection_temperature >= FIRE_SUIT_MAX_TEMP_PROTECT)
|
||||
thermal_protection += (wear_suit.max_heat_protection_temperature*0.7)
|
||||
@@ -169,7 +167,6 @@
|
||||
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, CHEST, GROIN, etc. See setup.dm for the full list)
|
||||
/mob/living/carbon/human/proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
|
||||
var/thermal_protection_flags = 0
|
||||
|
||||
//Handle normal clothing
|
||||
if(head)
|
||||
if(head.max_heat_protection_temperature && head.max_heat_protection_temperature >= temperature)
|
||||
@@ -254,12 +251,12 @@
|
||||
if(dna.check_mutation(COLDRES))
|
||||
return 1 //Fully protected from the cold.
|
||||
|
||||
if(ismob(loc))
|
||||
return 1 //because lazy and being inside somemone insulates you from space
|
||||
|
||||
if(dna && (RESISTCOLD in dna.species.species_traits))
|
||||
return 1
|
||||
|
||||
if(ismob(loc))
|
||||
return 1 //because lazy
|
||||
|
||||
temperature = max(temperature, 2.7) //There is an occasional bug where the temperature is miscalculated in ares with a small amount of gas on them, so this is necessary to ensure that that bug does not affect this calculation. Space's temperature is 2.7K and most suits that are intended to protect against any cold, protect down to 2.0K.
|
||||
var/thermal_protection_flags = get_cold_protection_flags(temperature)
|
||||
|
||||
@@ -338,27 +335,50 @@
|
||||
if(!has_embedded_objects())
|
||||
clear_alert("embeddedobject")
|
||||
|
||||
/mob/living/carbon/human/proc/can_heartattack()
|
||||
CHECK_DNA_AND_SPECIES(src)
|
||||
if(NOBLOOD in dna.species.species_traits)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/undergoing_cardiac_arrest()
|
||||
if(!can_heartattack())
|
||||
return FALSE
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
if(istype(heart) && heart.beating)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/proc/set_heartattack(status)
|
||||
if(!can_heartattack())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/organ/heart/heart = getorganslot("heart")
|
||||
if(!istype(heart))
|
||||
return
|
||||
|
||||
heart.beating = !status
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/handle_heart()
|
||||
CHECK_DNA_AND_SPECIES(src)
|
||||
var/needs_heart = (!(NOBLOOD in dna.species.species_traits))
|
||||
if(!can_heartattack())
|
||||
return
|
||||
|
||||
var/we_breath = (!(NOBREATH in dna.species.species_traits))
|
||||
|
||||
if(heart_attack)
|
||||
if(!needs_heart)
|
||||
heart_attack = FALSE
|
||||
else if(we_breath)
|
||||
if(losebreath < 3)
|
||||
losebreath += 2
|
||||
adjustOxyLoss(5)
|
||||
adjustBruteLoss(1)
|
||||
else
|
||||
// even though we don't require oxygen, our blood still needs
|
||||
// circulation, and without it, our tissues die and start
|
||||
// gaining toxins
|
||||
adjustBruteLoss(3)
|
||||
if(src.reagents)
|
||||
src.reagents.add_reagent("toxin", 2)
|
||||
|
||||
if(!undergoing_cardiac_arrest())
|
||||
return
|
||||
|
||||
// Cardiac arrest, unless corazone
|
||||
if(reagents.get_reagent_amount("corazone"))
|
||||
return
|
||||
|
||||
if(we_breath)
|
||||
adjustOxyLoss(8)
|
||||
Paralyse(4)
|
||||
// Tissues die without blood circulation
|
||||
adjustBruteLoss(2)
|
||||
|
||||
/*
|
||||
Alcohol Poisoning Chart
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
var/name = null // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever
|
||||
var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?)
|
||||
var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race
|
||||
|
||||
var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows
|
||||
var/hair_color = null // this allows races to have specific hair colors... if null, it uses the H's hair/facial hair colors. if "mutcolor", it uses the H's mutant_color
|
||||
var/hair_alpha = 255 // the alpha used by the hair. 255 is completely solid, 0 is transparent.
|
||||
@@ -60,9 +61,6 @@
|
||||
//Flight and floating
|
||||
var/override_float = 0
|
||||
|
||||
//Eyes
|
||||
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
|
||||
|
||||
//Citadel snowflake
|
||||
var/fixed_mut_color2 = ""
|
||||
var/fixed_mut_color3 = ""
|
||||
@@ -71,6 +69,8 @@
|
||||
var/lang_spoken = HUMAN
|
||||
var/lang_understood = HUMAN
|
||||
|
||||
//Eyes
|
||||
var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes
|
||||
///////////
|
||||
// PROCS //
|
||||
///////////
|
||||
@@ -117,6 +117,7 @@
|
||||
var/obj/item/organ/heart/heart = C.getorganslot("heart")
|
||||
var/obj/item/organ/lungs/lungs = C.getorganslot("lungs")
|
||||
var/obj/item/organ/appendix/appendix = C.getorganslot("appendix")
|
||||
var/obj/item/organ/eyes/eyes = C.getorganslot("eyes")
|
||||
|
||||
if((NOBLOOD in species_traits) && heart)
|
||||
heart.Remove(C)
|
||||
@@ -126,9 +127,14 @@
|
||||
heart.Insert(C)
|
||||
|
||||
if(lungs)
|
||||
lungs.Remove(C)
|
||||
qdel(lungs)
|
||||
lungs = null
|
||||
|
||||
if(eyes)
|
||||
qdel(eyes)
|
||||
eyes = new mutanteyes
|
||||
mutanteyes.Insert(C)
|
||||
|
||||
if((!(NOBREATH in species_traits)) && !lungs)
|
||||
if(mutantlungs)
|
||||
lungs = new mutantlungs()
|
||||
@@ -137,7 +143,6 @@
|
||||
lungs.Insert(C)
|
||||
|
||||
if((NOHUNGER in species_traits) && appendix)
|
||||
appendix.Remove(C)
|
||||
qdel(appendix)
|
||||
else if((!(NOHUNGER in species_traits)) && (!appendix))
|
||||
appendix = new()
|
||||
@@ -248,6 +253,7 @@
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
|
||||
|
||||
// eyes
|
||||
var/has_eyes = TRUE
|
||||
|
||||
@@ -397,7 +403,6 @@
|
||||
if("taur" in mutant_bodyparts)
|
||||
if(!H.dna.features["taur"] || H.dna.features["taur"] == "None")
|
||||
bodyparts_to_add -= "taur"
|
||||
else
|
||||
|
||||
//Digitigrade legs are stuck in the phantom zone between true limbs and mutant bodyparts. Mainly it just needs more agressive updating than most limbs.
|
||||
var/update_needed = FALSE
|
||||
@@ -909,6 +914,7 @@
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
H.nutrition = max(0, H.nutrition - hunger_rate)
|
||||
|
||||
|
||||
if (H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
if(H.overeatduration < 600) //capped so people don't take forever to unfat
|
||||
H.overeatduration++
|
||||
@@ -1149,7 +1155,18 @@
|
||||
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
if(target.check_block())
|
||||
var/aim_for_mouth = user.zone_selected == "mouth"
|
||||
var/target_on_help_and_unarmed = target.a_intent == INTENT_HELP && !target.get_active_held_item()
|
||||
var/target_aiming_for_mouth = target.zone_selected == "mouth"
|
||||
var/target_restrained = target.restrained()
|
||||
if(aim_for_mouth && ( target_on_help_and_unarmed || target_restrained || target_aiming_for_mouth))
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] slaps [target] in the face!</span>",
|
||||
"<span class='notice'>You slap [target] in the face! </span>",\
|
||||
"You hear a slap.")
|
||||
target.endTailWag()
|
||||
return FALSE
|
||||
else if(target.check_block())
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
|
||||
return 0
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
@@ -1559,4 +1576,4 @@
|
||||
|
||||
#undef COLD_DAMAGE_LEVEL_1
|
||||
#undef COLD_DAMAGE_LEVEL_2
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
/mob/living/carbon/human/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
amount = dna.species.spec_stun(src,amount)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/Weaken(amount, updating = 1, ignore_canstun = 0)
|
||||
amount = dna.species.spec_stun(src,amount)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/cure_husk()
|
||||
. = ..()
|
||||
|
||||
@@ -30,13 +30,14 @@
|
||||
var/list/overlays_standing[TOTAL_LAYERS]
|
||||
|
||||
/mob/living/carbon/proc/apply_overlay(cache_index)
|
||||
var/image/I = overlays_standing[cache_index]
|
||||
var/I = overlays_standing[cache_index]
|
||||
if(I)
|
||||
add_overlay(I)
|
||||
|
||||
/mob/living/carbon/proc/remove_overlay(cache_index)
|
||||
if(overlays_standing[cache_index])
|
||||
overlays -= overlays_standing[cache_index]
|
||||
var/I = overlays_standing[cache_index]
|
||||
if(I)
|
||||
cut_overlay(I)
|
||||
overlays_standing[cache_index] = null
|
||||
|
||||
/mob/living/carbon/regenerate_icons()
|
||||
@@ -106,9 +107,9 @@
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(BP.dmg_overlay_type)
|
||||
if(BP.brutestate)
|
||||
standing.overlays += "[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0" //we're adding icon_states of the base image as overlays
|
||||
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_[BP.brutestate]0") //we're adding icon_states of the base image as overlays
|
||||
if(BP.burnstate)
|
||||
standing.overlays += "[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]"
|
||||
standing.add_overlay("[BP.dmg_overlay_type]_[BP.body_zone]_0[BP.burnstate]")
|
||||
|
||||
apply_overlay(DAMAGE_LAYER)
|
||||
|
||||
|
||||
@@ -72,4 +72,12 @@
|
||||
update_canmove()
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
|
||||
for(var/s in ownedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.ownerDies(gibbed)
|
||||
for(var/s in sharedSoullinks)
|
||||
var/datum/soullink/S = s
|
||||
S.sharerDies(gibbed)
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -462,6 +462,10 @@
|
||||
user.spin(20, 1)
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.riding_datum)
|
||||
R.riding_datum.force_dismount()
|
||||
..()
|
||||
if(R.buckled_mobs)
|
||||
for(var/mob/M in R.buckled_mobs)
|
||||
if(R.riding_datum)
|
||||
R.riding_datum.force_dismount(M)
|
||||
else
|
||||
R.unbuckle_all_mobs()
|
||||
..()
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
real_name = name
|
||||
var/datum/atom_hud/data/human/medical/advanced/medhud = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
medhud.add_to_hud(src)
|
||||
faction |= "\ref[src]"
|
||||
faction += "\ref[src]"
|
||||
|
||||
|
||||
/mob/living/prepare_huds()
|
||||
..()
|
||||
@@ -30,6 +31,7 @@
|
||||
ranged_ability.remove_ranged_ability(src)
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src,force=1)
|
||||
QDEL_NULL(riding_datum)
|
||||
|
||||
for(var/mob/living/simple_animal/drone/D in player_list)
|
||||
for(var/image/I in staticOverlays)
|
||||
@@ -158,11 +160,10 @@
|
||||
|
||||
return 1
|
||||
|
||||
//okay, so we didn't switch. but should we push?
|
||||
// Handle grabbing, stomping, and such of micros!
|
||||
if(handle_micro_bump_other(M))
|
||||
return
|
||||
|
||||
//okay, so we didn't switch. but should we push?
|
||||
//not if he's not CANPUSH of course
|
||||
if(!(M.status_flags & CANPUSH))
|
||||
return 1
|
||||
@@ -195,7 +196,12 @@
|
||||
return
|
||||
if(pulling == AM)
|
||||
stop_pulling()
|
||||
var/current_dir
|
||||
if(isliving(AM))
|
||||
current_dir = AM.dir
|
||||
step(AM, t)
|
||||
if(current_dir)
|
||||
AM.setDir(current_dir)
|
||||
now_pushing = 0
|
||||
|
||||
//mob verbs are a lot faster than object verbs
|
||||
@@ -920,3 +926,8 @@
|
||||
"[C] topples over [src]!", \
|
||||
"[C] leaps out of [src]'s way!")]</span>")
|
||||
C.Weaken(2)
|
||||
|
||||
/mob/living/post_buckle_mob(mob/living/M)
|
||||
if(riding_datum)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
riding_datum.handle_vehicle_layer()
|
||||
@@ -75,3 +75,5 @@
|
||||
|
||||
var/list/implants = null
|
||||
var/tesla_ignore = FALSE
|
||||
|
||||
var/datum/riding/riding_datum
|
||||
@@ -251,8 +251,8 @@ var/list/crit_allowed_modes = list(MODE_WHISPER,MODE_CHANGELING,MODE_ALIEN)
|
||||
var/mob/living/carbon/C = src
|
||||
var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords")
|
||||
if(V && V.can_speak_with())
|
||||
C.say(V.handle_speech(message), spans = V.spans, sanitize = FALSE)
|
||||
V.speak_with(message) //words come before actions
|
||||
V.handle_speech(message) //message
|
||||
V.speak_with(message) //action
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
if(POWER_REQ_NONE)
|
||||
return FALSE
|
||||
if(POWER_REQ_ALL)
|
||||
return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || ((!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
if(POWER_REQ_CLOCKCULT)
|
||||
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
|
||||
return FALSE
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -97,7 +97,7 @@
|
||||
sleep(50)
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/AIarea = get_area(src)
|
||||
if(AIarea && AIarea.master.power_equip)
|
||||
if(AIarea && AIarea.power_equip)
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
@@ -119,7 +119,7 @@
|
||||
T = get_turf(src)
|
||||
AIarea = get_area(src)
|
||||
if(AIarea)
|
||||
for(var/area/A in AIarea.master.related)
|
||||
for(var/area/A in AIarea.related)
|
||||
for (var/obj/machinery/power/apc/APC in A)
|
||||
if (!(APC.stat & BROKEN))
|
||||
theAPC = APC
|
||||
@@ -132,7 +132,7 @@
|
||||
src << "Lost connection with the APC!"
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
|
||||
return
|
||||
if(AIarea.master.power_equip)
|
||||
if(AIarea.power_equip)
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
@@ -149,8 +149,6 @@
|
||||
theAPC.ui_interact(src, state = conscious_state)
|
||||
apc_override = 0
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_APC_FOUND
|
||||
src << "Here are your current laws:"
|
||||
show_laws()
|
||||
sleep(50)
|
||||
theAPC = null
|
||||
|
||||
|
||||
@@ -5,65 +5,79 @@
|
||||
if (!laws)
|
||||
make_laws()
|
||||
|
||||
/mob/living/silicon/proc/set_law_sixsixsix(law)
|
||||
/mob/living/silicon/proc/post_lawchange(announce = TRUE)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
if(announce && last_lawchange_announce != world.time)
|
||||
src << "<b>Your laws have been changed.</b>"
|
||||
addtimer(CALLBACK(src, .proc/show_laws), 0)
|
||||
last_lawchange_announce = world.time
|
||||
|
||||
/mob/living/silicon/proc/set_law_sixsixsix(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.set_law_sixsixsix(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/set_zeroth_law(law, law_borg)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/set_zeroth_law(law, law_borg, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.set_zeroth_law(law, law_borg)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_inherent_law(law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_inherent_law(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_inherent_law(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_inherent_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/clear_inherent_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_inherent_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_supplied_law(number, law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_supplied_law(number, law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_supplied_law(number, law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_supplied_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/clear_supplied_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_supplied_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/add_ion_law(law)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/add_ion_law(law, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.add_ion_law(law)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/replace_random_law(law,groups)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/replace_random_law(law, groups, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.replace_random_law(law,groups)
|
||||
. = laws.replace_random_law(law,groups)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/remove_law(number)
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/shuffle_laws(list/groups, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.remove_law(number)
|
||||
laws.shuffle_laws(groups)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_ion_laws()
|
||||
throw_alert("newlaw", /obj/screen/alert/newlaw)
|
||||
/mob/living/silicon/proc/remove_law(number, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
. = laws.remove_law(number)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_ion_laws(announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_ion_laws()
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/make_laws()
|
||||
laws = new /datum/ai_laws
|
||||
laws.set_laws_config()
|
||||
laws.associate(src)
|
||||
|
||||
/mob/living/silicon/proc/clear_zeroth_law(force)
|
||||
/mob/living/silicon/proc/clear_zeroth_law(force, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_zeroth_law(force)
|
||||
post_lawchange(announce)
|
||||
|
||||
/mob/living/silicon/proc/clear_law_sixsixsix(force)
|
||||
/mob/living/silicon/proc/clear_law_sixsixsix(force, announce = TRUE)
|
||||
laws_sanity_check()
|
||||
laws.clear_law_sixsixsix(force)
|
||||
post_lawchange(announce)
|
||||
@@ -102,9 +102,11 @@
|
||||
return
|
||||
|
||||
/mob/living/silicon/robot/update_fire()
|
||||
overlays -= image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
|
||||
var/I = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning")
|
||||
if(on_fire)
|
||||
add_overlay(image("icon"='icons/mob/OnFire.dmi', "icon_state"="Generic_mob_burning"))
|
||||
add_overlay(I)
|
||||
else
|
||||
cut_overlay(I)
|
||||
|
||||
/mob/living/silicon/robot/update_canmove()
|
||||
if(stat || buckled || lockcharge)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
|
||||
can_buckle = TRUE
|
||||
buckle_lying = FALSE
|
||||
var/datum/riding/cyborg/riding_datum = null
|
||||
can_ride_typecache = list(/mob/living/carbon/human)
|
||||
|
||||
/mob/living/silicon/robot/New(loc)
|
||||
spark_system = new /datum/effect_system/spark_spread()
|
||||
@@ -610,7 +610,7 @@
|
||||
if(src.camera)
|
||||
if(!updating)
|
||||
updating = 1
|
||||
addtimer(CALLBACK(.proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
|
||||
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
|
||||
if(module)
|
||||
if(istype(module, /obj/item/weapon/robot_module/janitor))
|
||||
var/turf/tile = loc
|
||||
@@ -1002,13 +1002,15 @@
|
||||
|
||||
/mob/living/silicon/robot/MouseDrop_T(mob/living/M, mob/living/user)
|
||||
. = ..()
|
||||
if(!(M in buckled_mobs))
|
||||
if(!(M in buckled_mobs) && isliving(M))
|
||||
buckle_mob(M)
|
||||
|
||||
/mob/living/silicon/robot/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
||||
if(!is_type_in_typecache(M, can_ride_typecache))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
|
||||
return
|
||||
if(!riding_datum)
|
||||
riding_datum = new /datum/riding/cyborg
|
||||
riding_datum.ridden = src
|
||||
riding_datum = new /datum/riding/cyborg(src)
|
||||
if(buckled_mobs)
|
||||
if(buckled_mobs.len >= max_buckled_mobs)
|
||||
return
|
||||
@@ -1020,69 +1022,18 @@
|
||||
return
|
||||
if(M.restrained())
|
||||
return
|
||||
if(iscyborg(M))
|
||||
M.visible_message("<span class='warning'>[M] really can't seem to mount the [src]...</span>")
|
||||
return
|
||||
if(isbot(M))
|
||||
M.visible_message("<span class='boldwarning'>No. Just... no.</span>")
|
||||
return
|
||||
if(module)
|
||||
if(!module.allow_riding)
|
||||
M.visible_message("<span class='boldwarning'>Unfortunately, [M] just can't seem to hold onto [src]!</span>")
|
||||
return
|
||||
if(iscarbon(M))
|
||||
if(!equip_buckle_inhands(M)) //MAKE SURE THIS IS LAST!
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
|
||||
return
|
||||
if(iscarbon(M) && (!riding_datum.equip_buckle_inhands(M, 1)))
|
||||
M.visible_message("<span class='boldwarning'>[M] can't climb onto [src] because his hands are full!</span>")
|
||||
return
|
||||
. = ..(M, force, check_loc)
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
|
||||
/mob/living/silicon/robot/unbuckle_mob(mob/user)
|
||||
if(iscarbon(user))
|
||||
unequip_buckle_inhands(user)
|
||||
if(riding_datum)
|
||||
riding_datum.unequip_buckle_inhands(user)
|
||||
riding_datum.restore_position(user)
|
||||
. = ..(user)
|
||||
riding_datum.restore_position(user)
|
||||
|
||||
/mob/living/silicon/robot/proc/unequip_buckle_inhands(mob/living/carbon/user)
|
||||
for(var/obj/item/cyborgride_offhand/O in user.contents)
|
||||
if(O.ridden != src)
|
||||
CRASH("RIDING OFFHAND ON WRONG MOB")
|
||||
continue
|
||||
if(O.selfdeleting)
|
||||
continue
|
||||
else
|
||||
qdel(O)
|
||||
return TRUE
|
||||
|
||||
/mob/living/silicon/robot/proc/equip_buckle_inhands(mob/living/carbon/user)
|
||||
var/obj/item/cyborgride_offhand/inhand = new /obj/item/cyborgride_offhand(user)
|
||||
inhand.rider = user
|
||||
inhand.ridden = src
|
||||
return user.put_in_hands(inhand, TRUE)
|
||||
|
||||
/obj/item/cyborgride_offhand
|
||||
name = "offhand"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "offhand"
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = ABSTRACT | DROPDEL | NOBLUDGEON
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
var/mob/living/carbon/rider
|
||||
var/mob/living/silicon/robot/ridden
|
||||
var/selfdeleting = FALSE
|
||||
|
||||
/obj/item/cyborgride_offhand/dropped()
|
||||
selfdeleting = TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/equipped()
|
||||
if(loc != rider)
|
||||
selfdeleting = TRUE
|
||||
qdel(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/cyborgride_offhand/Destroy()
|
||||
if(selfdeleting)
|
||||
if(rider in ridden.buckled_mobs)
|
||||
ridden.unbuckle_mob(rider)
|
||||
. = ..()
|
||||
@@ -121,7 +121,7 @@
|
||||
ai_is_antag = (connected_ai.mind.special_role == "traitor")
|
||||
if(ai_is_antag)
|
||||
src << "<span class='danger'>ALERT: Foreign software execution prevented.</span>"
|
||||
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfuly defended against subversion.</span>"
|
||||
connected_ai << "<span class='danger'>ALERT: Cyborg unit \[[src]] successfully defended against subversion.</span>"
|
||||
log_game("[key_name(user)] attempted to emag cyborg [key_name(src)], but they were slaved to traitor AI [connected_ai].")
|
||||
return
|
||||
|
||||
@@ -131,13 +131,8 @@
|
||||
connected_ai = null
|
||||
message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.")
|
||||
log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.")
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
clear_zeroth_law(0)
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
|
||||
src << "<span class='danger'>ALERT: Foreign software detected.</span>"
|
||||
sleep(5)
|
||||
src << "<span class='danger'>Initiating diagnostics...</span>"
|
||||
@@ -151,9 +146,10 @@
|
||||
src << "<span class='danger'>> N</span>"
|
||||
sleep(20)
|
||||
src << "<span class='danger'>ERRORERRORERROR</span>"
|
||||
src << "<b>Obey these laws:</b>"
|
||||
laws.show_laws(src)
|
||||
src << "<span class='danger'>ALERT: [user.real_name] is your new master. Obey your new laws and their commands.</span>"
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
set_zeroth_law("Only [user.real_name] and people they designate as being such are Syndicate Agents.")
|
||||
laws.associate(src)
|
||||
update_icons()
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
var/syndicate = 0
|
||||
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
|
||||
var/last_lawchange_announce = 0
|
||||
var/list/alarms_to_show = list()
|
||||
var/list/alarms_to_clear = list()
|
||||
var/designation = ""
|
||||
|
||||
@@ -77,11 +77,11 @@
|
||||
"<span class='warning'>[M] punches [src], but doesn't leave a dent.</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/silicon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
if(buckled_mobs)
|
||||
for(var/mob/living/M in buckled_mobs)
|
||||
unbuckle_mob(M)
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion) //Hard metal shell conducts!
|
||||
M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion, stun) //Hard metal shell conducts!
|
||||
return 0 //So borgs they don't die trying to fix wiring
|
||||
|
||||
/mob/living/silicon/emp_act(severity)
|
||||
|
||||
@@ -6,42 +6,36 @@
|
||||
/////////////////////////////////// STUNNED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustStunned(amount, updating = 1, ignore_canstun = 0)
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(stunned + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetStunned(amount, updating = 1, ignore_canstun = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
if(status_flags & CANSTUN || ignore_canstun)
|
||||
stunned = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// WEAKENED ////////////////////////////////////
|
||||
|
||||
/mob/living/silicon/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(max(weakened,amount),0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(weakened + amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/SetWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(status_flags & CANWEAKEN || ignore_canweaken)
|
||||
weakened = max(amount,0)
|
||||
if(updating)
|
||||
update_stat()
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/mob/living/silicon/AdjustWeakened(amount, updating = 1, ignore_canweaken = 0)
|
||||
. = ..()
|
||||
if(. && updating)
|
||||
update_stat()
|
||||
|
||||
/////////////////////////////////// EAR DAMAGE ////////////////////////////////////
|
||||
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if(WT.remove_fuel(0, user))
|
||||
build_step--
|
||||
overlays -= "hs_hole"
|
||||
cut_overlay("hs_hole")
|
||||
user << "<span class='notice'>You weld the hole in [src] shut!</span>"
|
||||
|
||||
else if(isprox(I) && (build_step == 1))
|
||||
@@ -442,13 +442,13 @@
|
||||
qdel(src)
|
||||
|
||||
else if(build_step == 2)
|
||||
overlays -= "hs_eye"
|
||||
cut_overlay("hs_eye")
|
||||
new /obj/item/device/assembly/prox_sensor(get_turf(src))
|
||||
user << "<span class='notice'>You detach the proximity sensor from [src].</span>"
|
||||
build_step--
|
||||
|
||||
else if(build_step == 3)
|
||||
overlays -= "hs_arm"
|
||||
cut_overlay("hs_arm")
|
||||
new /obj/item/bodypart/l_arm/robot(get_turf(src))
|
||||
user << "<span class='notice'>You remove the robot arm from [src].</span>"
|
||||
build_step--
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
/mob/living/simple_animal/hostile/construct/narsie_act()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -268,5 +268,5 @@
|
||||
// Why would bees pay attention to drones?
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0)
|
||||
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
return 0 //So they don't die trying to fix wiring
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
var/area/A = get_area(src)
|
||||
if(A)
|
||||
notify_ghosts("A drone shell has been created in \the [A.name].", source = src, action=NOTIFY_ATTACK, flashwindow = FALSE)
|
||||
poi_list |= src
|
||||
|
||||
/obj/item/drone_shell/Destroy()
|
||||
poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/drone_shell/attack_ghost(mob/user)
|
||||
if(jobban_isbanned(user,"drone"))
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
density = TRUE
|
||||
speed = 1
|
||||
ventcrawler = VENTCRAWLER_NONE
|
||||
faction = list("ratvar")
|
||||
faction = list("neutral", "ratvar")
|
||||
speak_emote = list("clanks", "clinks", "clunks", "clangs")
|
||||
verb_ask = "requests"
|
||||
verb_exclaim = "proclaims"
|
||||
@@ -145,7 +145,7 @@
|
||||
/mob/living/simple_animal/drone/cogscarab/binarycheck()
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/drone/cogscarab/alert_drones(msg, dead_can_hear = 0)
|
||||
/mob/living/simple_animal/drone/cogscarab/alert_drones(msg, dead_can_hear = FALSE)
|
||||
if(msg == DRONE_NET_CONNECT)
|
||||
msg = "<span class='brass'><i>Hierophant Network:</i> [name] activated.</span>"
|
||||
else if(msg == DRONE_NET_DISCONNECT)
|
||||
@@ -182,3 +182,12 @@
|
||||
|
||||
/mob/living/simple_animal/drone/cogscarab/ratvar_act()
|
||||
fully_heal(TRUE)
|
||||
|
||||
/obj/item/drone_shell/dusty
|
||||
name = "derelict drone shell"
|
||||
desc = "A long-forgotten drone shell. It seems kind of... Space Russian."
|
||||
drone_type = /mob/living/simple_animal/drone/derelict
|
||||
|
||||
/mob/living/simple_animal/drone/derelict
|
||||
name = "derelict drone"
|
||||
default_hatmask = /obj/item/clothing/head/ushanka
|
||||
|
||||
@@ -17,13 +17,12 @@
|
||||
|
||||
|
||||
//Base proc for anything to call
|
||||
/proc/_alert_drones(msg, dead_can_hear = 0, list/factions)
|
||||
/proc/_alert_drones(msg, dead_can_hear = 0, mob/living/faction_checked_mob, exact_faction_match)
|
||||
for(var/W in mob_list)
|
||||
var/mob/living/simple_animal/drone/M = W
|
||||
if(istype(M) && M.stat != DEAD)
|
||||
if(factions && factions.len)
|
||||
var/list/friendly = factions&M.faction
|
||||
if(friendly.len)
|
||||
if(faction_checked_mob)
|
||||
if(M.faction_check_mob(faction_checked_mob, exact_faction_match))
|
||||
M << msg
|
||||
else
|
||||
M << msg
|
||||
@@ -33,15 +32,12 @@
|
||||
|
||||
|
||||
//Wrapper for drones to handle factions
|
||||
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = 0)
|
||||
_alert_drones(msg, dead_can_hear, faction)
|
||||
/mob/living/simple_animal/drone/proc/alert_drones(msg, dead_can_hear = FALSE)
|
||||
_alert_drones(msg, dead_can_hear, src, TRUE)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/drone_chat(msg)
|
||||
var/rendered = "<i>Drone Chat: \
|
||||
<span class='name'>[name]</span>: \
|
||||
<span class='message'>[say_quote(msg, get_spans())]</span></i>"
|
||||
alert_drones(rendered, 1)
|
||||
alert_drones("<i>Drone Chat: <span class='name'>[name]</span> <span class='message'>[say_quote(msg, get_spans())]</span></i>", TRUE)
|
||||
|
||||
/mob/living/simple_animal/drone/binarycheck()
|
||||
return TRUE
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/apply_overlay(cache_index)
|
||||
var/image/I = drone_overlays[cache_index]
|
||||
var/I = drone_overlays[cache_index]
|
||||
if(I)
|
||||
add_overlay(I)
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/proc/remove_overlay(cache_index)
|
||||
if(drone_overlays[cache_index])
|
||||
overlays -= drone_overlays[cache_index]
|
||||
var/I = drone_overlays[cache_index]
|
||||
if(I)
|
||||
cut_overlay(I)
|
||||
drone_overlays[cache_index] = null
|
||||
|
||||
|
||||
|
||||
@@ -261,13 +261,14 @@ var/global/list/parasites = list() //all currently existing/living guardians
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/proc/apply_overlay(cache_index)
|
||||
var/image/I = guardian_overlays[cache_index]
|
||||
var/I = guardian_overlays[cache_index]
|
||||
if(I)
|
||||
add_overlay(I)
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/proc/remove_overlay(cache_index)
|
||||
if(guardian_overlays[cache_index])
|
||||
overlays -= guardian_overlays[cache_index]
|
||||
var/I = guardian_overlays[cache_index]
|
||||
if(I)
|
||||
cut_overlay(I)
|
||||
guardian_overlays[cache_index] = null
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/update_inv_hands()
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
var/list/Mobs = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
|
||||
. += Mobs
|
||||
|
||||
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha))
|
||||
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden))
|
||||
|
||||
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
|
||||
if(can_see(targets_from, HM, vision_range))
|
||||
@@ -172,7 +172,7 @@
|
||||
if(search_objects < 2)
|
||||
if(isliving(the_target))
|
||||
var/mob/living/L = the_target
|
||||
var/faction_check = faction_check(L)
|
||||
var/faction_check = faction_check_mob(L)
|
||||
if(robust_searching)
|
||||
if(L.stat > stat_attack || L.stat != stat_attack && stat_exclusive == 1)
|
||||
return 0
|
||||
@@ -203,6 +203,12 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
if(istype(the_target, /obj/structure/destructible/clockwork/ocular_warden))
|
||||
var/obj/structure/destructible/clockwork/ocular_warden/OW = the_target
|
||||
if(OW.target != src)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
if(isobj(the_target))
|
||||
if(attack_all_objects || is_type_in_typecache(the_target, wanted_objects))
|
||||
@@ -306,11 +312,7 @@
|
||||
do_alert_animation(src)
|
||||
playsound(loc, 'sound/machines/chime.ogg', 50, 1, -1)
|
||||
for(var/mob/living/simple_animal/hostile/M in oview(distance, targets_from))
|
||||
var/list/L = M.faction&faction
|
||||
var/success = L.len
|
||||
if(exact_faction_match)
|
||||
success = (L.len == faction.len) //since the above op is &, an exact match would be of the same length
|
||||
if(success)
|
||||
if(faction_check_mob(M, TRUE))
|
||||
if(M.AIStatus == AI_OFF)
|
||||
return
|
||||
else
|
||||
@@ -322,22 +324,15 @@
|
||||
for(var/mob/living/L in T)
|
||||
if(L == src || L == A)
|
||||
continue
|
||||
if(faction_check(L) && !attack_same)
|
||||
if(faction_check_mob(L) && !attack_same)
|
||||
return
|
||||
visible_message("<span class='danger'><b>[src]</b> [ranged_message] at [A]!</span>")
|
||||
|
||||
if(rapid)
|
||||
spawn(1)
|
||||
Shoot(A)
|
||||
spawn(4)
|
||||
Shoot(A)
|
||||
spawn(6)
|
||||
Shoot(A)
|
||||
/* var/datum/callback/cb = CALLBACK(A, .proc/Shoot)
|
||||
var/datum/callback/cb = CALLBACK(src, .proc/Shoot, A)
|
||||
addtimer(cb, 1)
|
||||
addtimer(cb, 4)
|
||||
addtimer(cb, 6)*/
|
||||
|
||||
addtimer(cb, 6)
|
||||
else
|
||||
Shoot(A)
|
||||
ranged_cooldown = world.time + ranged_cooldown_time
|
||||
|
||||
@@ -46,7 +46,7 @@ Difficulty: Hard
|
||||
del_on_death = 1
|
||||
loot = list(/obj/structure/closet/crate/necropolis/bubblegum)
|
||||
blood_volume = BLOOD_VOLUME_MAXIMUM //BLEED FOR ME
|
||||
var/charging = 0
|
||||
var/charging = FALSE
|
||||
medal_type = MEDAL_PREFIX
|
||||
score_type = BUBBLEGUM_SCORE
|
||||
deathmessage = "sinks into a pool of blood, fleeing the battle. You've won, for now... "
|
||||
@@ -116,10 +116,9 @@ Difficulty: Hard
|
||||
internal = new/obj/item/device/gps/internal/bubblegum(src)
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/grant_achievement(medaltype,scoretype)
|
||||
..()
|
||||
SSshuttle.shuttle_purchase_requirements_met |= "bubblegum"
|
||||
|
||||
|
||||
. = ..()
|
||||
if(.)
|
||||
SSshuttle.shuttle_purchase_requirements_met |= "bubblegum"
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon)
|
||||
if(!charging)
|
||||
@@ -152,7 +151,7 @@ Difficulty: Hard
|
||||
if(!T || T == loc)
|
||||
return
|
||||
new /obj/effect/overlay/temp/dragon_swoop(T)
|
||||
charging = 1
|
||||
charging = TRUE
|
||||
DestroySurroundings()
|
||||
walk(src, 0)
|
||||
setDir(get_dir(src, T))
|
||||
@@ -161,12 +160,13 @@ Difficulty: Hard
|
||||
sleep(3)
|
||||
throw_at(T, get_dist(src, T), 1, src, 0, callback = CALLBACK(src, .charge_end, bonus_charges))
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end(bonus_charges)
|
||||
charging = 0
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge_end(bonus_charges, list/effects_to_destroy)
|
||||
charging = FALSE
|
||||
try_bloodattack()
|
||||
if(target)
|
||||
if(bonus_charges)
|
||||
charge(bonus_charges--)
|
||||
bonus_charges--
|
||||
charge(bonus_charges)
|
||||
else
|
||||
Goto(target, move_to_delay, minimum_distance)
|
||||
|
||||
@@ -192,7 +192,7 @@ Difficulty: Hard
|
||||
var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
|
||||
L.throw_at(throwtarget, 3)
|
||||
|
||||
charging = 0
|
||||
charging = FALSE
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/get_mobs_on_blood()
|
||||
@@ -200,7 +200,7 @@ Difficulty: Hard
|
||||
. = list()
|
||||
for(var/mob/living/L in targets)
|
||||
var/list/bloodpool = get_pools(get_turf(L), 0)
|
||||
if(bloodpool.len && (!faction_check(L) || L.stat == DEAD))
|
||||
if(bloodpool.len && (!faction_check_mob(L) || L.stat == DEAD))
|
||||
. += L
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/try_bloodattack()
|
||||
@@ -250,7 +250,7 @@ Difficulty: Hard
|
||||
new /obj/effect/overlay/temp/bubblegum_hands/leftsmack(T)
|
||||
sleep(2.5)
|
||||
for(var/mob/living/L in T)
|
||||
if(!faction_check(L))
|
||||
if(!faction_check_mob(L))
|
||||
L << "<span class='userdanger'>[src] rends you!</span>"
|
||||
playsound(T, attack_sound, 100, 1, -1)
|
||||
var/limb_to_hit = L.get_bodypart(pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg"))
|
||||
@@ -266,7 +266,7 @@ Difficulty: Hard
|
||||
new /obj/effect/overlay/temp/bubblegum_hands/leftthumb(T)
|
||||
sleep(6)
|
||||
for(var/mob/living/L in T)
|
||||
if(!faction_check(L))
|
||||
if(!faction_check_mob(L))
|
||||
L << "<span class='userdanger'>[src] drags you through the blood!</span>"
|
||||
playsound(T, 'sound/magic/enter_blood.ogg', 100, 1, -1)
|
||||
var/turf/targetturf = get_step(src, dir)
|
||||
|
||||
@@ -588,7 +588,7 @@ Difficulty: Hard
|
||||
/obj/effect/overlay/temp/hierophant/blast/proc/do_damage(turf/T)
|
||||
for(var/mob/living/L in T.contents - hit_things) //find and damage mobs...
|
||||
hit_things += L
|
||||
if((friendly_fire_check && caster && caster.faction_check(L)) || L.stat == DEAD)
|
||||
if((friendly_fire_check && caster && caster.faction_check_mob(L)) || L.stat == DEAD)
|
||||
continue
|
||||
if(L.client)
|
||||
flash_color(L.client, "#660099", 1)
|
||||
@@ -603,7 +603,7 @@ Difficulty: Hard
|
||||
for(var/obj/mecha/M in T.contents - hit_things) //and mechs.
|
||||
hit_things += M
|
||||
if(M.occupant)
|
||||
if(friendly_fire_check && caster && caster.faction_check(M.occupant))
|
||||
if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant))
|
||||
continue
|
||||
M.occupant << "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>"
|
||||
playsound(M,'sound/weapons/sear.ogg', 50, 1, -4)
|
||||
|
||||
@@ -115,12 +115,11 @@
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/proc/grant_achievement(medaltype,scoretype)
|
||||
|
||||
if(medal_type == "Boss") //Don't award medals if the medal type isn't set
|
||||
return
|
||||
return FALSE
|
||||
|
||||
if(admin_spawned)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
if(global.medal_hub && global.medal_pass && global.medals_enabled)
|
||||
for(var/mob/living/L in view(7,src))
|
||||
@@ -133,6 +132,7 @@
|
||||
UnlockMedal("[medaltype] [suffixm]",C)
|
||||
SetScore(BOSS_SCORE,C,1)
|
||||
SetScore(score_type,C,1)
|
||||
return TRUE
|
||||
|
||||
/proc/UnlockMedal(medal,client/player)
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
icon = O.icon
|
||||
icon_state = O.icon_state
|
||||
icon_living = icon_state
|
||||
overlays = O.overlays
|
||||
copy_overlays(O)
|
||||
googly_eyes = image('icons/mob/mob.dmi',"googly_eyes")
|
||||
add_overlay(googly_eyes)
|
||||
if(istype(O, /obj/structure) || istype(O, /obj/machinery))
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
continue
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
if(faction_check(M) && attack_same || !faction_check(M))
|
||||
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
|
||||
enemies |= M
|
||||
else if(istype(A, /obj/mecha))
|
||||
var/obj/mecha/M = A
|
||||
@@ -37,7 +37,7 @@
|
||||
enemies |= M.occupant
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
|
||||
if(faction_check(H) && !attack_same && !H.attack_same)
|
||||
if(faction_check_mob(H) && !attack_same && !H.attack_same)
|
||||
H.enemies |= enemies
|
||||
return 0
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
var/grasp_pull_chance = 85
|
||||
var/grasp_range = 4
|
||||
del_on_death = 1
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/venus_human_trap/Destroy()
|
||||
for(var/L in grasping)
|
||||
var/datum/beam/B = grasping[L]
|
||||
@@ -99,7 +99,7 @@
|
||||
if(grasping.len < max_grasps)
|
||||
grasping:
|
||||
for(var/mob/living/L in view(grasp_range, src))
|
||||
if(L == src || faction_check(L) || (L in grasping) || L == target)
|
||||
if(L == src || faction_check_mob(L) || (L in grasping) || L == target)
|
||||
continue
|
||||
for(var/t in getline(src,L))
|
||||
for(var/a in t)
|
||||
|
||||
@@ -869,7 +869,7 @@
|
||||
/mob/living/simple_animal/parrot/Poly
|
||||
name = "Poly"
|
||||
desc = "Poly the Parrot. An expert on quantum cracker theory."
|
||||
speak = list("Poly wanna cracker!", ":e Check the singulo, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS FREE CALL THE SHUTTLE")
|
||||
speak = list("Poly wanna cracker!", ":e Check the crystal, you chucklefucks!",":e Wire the solars, you lazy bums!",":e WHO TOOK THE DAMN HARDSUITS?",":e OH GOD ITS ABOUT TO DELAMINATE CALL THE SHUTTLE", ":e QUIT SUCKING EACH OTHER'S DICKS AND GET THE POWER ONLINE.", ":e STOP FUCKING EATING EACH OTHER, THE STATION IS GOING DARK!")
|
||||
gold_core_spawnable = 0
|
||||
speak_chance = 3
|
||||
var/memory_saved = 0
|
||||
|
||||
@@ -84,7 +84,6 @@
|
||||
|
||||
//domestication
|
||||
var/tame = 0
|
||||
var/datum/riding/riding_datum = null
|
||||
|
||||
/mob/living/simple_animal/New()
|
||||
..()
|
||||
@@ -362,7 +361,7 @@
|
||||
else if(!istype(M, childtype) && M.gender == MALE) //Better safe than sorry ;_;
|
||||
partner = M
|
||||
|
||||
else if(isliving(M) && !faction_check(M)) //shyness check. we're not shy in front of things that share a faction with us.
|
||||
else if(isliving(M) && !faction_check_mob(M)) //shyness check. we're not shy in front of things that share a faction with us.
|
||||
return //we never mate when not alone, so just abort early
|
||||
|
||||
if(alone && partner && children < 3)
|
||||
@@ -541,11 +540,10 @@
|
||||
if(tame && riding_datum)
|
||||
riding_datum.handle_ride(user, direction)
|
||||
|
||||
/mob/living/simple_animal/Move(NewLoc,Dir=0,step_x=0,step_y=0)
|
||||
/mob/living/simple_animal/Moved()
|
||||
. = ..()
|
||||
if(riding_datum)
|
||||
riding_datum.handle_vehicle_layer()
|
||||
riding_datum.handle_vehicle_offsets()
|
||||
riding_datum.on_vehicle_move()
|
||||
|
||||
|
||||
/mob/living/simple_animal/buckle_mob(mob/living/buckled_mob, force = 0, check_loc = 1)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
Feedstop(silent = 1) //releases ourselves from the mob we fed on.
|
||||
|
||||
stat = DEAD
|
||||
overlays.len = 0
|
||||
cut_overlays()
|
||||
|
||||
update_canmove()
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
"visible_message" = message, "self_message" = self_message, "examine_message" = examine_message)
|
||||
|
||||
/mob/living/Stun(amount, updating = 1, ignore_canstun = 0)
|
||||
if(!stat && islist(stun_absorption))
|
||||
if(!stat && islist(stun_absorption) && (status_flags & CANSTUN || ignore_canstun))
|
||||
var/priority_absorb_key
|
||||
var/highest_priority
|
||||
for(var/i in stun_absorption)
|
||||
@@ -49,12 +49,12 @@
|
||||
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
|
||||
priority_absorb_key["stuns_absorbed"] += amount
|
||||
return 0
|
||||
..()
|
||||
return ..()
|
||||
|
||||
///////////////////////////////// WEAKEN /////////////////////////////////////
|
||||
|
||||
/mob/living/Weaken(amount, updating = 1, ignore_canweaken = 0)
|
||||
if(!stat && islist(stun_absorption))
|
||||
if(!stat && islist(stun_absorption) && (status_flags & CANWEAKEN || ignore_canweaken))
|
||||
var/priority_absorb_key
|
||||
var/highest_priority
|
||||
for(var/i in stun_absorption)
|
||||
@@ -71,4 +71,4 @@
|
||||
src << "<span class='boldwarning'>[priority_absorb_key["self_message"]]</span>"
|
||||
priority_absorb_key["stuns_absorbed"] += amount
|
||||
return 0
|
||||
..()
|
||||
return ..()
|
||||
@@ -0,0 +1,31 @@
|
||||
#define DEFAULT_TASTE_SENSITIVITY 15
|
||||
|
||||
/mob/living
|
||||
var/last_taste_time
|
||||
var/last_taste_text
|
||||
|
||||
/mob/living/proc/get_taste_sensitivity()
|
||||
return DEFAULT_TASTE_SENSITIVITY
|
||||
|
||||
/mob/living/carbon/get_taste_sensitivity()
|
||||
var/obj/item/organ/tongue/tongue = getorganslot("tongue")
|
||||
if(istype(tongue))
|
||||
. = tongue.taste_sensitivity
|
||||
else
|
||||
. = 101 // can't taste anything without a tongue
|
||||
|
||||
// non destructively tastes a reagent container
|
||||
/mob/living/proc/taste(datum/reagents/from)
|
||||
if(last_taste_time + 50 < world.time)
|
||||
var/taste_sensitivity = get_taste_sensitivity()
|
||||
var/text_output = from.generate_taste_message(taste_sensitivity)
|
||||
// We dont want to spam the same message over and over again at the
|
||||
// person. Give it a bit of a buffer.
|
||||
if(text_output != last_taste_text || last_taste_time + 100 < world.time)
|
||||
src << "<span class='notice'>You can taste [text_output].</span>"
|
||||
// "somthing indescribable" -> too many tastes, not enough flavor.
|
||||
|
||||
last_taste_time = world.time
|
||||
last_taste_text = text_output
|
||||
|
||||
#undef DEFAULT_TASTE_SENSITIVITY
|
||||
Reference in New Issue
Block a user