Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into syntheticbloods
This commit is contained in:
@@ -258,7 +258,7 @@
|
||||
else
|
||||
return
|
||||
|
||||
if(do_mob(usr, src, POCKET_STRIP_DELAY/delay_denominator)) //placing an item into the pocket is 4 times faster
|
||||
if(do_mob(usr, src, POCKET_STRIP_DELAY/delay_denominator, ignorehelditem = TRUE)) //placing an item into the pocket is 4 times faster
|
||||
if(pocket_item)
|
||||
if(pocket_item == (pocket_id == SLOT_R_STORE ? r_store : l_store)) //item still in the pocket we search
|
||||
dropItemToGround(pocket_item)
|
||||
|
||||
@@ -309,6 +309,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
else
|
||||
if(C.client)
|
||||
C.canbearoused = C.client.prefs.arousable
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(NOGENITALS in H.dna.species.species_traits)
|
||||
H.give_genitals(TRUE) //call the clean up proc to delete anything on the mob then return.
|
||||
|
||||
// EDIT ENDS
|
||||
|
||||
/datum/species/proc/on_species_loss(mob/living/carbon/human/C, datum/species/new_species, pref_load)
|
||||
@@ -1485,39 +1490,51 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
|
||||
// CITADEL EDIT slap mouthy gits and booty
|
||||
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/aim_for_mouth = user.zone_selected == "mouth"
|
||||
var/target_on_help = target.a_intent == INTENT_HELP
|
||||
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.")
|
||||
if (!target.has_trait(TRAIT_NYMPHO))
|
||||
stop_wagging_tail(target)
|
||||
return FALSE
|
||||
var/same_dir = (target.dir & user.dir)
|
||||
var/aim_for_groin = user.zone_selected == "groin"
|
||||
var/target_aiming_for_groin = target.zone_selected == "groin"
|
||||
if(aim_for_groin && (target_on_help_and_unarmed || target_restrained || target_aiming_for_groin))
|
||||
|
||||
if(target.check_block()) //END EDIT
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
|
||||
return 0
|
||||
else if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted!</span>")
|
||||
return FALSE
|
||||
|
||||
else if(aim_for_mouth && ( target_on_help || 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]'s ass!</span>",
|
||||
"<span class='notice'>You slap [target]'s ass! </span>",\
|
||||
"You hear a slap.")
|
||||
|
||||
user.visible_message(\
|
||||
"<span class='danger'>\The [user] slaps \the [target] in the face!</span>",\
|
||||
"<span class='notice'>You slap [user == target ? "yourself" : "\the [target]"] in the face! </span>",\
|
||||
"You hear a slap."
|
||||
)
|
||||
if (!target.has_trait(TRAIT_NYMPHO))
|
||||
stop_wagging_tail(target)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_FACE_SLAP)
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
return FALSE
|
||||
else if(aim_for_groin && (target == user || target.lying || same_dir) && (target_on_help || target_restrained || target_aiming_for_groin))
|
||||
playsound(target.loc, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message(\
|
||||
"<span class='danger'>\The [user] slaps \the [target]'s ass!</span>",\
|
||||
"<span class='notice'>You slap [user == target ? "your" : "\the [target]'s"] ass!</span>",\
|
||||
"You hear a slap."
|
||||
)
|
||||
if (target.canbearoused)
|
||||
target.adjustArousalLoss(5)
|
||||
if (target.getArousalLoss() >= 100 && ishuman(target) && target.has_trait(TRAIT_NYMPHO) && target.has_dna())
|
||||
if (target.getArousalLoss() >= 100 && ishuman(target) && target.has_trait(TRAIT_MASO) && target.has_dna())
|
||||
target.mob_climax(forced_climax=TRUE)
|
||||
if (!target.has_trait(TRAIT_NYMPHO))
|
||||
stop_wagging_tail(target)
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_ASS_SLAP)
|
||||
user.adjustStaminaLossBuffered(3)
|
||||
return FALSE
|
||||
else if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(user, "<span class='warning'>You're too exhausted.</span>")
|
||||
return FALSE
|
||||
else if(target.check_block()) //END EDIT
|
||||
target.visible_message("<span class='warning'>[target] blocks [user]'s disarm attempt!</span>")
|
||||
return 0
|
||||
if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
else if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return 1
|
||||
else
|
||||
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
|
||||
@@ -1743,6 +1760,11 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(BP)
|
||||
if(damage > 0 ? BP.receive_damage(damage * hit_percent * brutemod * H.physiology.brute_mod, 0) : BP.heal_damage(abs(damage * hit_percent * brutemod * H.physiology.brute_mod), 0))
|
||||
H.update_damage_overlays()
|
||||
if(H.has_trait(TRAIT_MASO))
|
||||
H.adjustArousalLoss(damage * brutemod * H.physiology.brute_mod)
|
||||
if (H.getArousalLoss() >= 100 && ishuman(H) && H.has_dna())
|
||||
H.mob_climax(forced_climax=TRUE)
|
||||
|
||||
else//no bodypart, we deal damage with a more general method.
|
||||
H.adjustBruteLoss(damage * hit_percent * brutemod * H.physiology.brute_mod)
|
||||
if(BURN)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
id = "abductor"
|
||||
say_mod = "gibbers"
|
||||
sexes = FALSE
|
||||
species_traits = list(NOBLOOD,NOEYES,NOGENITALS)
|
||||
species_traits = list(NOBLOOD,NOEYES,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NOGUNS,TRAIT_NOHUNGER,TRAIT_NOBREATH)
|
||||
mutanttongue = /obj/item/organ/tongue/abductor
|
||||
var/scientist = FALSE // vars to not pollute spieces list with castes
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Android"
|
||||
id = "android"
|
||||
say_mod = "states"
|
||||
species_traits = list(NOBLOOD,NOGENITALS)
|
||||
species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_RADIMMUNE,TRAIT_NOFIRE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_LIMBATTACHMENT)
|
||||
inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID)
|
||||
meat = null
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Animated beings of stone. They have increased defenses, and do not need to breathe. They're also slow as fuuuck.
|
||||
name = "Golem"
|
||||
id = "iron golem"
|
||||
species_traits = list(NOBLOOD,MUTCOLORS,NO_UNDERWEAR,NOGENITALS)
|
||||
species_traits = list(NOBLOOD,MUTCOLORS,NO_UNDERWEAR,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOFIRE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER)
|
||||
inherent_biotypes = list(MOB_INORGANIC, MOB_HUMANOID)
|
||||
mutant_organs = list(/obj/item/organ/adamantine_resonator)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
nojumpsuit = TRUE
|
||||
|
||||
say_mod = "poofs" //what does a mushroom sound like
|
||||
species_traits = list(MUTCOLORS, NOEYES, NO_UNDERWEAR,NOGENITALS)
|
||||
species_traits = list(MUTCOLORS, NOEYES, NO_UNDERWEAR,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_NOBREATH)
|
||||
speedmod = 1.5 //faster than golems but not by much
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
burnmod = 1.5
|
||||
blacklisted = TRUE
|
||||
no_equip = list(SLOT_WEAR_MASK, SLOT_WEAR_SUIT, SLOT_GLOVES, SLOT_SHOES, SLOT_W_UNIFORM, SLOT_S_STORE)
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES,NOGENITALS)
|
||||
species_traits = list(NOBLOOD,NO_UNDERWEAR,NO_DNA_COPY,NOTRANSSTING,NOEYES,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_RESISTCOLD,TRAIT_NOBREATH,TRAIT_RESISTHIGHPRESSURE,TRAIT_RESISTLOWPRESSURE,TRAIT_NOGUNS,TRAIT_RADIMMUNE,TRAIT_VIRUSIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER)
|
||||
mutanteyes = /obj/item/organ/eyes/night_vision/nightmare
|
||||
mutant_organs = list(/obj/item/organ/heart/nightmare)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
blacklisted = 1
|
||||
sexes = 0
|
||||
meat = /obj/item/reagent_containers/food/snacks/meat/slab/human/mutant/skeleton
|
||||
species_traits = list(NOBLOOD,NOGENITALS)
|
||||
species_traits = list(NOBLOOD,NOGENITALS,NOAROUSAL)
|
||||
inherent_traits = list(TRAIT_RESISTHEAT,TRAIT_NOBREATH,TRAIT_RESISTCOLD,TRAIT_RADIMMUNE,TRAIT_PIERCEIMMUNE,TRAIT_NOHUNGER,TRAIT_EASYDISMEMBER,TRAIT_LIMBATTACHMENT,TRAIT_FAKEDEATH)
|
||||
inherent_biotypes = list(MOB_UNDEAD, MOB_HUMANOID)
|
||||
mutanttongue = /obj/item/organ/tongue/bone
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
id = "synth"
|
||||
say_mod = "beep boops" //inherited from a user's real species
|
||||
sexes = 0
|
||||
species_traits = list(NOTRANSSTING,NOGENITALS) //all of these + whatever we inherit from the real species
|
||||
species_traits = list(NOTRANSSTING,NOGENITALS,NOAROUSAL) //all of these + whatever we inherit from the real species
|
||||
inherent_traits = list(TRAIT_VIRUSIMMUNE,TRAIT_NODISMEMBER,TRAIT_NOHUNGER,TRAIT_NOBREATH)
|
||||
inherent_biotypes = list(MOB_ROBOTIC, MOB_HUMANOID)
|
||||
dangerous_existence = 1
|
||||
|
||||
@@ -103,21 +103,23 @@
|
||||
|
||||
//CIT CHANGES START HERE - makes it so resting stops you from moving through standing folks without a short delay
|
||||
if(resting && !L.resting)
|
||||
if(attemptingcrawl)
|
||||
return TRUE
|
||||
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(src, "<span class='warning'>You're too exhausted to crawl under [L].</span>")
|
||||
return TRUE
|
||||
attemptingcrawl = TRUE
|
||||
var/origtargetloc = L.loc
|
||||
visible_message("<span class='notice'>[src] is attempting to crawl under [L].</span>", "<span class='notice'>You are now attempting to crawl under [L].</span>")
|
||||
if(do_after(src, CRAWLUNDER_DELAY, target = src))
|
||||
if(resting)
|
||||
var/src_passmob = (pass_flags & PASSMOB)
|
||||
pass_flags |= PASSMOB
|
||||
Move(origtargetloc)
|
||||
if(!src_passmob)
|
||||
pass_flags &= ~PASSMOB
|
||||
if(!pulledby)
|
||||
if(attemptingcrawl)
|
||||
return TRUE
|
||||
if(getStaminaLoss() >= STAMINA_SOFTCRIT)
|
||||
to_chat(src, "<span class='warning'>You're too exhausted to crawl under [L].</span>")
|
||||
return TRUE
|
||||
attemptingcrawl = TRUE
|
||||
visible_message("<span class='notice'>[src] is attempting to crawl under [L].</span>", "<span class='notice'>You are now attempting to crawl under [L].</span>")
|
||||
if(!do_after(src, CRAWLUNDER_DELAY, target = src) || !resting)
|
||||
attemptingcrawl = FALSE
|
||||
return TRUE
|
||||
var/src_passmob = (pass_flags & PASSMOB)
|
||||
pass_flags |= PASSMOB
|
||||
Move(origtargetloc)
|
||||
if(!src_passmob)
|
||||
pass_flags &= ~PASSMOB
|
||||
attemptingcrawl = FALSE
|
||||
return TRUE
|
||||
//END OF CIT CHANGES
|
||||
@@ -698,7 +700,7 @@
|
||||
who.visible_message("<span class='danger'>[src] tries to remove [who]'s [what.name].</span>", \
|
||||
"<span class='userdanger'>[src] tries to remove [who]'s [what.name].</span>")
|
||||
what.add_fingerprint(src)
|
||||
if(do_mob(src, who, what.strip_delay))
|
||||
if(do_mob(src, who, what.strip_delay, ignorehelditem = TRUE))
|
||||
if(what && Adjacent(who))
|
||||
if(islist(where))
|
||||
var/list/L = where
|
||||
|
||||
@@ -505,3 +505,33 @@
|
||||
to_chat(user, "<span class='notice'>You unbolt [src]'s energy swords</span>")
|
||||
for(var/IS in 1 to swordamt)
|
||||
new /obj/item/melee/transforming/energy/sword/saber(Tsec)
|
||||
|
||||
//Firebot Assembly
|
||||
/obj/item/bot_assembly/firebot
|
||||
name = "incomplete firebot assembly"
|
||||
desc = "A fire extinguisher with an arm attached to it."
|
||||
icon_state = "firebot_arm"
|
||||
created_name = "Firebot"
|
||||
|
||||
/obj/item/bot_assembly/firebot/attackby(obj/item/I, mob/user, params)
|
||||
..()
|
||||
switch(build_step)
|
||||
if(ASSEMBLY_FIRST_STEP)
|
||||
if(istype(I, /obj/item/clothing/head/hardhat/red))
|
||||
if(!user.temporarilyRemoveItemFromInventory(I))
|
||||
return
|
||||
to_chat(user,"<span class='notice'>You add the [I] to [src]!</span>")
|
||||
icon_state = "firebot_helmet"
|
||||
desc = "An incomplete firebot assembly with a fire helmet."
|
||||
qdel(I)
|
||||
build_step++
|
||||
|
||||
if(ASSEMBLY_SECOND_STEP)
|
||||
if(isprox(I))
|
||||
if(!can_finish_build(I, user))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You add the [I] to [src]! Beep Boop!</span>")
|
||||
var/mob/living/simple_animal/bot/firebot/F = new(drop_location())
|
||||
F.name = created_name
|
||||
qdel(I)
|
||||
qdel(src)
|
||||
|
||||
@@ -0,0 +1,325 @@
|
||||
//Firebot
|
||||
|
||||
#define SPEECH_INTERVAL 300 // Time between idle speeches
|
||||
#define DETECTED_VOICE_INTERVAL 300 // Time between fire detected callouts
|
||||
#define FOAM_INTERVAL 50 // Time between deployment of fire fighting foam
|
||||
|
||||
/mob/living/simple_animal/bot/firebot
|
||||
name = "\improper Firebot"
|
||||
desc = "A little fire extinguishing bot. He looks rather anxious."
|
||||
icon = 'icons/mob/aibots.dmi'
|
||||
icon_state = "firebot"
|
||||
density = FALSE
|
||||
anchored = FALSE
|
||||
health = 25
|
||||
maxHealth = 25
|
||||
spacewalk = TRUE
|
||||
|
||||
radio_key = /obj/item/encryptionkey/headset_eng
|
||||
radio_channel = "Engineering"
|
||||
bot_type = FIRE_BOT
|
||||
model = "Firebot"
|
||||
bot_core = /obj/machinery/bot_core/firebot
|
||||
window_id = "autoextinguisher"
|
||||
window_name = "Mobile Fire Extinguisher v1.0"
|
||||
path_image_color = "#FFA500"
|
||||
|
||||
var/atom/target_fire
|
||||
var/atom/old_target_fire
|
||||
|
||||
var/obj/item/extinguisher/internal_ext
|
||||
|
||||
var/last_found = 0
|
||||
|
||||
var/speech_cooldown = 0
|
||||
var/detected_cooldown = 0
|
||||
var/foam_cooldown = 0
|
||||
|
||||
var/extinguish_people = TRUE
|
||||
var/extinguish_fires = TRUE
|
||||
var/stationary_mode = FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
var/datum/job/engineer/J = new/datum/job/engineer
|
||||
access_card.access += J.get_access()
|
||||
prev_access = access_card.access
|
||||
|
||||
create_extinguisher()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/bot_reset()
|
||||
create_extinguisher()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/create_extinguisher()
|
||||
internal_ext = new /obj/item/extinguisher(src)
|
||||
internal_ext.safety = FALSE
|
||||
internal_ext.precision = TRUE
|
||||
internal_ext.max_water = INFINITY
|
||||
internal_ext.refill()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
if(internal_ext)
|
||||
internal_ext.afterattack(A, src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/RangedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
if(internal_ext)
|
||||
internal_ext.afterattack(A, src)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/turn_on()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/turn_off()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/bot_reset()
|
||||
..()
|
||||
target_fire = null
|
||||
old_target_fire = null
|
||||
ignore_list = list()
|
||||
anchored = FALSE
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/soft_reset()
|
||||
path = list()
|
||||
target_fire = null
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/set_custom_texts()
|
||||
text_hack = "You corrupt [name]'s safety protocols."
|
||||
text_dehack = "You detect errors in [name] and reset his programming."
|
||||
text_dehack_fail = "[name] is not responding to reset commands!"
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/get_controls(mob/user)
|
||||
var/dat
|
||||
dat += hack(user)
|
||||
dat += showpai(user)
|
||||
dat += "<TT><B>Mobile Fire Extinguisher v1.0</B></TT><BR><BR>"
|
||||
dat += "Status: <A href='?src=[REF(src)];power=1'>[on ? "On" : "Off"]</A><BR>"
|
||||
dat += "Maintenance panel panel is [open ? "opened" : "closed"]<BR>"
|
||||
|
||||
dat += "Behaviour controls are [locked ? "locked" : "unlocked"]<BR>"
|
||||
if(!locked || issilicon(user) || IsAdminGhost(user))
|
||||
dat += "Extinguish Fires: <A href='?src=[REF(src)];operation=extinguish_fires'>[extinguish_fires ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Extinguish People: <A href='?src=[REF(src)];operation=extinguish_people'>[extinguish_people ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Patrol Station: <A href='?src=[REF(src)];operation=patrol'>[auto_patrol ? "Yes" : "No"]</A><BR>"
|
||||
dat += "Stationary Mode: <a href='?src=[REF(src)];operation=stationary_mode'>[stationary_mode ? "Yes" : "No"]</a><br>"
|
||||
|
||||
return dat
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/emag_act(mob/user)
|
||||
..()
|
||||
if(emagged == 1)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>[src] buzzes and beeps.</span>")
|
||||
audible_message("<span class='danger'>[src] buzzes oddly!</span>")
|
||||
playsound(src, "sparks", 75, TRUE)
|
||||
if(user)
|
||||
old_target_fire = user
|
||||
extinguish_fires = FALSE
|
||||
extinguish_people = TRUE
|
||||
|
||||
internal_ext.chem = "clf3" //Refill the internal extinguisher with liquid fire
|
||||
internal_ext.power = 3
|
||||
internal_ext.safety = FALSE
|
||||
internal_ext.precision = FALSE
|
||||
internal_ext.max_water = INFINITY
|
||||
internal_ext.refill()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
switch(href_list["operation"])
|
||||
if("extinguish_fires")
|
||||
extinguish_fires = !extinguish_fires
|
||||
if("extinguish_people")
|
||||
extinguish_people = !extinguish_people
|
||||
if("stationary_mode")
|
||||
stationary_mode = !stationary_mode
|
||||
|
||||
update_controls()
|
||||
update_icon()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/is_burning(atom/target)
|
||||
if(ismob(target))
|
||||
var/mob/living/M = target
|
||||
if(M.on_fire || (emagged == 1 && !M.on_fire))
|
||||
return TRUE
|
||||
|
||||
else if(isturf(target))
|
||||
var/turf/open/T = target
|
||||
if(T.active_hotspot)
|
||||
return TRUE
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/handle_automated_action()
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if(IsStun())
|
||||
old_target_fire = target_fire
|
||||
target_fire = null
|
||||
mode = BOT_IDLE
|
||||
return
|
||||
|
||||
if(prob(1) && target_fire == null)
|
||||
var/list/messagevoice = list("No fires detected." = 'sound/voice/firebot/nofires.ogg',
|
||||
"Only you can prevent station fires." = 'sound/voice/firebot/onlyyou.ogg',
|
||||
"Temperature nominal." = 'sound/voice/firebot/tempnominal.ogg',
|
||||
"Keep it cool." = 'sound/voice/firebot/keepitcool.ogg')
|
||||
var/message = pick(messagevoice)
|
||||
speak(message)
|
||||
playsound(src, messagevoice[message], 50)
|
||||
|
||||
// Couldn't reach the target, reset and try again ignoring the old one
|
||||
if(frustration > 8)
|
||||
old_target_fire = target_fire
|
||||
soft_reset()
|
||||
|
||||
// We extinguished our target or it was deleted
|
||||
if(QDELETED(target_fire) || !is_burning(target_fire) || isdead(target_fire))
|
||||
target_fire = null
|
||||
var/scan_range = (stationary_mode ? 1 : DEFAULT_SCAN_RANGE)
|
||||
|
||||
if(extinguish_people)
|
||||
target_fire = scan(/mob/living, old_target_fire, scan_range) // Scan for burning humans first
|
||||
|
||||
if(target_fire == null && extinguish_fires)
|
||||
target_fire = scan(/turf/open, old_target_fire, scan_range) // Scan for burning turfs second
|
||||
|
||||
old_target_fire = target_fire
|
||||
|
||||
// Target reached ENGAGE WATER CANNON
|
||||
if(target_fire && (get_dist(src, target_fire) <= (emagged == 1 ? 1 : 2))) // Make the bot spray water from afar when not emagged
|
||||
if((speech_cooldown + SPEECH_INTERVAL) < world.time)
|
||||
if(ishuman(target_fire))
|
||||
speak("Stop, drop and roll!")
|
||||
playsound(src, "sound/voice/firebot/stopdropnroll.ogg", 50, 0)
|
||||
else
|
||||
speak("Extinguishing!")
|
||||
playsound(src, "sound/voice/firebot/extinguishing.ogg", 50, 0)
|
||||
speech_cooldown = world.time
|
||||
|
||||
flick("firebot1_use", src)
|
||||
spray_water(target_fire, src)
|
||||
|
||||
soft_reset()
|
||||
|
||||
// Target ran away
|
||||
else if(target_fire && path.len && (get_dist(target_fire,path[path.len]) > 2))
|
||||
path = list()
|
||||
mode = BOT_IDLE
|
||||
last_found = world.time
|
||||
|
||||
else if(target_fire && stationary_mode)
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
if(target_fire && (get_dist(src, target_fire) > 2))
|
||||
|
||||
path = get_path_to(src, get_turf(target_fire), /turf/proc/Distance_cardinal, 0, 30, 1, id=access_card)
|
||||
mode = BOT_MOVING
|
||||
if(!path.len)
|
||||
soft_reset()
|
||||
|
||||
if(path.len > 0 && target_fire)
|
||||
if(!bot_move(path[path.len]))
|
||||
old_target_fire = target_fire
|
||||
soft_reset()
|
||||
return
|
||||
|
||||
// We got a target but it's too far away from us
|
||||
if(path.len > 8 && target_fire)
|
||||
frustration++
|
||||
|
||||
if(auto_patrol && !target_fire && !stationary_mode)
|
||||
if(mode == BOT_IDLE || mode == BOT_START_PATROL)
|
||||
start_patrol()
|
||||
|
||||
if(mode == BOT_PATROL)
|
||||
bot_patrol()
|
||||
|
||||
|
||||
//Look for burning people or turfs around the bot
|
||||
/mob/living/simple_animal/bot/firebot/process_scan(atom/scan_target)
|
||||
var/result
|
||||
|
||||
if(scan_target == src)
|
||||
return result
|
||||
|
||||
if(is_burning(scan_target))
|
||||
if((detected_cooldown + DETECTED_VOICE_INTERVAL) < world.time)
|
||||
speak("Fire detected!")
|
||||
playsound(src, "sound/voice/firebot/detected.ogg", 50, 0)
|
||||
detected_cooldown = world.time
|
||||
result = scan_target
|
||||
|
||||
return result
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && foam_cooldown + FOAM_INTERVAL < world.time)
|
||||
new /obj/effect/particle_effect/foam/firefighting(loc)
|
||||
foam_cooldown = world.time
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/proc/spray_water(atom/target, mob/user)
|
||||
if(stationary_mode)
|
||||
flick("firebots_use", user)
|
||||
else
|
||||
flick("firebot1_use", user)
|
||||
internal_ext.afterattack(target, user, null)
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/update_icon()
|
||||
if(!on)
|
||||
icon_state = "firebot0"
|
||||
return
|
||||
if(IsStun())
|
||||
icon_state = "firebots1"
|
||||
else if(stationary_mode) //Bot has yellow light to indicate stationary mode.
|
||||
icon_state = "firebots1"
|
||||
else
|
||||
icon_state = "firebot1"
|
||||
|
||||
|
||||
/mob/living/simple_animal/bot/firebot/explode()
|
||||
on = FALSE
|
||||
visible_message("<span class='boldannounce'>[src] blows apart!</span>")
|
||||
|
||||
var/atom/Tsec = drop_location()
|
||||
|
||||
new /obj/item/assembly/prox_sensor(Tsec)
|
||||
new /obj/item/clothing/head/hardhat/red(Tsec)
|
||||
|
||||
var/turf/T = get_turf(Tsec)
|
||||
|
||||
if(isopenturf(T))
|
||||
var/turf/open/theturf = T
|
||||
theturf.MakeSlippery(TURF_WET_WATER, min_wet_time = 10 SECONDS, wet_time_to_add = 5 SECONDS)
|
||||
|
||||
if(prob(50))
|
||||
drop_part(robot_arm, Tsec)
|
||||
|
||||
do_sparks(3, TRUE, src)
|
||||
..()
|
||||
|
||||
/obj/machinery/bot_core/firebot
|
||||
req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
|
||||
|
||||
#undef SPEECH_INTERVAL
|
||||
#undef DETECTED_VOICE_INTERVAL
|
||||
#undef FOAM_INTERVAL
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
/mob/living/simple_animal/hostile/syndicate/melee/bullet_act(obj/item/projectile/Proj)
|
||||
if(!Proj)
|
||||
return
|
||||
if(prob(50))
|
||||
if(prob(25))
|
||||
return ..()
|
||||
else
|
||||
visible_message("<span class='danger'>[src] blocks [Proj] with its shield!</span>")
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
var/mood = "" // To show its face
|
||||
var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime
|
||||
var/force_stasis = FALSE
|
||||
|
||||
do_footstep = TRUE
|
||||
|
||||
var/static/regex/slime_name_regex = new("\\w+ (baby|adult) slime \\(\\d+\\)")
|
||||
///////////TIME FOR SUBSPECIES
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
set src in usr
|
||||
if(usr != src)
|
||||
usr << "No."
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. Can also be used for OOC notes about your character.","Flavor Text",html_decode(flavor_text)) as message|null
|
||||
|
||||
if(msg != null)
|
||||
var/msg = stripped_multiline_input(usr, "Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!", "Flavor Text", html_decode(flavor_text), MAX_MESSAGE_LEN*2, TRUE)
|
||||
|
||||
if(!isnull(msg))
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
|
||||
@@ -23,11 +23,12 @@
|
||||
|
||||
/mob/proc/print_flavor_text()
|
||||
if(flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
// We are decoding and then encoding to not only get correct amount of characters, but also to prevent partial escaping characters being shown.
|
||||
var/msg = html_decode(replacetext(flavor_text, "\n", " "))
|
||||
if(lentext(msg) <= 40)
|
||||
return "<span class='notice'>[msg]</span>"
|
||||
return "<span class='notice'>[html_encode(msg)]</span>"
|
||||
else
|
||||
return "<span class='notice'>[copytext(msg, 1, 37)]... <a href='?src=[REF(src)];flavor_more=1'>More...</span></a>"
|
||||
return "<span class='notice'>[html_encode(copytext(msg, 1, 37))]... <a href='?src=[REF(src)];flavor_more=1'>More...</span></a>"
|
||||
|
||||
/mob/proc/get_top_level_mob()
|
||||
if(istype(src.loc,/mob)&&src.loc!=src)
|
||||
|
||||
Reference in New Issue
Block a user