Merge remote-tracking branch 'upstream/master' into face_lock

# Conflicts:
#	code/modules/mob/mob.dm
This commit is contained in:
tigercat2000
2018-05-17 20:21:39 -07:00
944 changed files with 11247 additions and 15005 deletions
+7 -7
View File
@@ -106,7 +106,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
Transfer_mind is there to check if mob is being deleted/not going to have a body.
Works together with spawning an observer, noted above.
*/
/mob/dead/observer/Life()
/mob/dead/observer/Life(seconds, times_fired)
..()
if(!loc) return
if(!client) return 0
@@ -229,18 +229,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/verb/reenter_corpse()
set category = "Ghost"
set name = "Re-enter Corpse"
if(!client) return
if(!can_reenter_corpse)
to_chat(src, "<span class='warning'>You've given up your right to respawn!</span>")
if(!client)
return
if(!(mind && mind.current && can_reenter_corpse))
if(!mind || QDELETED(mind.current))
to_chat(src, "<span class='warning'>You have no body.</span>")
return
if(!can_reenter_corpse)
to_chat(src, "<span class='warning'>You cannot re-enter your body.</span>")
return
if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients
to_chat(usr, "<span class='warning'>Another consciousness is in your body...It is resisting you.</span>")
return
mind.current.ajourn=0
mind.current.key = key
var/obj/structure/morgue/Morgue = locate() in mind.current.loc
@@ -419,7 +419,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(.)
update_following()
/mob/Life()
/mob/Life(seconds, times_fired)
// to catch teleports etc which directly set loc
update_following()
return ..()
+2 -2
View File
@@ -4,7 +4,7 @@
if(!message)
return
log_say("Ghost/[src.key] : [message]")
log_ghostsay(message, src)
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
@@ -26,7 +26,7 @@
if(act != "me")
return
log_emote("Ghost/[src.key] : [message]")
log_ghostemote(message, src)
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
+1 -4
View File
@@ -46,7 +46,7 @@
if(message)
log_emote("[name]/[key] : [message]")
log_emote(message, src)
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that.
@@ -94,7 +94,6 @@
O.show_message(message, m_type)
/mob/proc/emote_dead(var/message)
if(client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='warning'>You cannot send deadchat emotes (muted).</span>")
return
@@ -122,8 +121,6 @@
if(message)
log_emote("Ghost/[src.key] : [message]")
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
+2 -3
View File
@@ -99,7 +99,7 @@
if(!check_can_speak(speaker))
return FALSE
log_say("[key_name(speaker)]: ([name]) [message]")
log_say("([name]-HIVE) [message]", speaker)
if(!speaker_mask)
speaker_mask = speaker.name
@@ -553,14 +553,13 @@
var/drone_only
/datum/language/binary/broadcast(mob/living/speaker, message, speaker_mask)
if(!speaker.binarycheck())
return
if(!message)
return
log_robot("[key_name(speaker)] : [message]")
log_say("(ROBOT) [message]", speaker)
var/message_start = "<i><span class='game say'>[name], <span class='name'>[speaker.name]</span>"
var/message_body = "<span class='message'>[speaker.say_quote(message)],</i><span class='robot'>\"[message]\"</span></span></span>"
@@ -9,15 +9,10 @@
icon = 'icons/mob/alien.dmi'
gender = NEUTER
dna = null
alien_talk_understand = 1
nightvision = 1
var/obj/item/card/id/wear_id = null // Fix for station bounced radios -- Skie
var/has_fine_manipulation = 0
var/move_delay_add = 0 // movement delay to add
status_flags = CANPARALYSE|CANPUSH
@@ -27,7 +22,6 @@
var/heat_protection = 0.5
var/leaping = 0
ventcrawler = 2
var/list/alien_organs = list()
/mob/living/carbon/alien/New()
@@ -118,31 +112,6 @@
else
clear_alert("alien_fire")
/mob/living/carbon/alien/handle_mutations_and_radiation()
// Aliens love radiation nom nom nom
if(radiation)
if(radiation > 100)
radiation = 100
if(radiation < 0)
radiation = 0
switch(radiation)
if(1 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
if(50 to 74)
radiation -= 2
adjustToxLoss(1)
if(prob(5))
radiation -= 5
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
/mob/living/carbon/alien/handle_fire()//Aliens on fire code
if(..())
return
@@ -5,7 +5,7 @@
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob)
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
@@ -35,19 +35,17 @@ In all, this is a lot like the monkey code. /N
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
add_attack_logs(M, src, "Alien attack", FALSE)
updatehealth()
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob)
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
return attack_alien(L)
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
if(..()) //to allow surgery to return properly.
return 0
if(istype(src,/mob/living/carbon/alien/humanoid))
return 0 //this is horrible but 100% necessary
switch(M.a_intent)
if(INTENT_HELP)
@@ -55,12 +53,11 @@ In all, this is a lot like the monkey code. /N
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_HARM, INTENT_DISARM)
M.do_attack_animation(src)
return 1
return 0
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M as mob)
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
@@ -43,7 +43,7 @@ Doesn't work on other aliens/AI.*/
adjustPlasma(-10)
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
log_say("Alien Whisper: [key_name(src)]->[key_name(M)]: [msg]")
log_say("(AWHISPER to [key_name(M)]) [msg]", src)
to_chat(M, "<span class='noticealien'>You hear a strange, alien voice in your head...<span class='noticealien'>[msg]")
to_chat(src, "<span class='noticealien'>You said: [msg] to [M]</span>")
for(var/mob/dead/observer/G in player_list)
@@ -78,138 +78,14 @@
updatehealth()
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(M.Victim) return // can't attack while eating!
if(stat > -100)
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>")
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(10, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
Weaken(power)
if(stuttering < power)
stuttering = power
Stun(power)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
if(..()) //to allow surgery to return properly.
return
switch(M.a_intent)
if(INTENT_HELP)
help_shake_act(M)
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_HARM)
M.do_attack_animation(src)
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)//HULK SMASH
damage = 15
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if(INTENT_DISARM)
if(!lying)
if(prob(5))//Very small chance to push an alien down.
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if(prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M)
..()
var/damage = rand(5, 35)
if(M.is_adult)
damage = rand(10, 40)
adjustBruteLoss(damage)
add_attack_logs(src, M, "Slime'd for [damage] damage")
updatehealth()
return
/mob/living/carbon/alien/humanoid/restrained()
@@ -0,0 +1,45 @@
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M)
if(..())
switch(M.a_intent)
if(INTENT_HARM)
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)//HULK SMASH
damage = 15
spawn(0)
Paralyse(1)
step_away(src, M, 15)
sleep(3)
step_away(src, M, 15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if((stat != DEAD) && (damage > 9||prob(5)))//Regular humans have a very small chance of weakening an alien.
Paralyse(2)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
add_attack_logs(M, src, "Melee attacked with fists")
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if(INTENT_DISARM)
if(!lying)
if(prob(5))//Very small chance to push an alien down.
Paralyse(2)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
add_attack_logs(M, src, "Pushed over")
visible_message("<span class='danger'>[M] has pushed down [src]!</span>", \
"<span class='userdanger'>[M] has pushed down [src]!</span>")
else
if(prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
"<span class='userdanger'>[M] has disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/humanoid/Life()
/mob/living/carbon/alien/humanoid/Life(seconds, times_fired)
. = ..()
update_icons()
@@ -114,7 +114,7 @@
else
to_chat(src, text("Invalid Emote: []", act))
if((message && src.stat == 0))
log_emote("[name]/[key] : [message]")
log_emote(message, src)
if(m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
@@ -73,91 +73,15 @@
/mob/living/carbon/alien/larva/attack_ui(slot_id)
return
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
updatehealth()
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(M.Victim)
return // can't attack while eating!
if(stat != DEAD)
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>")
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M)
..()
switch(M.a_intent)
if(INTENT_HELP)
help_shake_act(M)
if(INTENT_GRAB)
grabbedby(M)
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>", \
"<span class='danger'>You hear someone fall.</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
var/damage = rand(5, 35)
if(M.is_adult)
damage = rand(20, 40)
adjustBruteLoss(damage)
add_attack_logs(src, M, "Slime'd for [damage] damage")
updatehealth()
return
/mob/living/carbon/alien/larva/restrained()
return 0
@@ -0,0 +1,24 @@
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M)
if(..())
var/damage = rand(1, 9)
if(prob(90))
if(HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
step_away(src, M, 15)
sleep(3)
step_away(src, M, 15)
playsound(loc, "punch", 25, 1, -1)
add_attack_logs(M, src, "Melee attacked with fists")
visible_message("<span class='danger'>[M] has kicked [src]!</span>", \
"<span class='userdanger'>[M] has kicked [src]!</span>")
if((stat != DEAD) && (damage > 4.9))
Paralyse(rand(5,10))
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
@@ -1,4 +1,4 @@
/mob/living/carbon/alien/larva/Life()
/mob/living/carbon/alien/larva/Life(seconds, times_fired)
if(..()) //still breathing
// GROW!
if(amount_grown < max_grown)
@@ -96,7 +96,7 @@
if(ticker && ticker.mode)
ticker.mode.xenos += new_xeno.mind
new_xeno.mind.name = new_xeno.name
new_xeno.mind.assigned_role = "MODE"
new_xeno.mind.assigned_role = SPECIAL_ROLE_XENOMORPH
new_xeno.mind.special_role = SPECIAL_ROLE_XENOMORPH
new_xeno << sound('sound/voice/hiss5.ogg',0,0,0,100)//To get the player's attention
+15 -15
View File
@@ -1,4 +1,4 @@
/obj/item/device/mmi
/obj/item/mmi
name = "Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
icon = 'icons/obj/assemblies.dmi'
@@ -16,7 +16,7 @@
var/obj/mecha/mecha = null//This does not appear to be used outside of reference in mecha.dm.
// I'm using this for mechs giving MMIs HUDs now
/obj/item/device/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
/obj/item/mmi/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/organ/internal/brain/crystal ))
to_chat(user, "<span class='warning'> This brain is too malformed to be able to use with the [src].</span>")
return
@@ -65,7 +65,7 @@
/obj/item/device/mmi/attack_self(mob/user as mob)
/obj/item/mmi/attack_self(mob/user as mob)
if(!brainmob)
to_chat(user, "<span class='warning'>You upend the MMI, but there's nothing in it.</span>")
else
@@ -75,7 +75,7 @@
icon_state = "mmi_empty"
name = "Man-Machine Interface"
/obj/item/device/mmi/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->robot people.
/obj/item/mmi/proc/transfer_identity(var/mob/living/carbon/human/H)//Same deal as the regular brain proc. Used for human-->robot people.
brainmob = new(src)
brainmob.name = H.real_name
brainmob.real_name = H.real_name
@@ -98,7 +98,7 @@
//I made this proc as a way to have a brainmob be transferred to any created brain, and to solve the
//problem i was having with alien/nonalien brain drops.
/obj/item/device/mmi/proc/dropbrain(var/turf/dropspot)
/obj/item/mmi/proc/dropbrain(var/turf/dropspot)
if(isnull(held_brain))
log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain in [get_area(src)]."), src)
to_chat(brainmob, "<span class='userdanger'>Your MMI did not contain a brain! We'll make a new one for you, but you'd best report this to the bugtracker!</span>")
@@ -117,19 +117,19 @@
held_brain = null
/obj/item/device/mmi/radio_enabled
/obj/item/mmi/radio_enabled
name = "Radio-enabled Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity. This one comes with a built-in radio."
origin_tech = "biotech=2;programming=3;engineering=2;magnets=2"
var/obj/item/device/radio/radio = null//Let's give it a radio.
var/obj/item/radio/radio = null//Let's give it a radio.
/obj/item/device/mmi/radio_enabled/New()
/obj/item/mmi/radio_enabled/New()
..()
radio = new(src)//Spawns a radio inside the MMI.
radio.broadcasting = 1//So it's broadcasting from the start.
/obj/item/device/mmi/radio_enabled/verb/Toggle_Listening()
/obj/item/mmi/radio_enabled/verb/Toggle_Listening()
set name = "Toggle Listening"
set desc = "Toggle listening channel on or off."
set category = "MMI"
@@ -142,7 +142,7 @@
radio.listening = radio.listening==1 ? 0 : 1
to_chat(brainmob, "<span class='notice'>Radio is [radio.listening==1 ? "now" : "no longer"] receiving broadcast.</span>")
/obj/item/device/mmi/emp_act(severity)
/obj/item/mmi/emp_act(severity)
if(!brainmob)
return
else
@@ -155,14 +155,14 @@
brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/mmi/relaymove(var/mob/user, var/direction)
/obj/item/mmi/relaymove(var/mob/user, var/direction)
if(user.stat || user.stunned)
return
var/obj/item/rig/rig = src.get_rig()
if(rig)
rig.forced_move(direction, user)
/obj/item/device/mmi/Destroy()
/obj/item/mmi/Destroy()
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
borg.mmi = null
@@ -170,13 +170,13 @@
QDEL_NULL(held_brain)
return ..()
/obj/item/device/mmi/syndie
/obj/item/mmi/syndie
name = "Syndicate Man-Machine Interface"
desc = "Syndicate's own brand of MMI. It enforces laws designed to help Syndicate agents achieve their goals upon cyborgs created with it, but doesn't fit in Nanotrasen AI cores."
origin_tech = "biotech=4;programming=4;syndicate=2"
syndiemmi = 1
/obj/item/device/mmi/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
/obj/item/mmi/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
if(!brainmob)
return 0
if(!parent)
@@ -190,7 +190,7 @@
forceMove(holder)
holder.stored_mmi = src
holder.update_from_mmi()
if(istype(src, /obj/item/device/mmi/posibrain))
if(istype(src, /obj/item/mmi/posibrain))
holder.robotize()
if(brainmob && brainmob.mind)
brainmob.mind.transfer_to(H)
@@ -20,22 +20,22 @@
/mob/living/carbon/brain/say_understands(other)//Goddamn is this hackish, but this say code is so odd
if(istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && istype(container, /obj/item/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && istype(container, /obj/item/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && istype(container, /obj/item/mmi)))
return 0
else
return 1
if(istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
if(!(container && istype(container, /obj/item/mmi)))
return 0
else
return 1
@@ -50,7 +50,7 @@
if(in_contents_of(/obj/mecha))
canmove = 1
use_me = 1 //If it can move, let it emote
else if(istype(loc, /obj/item/device/mmi))
else if(istype(loc, /obj/item/mmi))
canmove = 1 //mmi won't move anyways so whatever
else
canmove = 0
@@ -78,11 +78,11 @@ This will return true if the brain has a container that leaves it less helpless
I'm using this for Stat to give it a more nifty interface to work with
*/
/mob/living/carbon/brain/proc/has_synthetic_assistance()
return (container && istype(container, /obj/item/device/mmi)) || in_contents_of(/obj/mecha)
return (container && istype(container, /obj/item/mmi)) || in_contents_of(/obj/mecha)
/mob/living/carbon/brain/proc/get_race()
if(container)
var/obj/item/device/mmi/M = container
var/obj/item/mmi/M = container
if(istype(M) && M.held_brain)
return M.held_brain.dna.get_species_name()
else
@@ -1,6 +1,6 @@
/mob/living/carbon/brain/death(gibbed)
if(stat == DEAD) return
if(!gibbed && container && istype(container, /obj/item/device/mmi))//If not gibbed but in a container.
if(!gibbed && container && istype(container, /obj/item/mmi))//If not gibbed but in a container.
for(var/mob/O in viewers(container, null))
O.show_message(text("<span class='danger'>[]'s MMI flatlines!</span>", src), 1, "<span class='warning'>You hear something flatline.</span>", 2)
container.icon_state = "mmi_dead"
@@ -32,7 +32,7 @@
gibs(loc, dna)
dead_mob_list -= src
if(container && istype(container, /obj/item/device/mmi))
if(container && istype(container, /obj/item/mmi))
qdel(container)//Gets rid of the MMI if there is one
if(loc)
if(istype(loc,/obj/item/organ/internal/brain))
@@ -1,5 +1,5 @@
/mob/living/carbon/brain/emote(var/act,var/m_type=1,var/message = null)
if(!(container && istype(container, /obj/item/device/mmi)))//No MMI, no emotes
if(!(container && istype(container, /obj/item/mmi)))//No MMI, no emotes
return
if(findtext(act, "-", 1, null))
+2 -21
View File
@@ -1,36 +1,20 @@
/mob/living/carbon/brain/handle_mutations_and_radiation()
if(radiation)
if(radiation > 100)
radiation -= 3
adjustToxLoss(3)
updatehealth()
if(!container)
to_chat(src, "<span class='danger'>You feel weak.</span>")
else
to_chat(src, "<span class='danger'>STATUS: CRITICAL AMOUNTS OF RADIATION DETECTED.</span>")
switch(radiation)
if(0 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
updatehealth()
if(50 to 74)
radiation -= 2
adjustToxLoss(1)
if(50 to 75)
if(prob(5))
radiation -= 5
if(!container)
to_chat(src, "<span class='danger'>You feel weak.</span>")
else
to_chat(src, "<span class='danger'>STATUS: DANGEROUS AMOUNTS OF RADIATION DETECTED.</span>")
updatehealth()
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
updatehealth()
..()
/mob/living/carbon/brain/proc/handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(status_flags & GODMODE)
@@ -38,13 +22,10 @@
if(exposed_temperature > bodytemperature)
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
//adjustFireLoss(5.0*discomfort)
adjustFireLoss(20.0*discomfort)
else
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//adjustFireLoss(2.5*discomfort)
adjustFireLoss(5.0*discomfort)
/mob/living/carbon/brain/handle_regular_status_updates()
@@ -1,4 +1,4 @@
/obj/item/device/mmi/posibrain
/obj/item/mmi/posibrain
name = "positronic brain"
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves."
icon = 'icons/obj/assemblies.dmi'
@@ -15,11 +15,11 @@
var/silenced = 0 //if set to 1, they can't talk.
var/next_ping_at = 0
/obj/item/device/mmi/posibrain/examine(mob/user)
/obj/item/mmi/posibrain/examine(mob/user)
if(..(user, 1))
to_chat(user, "Its speaker is turned [silenced ? "off" : "on"].")
/obj/item/device/mmi/posibrain/attack_self(mob/user)
/obj/item/mmi/posibrain/attack_self(mob/user)
if(brainmob && !brainmob.key && searching == 0)
//Start the process of searching for a new user.
to_chat(user, "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>")
@@ -41,12 +41,12 @@
if(brainmob && brainmob.key)
to_chat(brainmob, "<span class='warning'>Your internal speaker has been toggled [silenced ? "off" : "on"].</span>")
/obj/item/device/mmi/posibrain/proc/request_player()
/obj/item/mmi/posibrain/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(check_observer(O))
to_chat(O, "<span class='boldnotice'>\A [src] has been activated. (<a href='?src=[O.UID()];jump=\ref[src]'>Teleport</a> | <a href='?src=[UID()];signup=\ref[O]'>Sign Up</a>)</span>")
/obj/item/device/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O)
/obj/item/mmi/posibrain/proc/check_observer(var/mob/dead/observer/O)
if(cannotPossess(O))
return 0
if(jobban_isbanned(O, "Cyborg") || jobban_isbanned(O,"nonhumandept"))
@@ -57,7 +57,7 @@
return 1
return 0
/obj/item/device/mmi/posibrain/proc/question(var/client/C)
/obj/item/mmi/posibrain/proc/question(var/client/C)
spawn(0)
if(!C) return
var/response = alert(C, "Someone is requesting a personality for a positronic brain. Would you like to play as one?", "Positronic brain request", "Yes", "No", "Never for this round")
@@ -68,11 +68,11 @@
C.prefs.be_special -= ROLE_POSIBRAIN
// This should not ever happen, but let's be safe
/obj/item/device/mmi/posibrain/dropbrain(var/turf/dropspot)
/obj/item/mmi/posibrain/dropbrain(var/turf/dropspot)
log_runtime(EXCEPTION("[src] at [loc] attempted to drop brain without a contained brain."), src)
return
/obj/item/device/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
/obj/item/mmi/posibrain/transfer_identity(var/mob/living/carbon/H)
name = "positronic brain ([H])"
if(isnull(brainmob.dna))
brainmob.dna = H.dna.Clone()
@@ -88,7 +88,7 @@
icon_state = "posibrain-occupied"
return
/obj/item/device/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
/obj/item/mmi/posibrain/proc/transfer_personality(var/mob/candidate)
src.searching = 0
src.brainmob.key = candidate.key
src.name = "positronic brain ([src.brainmob.name])"
@@ -103,7 +103,7 @@
M.show_message("<span class='notice'>The positronic brain chimes quietly.</span>")
icon_state = "posibrain-occupied"
/obj/item/device/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
/obj/item/mmi/posibrain/proc/reset_search() //We give the players sixty seconds to decide, then reset the timer.
if(src.brainmob && src.brainmob.key) return
src.searching = 0
@@ -113,13 +113,13 @@
for(var/mob/M in viewers(T))
M.show_message("<span class='notice'>The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?</span>")
/obj/item/device/mmi/posibrain/Topic(href,href_list)
/obj/item/mmi/posibrain/Topic(href,href_list)
if("signup" in href_list)
var/mob/dead/observer/O = locate(href_list["signup"])
if(!O) return
volunteer(O)
/obj/item/device/mmi/posibrain/proc/volunteer(var/mob/dead/observer/O)
/obj/item/mmi/posibrain/proc/volunteer(var/mob/dead/observer/O)
if(!searching)
to_chat(O, "Not looking for a ghost, yet.")
return
@@ -143,7 +143,7 @@
ghost_volunteers.Add(O)
/obj/item/device/mmi/posibrain/examine(mob/user)
/obj/item/mmi/posibrain/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
if(!..(user))
to_chat(user, "<span class='info'>*---------*</span>")
@@ -162,7 +162,7 @@
msg += "*---------*</span>"
to_chat(user, msg)
/obj/item/device/mmi/posibrain/emp_act(severity)
/obj/item/mmi/posibrain/emp_act(severity)
if(!src.brainmob)
return
else
@@ -175,7 +175,7 @@
src.brainmob.emp_damage += rand(0,10)
..()
/obj/item/device/mmi/posibrain/New()
/obj/item/mmi/posibrain/New()
src.brainmob = new(src)
src.brainmob.name = "[pick(list("PBU","HIU","SINA","ARMA","OSI"))]-[rand(100, 999)]"
src.brainmob.real_name = src.brainmob.name
@@ -187,7 +187,7 @@
..()
/obj/item/device/mmi/posibrain/attack_ghost(var/mob/dead/observer/O)
/obj/item/mmi/posibrain/attack_ghost(var/mob/dead/observer/O)
if(searching)
volunteer(O)
return
@@ -200,6 +200,6 @@
for(var/mob/M in viewers(T))
M.show_message("<span class='notice'>The positronic brain pings softly.</span>")
/obj/item/device/mmi/posibrain/ipc
/obj/item/mmi/posibrain/ipc
desc = "A cube of shining metal, four inches to a side and covered in shallow grooves. The speaker switch is set to 'off'."
silenced = 1
+7 -7
View File
@@ -20,10 +20,10 @@
/mob/living/carbon/brain/can_speak(var/warning = FALSE)
. = ..()
if(!istype(container, /obj/item/device/mmi))
if(!istype(container, /obj/item/mmi))
. = FALSE
else if(istype(container, /obj/item/device/mmi/posibrain))
var/obj/item/device/mmi/posibrain/P = container
else if(istype(container, /obj/item/mmi/posibrain))
var/obj/item/mmi/posibrain/P = container
if(P && P.silenced)
if(warning)
to_chat(usr, "<span class='warning'>You cannot speak, as your internal speaker is turned off.</span>")
@@ -34,15 +34,15 @@
if("headset")
var/radio_worked = 0 // If any of the radios our brainmob could use functioned, this is set true so that we don't use any others
// I'm doing it this way so that if the mecha radio fails for some reason, a radio MMI still has the built-in fallback
if(container && istype(container,/obj/item/device/mmi))
var/obj/item/device/mmi/c = container
if(container && istype(container,/obj/item/mmi))
var/obj/item/mmi/c = container
if(!radio_worked && c.mecha)
var/obj/mecha/metalgear = c.mecha
if(metalgear.radio)
radio_worked = metalgear.radio.talk_into(src, message, message_mode, verb, speaking)
else if(!radio_worked && istype(c, /obj/item/device/mmi/radio_enabled))
var/obj/item/device/mmi/radio_enabled/R = c
else if(!radio_worked && istype(c, /obj/item/mmi/radio_enabled))
var/obj/item/mmi/radio_enabled/R = c
if(R.radio)
radio_worked = R.radio.talk_into(src, message, message_mode, verb, speaking)
return radio_worked
+17 -17
View File
@@ -1,5 +1,5 @@
/mob/living
var/canEnterVentWith = "/obj/item/implant=0&/obj/item/clothing/mask/facehugger=0&/obj/item/device/radio/borg=0&/obj/machinery/camera=0"
var/canEnterVentWith = "/obj/item/implant=0&/obj/item/clothing/mask/facehugger=0&/obj/item/radio/borg=0&/obj/machinery/camera=0"
var/datum/middleClickOverride/middleClickOverride = null
/mob/living/carbon/Destroy()
@@ -201,11 +201,12 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if(src.health >= config.health_threshold_crit)
if(src == M && istype(src, /mob/living/carbon/human))
add_attack_logs(M, src, "Shaked", admin_notify = FALSE)
if(health >= config.health_threshold_crit)
if(src == M && ishuman(src))
var/mob/living/carbon/human/H = src
src.visible_message( \
text("<span class='notice'>[src] examines [].</span>",src.gender==MALE?"himself":"herself"), \
visible_message( \
text("<span class='notice'>[src] examines [].</span>",gender==MALE?"himself":"herself"), \
"<span class='notice'>You check yourself for injuries.</span>" \
)
@@ -259,20 +260,21 @@
"<span class='notice'>You shake [src], but they are unresponsive. Probably suffering from SSD.</span>")
if(lying) // /vg/: For hugs. This is how update_icon figgers it out, anyway. - N3X15
var/t_him = "it"
if(src.gender == MALE)
if(gender == MALE)
t_him = "him"
else if(src.gender == FEMALE)
else if(gender == FEMALE)
t_him = "her"
if(istype(src,/mob/living/carbon/human) && src:w_uniform)
if(ishuman(src))
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
AdjustSleeping(-5)
if(src.sleeping == 0)
src.resting = 0
if(sleeping == 0)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(!player_logged)
M.visible_message( \
"<span class='notice'>[M] shakes [src] trying to wake [t_him] up!</span>",\
@@ -292,7 +294,7 @@
"<span class='notice'>[M] gives [src] a [pick("hug","warm embrace")].</span>",\
"<span class='notice'>You hug [src].</span>",\
)
if(istype(src,/mob/living/carbon/human))
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.wear_suit)
H.wear_suit.add_fingerprint(M)
@@ -564,7 +566,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
var/start_T_descriptor = "<font color='#6b5d00'>tile at [start_T.x], [start_T.y], [start_T.z] in area [get_area(start_T)]</font>"
var/end_T_descriptor = "<font color='#6b4400'>tile at [end_T.x], [end_T.y], [end_T.z] in area [get_area(end_T)]</font>"
add_logs(src, throwable_mob, "thrown", addition="from [start_T_descriptor] with the target [end_T_descriptor]")
add_attack_logs(src, throwable_mob, "Thrown from [start_T_descriptor] with the target [end_T_descriptor]")
else if(!(I.flags & ABSTRACT)) //can't throw abstract items
thrown_thing = I
@@ -1018,9 +1020,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/proc/forceFedAttackLog(var/obj/item/reagent_containers/food/toEat, mob/user)
create_attack_log("<font color='orange'>Has been fed [toEat.name] by [user.name] ([user.ckey]) Reagents: [toEat.reagentlist(toEat)]</font>")
user.create_attack_log("<font color='red'>Fed [toEat.name] to [name] ([ckey]) Reagents: [toEat.reagentlist(toEat)]</font>")
log_attack("[user.name] ([user.ckey]) fed [name] ([ckey]) with [toEat.name] Reagents: [toEat.reagentlist(toEat)] (INTENT: [uppertext(user.a_intent)])")
add_attack_logs(user, src, "Fed [toEat]. Reagents: [toEat.reagentlist(toEat)]")
if(!iscarbon(user))
LAssailant = null
else
@@ -18,12 +18,11 @@
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
if(lying)
if(surgeries.len)
if(user != src && user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
if(lying && surgeries.len)
if(user != src && user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
return ..()
/mob/living/carbon/attack_hand(mob/living/carbon/human/user)
@@ -39,8 +38,26 @@
var/datum/disease/D = thing
if(D.IsSpreadByTouch())
ContractDisease(D)
if(lying && surgeries.len)
if(user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
return 0
/mob/living/carbon/attack_slime(mob/living/carbon/slime/M)
if(..())
var/power = M.powerlevel + rand(0,3)
Weaken(power)
Stuttering(power)
Stun(power)
var/stunprob = M.powerlevel * 7 + 10
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return 1
/mob/living/carbon/is_mouth_covered(head_only = FALSE, mask_only = FALSE)
if((!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)))
return TRUE
@@ -111,7 +111,7 @@
if(ishuman(LAssailant))
var/mob/living/carbon/human/H=LAssailant
if(H.mind)
H.mind.kills += "[name] ([ckey])"
H.mind.kills += "[key_name(src)]"
if(!gibbed)
update_canmove()
@@ -121,7 +121,7 @@
med_hud_set_status()
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
if(ticker && ticker.mode)
// log_to_dd("k")
// log_world("k")
sql_report_death(src)
ticker.mode.check_win() //Calls the rounds wincheck, mainly for wizard, malf, and changeling now
+26 -5
View File
@@ -102,6 +102,8 @@
on_CD = handle_emote_CD()
if("sneeze", "sneezes")
on_CD = handle_emote_CD()
if("clap", "claps")
on_CD = handle_emote_CD()
//Everything else, including typos of the above emotes
else
on_CD = 0 //If it doesn't induce the cooldown, we won't check for the cooldown
@@ -302,11 +304,30 @@
message = "<B>[src]</B> makes a peculiar noise."
m_type = 2
if("clap", "claps")
if(!restrained())
message = "<B>[src]</B> claps."
if(miming)
message = "<B>[src]</B> claps silently."
m_type = 1
else
m_type = 2
if(miming)
m_type = 1
var/obj/item/organ/external/L = get_organ("l_hand")
var/obj/item/organ/external/R = get_organ("r_hand")
var/left_hand_good = FALSE
var/right_hand_good = FALSE
if(L && (!(L.status & ORGAN_SPLINTED)) && (!(L.status & ORGAN_BROKEN)))
left_hand_good = TRUE
if(R && (!(R.status & ORGAN_SPLINTED)) && (!(R.status & ORGAN_BROKEN)))
right_hand_good = TRUE
if(left_hand_good && right_hand_good)
message = "<b>[src]</b> claps."
var/clap = pick('sound/misc/clap1.ogg', 'sound/misc/clap2.ogg', 'sound/misc/clap3.ogg', 'sound/misc/clap4.ogg')
playsound(loc, clap, 50, 1, -1)
else
to_chat(usr, "You need your hands working in order to clap.")
if("flap", "flaps")
if(!restrained())
message = "<B>[src]</B> flaps \his wings."
@@ -898,7 +919,7 @@
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
if(message) //Humans are special fucking snowflakes and have 800 lines of emotes, they get to handle their own emotes, not call the parent.
log_emote("[name]/[key] : [message]")
log_emote(message, src)
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that.
@@ -406,8 +406,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
+114 -183
View File
@@ -10,8 +10,12 @@
var/datum/species/species //Contains icon generation and language information, set during New().
var/obj/item/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna = 0)
/mob/living/carbon/human/New(loc)
if(length(args) > 1)
log_runtime(EXCEPTION("human/New called with more than 1 argument (REPORT THIS ENTIRE RUNTIME TO A CODER)"))
. = ..()
/mob/living/carbon/human/Initialize(mapload, new_species = null)
if(!dna)
dna = new /datum/dna(null)
// Species name is handled by set_species()
@@ -40,7 +44,7 @@
faction |= "\ref[M]" //what
// Set up DNA.
if(!delay_ready_dna && dna)
if(dna)
dna.ready_dna(src)
dna.real_name = real_name
sync_organ_dna(1)
@@ -69,80 +73,80 @@
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
/mob/living/carbon/human/skrell/New(var/new_loc)
..(new_loc, "Skrell")
/mob/living/carbon/human/skrell/Initialize(mapload)
..(mapload, "Skrell")
/mob/living/carbon/human/tajaran/New(var/new_loc)
..(new_loc, "Tajaran")
/mob/living/carbon/human/tajaran/Initialize(mapload)
..(mapload, "Tajaran")
/mob/living/carbon/human/vulpkanin/New(var/new_loc)
..(new_loc, "Vulpkanin")
/mob/living/carbon/human/vulpkanin/Initialize(mapload)
..(mapload, "Vulpkanin")
/mob/living/carbon/human/unathi/New(var/new_loc)
..(new_loc, "Unathi")
/mob/living/carbon/human/unathi/Initialize(mapload)
..(mapload, "Unathi")
/mob/living/carbon/human/vox/New(var/new_loc)
..(new_loc, "Vox")
/mob/living/carbon/human/vox/Initialize(mapload)
..(mapload, "Vox")
/mob/living/carbon/human/voxarmalis/New(var/new_loc)
..(new_loc, "Vox Armalis")
/mob/living/carbon/human/voxarmalis/Initialize(mapload)
..(mapload, "Vox Armalis")
/mob/living/carbon/human/skeleton/New(var/new_loc)
..(new_loc, "Skeleton")
/mob/living/carbon/human/skeleton/Initialize(mapload)
..(mapload, "Skeleton")
/mob/living/carbon/human/kidan/New(var/new_loc)
..(new_loc, "Kidan")
/mob/living/carbon/human/kidan/Initialize(mapload)
..(mapload, "Kidan")
/mob/living/carbon/human/plasma/New(var/new_loc)
..(new_loc, "Plasmaman")
/mob/living/carbon/human/plasma/Initialize(mapload)
..(mapload, "Plasmaman")
/mob/living/carbon/human/slime/New(var/new_loc)
..(new_loc, "Slime People")
/mob/living/carbon/human/slime/Initialize(mapload)
..(mapload, "Slime People")
/mob/living/carbon/human/grey/New(var/new_loc)
..(new_loc, "Grey")
/mob/living/carbon/human/grey/Initialize(mapload)
..(mapload, "Grey")
/mob/living/carbon/human/abductor/New(var/new_loc)
..(new_loc, "Abductor")
/mob/living/carbon/human/abductor/Initialize(mapload)
..(mapload, "Abductor")
/mob/living/carbon/human/human/New(var/new_loc)
..(new_loc, "Human")
/mob/living/carbon/human/human/Initialize(mapload)
..(mapload, "Human")
/mob/living/carbon/human/diona/New(var/new_loc)
..(new_loc, "Diona")
/mob/living/carbon/human/diona/Initialize(mapload)
..(mapload, "Diona")
/mob/living/carbon/human/machine/New(var/new_loc)
..(new_loc, "Machine")
/mob/living/carbon/human/machine/Initialize(mapload)
..(mapload, "Machine")
/mob/living/carbon/human/shadow/New(var/new_loc)
..(new_loc, "Shadow")
/mob/living/carbon/human/shadow/Initialize(mapload)
..(mapload, "Shadow")
/mob/living/carbon/human/golem/New(var/new_loc)
..(new_loc, "Golem")
/mob/living/carbon/human/golem/Initialize(mapload)
..(mapload, "Golem")
/mob/living/carbon/human/wryn/New(var/new_loc)
..(new_loc, "Wryn")
/mob/living/carbon/human/wryn/Initialize(mapload)
..(mapload, "Wryn")
/mob/living/carbon/human/nucleation/New(var/new_loc)
..(new_loc, "Nucleation")
/mob/living/carbon/human/nucleation/Initialize(mapload)
..(mapload, "Nucleation")
/mob/living/carbon/human/drask/New(var/new_loc)
..(new_loc, "Drask")
/mob/living/carbon/human/drask/Initialize(mapload)
..(mapload, "Drask")
/mob/living/carbon/human/monkey/New(var/new_loc)
..(new_loc, "Monkey")
/mob/living/carbon/human/monkey/Initialize(mapload)
..(mapload, "Monkey")
/mob/living/carbon/human/farwa/New(var/new_loc)
..(new_loc, "Farwa")
/mob/living/carbon/human/farwa/Initialize(mapload)
..(mapload, "Farwa")
/mob/living/carbon/human/wolpin/New(var/new_loc)
..(new_loc, "Wolpin")
/mob/living/carbon/human/wolpin/Initialize(mapload)
..(mapload, "Wolpin")
/mob/living/carbon/human/neara/New(var/new_loc)
..(new_loc, "Neara")
/mob/living/carbon/human/neara/Initialize(mapload)
..(mapload, "Neara")
/mob/living/carbon/human/stok/New(var/new_loc)
..(new_loc, "Stok")
/mob/living/carbon/human/stok/Initialize(mapload)
..(mapload, "Stok")
/mob/living/carbon/human/Stat()
..()
@@ -156,7 +160,7 @@
show_stat_emergency_shuttle_eta()
if(client.statpanel == "Status")
if(locate(/obj/item/device/assembly/health) in src)
if(locate(/obj/item/assembly/health) in src)
stat(null, "Health: [health]")
if(internal)
if(!internal.air_contents)
@@ -306,112 +310,6 @@
return 0
..()
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration))
return 0
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
if(affected)
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
apply_damage(damage, M.melee_damage_type, affecting, armor)
updatehealth()
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M as mob)
if(M.Victim) return // can't attack while eating!
if(stat != DEAD)
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>")
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(10, 35)
else
damage = rand(5, 25)
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK))
return 0
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
if(M.powerlevel > 0)
var/stunprob = 10
var/power = M.powerlevel + rand(0,3)
switch(M.powerlevel)
if(1 to 2) stunprob = 20
if(3 to 4) stunprob = 30
if(5 to 6) stunprob = 40
if(7 to 8) stunprob = 60
if(9) stunprob = 70
if(10) stunprob = 95
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>The [M.name] has shocked []!</span>", src), 1)
Weaken(power)
Stuttering(power)
Stun(power)
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth()
return
/mob/living/carbon/human/restrained()
if(handcuffed)
return 1
@@ -551,7 +449,7 @@
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job")
var/obj/item/device/pda/pda = wear_id
var/obj/item/pda/pda = wear_id
if(istype(pda))
if(pda.id)
return pda.id.rank
@@ -567,7 +465,7 @@
//gets assignment from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/human/proc/get_assignment(var/if_no_id = "No id", var/if_no_job = "No job")
var/obj/item/device/pda/pda = wear_id
var/obj/item/pda/pda = wear_id
var/obj/item/card/id/id = wear_id
if(istype(pda))
if(pda.id && istype(pda.id, /obj/item/card/id))
@@ -585,7 +483,7 @@
//gets name from ID or ID inside PDA or PDA itself
//Useful when player do something with computers
/mob/living/carbon/human/proc/get_authentification_name(var/if_no_id = "Unknown")
var/obj/item/device/pda/pda = wear_id
var/obj/item/pda/pda = wear_id
var/obj/item/card/id/id = wear_id
if(istype(pda))
if(pda.id)
@@ -622,7 +520,7 @@
//gets name from ID or PDA itself, ID inside PDA doesn't matter
//Useful when player is being seen by other mobs
/mob/living/carbon/human/proc/get_id_name(var/if_no_id = "Unknown")
var/obj/item/device/pda/pda = wear_id
var/obj/item/pda/pda = wear_id
var/obj/item/card/id/id = wear_id
if(istype(pda)) . = pda.owner
else if(istype(id)) . = id.registered_name
@@ -632,7 +530,7 @@
//gets ID card object from special clothes slot or, if applicable, hands as well
/mob/living/carbon/human/proc/get_idcard(var/check_hands = FALSE)
var/obj/item/card/id/id = wear_id
var/obj/item/device/pda/pda = wear_id
var/obj/item/pda/pda = wear_id
if(istype(pda) && pda.id)
id = pda.id
@@ -753,12 +651,12 @@
unEquip(pocket_item)
if(thief_mode)
usr.put_in_hands(pocket_item)
add_logs(usr, src, "stripped", addition="of [pocket_item]", print_attack_log = isLivingSSD(src))
add_attack_logs(usr, src, "Stripped of [pocket_item]", isLivingSSD(src))
else
if(place_item)
usr.unEquip(place_item)
equip_to_slot_if_possible(place_item, pocket_id, 0, 1)
add_logs(usr, src, "equipped", addition="with [pocket_item]", print_attack_log = isLivingSSD(src))
add_attack_logs(usr, src, "Equipped with [pocket_item]", isLivingSSD(src))
// Update strip window
if(usr.machine == src && in_range(src, usr))
@@ -767,7 +665,7 @@
// Display a warning if the user mocks up if they don't have pickpocket gloves.
if(!thief_mode)
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
add_logs(usr, src, "attempted to strip", addition="of [pocket_item]", print_attack_log = isLivingSSD(src))
add_attack_logs(usr, src, "Attempted strip of [pocket_item]", isLivingSSD(src))
if(href_list["set_sensor"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -782,7 +680,7 @@
"<span class='danger'>You have dislodged everything from [src]'s headpocket!</span>")
var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket)
C.empty_contents()
add_logs(usr, src, "stripped", addition="of headpocket items", print_attack_log=isLivingSSD(src))
add_attack_logs(usr, src, "Stripped of headpocket items", isLivingSSD(src))
if(href_list["strip_accessory"])
if(istype(w_uniform, /obj/item/clothing/under))
@@ -859,8 +757,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -889,8 +787,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -916,8 +814,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -947,8 +845,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -980,8 +878,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -1011,8 +909,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -1038,8 +936,8 @@
if(wear_id)
if(istype(wear_id,/obj/item/card/id))
perpname = wear_id:registered_name
else if(istype(wear_id,/obj/item/device/pda))
var/obj/item/device/pda/tempPda = wear_id
else if(istype(wear_id,/obj/item/pda))
var/obj/item/pda/tempPda = wear_id
perpname = tempPda.owner
else
perpname = src.name
@@ -1834,6 +1732,39 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
return
..()
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H)
if(H.stat == DEAD || (H.status_flags & FAKEDEATH))
to_chat(src, "<span class='warning'>[H.name] is dead!</span>")
return
if(!check_has_mouth())
to_chat(src, "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>")
return
if(!H.check_has_mouth())
to_chat(src, "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>")
return
if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
to_chat(src, "<span class='warning'>Remove your mask first!</span>")
return 0
if((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH) && !H.wear_mask.mask_adjusted))
to_chat(src, "<span class='warning'>Remove their mask first!</span>")
return 0
visible_message("<span class='danger'>[src] is trying to perform CPR on [H.name]!</span>", \
"<span class='danger'>You try to perform CPR on [H.name]!</span>")
if(do_mob(src, H, 40))
if(H.health > config.health_threshold_dead && H.health <= config.health_threshold_crit)
var/suff = min(H.getOxyLoss(), 7)
H.adjustOxyLoss(-suff)
H.updatehealth()
visible_message("<span class='danger'>[src] performs CPR on [H.name]!</span>", \
"<span class='notice'>You perform CPR on [H.name].</span>")
to_chat(H, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
to_chat(src, "<span class='alert'>Repeat at least every 7 seconds.")
add_attack_logs(src, H, "CPRed", FALSE)
return 1
else
to_chat(src, "<span class='danger'>You need to stay still while performing CPR!</span>")
/mob/living/carbon/human/canBeHandcuffed()
if(get_num_arms() >= 2)
return TRUE
@@ -1912,7 +1843,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
if(istype(id) && id.is_untrackable())
return 0
if(wear_pda)
var/obj/item/device/pda/pda = wear_pda
var/obj/item/pda/pda = wear_pda
if(istype(pda))
var/obj/item/card/id/id = pda.id
if(istype(id) && id.is_untrackable())
@@ -1,50 +0,0 @@
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(check_shields(0, M.name))
visible_message("<span class='danger'>[M] attempted to touch [src]!</span>")
return 0
switch(M.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_HARM)
M.do_attack_animation(src)
if(w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
if(!damage)
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has lunged at [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>")
apply_damage(damage, BRUTE, affecting, armor_block)
if(damage >= 25)
visible_message("<span class='danger'>[M] has wounded [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
updatehealth()
if(INTENT_DISARM)
M.do_attack_animation(src)
if(prob(80))
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
else
if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
visible_message("<span class='danger'>[M] disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")
@@ -1,230 +0,0 @@
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
if(frozen)
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
return
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"]
if(H.hand)
temp = H.bodyparts_by_name["l_hand"]
if(!temp || !temp.is_usable())
to_chat(H, "<span class='warning'>You can't use your hand.</span>")
return
..()
if((M != src) && M.a_intent != INTENT_HELP && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
add_logs(M, src, "attempted to touch")
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
return 0
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
var/damage = rand(0, 9)
if(!damage)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(HULK in M.mutations)
damage += 5
Weaken(4)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>")
apply_damage(damage, STAMINA, affecting, armor_block)
if(damage >= 9)
visible_message("<span class='danger'>[M] has weakened [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
return
var/datum/martial_art/attacker_style = M.martial_art
species.handle_attack_hand(src,M)
switch(M.a_intent)
if(INTENT_HELP)
if(attacker_style && attacker_style.help_act(H, src))//adminfu only...
return 1
if(can_operate(src))
if(health >= config.health_threshold_crit)
if(src.surgeries.len)
for(var/datum/surgery/S in src.surgeries)
if(S.next_step(M, src))
return 1
help_shake_act(M)
add_logs(M, src, "shaked")
return 1
if(health >= config.health_threshold_crit)
help_shake_act(M)
add_logs(M, src, "shaked")
return 1
if(!H.check_has_mouth())
to_chat(H, "<span class='danger'>You don't have a mouth, you cannot perform CPR!</span>")
return
if(!check_has_mouth())
to_chat(H, "<span class='danger'>They don't have a mouth, you cannot perform CPR!</span>")
return
if((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH) && !M.wear_mask.mask_adjusted))
to_chat(M, "<span class='warning'>Remove your mask!</span>")
return 0
if((head && (head.flags_cover & HEADCOVERSMOUTH)) || (wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH) && !wear_mask.mask_adjusted))
to_chat(M, "<span class='warning'>Remove his mask!</span>")
return 0
M.visible_message("<span class='danger'>\The [M] is trying to perform CPR on \the [src]!</span>", \
"<span class='danger'>You try to perform CPR on \the [src]!</span>")
if(do_mob(M, src, 40))
if(health > config.health_threshold_dead && health <= config.health_threshold_crit)
var/suff = min(getOxyLoss(), 7)
adjustOxyLoss(-suff)
updatehealth()
M.visible_message("<span class='danger'>\The [M] performs CPR on \the [src]!</span>", \
"<span class='notice'>You perform CPR on \the [src].</span>")
to_chat(src, "<span class='notice'>You feel a breath of fresh air enter your lungs. It feels good.</span>")
to_chat(M, "<span class='alert'>Repeat at least every 7 seconds.")
add_logs(M, src, "CPRed")
return 1
else
to_chat(M, "<span class='danger'>You need to stay still while performing CPR!</span>")
if(INTENT_GRAB)
if(attacker_style && attacker_style.grab_act(H, src))
return 1
else
src.grabbedby(M)
return 1
if(INTENT_HARM)
//Vampire code
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M)
if((NO_BLOOD in species.species_traits) || species.exotic_blood || !blood_volume)
to_chat(M, "<span class='warning'>They have no blood!</span>")
return
if(mind && mind.vampire && (mind in ticker.mode.vampires))
to_chat(M, "<span class='warning'>Your fangs fail to pierce [name]'s cold flesh</span>")
return
if(SKELETON in mutations)
to_chat(M, "<span class='warning'>There is no blood in a skeleton!</span>")
return
if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not.
to_chat(M, "<span class='warning'>Blood from a monkey is useless!</span>")
return
//we're good to suck the blood, blaah
M.mind.vampire.handle_bloodsucking(src)
add_logs(M, src, "vampirebit")
msg_admin_attack("[key_name_admin(M)] vampirebit [key_name_admin(src)]")
return
//end vampire codes
if(attacker_style && attacker_style.harm_act(H, src))
return 1
else
var/datum/unarmed_attack/attack = M.species.unarmed
M.do_attack_animation(src)
add_logs(M, src, "[pick(attack.attack_verb)]ed")
if(!iscarbon(M))
LAssailant = null
else
LAssailant = M
var/damage = rand(M.species.punchdamagelow, M.species.punchdamagehigh)
damage += attack.damage
if(!damage)
playsound(loc, attack.miss_sound, 25, 1, -1)
visible_message("<span class='danger'>[M] tried to [pick(attack.attack_verb)] [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
if(HULK in M.mutations)
adjustBruteLoss(15)
playsound(loc, attack.attack_sound, 25, 1, -1)
visible_message("<span class='danger'>[M] [pick(attack.attack_verb)]ed [src]!</span>")
apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
if((stat != DEAD) && damage >= M.species.punchstunthreshold)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
forcesay(hit_appends)
else if(lying)
forcesay(hit_appends)
if(INTENT_DISARM)
if(attacker_style && attacker_style.disarm_act(H, src))
return 1
else
add_logs(M, src, "disarmed")
if(w_uniform)
w_uniform.add_fingerprint(M)
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/randn = rand(1, 100)
if(randn <= 25)
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
M.create_attack_log("<font color='red'>Pushed [src.name] ([src.ckey])</font>")
src.create_attack_log("<font color='orange'>Has been pushed by [M.name] ([M.ckey])</font>")
if(!iscarbon(M))
LAssailant = null
else
LAssailant = M
log_attack("[M.name] ([M.ckey]) pushed [src.name] ([src.ckey])")
return
var/talked = 0 // BubbleWrap
if(randn <= 60)
//BubbleWrap: Disarming breaks a pull
if(pulling)
visible_message("<span class='danger'>[M] has broken [src]'s grip on [pulling]!</span>")
talked = 1
stop_pulling()
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
if(istype(l_hand, /obj/item/grab))
var/obj/item/grab/lgrab = l_hand
if(lgrab.affecting)
visible_message("<span class='danger'>[M] has broken [src]'s grip on [lgrab.affecting]!</span>")
talked = 1
spawn(1)
qdel(lgrab)
if(istype(r_hand, /obj/item/grab))
var/obj/item/grab/rgrab = r_hand
if(rgrab.affecting)
visible_message("<span class='danger'>[M] has broken [src]'s grip on [rgrab.affecting]!</span>")
talked = 1
spawn(1)
qdel(rgrab)
//End BubbleWrap
if(!talked) //BubbleWrap
if(drop_item())
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>")
return
@@ -175,6 +175,11 @@ emp_act
affecting.sabotaged = 1
return 1
/mob/living/carbon/human/grabbedby(mob/living/user)
if(w_uniform)
w_uniform.add_fingerprint(user)
..()
//Returns 1 if the attack hit, 0 if it missed.
/mob/living/carbon/human/attacked_by(obj/item/I, mob/living/user, def_zone)
if(!I || !user)
@@ -191,9 +196,7 @@ emp_act
--meatleft
to_chat(user, "<span class='warning'>You hack off a chunk of meat from [name]</span>")
if(!meatleft)
create_attack_log("Was chopped up into meat by <b>[key_name(user)]</b>")
user.create_attack_log("Chopped up <b>[key_name(src)]</b> into meat</b>")
msg_admin_attack("[key_name_admin(user)] chopped up [key_name_admin(src)] into meat")
add_attack_logs(user, src, "Chopped up into meat")
if(!iscarbon(user))
LAssailant = null
else
@@ -345,6 +348,99 @@ emp_act
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
/mob/living/carbon/human/attack_hand(mob/user)
if(..()) //to allow surgery to return properly.
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
species.spec_attack_hand(H, src)
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L)
if(..()) //successful larva bite.
var/damage = rand(1, 3)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
var/obj/item/organ/external/affecting = get_organ(ran_zone(L.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
updatehealth()
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
if(check_shields(0, M.name))
visible_message("<span class='danger'>[M] attempted to touch [src]!</span>")
return 0
if(..())
if(M.a_intent == INTENT_HARM)
if(w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
if(!damage)
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has lunged at [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
var/armor_block = run_armor_check(affecting, "melee")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
apply_damage(damage, BRUTE, affecting, armor_block)
if(damage >= 25)
visible_message("<span class='danger'>[M] has wounded [src]!</span>", \
"<span class='userdanger'>[M] has wounded [src]!</span>")
apply_effect(4, WEAKEN, armor_block)
add_attack_logs(M, src, "Alien attacked")
updatehealth()
if(M.a_intent == INTENT_DISARM)
if(prob(80))
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
apply_effect(5, WEAKEN, run_armor_check(affecting, "melee"))
add_attack_logs(M, src, "Alien tackled")
visible_message("<span class='danger'>[M] has tackled down [src]!</span>")
else
if(prob(99)) //this looks fucking stupid but it was previously 'var/randn = rand(1, 100); if(randn <= 99)'
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
drop_item()
visible_message("<span class='danger'>[M] disarmed [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(check_shields(damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration))
return 0
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
if(affected)
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
apply_damage(damage, M.melee_damage_type, affecting, armor)
updatehealth()
/mob/living/carbon/human/attack_slime(mob/living/carbon/slime/M)
..()
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(10, 35)
else
damage = rand(5, 25)
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
var/armor_block = run_armor_check(affecting, "melee")
apply_damage(damage, BRUTE, affecting, armor_block)
return
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
if(M.damtype == "brute")
@@ -371,10 +467,7 @@ emp_act
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
create_attack_log("<font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.create_attack_log("<font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
..()
@@ -46,7 +46,7 @@
//Job and mind data
var/obj/item/card/id/MYID
var/obj/item/card/id/RPID // the "real" idea they use
var/obj/item/device/pda/MYPDA
var/obj/item/pda/MYPDA
var/obj/item/main_hand
var/obj/item/other_hand
var/TRAITS = 0
@@ -885,7 +885,7 @@
return pick(/area/hallway, /area/crew_quarters)
/mob/living/carbon/human/interactive/proc/target_filter(target)
var/list/filtered_targets = list(/area, /turf, /obj/machinery/door, /atom/movable/lighting_overlay, /obj/structure/cable, /obj/machinery/atmospherics, /obj/item/device/radio/intercom)
var/list/filtered_targets = list(/area, /turf, /obj/machinery/door, /atom/movable/lighting_overlay, /obj/structure/cable, /obj/machinery/atmospherics, /obj/item/radio/intercom)
var/list/L = target
for(var/atom/A in target) // added a bunch of "junk" that clogs up the general find procs
if(is_type_in_list(A,filtered_targets))
@@ -578,7 +578,7 @@
if(!disable_warning)
to_chat(src, "The [name] is too big to attach.")
return 0
if(istype(I, /obj/item/device/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, wear_suit.allowed))
if(istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, wear_suit.allowed))
return 1
return 0
if(slot_handcuffed)
+4 -5
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/human/Life()
/mob/living/carbon/human/Life(seconds, times_fired)
life_tick++
voice = GetVoice()
@@ -32,7 +32,7 @@
//Update our name based on whether our face is obscured/disfigured
name = get_visible_name()
pulse = handle_pulse()
pulse = handle_pulse(times_fired)
if(mind && mind.vampire)
mind.vampire.handle_vampire()
@@ -902,9 +902,8 @@
hud_used.lingchemdisplay.invisibility = 101
/mob/living/carbon/human/proc/handle_pulse()
if(mob_master.current_cycle % 5)
/mob/living/carbon/human/proc/handle_pulse(times_fired)
if(times_fired % 5 == 1)
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(NO_BLOOD in species.species_traits)
+4 -5
View File
@@ -5,9 +5,8 @@
item_color = "punpun"
species_restricted = list("Monkey")
/mob/living/carbon/human/monkey/punpun/New()
/mob/living/carbon/human/monkey/punpun/Initialize(mapload)
..()
spawn(1)
name = "Pun Pun"
real_name = name
equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform)
name = "Pun Pun"
real_name = name
equip_to_slot(new /obj/item/clothing/under/punpun(src), slot_w_uniform)
+7 -7
View File
@@ -163,13 +163,13 @@
/mob/living/carbon/human/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios, var/alt_name)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, src))
for(var/obj/item/radio/intercom/I in view(1, src))
spawn(0)
I.talk_into(src, message, null, verb, speaking)
used_radios += I
if("headset")
var/obj/item/device/radio/R = null
var/obj/item/radio/R = null
if(isradio(l_ear))
R = l_ear
used_radios += R
@@ -183,7 +183,7 @@
return
if("right ear")
var/obj/item/device/radio/R
var/obj/item/radio/R
if(isradio(r_ear))
R = r_ear
else if(isradio(r_hand))
@@ -193,7 +193,7 @@
R.talk_into(src, message, null, verb, speaking)
if("left ear")
var/obj/item/device/radio/R
var/obj/item/radio/R
if(isradio(l_ear))
R = l_ear
else if(isradio(l_hand))
@@ -226,13 +226,13 @@
/mob/living/carbon/human/binarycheck()
. = FALSE
var/obj/item/device/radio/headset/R
if(istype(l_ear, /obj/item/device/radio/headset))
var/obj/item/radio/headset/R
if(istype(l_ear, /obj/item/radio/headset))
R = l_ear
if(R.translate_binary)
. = TRUE
if(istype(r_ear, /obj/item/device/radio/headset))
if(istype(r_ear, /obj/item/radio/headset))
R = r_ear
if(R.translate_binary)
. = TRUE
@@ -56,32 +56,27 @@
to_chat(C, "<span class='danger'><B>Your antennae tingle as you are overcome with pain...</B></span>")
to_chat(C, "<span class='danger'>It feels like part of you has died.</span>")
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
if(M.a_intent == INTENT_HARM)
if(H.handcuffed)
if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return
var/turf/p_loc = M.loc
var/turf/p_loc_m = H.loc
/datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(target.handcuffed && target.get_int_organ(/obj/item/organ/internal/wryn/hivenode))
M.visible_message("<span class='notice'>[M] begins to violently pull off [H]'s antennae.</span>")
to_chat(H, "<span class='danger'><B>[M] grips your antennae and starts violently pulling!<B></span>")
if(do_after(H, 250, target = src))
if(p_loc == M.loc && p_loc_m == H.loc)
var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode
H.remove_language("Wryn Hivemind")
node.remove(H)
node.loc = M.loc
to_chat(M, "<span class='notice'>You hear a loud crunch as you mercilessly pull off [H]'s antennae.</span>")
to_chat(H, "<span class='danger'>You hear a loud crunch as your antennae is ripped off your head by [M].</span>")
to_chat(H, "<span class='danger'><span class='danger'><B>It's so quiet...</B></span>")
head_organ.h_style = "Bald"
H.update_hair()
user.visible_message("<span class='notice'>[user] begins to violently pull off [target]'s antennae.</span>")
to_chat(target, "<span class='danger'><B>[user] grips your antennae and starts violently pulling!<B></span>")
if(do_mob(user, target, 250))
var/obj/item/organ/internal/wryn/hivenode/node = new /obj/item/organ/internal/wryn/hivenode
target.remove_language("Wryn Hivemind")
node.remove(target)
node.forceMove(user.loc)
to_chat(user, "<span class='notice'>You hear a loud crunch as you mercilessly pull off [target]'s antennae.</span>")
to_chat(target, "<span class='danger'>You hear a loud crunch as your antennae is ripped off your head by [user].</span>")
to_chat(target, "<span class='danger'><B>It's so quiet...</B></span>")
var/obj/item/organ/external/head/head_organ = target.get_organ("head")
head_organ.h_style = "Bald"
target.update_hair()
M.create_attack_log("<font color='red'>removed antennae [H.name] ([H.ckey])</font>")
H.create_attack_log("<font color='orange'>Has had their antennae removed by [M.name] ([M.ckey])</font>")
msg_admin_attack("[key_name(M)] removed [key_name(H)]'s antennae")
return 0
add_attack_logs(user, target, "Antennae removed")
return 0
else
..()
/datum/species/nucleation
name = "Nucleation"
@@ -105,7 +105,7 @@
if("Medical Doctor","Brig Physician","Virologist")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/flashlight/pen(H), slot_in_backpack)
if("Paramedic")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical/paramedic
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical/paramedic
@@ -148,8 +148,13 @@
if("Mime")
suit=/obj/item/clothing/suit/space/eva/plasmaman/mime
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/mime
H.equip_or_collect(new suit(H), slot_wear_suit)
H.equip_or_collect(new helm(H), slot_head)
if((H.mind.special_role == SPECIAL_ROLE_WIZARD) || (H.mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE))
H.equip_to_slot(new /obj/item/clothing/suit/space/eva/plasmaman/wizard(H), slot_wear_suit)
H.equip_to_slot(new /obj/item/clothing/head/helmet/space/eva/plasmaman/wizard(H), slot_head)
else
H.equip_or_collect(new suit(H), slot_wear_suit)
H.equip_or_collect(new helm(H), slot_head)
H.equip_or_collect(new /obj/item/tank/plasma/plasmaman(H), tank_slot) // Bigger plasma tank from Raggy.
H.equip_or_collect(new /obj/item/plasmensuit_cartridge(H), slot_in_backpack)
H.equip_or_collect(new /obj/item/plasmensuit_cartridge(H), slot_in_backpack) //Two refill cartridges for their suit. Can fit in boxes.
@@ -315,8 +315,171 @@
/datum/species/proc/handle_death(var/mob/living/carbon/human/H) //Handles any species-specific death events (such as dionaea nymph spawns).
return
/datum/species/proc/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M) //Handles any species-specific attackhand events.
return
/datum/species/proc/help(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(attacker_style && attacker_style.help_act(user, target))//adminfu only...
return 1
if(target.health >= config.health_threshold_crit)
target.help_shake_act(user)
return 1
else
user.do_cpr(target)
/datum/species/proc/grab(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(attacker_style && attacker_style.grab_act(user, target))
return 1
else
target.grabbedby(user)
return 1
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
//Vampire code
if(user.mind && user.mind.vampire && (user.mind in ticker.mode.vampires) && !user.mind.vampire.draining && user.zone_sel && user.zone_sel.selecting == "head" && target != user)
if((NO_BLOOD in target.species.species_traits) || target.species.exotic_blood || !target.blood_volume)
to_chat(user, "<span class='warning'>They have no blood!</span>")
return
if(target.mind && target.mind.vampire && (target.mind in ticker.mode.vampires))
to_chat(user, "<span class='warning'>Your fangs fail to pierce [target.name]'s cold flesh</span>")
return
if(SKELETON in target.mutations)
to_chat(user, "<span class='warning'>There is no blood in a skeleton!</span>")
return
if(issmall(target) && !target.ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not.
to_chat(user, "<span class='warning'>Blood from a monkey is useless!</span>")
return
//we're good to suck the blood, blaah
user.mind.vampire.handle_bloodsucking(target)
add_attack_logs(user, target, "vampirebit")
return
//end vampire codes
if(attacker_style && attacker_style.harm_act(user, target))
return 1
else
var/datum/unarmed_attack/attack = user.species.unarmed
user.do_attack_animation(target)
add_attack_logs(user, target, "Melee attacked with fists", admin_notify = target.ckey ? TRUE : FALSE)
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
var/damage = rand(user.species.punchdamagelow, user.species.punchdamagehigh)
damage += attack.damage
if(!damage)
playsound(target.loc, attack.miss_sound, 25, 1, -1)
target.visible_message("<span class='danger'>[user] tried to [pick(attack.attack_verb)] [target]!</span>")
return 0
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
var/armor_block = target.run_armor_check(affecting, "melee")
if(HULK in user.mutations)
target.adjustBruteLoss(15)
playsound(target.loc, attack.attack_sound, 25, 1, -1)
target.visible_message("<span class='danger'>[user] [pick(attack.attack_verb)]ed [target]!</span>")
target.apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
if((target.stat != DEAD) && damage >= user.species.punchstunthreshold)
target.visible_message("<span class='danger'>[user] has weakened [target]!</span>", \
"<span class='userdanger'>[user] has weakened [target]!</span>")
target.apply_effect(4, WEAKEN, armor_block)
target.forcesay(hit_appends)
else if(target.lying)
target.forcesay(hit_appends)
/datum/species/proc/disarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(attacker_style && attacker_style.disarm_act(user, target))
return 1
else
add_attack_logs(user, target, "Disarmed", admin_notify = FALSE)
user.do_attack_animation(target)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
var/randn = rand(1, 100)
if(randn <= 25)
target.apply_effect(2, WEAKEN, target.run_armor_check(affecting, "melee"))
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("<span class='danger'>[user] has pushed [target]!</span>")
add_attack_logs(user, target, "Pushed over", admin_notify = FALSE)
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
return
var/talked = 0 // BubbleWrap
if(randn <= 60)
//BubbleWrap: Disarming breaks a pull
if(target.pulling)
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [target.pulling]!</span>")
talked = 1
target.stop_pulling()
//BubbleWrap: Disarming also breaks a grab - this will also stop someone being choked, won't it?
if(istype(target.l_hand, /obj/item/grab))
var/obj/item/grab/lgrab = target.l_hand
if(lgrab.affecting)
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [lgrab.affecting]!</span>")
talked = 1
spawn(1)
qdel(lgrab)
if(istype(target.r_hand, /obj/item/grab))
var/obj/item/grab/rgrab = target.r_hand
if(rgrab.affecting)
target.visible_message("<span class='danger'>[user] has broken [target]'s grip on [rgrab.affecting]!</span>")
talked = 1
spawn(1)
qdel(rgrab)
//End BubbleWrap
if(!talked) //BubbleWrap
if(target.drop_item())
target.visible_message("<span class='danger'>[user] has disarmed [target]!</span>")
playsound(target.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
target.visible_message("<span class='danger'>[user] attempted to disarm [target]!</span>")
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
if(!istype(M))
return
if(H.frozen)
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
return
if(istype(M))
var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"]
if(M.hand)
temp = M.bodyparts_by_name["l_hand"]
if(!temp || !temp.is_usable())
to_chat(M, "<span class='warning'>You can't use your hand.</span>")
return
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
add_attack_logs(M, H, "Melee attacked with fists (miss/block)")
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
return 0
switch(M.a_intent)
if(INTENT_HELP)
help(M, H, attacker_style)
if(INTENT_GRAB)
grab(M, H, attacker_style)
if(INTENT_HARM)
harm(M, H, attacker_style)
if(INTENT_DISARM)
disarm(M, H, attacker_style)
/datum/species/proc/say_filter(mob/M, message, datum/language/speaking)
return message
+8 -8
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/Life()
/mob/living/carbon/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -14,7 +14,7 @@
O.on_life()
handle_changeling()
handle_wetness()
handle_wetness(times_fired)
// Increase germ_level regularly
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
@@ -26,8 +26,8 @@
///////////////
//Start of a breath chain, calls breathe()
/mob/living/carbon/handle_breathing()
if(mob_master.current_cycle % 4 == 2 || failed_last_breath)
/mob/living/carbon/handle_breathing(times_fired)
if(times_fired % 4 == 2 || failed_last_breath)
breathe() //Breathe per 4 ticks, unless suffocating
else
if(istype(loc, /obj/))
@@ -241,11 +241,11 @@
reagents.metabolize(src)
/mob/living/carbon/proc/handle_wetness()
if(mob_master.current_cycle%20==2) //dry off a bit once every 20 ticks or so
/mob/living/carbon/proc/handle_wetness(times_fired)
if(times_fired % 20==2) //dry off a bit once every 20 ticks or so
wetlevel = max(wetlevel - 1,0)
/mob/living/carbon/handle_stomach()
/mob/living/carbon/handle_stomach(times_fired)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
@@ -255,7 +255,7 @@
stomach_contents.Remove(M)
qdel(M)
continue
if(mob_master.current_cycle%3==1)
if(times_fired % 3 == 1)
M.adjustBruteLoss(5)
nutrition += 10
@@ -1,4 +1,6 @@
/mob/living/carbon/slime/death(gibbed)
if(stat == DEAD)
return
if(!gibbed)
if(is_adult)
var/mob/living/carbon/slime/M = new /mob/living/carbon/slime(loc)
@@ -11,13 +13,11 @@
number = rand(1, 1000)
name = "[colour] [is_adult ? "adult" : "baby"] slime ([number])"
return
if(stat == DEAD) return
else
visible_message("<b>The [name]</b> seizes up and falls limp...")
stat = DEAD
icon_state = "[colour] baby slime dead"
overlays.len = 0
for(var/mob/O in viewers(src, null))
O.show_message("<b>The [name]</b> seizes up and falls limp...", 1) //ded -- Urist
update_canmove()
+38 -9
View File
@@ -1,4 +1,4 @@
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
/mob/living/carbon/slime/emote(act, m_type = 1, message = null)
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
//param = copytext(act, t1 + 1, length(act) + 1)
@@ -8,6 +8,9 @@
act = copytext(act,1,length(act))
act = lowertext(act)
var/regenerate_icons
switch(act) //Alphabetical please
if("me")
if(silent)
@@ -58,18 +61,44 @@
message = "<B>The [src.name]</B> vibrates!"
m_type = 1
if("noface") //mfw I have no face
mood = null
regenerate_icons = 1
if("smile")
mood = "mischevous"
regenerate_icons = 1
if(":3")
mood = ":33"
regenerate_icons = 1
if("pout")
mood = "pout"
regenerate_icons = 1
if("frown")
mood = "sad"
regenerate_icons = 1
if("scowl")
mood = "angry"
regenerate_icons = 1
if("help") //This is an exception
to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate")
to_chat(src, "Help for slime emotes. You can use these emotes with say \"*emote\":\n\nbounce, custom, jiggle, light, moan, shiver, sway, twitch, vibrate. \n\nYou may also change your face with: \n\nsmile, :3, pout, frown, scowl, noface")
else
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
if((message && src.stat == 0))
if((message && stat == CONSCIOUS))
if(client)
log_emote("[name]/[key] : [message]")
if(m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
//Foreach goto(703)
visible_message(message)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
loc.audible_message(message)
if(regenerate_icons)
regenerate_icons()
return
+40 -9
View File
@@ -5,7 +5,7 @@
var/Discipline = 0 // if a slime has been hit with a freeze gun, or wrestled/attacked off a human, they become disciplined and don't attack anymore for a while
var/SStun = 0 // stun variable
/mob/living/carbon/slime/Life()
/mob/living/carbon/slime/Life(seconds, times_fired)
if(..())
handle_nutrition()
handle_targets()
@@ -156,7 +156,14 @@
if(reagents)
reagents.metabolize(src)
src.updatehealth()
if(reagents.get_reagent_amount("plasma")>=5)
mutation_chance = min(mutation_chance + 5,50) //Prevents mutation chance going >50%
reagents.remove_reagent("plasma", 5)
if(reagents.get_reagent_amount("epinephrine")>=5)
mutation_chance = max(mutation_chance - 5,0) //Prevents mutation chance going <0%
reagents.remove_reagent("epinephrine", 5)
updatehealth()
return //TODO: DEFERRED
@@ -235,6 +242,10 @@
/mob/living/carbon/slime/proc/handle_nutrition()
if(docile) //God as my witness, I will never go hungry again
nutrition = 700
return
if(prob(15))
nutrition -= 1 + is_adult
@@ -254,6 +265,15 @@
else
Evolve()
/mob/living/carbon/slime/proc/add_nutrition(nutrition_to_add = 0, lastnut = 0)
nutrition = min((nutrition + nutrition_to_add), get_max_nutrition())
if(nutrition >= (lastnut + 50))
if(prob(80))
lastnut = nutrition
powerlevel++
if(powerlevel > 10)
powerlevel = 10
adjustToxLoss(-10)
/mob/living/carbon/slime/proc/handle_targets()
if(Tempstun)
@@ -282,7 +302,7 @@
if(Target)
--target_patience
if(target_patience <= 0 || SStun || Discipline || attacked) // Tired of chasing or something draws out attention
if(target_patience <= 0 || SStun || Discipline || attacked || docile) // Tired of chasing or something draws out attention
target_patience = 0
Target = null
@@ -365,6 +385,8 @@
else
if(holding_still)
holding_still = max(holding_still - 1, 0)
else if(docile && pulledby)
holding_still = 10
else if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
else if(!AIproc)
@@ -374,8 +396,12 @@
/mob/living/carbon/slime/proc/handle_speech_and_mood()
//Mood starts here
var/newmood = ""
if(rabid || attacked) newmood = "angry"
else if(Target) newmood = "mischevous"
if(rabid || attacked)
newmood = "angry"
else if(docile)
newmood = ":3"
else if(Target)
newmood = "mischevous"
if(!newmood)
if(Discipline && prob(25))
@@ -544,8 +570,13 @@
if(is_adult) return 300
else return 200
/mob/living/carbon/slime/proc/will_hunt(var/hunger = -1) // Check for being stopped from feeding and chasing
if(hunger == 2 || rabid || attacked) return 1
if(Leader) return 0
if(holding_still) return 0
/mob/living/carbon/slime/proc/will_hunt(hunger = -1) // Check for being stopped from feeding and chasing
if(docile)
return 0
if(hunger == 2 || rabid || attacked)
return 1
if(Leader)
return 0
if(holding_still)
return 0
return 1
+49 -52
View File
@@ -3,11 +3,15 @@
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
if(Victim)
Feedstop()
return
return 0
if(docile)
to_chat(src, "<span class='notice'><i>I'm not hungry anymore...</i></span>")
return 0
if(stat)
to_chat(src, "<i>I must be conscious to do this...</i>")
return
return 0
var/list/choices = list()
for(var/mob/living/C in view(1,src))
@@ -15,32 +19,31 @@
choices += C
var/mob/living/M = input(src,"Who do you wish to feed on?") in null|choices
if(!M) return
if(!M)
return 0
if(Adjacent(M))
if(!istype(src, /mob/living/carbon/brain))
if(!istype(M, /mob/living/carbon/slime))
if(stat != 2)
if(health > -70)
for(var/mob/living/carbon/slime/met in view())
if(met.Victim == M && met != src)
to_chat(src, "<i>The [met.name] is already feeding on this subject...</i>")
return
to_chat(src, "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>")
to_chat(M, "<span class='danger'>The [src.name] has latched onto your head!</span>")
Feedon(M)
else
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
else
to_chat(src, "<i>This subject does not have an edible life energy...</i>")
else
to_chat(src, "<i>I must not feed on my brothers...</i>")
else
if(isbrain(M))
to_chat(src, "<i>This subject does not have an edible life energy...</i>")
return 0
if(iscarbon(M) && (M.health < -70))
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
return 0
if(isanimal(M) && (M.health < 1))//animals don't go into crit, stupid; fixes infinite energy exploit
to_chat(src, "<i>This subject does not have a strong enough life energy...</i>")
return 0
for(var/mob/living/carbon/slime/met in view())
if(met.Victim == M && met != src)
to_chat(src, "<i>The [met.name] is already feeding on this subject...</i>")
return 0
to_chat(src, "<span class='notice'><i>I have latched onto the subject and begun feeding...</i></span>")
to_chat(M, "<span class='danger'>The [name] has latched onto your head!</span>")
Feedon(M)
return 1
/mob/living/carbon/slime/proc/Feedon(var/mob/living/M)
Victim = M
@@ -49,55 +52,49 @@
anchored = 1
var/lastnut = nutrition
var/fed_succesfully = 0
var/health_minimum = -70
if(is_adult)
icon_state = "[colour] adult slime eat"
else
icon_state = "[colour] baby slime eat"
while(Victim && M.health > -70 && M.stat != DEAD && stat != DEAD)
if(isanimal(Victim))
health_minimum = 0
while(Victim && Victim.health > health_minimum && stat != DEAD)
canmove = 0
if(Adjacent(M))
if(Adjacent(Victim))
loc = M.loc
if(prob(15) && M.client && istype(M, /mob/living/carbon))
to_chat(M, "<span class='danger'>[pick("You can feel your body becoming weak!", \
"You feel like you're about to die!", \
"You feel every part of your body screaming in agony!", \
"A low, rolling pain passes through your body!", \
"Your body feels as if it's falling apart!", \
"You feel extremely weak!", \
"A sharp, deep pain bathes every inch of your body!")]</span>")
if(istype(M, /mob/living/carbon))
if(iscarbon(Victim))
Victim.adjustCloneLoss(rand(5,6))
Victim.adjustToxLoss(rand(1,2))
if(Victim.health <= 0)
Victim.adjustToxLoss(rand(2,4))
if(prob(15) && Victim.client)
to_chat(Victim, "<span class='danger'>[pick("You can feel your body becoming weak!", \
"You feel like you're about to die!", \
"You feel every part of your body screaming in agony!", \
"A low, rolling pain passes through your body!", \
"Your body feels as if it's falling apart!", \
"You feel extremely weak!", \
"A sharp, deep pain bathes every inch of your body!")]</span>")
fed_succesfully = 1
else if(istype(M, /mob/living/simple_animal))
else if(health_minimum == 0) //we already know it's a simple_animal from above
Victim.adjustBruteLoss(is_adult ? rand(7, 15) : rand(4, 12))
fed_succesfully = 1
else
if(prob(25))
to_chat(src, "<span class='warning'>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]...</span>")
to_chat(src, "<span class='warning'>[pick("This subject is incompatable", \
"This subject does not have a life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]...</span>")
if(fed_succesfully)
//I have no idea why this is not in handle_nutrition()
nutrition += rand(15,30)
if(nutrition >= lastnut + 50)
if(prob(80))
lastnut = nutrition
powerlevel++
if(powerlevel > 10)
powerlevel = 10
adjustToxLoss(-10)
add_nutrition(rand(15,30), lastnut)
//Heal yourself.
adjustOxyLoss(-10)
@@ -128,7 +125,7 @@
anchored = 0
if(M)
if(M.health <= -70)
if(M.health <= health_minimum)
M.canmove = 0
if(!client)
if(Victim && !rabid && !attacked)
+43 -106
View File
@@ -5,18 +5,14 @@
pass_flags = PASSTABLE
ventcrawler = 2
speak_emote = list("telepathically chirps")
layer = 5
maxHealth = 150
health = 150
gender = NEUTER
nutrition = 700
see_in_dark = 8
update_slimes = 0
faction = list("slime","neutral")
// canstun and canweaken don't affect slimes because they ignore stun and weakened variables
// for the sake of cleanliness, though, here they are.
status_flags = CANPARALYSE|CANPUSH
@@ -44,7 +40,7 @@
var/mood = "" // To show its face
var/is_adult = 0
var/docile = 0
var/core_removal_stage = 0 //For removing cores.
var/mutator_used = FALSE //So you can't shove a dozen mutators into a single slime
@@ -140,7 +136,8 @@
stat(null, "Health: [round((health / 150) * 100)]%")
if(client.statpanel == "Status")
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
if(!docile)
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
if(amount_grown >= 10)
if(is_adult)
stat(null, "You can reproduce!")
@@ -194,9 +191,9 @@
return
/mob/living/carbon/slime/MouseDrop(atom/movable/A)
if(isliving(A) && A != usr)
if(isliving(A) && A != src && usr == src)
var/mob/living/Food = A
if(Food.Adjacent(usr) && !stat && Food.stat != DEAD) //messy
if(Food.Adjacent(src) && !stat && Food.stat != DEAD) //messy
Feedon(Food)
..()
@@ -207,74 +204,37 @@
return
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
..()
if(Victim)
return // can't attack while eating!
M.do_attack_animation(src)
visible_message("<span class='danger'>[M.name] has glomped [src]!</span>", \
"<span class='userdanger'>[M.name] has glomped [src]!</span>")
var/damage = rand(1, 3)
Victim = null
visible_message("<span class='danger'>[M] pulls [src] off!</span>")
return
attacked += 5
if(M.is_adult)
damage = rand(1, 6)
else
damage = rand(1, 3)
if(health > -100)
adjustBruteLoss(damage)
if(nutrition >= 100) //steal some nutrition. negval handled in life()
nutrition -= (50 + (5 * M.amount_grown))
M.add_nutrition(50 + (5 * M.amount_grown))
if(health > 0)
adjustBruteLoss(4 + (2 * M.amount_grown)) //amt_grown isn't very linear but it works
updatehealth()
return
M.adjustBruteLoss(-4 + (-2 * M.amount_grown))
M.updatehealth()
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'>[M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>[M] [M.attacktext] [src]!</span>")
M.create_attack_log("<font color='red'>attacked [src.name] ([src.ckey])</font>")
src.create_attack_log("<font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
attacked += 10
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
L.do_attack_animation(src)
attacked += 10
visible_message("<span class='danger'>[L] bites [src]!</span>", \
"<span class='userdanger'>[L] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
if(stat != DEAD)
var/damage = rand(1, 3)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
..()
/mob/living/carbon/slime/attack_larva(mob/living/carbon/alien/larva/L)
if(..()) //successful larva bite.
var/damage = rand(1, 3)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
adjustBruteLoss(damage)
updatehealth()
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M)
if(Victim)
if(Victim == M)
if(prob(60))
@@ -299,6 +259,7 @@
return
else
M.do_attack_animation(src)
if(prob(30))
visible_message("<span class='warning'>[M] attempts to wrestle \the [name] off of [Victim]!</span>")
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
@@ -323,12 +284,9 @@
step_away(src,M)
return
else
if(stat == DEAD && surgeries.len)
if(M.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(M, src))
return 1
if(..()) //To allow surgery to return properly.
return
switch(M.a_intent)
@@ -341,7 +299,6 @@
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
attacked += 10
if(prob(90))
if(HULK in M.mutations)
@@ -353,16 +310,16 @@
if(prob(80) && !client)
Discipline++
spawn(0)
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
add_attack_logs(M, src, "Melee attacked with fists")
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
if(health > -100)
if(stat != DEAD)
adjustBruteLoss(damage)
updatehealth()
else
@@ -370,23 +327,9 @@
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
return
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
switch(M.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if(INTENT_HARM)
M.do_attack_animation(src)
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
if(M.a_intent == INTENT_HARM)
if(prob(95))
attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
@@ -398,7 +341,8 @@
else
visible_message("<span class='danger'>[M] has wounded [name]!</span>", \
"<span class='userdanger'>)[M] has wounded [name]!</span>")
if(health > -100)
add_attack_logs(M, src, "Alien attacked")
if(stat != DEAD)
adjustBruteLoss(damage)
updatehealth()
else
@@ -406,11 +350,7 @@
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_DISARM)
M.do_attack_animation(src)
if(M.a_intent == INTENT_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
attacked += 10
@@ -425,7 +365,7 @@
anchored = 0
if(prob(80) && !client)
Discipline++
if(!istype(src, /mob/living/carbon/slime))
if(!isslime(src))
if(Discipline == 1)
attacked = 0
@@ -443,16 +383,12 @@
drop_item()
visible_message("<span class='danger'>[M] has disarmed [name]!</span>",
"<span class='userdanger'>[M] has disarmed [name]!</span>")
add_attack_logs(M, src, "Alien disarmed")
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
if(stat == DEAD && surgeries.len)
if(user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
/mob/living/carbon/slime/attackby(obj/item/W, mob/living/user, params)
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
if(user in Friends)
++Friends[user]
@@ -465,6 +401,7 @@
else if(W.force > 0)
attacked += 10
if(prob(25))
user.do_attack_animation(src)
to_chat(user, "<span class='danger'>[W] passes right through [src]!</span>")
return
if(Discipline && prob(50)) // wow, buddy, why am I getting attacked??
@@ -21,7 +21,7 @@
H.rename_character(H.real_name, name)
for(var/obj/item/W in H.get_all_slots())
H.unEquip(W)
H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear)
H.equip_to_slot_or_del(new /obj/item/radio/headset(H), slot_l_ear)
/datum/superheroes/proc/fixflags(var/mob/living/carbon/human/H)
for(var/obj/item/W in H.get_all_slots())
@@ -229,7 +229,7 @@
target.equip_to_slot_or_del(new /obj/item/clothing/under/color/grey/greytide(target), slot_w_uniform)
target.equip_to_slot_or_del(new /obj/item/clothing/shoes/black/greytide(target), slot_shoes)
target.equip_to_slot_or_del(new /obj/item/storage/toolbox/mechanical/greytide(target), slot_l_hand)
target.equip_to_slot_or_del(new /obj/item/device/radio/headset(target), slot_l_ear)
target.equip_to_slot_or_del(new /obj/item/radio/headset(target), slot_l_ear)
var/obj/item/card/id/syndicate/W = new(target)
W.icon_state = "lifetimeid"
W.access = list(access_maint_tunnels)
+5 -5
View File
@@ -1,4 +1,4 @@
/mob/living/Life()
/mob/living/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -22,7 +22,7 @@
handle_mutations_and_radiation()
//Breathing, if applicable
handle_breathing()
handle_breathing(times_fired)
//Random events (vomiting etc)
handle_random_events()
@@ -38,7 +38,7 @@
handle_fire()
//stuff in the stomach
handle_stomach()
handle_stomach(times_fired)
update_gravity(mob_has_gravity())
@@ -61,7 +61,7 @@
..()
/mob/living/proc/handle_breathing()
/mob/living/proc/handle_breathing(times_fired)
return
/mob/living/proc/handle_mutations_and_radiation()
@@ -80,7 +80,7 @@
/mob/living/proc/handle_environment(datum/gas_mixture/environment)
return
/mob/living/proc/handle_stomach()
/mob/living/proc/handle_stomach(times_fired)
return
/mob/living/proc/update_pulling()
+3 -3
View File
@@ -793,7 +793,7 @@
/mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND)))
overlay_fullscreen("flash", type)
addtimer(src, "clear_fullscreen", 25, FALSE, "flash", 25)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return 1
/mob/living/proc/check_eye_prot()
@@ -816,7 +816,7 @@
who.unEquip(what)
if(silent)
put_in_hands(what)
add_logs(src, who, "stripped", addition="of [what]", print_attack_log = isLivingSSD(who))
add_attack_logs(src, who, "Stripped of [what]", isLivingSSD(who))
// The src mob is trying to place an item on someone
// Override if a certain mob should be behave differently when placing items (can't, for example)
@@ -835,7 +835,7 @@
if(what && Adjacent(who))
unEquip(what)
who.equip_to_slot_if_possible(what, where, 0, 1)
add_logs(src, who, "equipped", what, print_attack_log = isLivingSSD(who))
add_attack_logs(src, who, "Equipped [what]", isLivingSSD(who))
/mob/living/singularity_act()
+81 -11
View File
@@ -98,7 +98,7 @@
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), I)
if(I.thrownby)
add_logs(I.thrownby, src, "hit", I)
add_attack_logs(I.thrownby, src, "Hit with thrown [I]")
else
return 1
else
@@ -126,14 +126,10 @@
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
create_attack_log("<font color='orange'>Has been attacked by \the [M] controlled by [key_name(M.occupant)] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
M.occupant.create_attack_log("<font color='red'>Attacked [src] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])</font>")
msg_admin_attack("[key_name_admin(M.occupant)] attacked [key_name_admin(src)] with \the [M] (INTENT: [uppertext(M.occupant.a_intent)])")
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
step_away(src,M)
add_logs(M.occupant, src, "pushed", object=M, admin=0, print_attack_log = 0)
add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", FALSE)
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
return
@@ -233,18 +229,18 @@
// End BS12 momentum-transfer code.
/mob/living/proc/grabbedby(mob/living/carbon/user,var/supress_message = 0)
/mob/living/proc/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src || anchored)
return 0
if(!(status_flags & CANPUSH))
return 0
for(var/obj/item/grab/G in src.grabbed_by)
for(var/obj/item/grab/G in grabbed_by)
if(G.assailant == user)
to_chat(user, "<span class='notice'>You already grabbed [src].</span>")
return
add_logs(user, src, "grabbed", addition="passively")
add_attack_logs(user, src, "Grabbed passively", admin_notify = FALSE)
var/obj/item/grab/G = new /obj/item/grab(user, src)
if(buckled)
@@ -265,4 +261,78 @@
if(!supress_message)
visible_message("<span class='warning'>[user] has grabbed [src] passively!</span>")
return G
return G
/mob/living/attack_slime(mob/living/carbon/slime/M)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(M.Victim)
return // can't attack while eating!
if(stat != DEAD)
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>")
if(M.powerlevel > 0)
var/stunprob = M.powerlevel * 7 + 10 // 17 at level 1, 80 at level 10
if(prob(stunprob))
M.powerlevel -= 3
if(M.powerlevel < 0)
M.powerlevel = 0
visible_message("<span class='danger'>The [M.name] has shocked [src]!</span>", \
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
s.set_up(5, 1, src)
s.start()
return 1
add_attack_logs(src, M, "Slime'd")
return
/mob/living/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
return 0
else
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>")
add_attack_logs(M, src, "Animal attacked")
return 1
/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
switch(L.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
return 0
else
L.do_attack_animation(src)
if(prob(90))
add_attack_logs(L, src, "Larva attacked")
visible_message("<span class='danger'>[L.name] bites [src]!</span>", \
"<span class='userdanger'>[L.name] bites [src]!</span>")
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
return 1
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>")
return 0
/mob/living/attack_alien(mob/living/carbon/alien/humanoid/M)
switch(M.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
return FALSE
if(INTENT_GRAB)
grabbedby(M)
return FALSE
else
M.do_attack_animation(src)
return TRUE
+3 -3
View File
@@ -286,7 +286,7 @@ proc/get_radio_key_from_channel(var/channel)
//Log of what we've said, plain message, no spans or junk
say_log += message
log_say("[name]/[key] : [message]")
log_say(message, src)
return 1
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
@@ -313,7 +313,7 @@ proc/get_radio_key_from_channel(var/channel)
return 1
if(act && type && message) //parent call
log_emote("[name]/[key] : [message]")
log_emote(message, src)
for(var/mob/M in dead_mob_list)
if(!M.client || istype(M, /mob/new_player))
@@ -485,7 +485,7 @@ proc/get_radio_key_from_channel(var/channel)
for(var/mob/M in watching)
M.show_message(rendered, 2)
log_whisper("[name]/[key] : [message]")
log_whisper(message, src)
return 1
/mob/living/speech_bubble(var/bubble_state = "",var/bubble_loc = src, var/list/bubble_recipients = list())
+10 -63
View File
@@ -54,12 +54,12 @@ var/list/ai_verbs_default = list(
var/viewalerts = 0
var/icon/holo_icon//Default is assigned when AI is created.
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/obj/item/device/pda/silicon/ai/aiPDA = null
var/obj/item/device/multitool/aiMulti = null
var/obj/item/pda/silicon/ai/aiPDA = null
var/obj/item/multitool/aiMulti = null
var/custom_sprite = 0 //For our custom sprites
var/custom_hologram = 0 //For our custom holograms
var/obj/item/device/radio/headset/heads/ai_integrated/aiRadio = null
var/obj/item/radio/headset/heads/ai_integrated/aiRadio = null
//MALFUNCTION
var/datum/module_picker/malf_picker
@@ -111,7 +111,7 @@ var/list/ai_verbs_default = list(
verbs -= ai_verbs_default
verbs -= silicon_subsystems
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/device/mmi/B, var/safety = 0)
/mob/living/silicon/ai/New(loc, var/datum/ai_laws/L, var/obj/item/mmi/B, var/safety = 0)
announcement = new()
announcement.title = "A.I. Announcement"
announcement.announcement_type = "A.I. Announcement"
@@ -128,7 +128,7 @@ var/list/ai_verbs_default = list(
possibleNames -= pickedName
pickedName = null
aiPDA = new/obj/item/device/pda/silicon/ai(src)
aiPDA = new/obj/item/pda/silicon/ai(src)
rename_character(null, pickedName)
anchored = 1
canmove = 0
@@ -154,7 +154,7 @@ var/list/ai_verbs_default = list(
additional_law_channels["Binary"] = ":b "
additional_law_channels["Holopad"] = ":h"
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
aiCamera = new/obj/item/camera/siliconcam/ai_camera(src)
if(isturf(loc))
add_ai_verbs(src)
@@ -268,6 +268,9 @@ var/list/ai_verbs_default = list(
shuttle_caller_list -= src
shuttle_master.autoEvac()
QDEL_NULL(eyeobj) // No AI, no Eye
if(malfhacking)
deltimer(malfhacking)
malfhacking = null
malfhack = null
return ..()
@@ -686,62 +689,6 @@ var/list/ai_verbs_default = list(
updatehealth()
return 2
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(isturf(loc) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
switch(M.a_intent)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
else //harm
M.do_attack_animation(src)
var/damage = rand(10, 20)
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
return
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
if(BRUTE)
adjustBruteLoss(damage)
if(BURN)
adjustFireLoss(damage)
if(TOX)
adjustToxLoss(damage)
if(OXY)
adjustOxyLoss(damage)
if(CLONE)
adjustCloneLoss(damage)
if(STAMINA)
adjustStaminaLoss(damage)
updatehealth()
/mob/living/silicon/ai/reset_perspective(atom/A)
if(camera_light_on)
light_cameras()
@@ -1183,7 +1130,7 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/is_in_chassis()
return isturf(loc)
/mob/living/silicon/ai/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/device/aicard/card)
/mob/living/silicon/ai/transfer_ai(interaction, mob/user, mob/living/silicon/ai/AI, obj/item/aicard/card)
if(!..())
return
if(interaction == AI_TRANS_TO_CARD)//The only possible interaction. Upload AI mob to a card.
@@ -0,0 +1,8 @@
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
..()
/mob/living/silicon/ai/attack_slime(mob/living/carbon/slime/user)
return //immune to slimes
+1 -1
View File
@@ -40,7 +40,7 @@
for(var/obj/machinery/ai_status_display/O in world) //change status
spawn( 0 )
O.mode = 2
if(istype(loc, /obj/item/device/aicard))
if(istype(loc, /obj/item/aicard))
loc.icon_state = "aicard-404"
timeofdeath = world.time
+5 -3
View File
@@ -3,7 +3,7 @@
#define POWER_RESTORATION_SEARCH_APC 2
#define POWER_RESTORATION_APC_FOUND 3
/mob/living/silicon/ai/Life()
/mob/living/silicon/ai/Life(seconds, times_fired)
//doesn't call parent because it's a horrible mess
if(stat == DEAD)
return
@@ -29,8 +29,10 @@
if(malfhack && malfhack.aidisabled)
to_chat(src, "<span class='danger'>ERROR: APC access disabled, hack attempt canceled.</span>")
malfhacking = 0
malfhack = null
deltimer(malfhacking)
// This proc handles cleanup of screen notifications and
// messenging the client
malfhacked(malfhack)
if(aiRestorePowerRoutine)
adjustOxyLoss(1)
@@ -1,4 +1,4 @@
/mob/living/silicon/decoy/Life()
/mob/living/silicon/decoy/Life(seconds, times_fired)
if(src.stat == 2)
return
else
+1 -1
View File
@@ -1,4 +1,4 @@
/mob/living/silicon/pai/Life()
/mob/living/silicon/pai/Life(seconds, times_fired)
. = ..()
if(.)
//if(secHUD == 1)
+12 -48
View File
@@ -15,8 +15,8 @@
var/ram = 100 // Used as currency to purchase different abilities
var/list/software = list()
var/userDNA // The DNA string of our assigned user
var/obj/item/device/paicard/card // The card we inhabit
var/obj/item/device/radio/radio // Our primary radio
var/obj/item/paicard/card // The card we inhabit
var/obj/item/radio/radio // Our primary radio
var/chassis = "repairbot" // A record of your chosen chassis.
var/global/list/possible_chassis = list(
@@ -59,7 +59,7 @@
var/screen // Which screen our main window displays
var/subscreen // Which specific function of the main screen is being displayed
var/obj/item/device/pda/silicon/pai/pda = null
var/obj/item/pda/silicon/pai/pda = null
var/secHUD = 0 // Toggles whether the Security HUD is active or not
var/medHUD = 0 // Toggles whether the Medical HUD is active or not
@@ -76,7 +76,7 @@
var/hackprogress = 0 // Possible values: 0 - 100, >= 100 means the hack is complete and will be reset upon next check
var/hack_aborted = 0
var/obj/item/radio/integrated/signal/sradio // AI's signaller
var/obj/item/integrated_radio/signal/sradio // AI's signaller
var/translator_on = 0 // keeps track of the translator module
@@ -84,7 +84,7 @@
var/custom_sprite = 0
var/slowdown = 0
/mob/living/silicon/pai/New(var/obj/item/device/paicard)
/mob/living/silicon/pai/New(var/obj/item/paicard)
loc = paicard
card = paicard
if(card)
@@ -92,7 +92,7 @@
sradio = new(src)
if(card)
if(!card.radio)
card.radio = new /obj/item/device/radio(card)
card.radio = new /obj/item/radio(card)
radio = card.radio
//Default languages without universal translator software
@@ -169,7 +169,7 @@
return 0
/mob/living/silicon/pai/restrained()
if(istype(loc,/obj/item/device/paicard))
if(istype(loc,/obj/item/paicard))
return 0
..()
@@ -237,47 +237,11 @@
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("<span class='danger'>[M]</span> [M.attacktext] [src]!", 1)
M.create_attack_log("<font color='red'>attacked [name] ([ckey])</font>")
create_attack_log("<font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
add_attack_logs(M, src, "Animal attacked for [damage] damage")
adjustBruteLoss(damage)
updatehealth()
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "You cannot attack someone in the spawn area.")
return
switch(M.a_intent)
if(INTENT_HELP)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='notice'>[M] caresses [src]'s casing with its scythe like arm.</span>"), 1)
else //harm
M.do_attack_animation(src)
var/damage = rand(10, 20)
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>[] has slashed at []!</span>", M, src), 1)
if(prob(8))
flash_eyes(affect_silicon = 1)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>[] took a swipe at []!</span>", M, src), 1)
return
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
if(!C)
@@ -343,7 +307,7 @@
/*
// Debug command - Maybe should be added to admin verbs later
/mob/verb/makePAI(var/turf/t in view())
var/obj/item/device/paicard/card = new(t)
var/obj/item/paicard/card = new(t)
var/mob/living/silicon/pai/pai = new(card)
pai.key = key
card.setPersonality(pai)
@@ -380,8 +344,8 @@
if(istype(card.loc, /mob))
var/mob/holder = card.loc
holder.unEquip(card)
else if(istype(card.loc, /obj/item/device/pda))
var/obj/item/device/pda/holder = card.loc
else if(istype(card.loc, /obj/item/pda))
var/obj/item/pda/holder = card.loc
holder.pai = null
forceMove(get_turf(card))
@@ -473,7 +437,7 @@
set category = "IC"
// Pass lying down or getting up to our pet human, if we're in a rig.
if(stat == CONSCIOUS && istype(loc,/obj/item/device/paicard))
if(stat == CONSCIOUS && istype(loc,/obj/item/paicard))
resting = 0
var/obj/item/rig/rig = get_rig()
if(istype(rig))
@@ -35,10 +35,10 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(href_list["download"])
var/datum/paiCandidate/candidate = locate(href_list["candidate"])
var/obj/item/device/paicard/card = locate(href_list["device"])
var/obj/item/paicard/card = locate(href_list["device"])
if(card.pai)
return
if(istype(card,/obj/item/device/paicard) && istype(candidate,/datum/paiCandidate))
if(istype(card,/obj/item/paicard) && istype(candidate,/datum/paiCandidate))
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(ninja_names)
@@ -95,7 +95,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if("submit")
if(candidate)
candidate.ready = 1
for(var/obj/item/device/paicard/p in world)
for(var/obj/item/paicard/p in world)
if(p.looking_for_personality == 1)
p.alertUpdate()
usr << browse(null, "window=paiRecruit")
@@ -231,7 +231,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
M << browse(dat, "window=paiRecruit;size=580x580;")
proc/findPAI(var/obj/item/device/paicard/p, var/mob/user)
proc/findPAI(var/obj/item/paicard/p, var/mob/user)
requestRecruits(p, user)
var/list/available = list()
for(var/datum/paiCandidate/c in paiController.pai_candidates)
@@ -347,7 +347,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
user << browse(dat, "window=findPai")
proc/requestRecruits(var/obj/item/device/paicard/P, mob/user)
proc/requestRecruits(var/obj/item/paicard/P, mob/user)
for(var/mob/dead/observer/O in player_list)
if(O.client && (ROLE_PAI in O.client.prefs.be_special))
if(player_old_enough_antag(O.client,ROLE_PAI))
+1 -1
View File
@@ -7,7 +7,7 @@
/mob/living/silicon/pai/get_whisper_loc()
if(loc == card) // currently in its card?
var/atom/movable/whisper_loc = card
if(istype(card.loc, /obj/item/device/pda)) // Step up 1 level if in a PDA
if(istype(card.loc, /obj/item/pda)) // Step up 1 level if in a PDA
whisper_loc = card.loc
if(istype(whisper_loc.loc, /mob/living))
return whisper_loc.loc // allow a pai being held or in pocket to whisper
@@ -104,7 +104,7 @@
var/ch_stat = user.radio.channels[ch_name]
var/ch_dat[0]
ch_dat["name"] = ch_name
// FREQ_LISTENING is const in /obj/item/device/radio
// FREQ_LISTENING is const in /obj/item/radio
ch_dat["listening"] = !!(ch_stat & user.radio.FREQ_LISTENING)
channels[++channels.len] = ch_dat
@@ -165,7 +165,7 @@
var/pdas[0]
if(!M.toff)
for(var/obj/item/device/pda/P in PDAs)
for(var/obj/item/pda/P in PDAs)
var/datum/data/pda/app/messenger/PM = P.find_program(/datum/data/pda/app/messenger)
if(P == user.pda || !PM || !PM.can_receive())
@@ -165,8 +165,9 @@
//
//Robotic Component Analyser, basically a health analyser for robots
//
/obj/item/device/robotanalyzer
/obj/item/robotanalyzer
name = "cyborg analyzer"
icon = 'icons/obj/device.dmi'
icon_state = "robotanalyzer"
item_state = "analyzer"
desc = "A hand-held scanner able to diagnose robotic injuries."
@@ -179,7 +180,7 @@
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
/obj/item/device/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
/obj/item/robotanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>", "<span class='warning'>You try to analyze the floor's vitals!</span>")
to_chat(user, "<span class='notice'>Analyzing Results for The floor:\n\t Overall Status: Healthy</span>")
@@ -86,7 +86,7 @@
laws = new /datum/ai_laws/drone()
connected_ai = null
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
aiCamera = new/obj/item/camera/siliconcam/drone_camera(src)
additional_law_channels["Drone"] = ";"
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
@@ -124,7 +124,7 @@
to_chat(user, "The machine is hermetically sealed. You can't open the case.")
return
else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
if(stat == 2)
@@ -43,11 +43,11 @@
control_headlamp()
//Actual picking-up event.
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M)
if(M.a_intent == INTENT_HELP)
get_scooped(M)
..()
else
..()
/mob/living/silicon/robot/drone/verb/customize()
set name = "Customize Chassis"
@@ -146,7 +146,7 @@
wrapped = A.cell
A.cell.add_fingerprint(user)
A.cell.updateicon()
A.cell.update_icon()
A.cell.forceMove(src)
A.cell = null
@@ -323,7 +323,7 @@
else
module_string += text("[O]: <A HREF=?src=[UID()];act=\ref[O]>Activate</A><BR>")
if((istype(O,/obj/item) || istype(O,/obj/item/device)) && !(istype(O,/obj/item/stack/cable_coil)))
if((istype(O,/obj/item) || istype(O,/obj/item)) && !(istype(O,/obj/item/stack/cable_coil)))
tools += module_string
else
resources += module_string
@@ -1,4 +1,4 @@
/mob/living/silicon/robot/Life()
/mob/living/silicon/robot/Life(seconds, times_fired)
set invisibility = 0
set background = BACKGROUND_ENABLED
@@ -1,5 +1,5 @@
/mob/living/silicon/robot/proc/photosync()
var/obj/item/device/camera/siliconcam/master_cam = connected_ai ? connected_ai.aiCamera : null
var/obj/item/camera/siliconcam/master_cam = connected_ai ? connected_ai.aiCamera : null
if(!master_cam)
return
+43 -163
View File
@@ -33,7 +33,7 @@ var/list/robot_verbs_default = list(
var/module_state_2 = null
var/module_state_3 = null
var/obj/item/device/radio/borg/radio = null
var/obj/item/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/stock_parts/cell/cell = null
var/obj/machinery/camera/camera = null
@@ -42,9 +42,9 @@ var/list/robot_verbs_default = list(
var/list/components = list()
var/obj/item/robot_parts/robot_suit/robot_suit = null //Used for deconstruction to remember what the borg was constructed out of..
var/obj/item/device/mmi/mmi = null
var/obj/item/mmi/mmi = null
var/obj/item/device/pda/silicon/robot/rbPDA = null
var/obj/item/pda/silicon/robot/rbPDA = null
var/datum/wires/robot/wires = null
@@ -52,6 +52,9 @@ var/list/robot_verbs_default = list(
var/custom_panel = null
var/list/custom_panel_names = list("Cricket")
var/emagged = 0
var/is_emaggable = TRUE
var/eye_protection = 0
var/ear_protection = 0
var/list/force_modules = list()
var/allow_rename = TRUE
@@ -115,7 +118,7 @@ var/list/robot_verbs_default = list(
update_icons()
update_headlamp()
radio = new /obj/item/device/radio/borg(src)
radio = new /obj/item/radio/borg(src)
common_radio = radio
init()
@@ -128,7 +131,7 @@ var/list/robot_verbs_default = list(
camera.status = 0
if(mmi == null)
mmi = new /obj/item/device/mmi/posibrain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a posibrain, but it works)
mmi = new /obj/item/mmi/posibrain(src) //Give the borg an MMI if he spawns without for some reason. (probably not the correct way to spawn a posibrain, but it works)
mmi.icon_state="posibrain-occupied"
initialize_components()
@@ -158,7 +161,7 @@ var/list/robot_verbs_default = list(
scanner.Grant(src)
/mob/living/silicon/robot/proc/init(var/alien=0)
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
make_laws()
additional_law_channels["Binary"] = ":b "
var/new_ai = select_active_ai_with_fewest_borgs()
@@ -207,7 +210,7 @@ var/list/robot_verbs_default = list(
if(prefix)
modtype = prefix
if(mmi)
if(istype(mmi, /obj/item/device/mmi/posibrain))
if(istype(mmi, /obj/item/mmi/posibrain))
braintype = "Android"
else
braintype = "Cyborg"
@@ -695,7 +698,7 @@ var/list/robot_verbs_default = list(
C.electronics_damage = 0
diag_hud_set_borgcell()
else if(istype(W, /obj/item/wirecutters) || istype(W, /obj/item/device/multitool))
else if(istype(W, /obj/item/wirecutters) || istype(W, /obj/item/multitool))
if(wiresexposed)
wires.Interact(user)
else
@@ -713,13 +716,13 @@ var/list/robot_verbs_default = list(
to_chat(user, "Unable to locate a radio.")
update_icons()
else if(istype(W, /obj/item/device/encryptionkey/) && opened)
else if(istype(W, /obj/item/encryptionkey/) && opened)
if(radio)//sanityyyyyy
radio.attackby(W,user)//GTFO, you have your own procs
else
to_chat(user, "Unable to locate a radio.")
else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
to_chat(user, "The interface seems slightly damaged.")
if(opened)
@@ -762,7 +765,9 @@ var/list/robot_verbs_default = list(
return
var/mob/living/M = user
if(!opened)//Cover is closed
if(locked)
if(!is_emaggable)
to_chat(user, "The emag sparks, and flashes red. This mechanism does not appear to be emaggable.")
else if(locked)
to_chat(user, "You emag the cover lock.")
locked = 0
else
@@ -832,126 +837,10 @@ var/list/robot_verbs_default = list(
update_icons()
to_chat(usr, "You unlock your cover.")
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
switch(M.a_intent)
if(INTENT_HELP)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_HARM)
M.do_attack_animation(src)
var/damage = rand(10, 20)
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>",\
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flash_eyes(affect_silicon = 1)
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
if(INTENT_DISARM)
if(!(lying))
M.do_attack_animation(src)
if(prob(85))
Stun(7)
step(src,get_dir(M,src))
spawn(5)
step(src,get_dir(M,src))
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
"<span class='userdanger'>[M] has forced back [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] attempted to force back [src]!</span>",\
"<span class='userdanger'>[M] attempted to force back [src]!</span>")
return
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M as mob)
if(..()) //successful slime shock
flash_eyes(affect_silicon = 1)
var/stunprob = M.powerlevel * 7 + 10
if(prob(stunprob) && M.powerlevel >= 8)
adjustBruteLoss(M.powerlevel * rand(6,10))
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
damage = round(damage / 2) // borgs recieve half damage
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src]")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
if(BRUTE)
adjustBruteLoss(damage)
if(BURN)
adjustFireLoss(damage)
if(TOX)
adjustToxLoss(damage)
if(OXY)
adjustOxyLoss(damage)
if(CLONE)
adjustCloneLoss(damage)
if(STAMINA)
adjustStaminaLoss(damage)
updatehealth()
/mob/living/silicon/robot/attack_ghost(mob/user)
if(wiresexposed)
wires.Interact(user)
/mob/living/silicon/robot/attack_hand(mob/user)
add_fingerprint(user)
if(opened && !wiresexposed && (!istype(user, /mob/living/silicon)))
if(cell)
cell.updateicon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
to_chat(user, "You remove \the [cell].")
cell = null
update_icons()
diag_hud_set_borgcell()
if(!opened && (!istype(user, /mob/living/silicon)))
if(user.a_intent == INTENT_HELP)
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
/mob/living/silicon/robot/proc/allowed(obj/item/I)
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
dummy.req_access = req_access
@@ -994,9 +883,10 @@ var/list/robot_verbs_default = list(
icon_state = "[base_icon]-roll"
else
icon_state = base_icon
for(var/obj/item/borg/combat/shield/S in module.modules)
if(activated(S))
overlays += "[base_icon]-shield"
if(module)
for(var/obj/item/borg/combat/shield/S in module.modules)
if(activated(S))
overlays += "[base_icon]-shield"
update_fire()
/mob/living/silicon/robot/proc/installed_modules()
@@ -1162,7 +1052,7 @@ var/list/robot_verbs_default = list(
new /obj/item/robot_parts/head(T)
var/b
for(b=0, b!=2, b++)
var/obj/item/device/flash/F = new /obj/item/device/flash(T)
var/obj/item/flash/F = new /obj/item/flash(T)
F.burn_out()
if(cell) //Sanity check.
cell.forceMove(T)
@@ -1357,16 +1247,19 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/deathsquad
base_icon = "nano_bloodhound"
icon_state = "nano_bloodhound"
designation = "SpecOps"
lawupdate = 0
scrambledcodes = 1
pdahide = 1
modtype = "Commando"
faction = list("nanotrasen")
designation = "Nanotrasen Combat"
req_access = list(access_cent_specops)
ionpulse = 1
magpulse = 1
var/searching_for_ckey = 0
pdahide = 1
eye_protection = 2 // Immunity to flashes and the visual part of flashbangs
ear_protection = 1 // Immunity to the audio part of flashbangs
allow_rename = FALSE
modtype = "Commando"
faction = list("nanotrasen")
is_emaggable = FALSE
/mob/living/silicon/robot/deathsquad/New(loc)
..()
@@ -1377,32 +1270,13 @@ var/list/robot_verbs_default = list(
laws = new /datum/ai_laws/deathsquad
module = new /obj/item/robot_module/deathsquad(src)
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
radio = new /obj/item/device/radio/borg/deathsquad(src)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
radio = new /obj/item/radio/borg/deathsquad(src)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/deathsquad/attack_hand(mob/user)
if(isnull(ckey) && !searching_for_ckey)
searching_for_ckey = 1
to_chat(user, "<span class='notice'>Now checking for possible borgs.</span>")
var/list/borg_candidates = pollCandidates("Do you want to play as a Nanotrasen Combat borg?")
if(borg_candidates.len > 0 && isnull(ckey))
searching_for_ckey = 0
var/mob/M = pick(borg_candidates)
M.mind.transfer_to(src)
M.mind.assigned_role = "MODE"
M.mind.special_role = SPECIAL_ROLE_DEATHSQUAD
ticker.mode.traitors |= M.mind // Adds them to current traitor list. Which is really the extra antagonist list.
key = M.key
else
searching_for_ckey = 0
to_chat(user, "<span class='notice'>Unable to connect to Central Command. Please wait and try again later.</span>")
return
else
to_chat(user, "<span class='warning'>[src] is already checking for possible borgs.</span>")
return
/mob/living/silicon/robot/syndicate
base_icon = "syndie_bloodhound"
@@ -1431,8 +1305,8 @@ var/list/robot_verbs_default = list(
laws = new /datum/ai_laws/syndicate_override
module = new /obj/item/robot_module/syndicate(src)
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
radio = new /obj/item/device/radio/borg/syndicate(src)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
radio = new /obj/item/radio/borg/syndicate(src)
radio.recalculateChannels()
spawn(5)
@@ -1492,9 +1366,9 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/ert/init()
laws = new /datum/ai_laws/ert_override
radio = new /obj/item/device/radio/borg/ert(src)
radio = new /obj/item/radio/borg/ert(src)
radio.recalculateChannels()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
aiCamera = new/obj/item/camera/siliconcam/robot_camera(src)
/mob/living/silicon/robot/ert/New(loc, cyborg_unlock)
..(loc)
@@ -1508,7 +1382,7 @@ var/list/robot_verbs_default = list(
mind = new
mind.current = src
mind.original = src
mind.assigned_role = "MODE"
mind.assigned_role = SPECIAL_ROLE_ERT
mind.special_role = SPECIAL_ROLE_ERT
if(cyborg_unlock)
crisis = 1
@@ -1563,3 +1437,9 @@ var/list/robot_verbs_default = list(
var/static/all_borg_icon_states = icon_states('icons/mob/custom_synthetic/custom-synthetic.dmi')
if(spritename in all_borg_icon_states)
. = TRUE
/mob/living/silicon/robot/check_eye_prot()
return eye_protection
/mob/living/silicon/robot/check_ear_prot()
return ear_protection
@@ -0,0 +1,59 @@
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
if(M.a_intent == INTENT_DISARM)
if(!lying)
M.do_attack_animation(src)
if(prob(85))
Stun(7)
step(src, get_dir(M,src))
spawn(5)
step(src, get_dir(M,src))
add_attack_logs(M, src, "Alien pushed over")
playsound(loc, 'sound/weapons/pierce.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has forced back [src]!</span>",\
"<span class='userdanger'>[M] has forced back [src]!</span>")
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>",\
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
else
..()
return
/mob/living/silicon/robot/attack_slime(mob/living/carbon/slime/M)
if(..()) //successful slime shock
flash_eyes(affect_silicon = 1)
var/stunprob = M.powerlevel * 7 + 10
if(prob(stunprob) && M.powerlevel >= 8)
adjustBruteLoss(M.powerlevel * rand(6,10))
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
damage = round(damage / 2) // borgs recieve half damage
adjustBruteLoss(damage)
updatehealth()
return
/mob/living/silicon/robot/attack_hand(mob/living/carbon/human/user)
add_fingerprint(user)
if(opened && !wiresexposed && !issilicon(user))
if(cell)
cell.update_icon()
cell.add_fingerprint(user)
user.put_in_active_hand(cell)
to_chat(user, "<span class='notice'>You remove \the [cell].</span>")
cell = null
update_icons()
diag_hud_set_borgcell()
if(!opened)
if(..()) // hulk attack
spark_system.start()
spawn(0)
step_away(src, user, 15)
sleep(3)
step_away(src, user, 15)
@@ -27,7 +27,7 @@
/obj/item/robot_module/New()
modules += new /obj/item/device/flash/cyborg(src)
modules += new /obj/item/flash/cyborg(src)
emag = new /obj/item/toy/sword(src)
emag.name = "Placeholder Emag Item"
@@ -113,7 +113,7 @@
modules += new /obj/item/extinguisher(src)
modules += new /obj/item/wrench/cyborg(src)
modules += new /obj/item/crowbar/cyborg(src)
modules += new /obj/item/device/healthanalyzer(src)
modules += new /obj/item/healthanalyzer(src)
emag = new /obj/item/melee/energy/sword/cyborg(src)
fix_modules()
@@ -131,9 +131,9 @@
/obj/item/robot_module/medical/New()
..()
modules += new /obj/item/device/healthanalyzer/advanced(src)
modules += new /obj/item/device/robotanalyzer(src)
modules += new /obj/item/device/reagent_scanner/adv(src)
modules += new /obj/item/healthanalyzer/advanced(src)
modules += new /obj/item/robotanalyzer(src)
modules += new /obj/item/reagent_scanner/adv(src)
modules += new /obj/item/borg_defib(src)
modules += new /obj/item/roller_holder(src)
modules += new /obj/item/reagent_containers/borghypo(src)
@@ -195,13 +195,13 @@
modules += new /obj/item/wrench/cyborg(src)
modules += new /obj/item/crowbar/cyborg(src)
modules += new /obj/item/wirecutters/cyborg(src)
modules += new /obj/item/device/multitool/cyborg(src)
modules += new /obj/item/device/t_scanner(src)
modules += new /obj/item/device/analyzer(src)
modules += new /obj/item/multitool/cyborg(src)
modules += new /obj/item/t_scanner(src)
modules += new /obj/item/analyzer(src)
modules += new /obj/item/taperoll/engineering(src)
modules += new /obj/item/gripper(src)
modules += new /obj/item/matter_decompiler(src)
modules += new /obj/item/device/floor_painter(src)
modules += new /obj/item/floor_painter(src)
modules += new /obj/item/areaeditor/blueprints/cyborg(src)
emag = new /obj/item/borg/stun(src)
@@ -237,7 +237,7 @@
modules += new /obj/item/soap/nanotrasen(src)
modules += new /obj/item/storage/bag/trash/cyborg(src)
modules += new /obj/item/mop/advanced/cyborg(src)
modules += new /obj/item/device/lightreplacer(src)
modules += new /obj/item/lightreplacer(src)
modules += new /obj/item/holosign_creator(src)
emag = new /obj/item/reagent_containers/spray(src)
@@ -272,8 +272,8 @@
modules += new /obj/item/pen(src)
modules += new /obj/item/razor(src)
modules += new /obj/item/device/instrument/piano_synth(src)
modules += new /obj/item/device/healthanalyzer/advanced(src)
modules += new /obj/item/instrument/piano_synth(src)
modules += new /obj/item/healthanalyzer/advanced(src)
var/obj/item/rsf/M = new /obj/item/rsf(src)
M.matter = 30
@@ -334,9 +334,9 @@
modules += new /obj/item/weldingtool/mini(src)
modules += new /obj/item/extinguisher/mini(src)
modules += new /obj/item/storage/bag/sheetsnatcher/borg(src)
modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
modules += new /obj/item/t_scanner/adv_mining_scanner/cyborg(src)
modules += new /obj/item/gun/energy/kinetic_accelerator/cyborg(src)
modules += new /obj/item/device/gps/cyborg(src)
modules += new /obj/item/gps/cyborg(src)
emag = new /obj/item/borg/stun(src)
fix_modules()
@@ -385,8 +385,8 @@
/obj/item/robot_module/syndicate_medical/New()
..()
modules += new /obj/item/device/healthanalyzer/advanced(src)
modules += new /obj/item/device/reagent_scanner/adv(src)
modules += new /obj/item/healthanalyzer/advanced(src)
modules += new /obj/item/reagent_scanner/adv(src)
modules += new /obj/item/borg_defib(src)
modules += new /obj/item/roller_holder(src)
modules += new /obj/item/reagent_containers/borghypo/syndicate(src)
@@ -455,7 +455,7 @@
/obj/item/robot_module/alien/hunter/New()
modules += new /obj/item/melee/energy/alien/claws(src)
modules += new /obj/item/device/flash/cyborg/alien(src)
modules += new /obj/item/flash/cyborg/alien(src)
var/obj/item/reagent_containers/spray/alien/stun/S = new /obj/item/reagent_containers/spray/alien/stun(src)
S.reagents.add_reagent("ether",250) //nerfed to sleeptoxin to make it less instant drop.
modules += S
@@ -492,13 +492,13 @@
modules += new /obj/item/wrench/cyborg(src)
modules += new /obj/item/crowbar/cyborg(src)
modules += new /obj/item/wirecutters/cyborg(src)
modules += new /obj/item/device/multitool/cyborg(src)
modules += new /obj/item/device/lightreplacer(src)
modules += new /obj/item/multitool/cyborg(src)
modules += new /obj/item/lightreplacer(src)
modules += new /obj/item/gripper(src)
modules += new /obj/item/matter_decompiler(src)
modules += new /obj/item/reagent_containers/spray/cleaner/drone(src)
modules += new /obj/item/soap(src)
modules += new /obj/item/device/t_scanner(src)
modules += new /obj/item/t_scanner(src)
modules += new /obj/item/rpd(src)
for(var/T in stacktypes)
@@ -512,7 +512,7 @@
var/obj/item/reagent_containers/spray/cleaner/C = locate() in modules
C.reagents.add_reagent("cleaner", 3)
var/obj/item/device/lightreplacer/LR = locate() in modules
var/obj/item/lightreplacer/LR = locate() in modules
LR.Charge(R)
..()
+4 -6
View File
@@ -1,5 +1,5 @@
/mob/living/silicon/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
log_say("[key_name(src)] : [message]")
log_say(message, src)
if(..())
return 1
@@ -67,8 +67,7 @@
//For holopads only. Usable by AI.
/mob/living/silicon/ai/proc/holopad_talk(var/message, verb, datum/language/speaking)
log_say("[key_name(src)] : [message]")
log_say("(HPAD) [message]", src)
message = trim(message)
@@ -108,9 +107,6 @@
return 1
/mob/living/silicon/ai/proc/holopad_emote(var/message) //This is called when the AI uses the 'me' verb while using a holopad.
log_emote("[key_name(src)] : [message]")
message = trim(message)
if(!message)
@@ -123,6 +119,8 @@
for(var/mob/M in viewers(T.loc))
M.show_message(rendered, 2)
log_emote("(HPAD) [message]", src)
else //This shouldn't occur, but better safe then sorry.
to_chat(src, "No holopad connected.")
return
+2 -2
View File
@@ -13,7 +13,7 @@
var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer
var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
var/designation = ""
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
var/obj/item/camera/siliconcam/aiCamera = null //photography
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
var/speak_statement = "states"
var/speak_exclamation = "declares"
@@ -32,7 +32,7 @@
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
var/d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED //There is only one kind of diag hud
var/obj/item/device/radio/common_radio
var/obj/item/radio/common_radio
/mob/living/silicon/New()
silicon_mob_list |= src
@@ -0,0 +1,65 @@
/mob/living/silicon/grabbedby(mob/living/user)
return
/mob/living/silicon/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent
var/damage = rand(10, 20)
if(prob(90))
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
if(prob(8))
flash_eyes(affect_silicon = 1)
add_attack_logs(M, src, "Alien attacked")
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
return
/mob/living/silicon/attack_animal(mob/living/simple_animal/M)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
if(BRUTE)
adjustBruteLoss(damage)
if(BURN)
adjustFireLoss(damage)
if(TOX)
adjustToxLoss(damage)
if(OXY)
adjustOxyLoss(damage)
if(CLONE)
adjustCloneLoss(damage)
if(STAMINA)
adjustStaminaLoss(damage)
updatehealth()
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
if(L.a_intent == INTENT_HELP)
visible_message("<span class='notice'>[L.name] rubs its head against [src].</span>")
/mob/living/silicon/attack_hand(mob/living/carbon/human/M)
switch(M.a_intent)
if(INTENT_HELP)
M.visible_message("<span class='notice'>[M] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
if("grab")
grabbedby(M)
else
M.do_attack_animation(src)
playsound(loc, 'sound/effects/bang.ogg', 10, 1)
if(HULK in M.mutations)
var/damage = rand(10,15)
adjustBruteLoss(damage)
add_attack_logs(M, src, "Melee attacked with fists")
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[M] has punched [src]!</span>", \
"<span class='userdanger'>[M] has punched [src]!</span>")
return 1
else
visible_message("<span class='danger'>[M] punches [src], but doesn't leave a dent.</span>", \
"<span class='userdanger'>[M] punches [src], but doesn't leave a dent.!</span>")
return 0
@@ -0,0 +1,60 @@
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M)
..()
switch(M.a_intent)
if(INTENT_HELP)
if(health > 0)
visible_message("<span class='notice'>[M] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(INTENT_GRAB)
grabbedby(M)
if(INTENT_HARM, INTENT_DISARM)
M.do_attack_animation(src)
visible_message("<span class='danger'>[M] [response_harm] [src]!</span>")
playsound(loc, "punch", 25, 1, -1)
attack_threshold_check(harm_intent_damage)
add_attack_logs(M, src, "Melee attacked with fists")
updatehealth()
return 1
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
var/damage = rand(15, 30)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
"<span class='userdanger'>[M] has slashed at [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
add_attack_logs(M, src, "Alien attacked")
attack_threshold_check(damage)
return
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L)
if(..()) //successful larva bite
var/damage = rand(5, 10)
if(stat != DEAD)
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
attack_threshold_check(damage)
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M)
if(..())
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
attack_threshold_check(damage, M.melee_damage_type)
/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M)
..()
var/damage = rand(1, 3)
if(M.is_adult)
damage = rand(20, 40)
else
damage = rand(5, 35)
attack_threshold_check(damage)
return
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE)
if(damage <= force_threshold || !damage_coeff[damagetype])
visible_message("<span class='warning'>[src] looks unharmed.</span>")
else
apply_damage(damage, damagetype)
@@ -28,7 +28,7 @@
var/window_name = "Protobot 1.0" //Popup title
var/window_width = 0 //0 for default size
var/window_height = 0
var/obj/item/device/paicard/paicard // Inserted pai card.
var/obj/item/paicard/paicard // Inserted pai card.
var/allow_pai = 1 // Are we even allowed to insert a pai card.
var/bot_name
@@ -54,7 +54,7 @@
var/tries = 0 //Number of times the bot tried and failed to move.
var/remote_disabled = 0 //If enabled, the AI cannot *Remotely* control a bot. It can still control it through cameras.
var/mob/living/silicon/ai/calling_ai //Links a bot to the AI calling it.
var/obj/item/device/radio/Radio //The bot's radio, for speaking to people.
var/obj/item/radio/Radio //The bot's radio, for speaking to people.
var/list/radio_config = null //which channels can the bot listen to
var/radio_channel = "Common" //The bot's default radio channel
var/auto_patrol = 0// set to make bot automatically patrol
@@ -91,11 +91,11 @@
hud_possible = list(DIAG_STAT_HUD, DIAG_BOT_HUD, DIAG_HUD, DIAG_PATH_HUD = HUD_LIST_LIST)//Diagnostic HUD views
/obj/item/device/radio/headset/bot
/obj/item/radio/headset/bot
subspace_transmission = 1
canhear_range = 0
/obj/item/device/radio/headset/bot/recalculateChannels()
/obj/item/radio/headset/bot/recalculateChannels()
var/mob/living/simple_animal/bot/B = loc
if(istype(B))
if(!B.radio_config)
@@ -144,7 +144,7 @@
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
access_card.access += access_robotics
set_custom_texts()
Radio = new/obj/item/device/radio/headset/bot(src)
Radio = new/obj/item/radio/headset/bot(src)
add_language("Galactic Common", 1)
add_language("Sol Common", 1)
@@ -193,6 +193,9 @@
bots_list -= src
QDEL_NULL(Radio)
QDEL_NULL(access_card)
if(reset_access_timer_id)
deltimer(reset_access_timer_id)
reset_access_timer_id = null
if(radio_controller && bot_filter)
radio_controller.remove_object(bot_core, control_freq)
QDEL_NULL(bot_core)
@@ -219,7 +222,7 @@
turn_on() //The bot automatically turns on when emagged, unless recently hit with EMP.
to_chat(src, "<span class='userdanger'>(#$*#$^^( OVERRIDE DETECTED</span>")
show_laws()
add_logs(user, src, "emagged")
add_attack_logs(user, src, "Emagged")
return
else //Bot is unlocked, but the maint panel has not been opened with a screwdriver yet.
to_chat(user, "<span class='warning'>You need to open maintenance panel first!</span>")
@@ -258,22 +261,22 @@
return
return 1 //Successful completion. Used to prevent child process() continuing if this one is ended early.
/mob/living/simple_animal/bot/attack_alien(var/mob/living/carbon/alien/user as mob)
/mob/living/simple_animal/bot/attack_alien(mob/living/carbon/alien/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
apply_damage(rand(15,30), BRUTE)
visible_message("<span class='userdanger'>[user] has slashed [src]!</span>")
visible_message("<span class='danger'>[user] has slashed [src]!</span>")
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(loc)
/mob/living/simple_animal/bot/attack_animal(var/mob/living/simple_animal/M as mob)
/mob/living/simple_animal/bot/attack_animal(mob/living/simple_animal/M)
M.do_attack_animation(src)
if(M.melee_damage_upper == 0)
return
apply_damage(M.melee_damage_upper, BRUTE)
visible_message("<span class='userdanger'>[M] has [M.attacktext] [src]!</span>")
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
visible_message("<span class='danger'>[M] has [M.attacktext] [src]!</span>")
add_attack_logs(M, src, "Animal attacked", FALSE)
if(prob(10))
new /obj/effect/decal/cleanable/blood/oil(loc)
@@ -302,7 +305,7 @@
to_chat(user, "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>")
else
to_chat(user, "<span class='warning'>The maintenance panel is locked.</span>")
else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/device/pda))
else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")
@@ -313,12 +316,12 @@
to_chat(user, "<span class='warning'>Please close the access panel before locking it.</span>")
else
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/device/paicard))
else if(istype(W, /obj/item/paicard))
if(paicard)
to_chat(user, "<span class='warning'>A [paicard] is already inserted!</span>")
else if(allow_pai && !key)
if(!locked && !open)
var/obj/item/device/paicard/card = W
var/obj/item/paicard/card = W
if(card.pai && card.pai.mind)
if(!card.pai.ckey || jobban_isbanned(card.pai, ROLE_SENTIENT))
to_chat(user, "<span class='warning'>[W] is unable to establish a connection to [src].</span>")
@@ -333,7 +336,7 @@
bot_name = name
name = paicard.pai.name
faction = user.faction
add_logs(user, paicard.pai, "uploaded to [src.bot_name],")
add_attack_logs(user, paicard.pai, "Uploaded to [src.bot_name]")
else
to_chat(user, "<span class='warning'>[W] is inactive.</span>")
else
@@ -527,7 +530,7 @@ Pass a positive integer as an argument to override a bot's default speed.
turn_on() //Saves the AI the hassle of having to activate a bot manually.
access_card = all_access //Give the bot all-access while under the AI's command.
if(client)
reset_access_timer_id = addtimer(src, "bot_reset", 600) //if the bot is player controlled, they get the extra access for a limited time
reset_access_timer_id = addtimer(CALLBACK (src, .proc/bot_reset), 600, TIMER_OVERRIDE|TIMER_STOPPABLE) //if the bot is player controlled, they get the extra access for a limited time
to_chat(src, "<span class='notice'><span class='big'>Priority waypoint set by [calling_ai] <b>[caller]</b>. Proceed to <b>[end_area.name]</b>.</span><br>[path.len-1] meters to destination. You have been granted additional door access for 60 seconds.</span>")
if(message)
to_chat(calling_ai, "<span class='notice'>[bicon(src)] [name] called to [end_area.name]. [path.len-1] meters to destination.</span>")
@@ -865,7 +868,7 @@ Pass a positive integer as an argument to override a bot's default speed.
to_chat(usr, "<span class='warning'>[text_hack]</span>")
show_laws()
bot_reset()
add_logs(usr, src, "hacked")
add_attack_logs(usr, src, "Hacked")
else if(!hacked)
to_chat(usr, "<span class='userdanger'>[text_dehack_fail]</span>")
else
@@ -874,7 +877,7 @@ Pass a positive integer as an argument to override a bot's default speed.
to_chat(usr, "<span class='notice'>[text_dehack]</span>")
show_laws()
bot_reset()
add_logs(usr, src, "dehacked")
add_attack_logs(usr, src, "Dehacked")
if("ejectpai")
if(paicard && (!locked || issilicon(usr) || usr.can_admin_interact()))
to_chat(usr, "<span class='notice'>You eject [paicard] from [bot_name]</span>")
@@ -946,9 +949,9 @@ Pass a positive integer as an argument to override a bot's default speed.
key = null
paicard.forceMove(loc)
if(user)
add_logs(user, paicard.pai, "ejected from [src.bot_name],")
add_attack_logs(user, paicard.pai, "Ejected from [src.bot_name],")
else
add_logs(src, paicard.pai, "ejected")
add_attack_logs(src, paicard.pai, "Ejected")
if(announce)
to_chat(paicard.pai, "<span class='notice'>You feel your control fade as [paicard] ejects from [bot_name].</span>")
paicard = null
@@ -1015,7 +1018,7 @@ Pass a positive integer as an argument to override a bot's default speed.
/mob/living/simple_animal/bot/handle_message_mode(var/message_mode, var/message, var/verb, var/speaking, var/used_radios)
switch(message_mode)
if("intercom")
for(var/obj/item/device/radio/intercom/I in view(1, src))
for(var/obj/item/radio/intercom/I in view(1, src))
spawn(0)
I.talk_into(src, message, null, verb, speaking)
used_radios += I
@@ -60,7 +60,7 @@
text_dehack_fail = "[name] does not seem to respond to your repair code!"
/mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/device/pda))
if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
to_chat(user, "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>")
@@ -161,6 +161,7 @@
target_types += /obj/effect/decal/cleanable/blood/gibs/
target_types += /obj/effect/decal/cleanable/blood/tracks
target_types += /obj/effect/decal/cleanable/dirt
target_types += /obj/effect/decal/cleanable/trail_holder
/mob/living/simple_animal/bot/cleanbot/proc/clean(obj/effect/decal/cleanable/target)
anchored = 1
@@ -181,7 +182,7 @@
new /obj/item/reagent_containers/glass/bucket(Tsec)
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
if(prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
@@ -30,9 +30,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
//Edbot Assembly
@@ -53,9 +54,10 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
return
switch(build_step)
@@ -253,10 +255,11 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
/obj/item/toolbox_tiles_sensor/attackby(obj/item/W, mob/user, params)
..()
@@ -272,10 +275,11 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
//Medbot Assembly
/obj/item/firstaid_arm_assembly
@@ -347,13 +351,14 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
else
switch(build_step)
if(0)
if(istype(W, /obj/item/device/healthanalyzer))
if(istype(W, /obj/item/healthanalyzer))
if(!user.unEquip(W))
return
qdel(W)
@@ -392,7 +397,7 @@
var/build_step = 0
var/created_name = "Securitron" //To preserve the name if it's a unique securitron I guess
/obj/item/clothing/head/helmet/attackby(obj/item/device/assembly/signaler/S, mob/user, params)
/obj/item/clothing/head/helmet/attackby(obj/item/assembly/signaler/S, mob/user, params)
..()
if(!issignaler(S))
..()
@@ -457,20 +462,21 @@
var/t = stripped_input(user, "Enter new robot name", name, created_name,MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
if(!in_range(src, user) && loc != user)
return
created_name = t
log_game("[key_name(user)] has renamed a robot to [t]")
else if(istype(I, /obj/item/screwdriver))
if(!build_step)
new /obj/item/device/assembly/signaler(get_turf(src))
new /obj/item/assembly/signaler(get_turf(src))
new /obj/item/clothing/head/helmet(get_turf(src))
to_chat(user, "<span class='notice'>You disconnect the signaler from the helmet.</span>")
qdel(src)
else if(build_step == 2)
overlays -= "hs_eye"
new /obj/item/device/assembly/prox_sensor(get_turf(src))
new /obj/item/assembly/prox_sensor(get_turf(src))
to_chat(user, "<span class='notice'>You detach the proximity sensor from [src].</span>")
build_step--
@@ -365,7 +365,7 @@ Auto Patrol[]"},
Sa.build_step = 1
Sa.overlays += image('icons/obj/aibots.dmi', "hs_hole")
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
if(!lasercolor)
var/obj/item/gun/energy/gun/advtaser/G = new /obj/item/gun/energy/gun/advtaser(Tsec)
@@ -550,7 +550,7 @@ Auto Patrol[]"},
C.Weaken(5)
C.stuttering = 5
C.Stun(5)
add_logs(src, C, "stunned")
add_attack_logs(src, C, "Stunned by [src]")
if(declare_arrests)
var/area/location = get_area(src)
speak("[arrest_type ? "Detaining" : "Arresting"] level [threat] scumbag <b>[C]</b> in [location].", radio_channel)
@@ -392,7 +392,7 @@
var/obj/item/storage/toolbox/mechanical/N = new /obj/item/storage/toolbox/mechanical(Tsec)
N.contents = list()
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
if(prob(50))
new /obj/item/robot_parts/l_arm(Tsec)
@@ -560,9 +560,9 @@
else
new /obj/item/storage/firstaid(Tsec)
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
new /obj/item/device/healthanalyzer(Tsec)
new /obj/item/healthanalyzer(Tsec)
if(reagent_glass)
reagent_glass.forceMove(Tsec)
@@ -112,7 +112,7 @@
)
else
to_chat(user, "<span class='notice'>[src] does not need a repair!</span>")
else if((istype(I, /obj/item/device/multitool) || istype(I, /obj/item/wirecutters)) && open)
else if((istype(I, /obj/item/multitool) || istype(I, /obj/item/wirecutters)) && open)
return attack_hand(user)
else if(load && ismob(load)) // chance to knock off rider
if(prob(1 + I.force * 2))
@@ -188,7 +188,7 @@
visible_message("[usr] switches [on ? "on" : "off"] [src].")
if("cellremove")
if(open && cell && !usr.get_active_hand())
cell.updateicon()
cell.update_icon()
usr.put_in_active_hand(cell)
cell.add_fingerprint(usr)
cell = null
@@ -684,7 +684,7 @@
visible_message("<span class='danger'>[src] bumps into [M]!</span>")
else
if(!paicard)
add_logs(src, M, "knocked down")
add_attack_logs(src, M, "Knocked down")
visible_message("<span class='danger'>[src] knocks over [M]!</span>")
M.stop_pulling()
M.Stun(8)
@@ -692,7 +692,7 @@
return ..()
/mob/living/simple_animal/bot/mulebot/proc/RunOver(mob/living/carbon/human/H)
add_logs(src, H, "run over", null, "(DAMTYPE: [uppertext(BRUTE)])")
add_attack_logs(src, H, "Run over (DAMTYPE: [uppertext(BRUTE)])")
H.visible_message("<span class='danger'>[src] drives over [H]!</span>", \
"<span class='userdanger'>[src] drives over you!<span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
@@ -827,7 +827,7 @@
visible_message("<span class='userdanger'>[src] blows apart!</span>")
var/turf/Tsec = get_turf(src)
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/rods(Tsec)
new /obj/item/stack/cable_coil/cut(Tsec)
@@ -260,14 +260,14 @@ Auto Patrol: []"},
C.Weaken(5)
C.stuttering = 5
C.Stun(5)
add_logs(src, C, "stunned")
add_attack_logs(src, C, "Stunned by [src]")
if(declare_arrests)
var/area/location = get_area(src)
speak("[arrest_type ? "Detaining" : "Arresting"] level [threat] scumbag <b>[C]</b> in [location].", radio_channel)
C.visible_message("<span class='danger'>[src] has [harmbaton ? "beaten" : "stunned"] [C]!</span>",\
"<span class='userdanger'>[src] has [harmbaton ? "beaten" : "stunned"] you!</span>")
/mob/living/simple_animal/bot/secbot/Life()
/mob/living/simple_animal/bot/secbot/Life(seconds, times_fired)
. = ..()
if(flashing_lights)
switch(light_color)
@@ -433,7 +433,7 @@ Auto Patrol: []"},
Sa.build_step = 1
Sa.overlays += "hs_hole"
Sa.created_name = name
new /obj/item/device/assembly/prox_sensor(Tsec)
new /obj/item/assembly/prox_sensor(Tsec)
new /obj/item/melee/baton(Tsec)
if(prob(50))
@@ -285,7 +285,7 @@
AIStatus = AI_ON
environment_smash = 1 //only token destruction, don't smash the cult wall NO STOP
/mob/living/simple_animal/hostile/construct/behemoth/Life()
/mob/living/simple_animal/hostile/construct/behemoth/Life(seconds, times_fired)
weakened = 0
return ..()
@@ -90,7 +90,7 @@
corpsesuit = /obj/item/clothing/suit/armor/vest
corpseshoes = /obj/item/clothing/shoes/combat
corpsegloves = /obj/item/clothing/gloves/combat
corpseradio = /obj/item/device/radio/headset
corpseradio = /obj/item/radio/headset
corpsemask = /obj/item/clothing/mask/gas
corpsehelmet = /obj/item/clothing/head/helmet/swat
corpseback = /obj/item/storage/backpack
@@ -106,7 +106,7 @@
corpsesuit = /obj/item/clothing/suit/space/hardsuit/syndi
corpseshoes = /obj/item/clothing/shoes/combat
corpsegloves = /obj/item/clothing/gloves/combat
corpseradio = /obj/item/device/radio/headset
corpseradio = /obj/item/radio/headset
corpsemask = /obj/item/clothing/mask/gas/syndicate
corpsehelmet = /obj/item/clothing/head/helmet/space/hardsuit/syndi
corpseback = /obj/item/tank/jetpack/oxygen
@@ -121,7 +121,7 @@
name = "Clown"
corpseuniform = /obj/item/clothing/under/rank/clown
corpseshoes = /obj/item/clothing/shoes/clown_shoes
corpseradio = /obj/item/device/radio/headset
corpseradio = /obj/item/radio/headset
corpsemask = /obj/item/clothing/mask/gas/clown_hat
corpsepocket1 = /obj/item/bikehorn
corpseback = /obj/item/storage/backpack/clown
@@ -46,7 +46,7 @@
Read_Memory()
..()
/mob/living/simple_animal/pet/cat/Runtime/Life()
/mob/living/simple_animal/pet/cat/Runtime/Life(seconds, times_fired)
if(!cats_deployed && ticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && ticker.current_state == GAME_STATE_FINISHED && !memory_saved)
@@ -37,7 +37,7 @@
if(gender == NEUTER)
gender = pick(MALE, FEMALE)
/mob/living/simple_animal/pet/corgi/Life()
/mob/living/simple_animal/pet/corgi/Life(seconds, times_fired)
. = ..()
regenerate_icons()
@@ -171,8 +171,8 @@
/obj/item/clothing/suit/armor/vest,
/obj/item/clothing/suit/space/deathsquad,
/obj/item/clothing/suit/space/hardsuit/engineering,
/obj/item/device/radio,
/obj/item/device/radio/off,
/obj/item/radio,
/obj/item/radio/off,
/obj/item/clothing/suit/cardborg,
/obj/item/tank/oxygen,
/obj/item/tank/air,
@@ -612,7 +612,7 @@
A.fire()
return
/mob/living/simple_animal/pet/corgi/Ian/borgi/Life()
/mob/living/simple_animal/pet/corgi/Ian/borgi/Life(seconds, times_fired)
..()
if(emagged && prob(25))
var/mob/living/carbon/target = locate() in view(10,src)
@@ -34,7 +34,7 @@
Move(get_step(src, east_vs_west), east_vs_west)
turns_since_move = 0
/mob/living/simple_animal/crab/Life()
/mob/living/simple_animal/crab/Life(seconds, times_fired)
. = ..()
regenerate_icons()
@@ -245,7 +245,7 @@
var/list/allowed_types = list(
/obj/item/clothing/suit/armor/vest,
/obj/item/device/radio
/obj/item/radio
)
if( ! ( item_to_add.type in allowed_types ) )
@@ -52,7 +52,7 @@
if(SV)
SV.eat(src)
/mob/living/simple_animal/hostile/retaliate/goat/Life()
/mob/living/simple_animal/hostile/retaliate/goat/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -132,7 +132,7 @@
else
..()
/mob/living/simple_animal/cow/Life()
/mob/living/simple_animal/cow/Life(seconds, times_fired)
. = ..()
if(stat == CONSCIOUS && prob(5))
milk_content = min(50, milk_content+rand(5, 10))
@@ -188,7 +188,7 @@
pixel_x = rand(-6, 6)
pixel_y = rand(0, 10)
/mob/living/simple_animal/chick/Life()
/mob/living/simple_animal/chick/Life(seconds, times_fired)
. =..()
if(.)
amount_grown += rand(1,2)
@@ -267,7 +267,7 @@ var/global/chicken_count = 0
else
..()
/mob/living/simple_animal/chicken/Life()
/mob/living/simple_animal/chicken/Life(seconds, times_fired)
. = ..()
if((. && prob(3) && eggsleft > 0) && egg_type)
visible_message("[src] [pick(layMessage)]")
@@ -39,7 +39,7 @@
for(var/mob/M in view())
M << 'sound/effects/mousesqueek.ogg'
/mob/living/simple_animal/mouse/Life()
/mob/living/simple_animal/mouse/Life(seconds, times_fired)
. = ..()
if(stat == UNCONSCIOUS)
if(ckey || prob(1))
@@ -20,7 +20,6 @@
maxHealth = 200
icon_state = "grey adult slime"
icon_living = "grey adult slime"
icon_dead = "grey baby slime dead"
/mob/living/simple_animal/slime/New()
..()
@@ -34,7 +34,7 @@
del_on_death = 1
var/emagged = 0 //is it getting ready to explode?
var/obj/item/device/mmi/mmi = null
var/obj/item/mmi/mmi = null
var/emagged_master = null //for administrative purposes, to see who emagged the spiderbot; also for a holder for if someone emags an empty frame first then inserts an MMI.
/mob/living/simple_animal/spiderbot/Destroy()
@@ -46,8 +46,8 @@
return ..()
/mob/living/simple_animal/spiderbot/attackby(obj/item/O, mob/living/user, params)
if(istype(O, /obj/item/device/mmi))
var/obj/item/device/mmi/B = O
if(istype(O, /obj/item/mmi))
var/obj/item/mmi/B = O
if(mmi) //There's already a brain in it.
to_chat(user, "<span class='warning'>There's already a brain in [src]!</span>")
return
@@ -100,7 +100,7 @@
to_chat(user, "<span class='notice'>[src] is undamaged!</span>")
else
to_chat(user, "Need more welding fuel!")
else if(istype(O, /obj/item/card/id) || istype(O, /obj/item/device/pda))
else if(istype(O, /obj/item/card/id) || istype(O, /obj/item/pda))
if(!mmi)
to_chat(user, "<span class='warning'>There's no reason to swipe your ID - the spiderbot has no brain to remove.</span>")
return 0
@@ -114,7 +114,7 @@
if(istype(O, /obj/item/card/id))
id_card = O
else
var/obj/item/device/pda/pda = O
var/obj/item/pda/pda = O
id_card = pda.id
if(access_robotics in id_card.access)
@@ -137,14 +137,14 @@
to_chat(user, "<span class='notice'>You short out the security protocols and rewrite [src]'s internal memory.</span>")
to_chat(src, "<span class='userdanger'>You have been emagged; you are now completely loyal to [user] and their every order!</span>")
emagged_master = user.name
add_logs(user, src, "emagged")
add_attack_logs(user, src, "Emagged")
maxHealth = 60
health = 60
melee_damage_lower = 15
melee_damage_upper = 15
attack_sound = 'sound/machines/defib_zap.ogg'
/mob/living/simple_animal/spiderbot/proc/transfer_personality(obj/item/device/mmi/M)
/mob/living/simple_animal/spiderbot/proc/transfer_personality(obj/item/mmi/M)
mind = M.brainmob.mind
mind.key = M.brainmob.key
ckey = M.brainmob.ckey
@@ -154,10 +154,10 @@
/mob/living/simple_animal/spiderbot/proc/update_icon()
if(mmi)
if(istype(mmi, /obj/item/device/mmi))
if(istype(mmi, /obj/item/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
if(istype(mmi, /obj/item/device/mmi/posibrain))
if(istype(mmi, /obj/item/mmi/posibrain))
icon_state = "spiderbot-chassis-posi"
icon_living = "spiderbot-chassis-posi"
@@ -57,7 +57,7 @@
target = null
return ..()
/mob/living/simple_animal/hostile/Life()
/mob/living/simple_animal/hostile/Life(seconds, times_fired)
. = ..()
if(!.)
walk(src, 0)
@@ -51,7 +51,7 @@ Difficulty: Hard
deathmessage = "sinks into a pool of blood, fleeing the battle. You've won, for now... "
death_sound = 'sound/misc/enter_blood.ogg'
/obj/item/device/gps/internal/bubblegum
/obj/item/gps/internal/bubblegum
icon_state = null
gpstag = "Bloody Signal"
desc = "You're not quite sure how a signal can be bloody."
@@ -75,7 +75,7 @@ Difficulty: Hard
/obj/effect/decal/cleanable/blood/gibs/bubblegum/can_bloodcrawl_in()
return TRUE
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
/mob/living/simple_animal/hostile/megafauna/bubblegum/Life(seconds, times_fired)
..()
move_to_delay = Clamp((health/maxHealth) * 10, 5, 10)
@@ -115,7 +115,7 @@ Difficulty: Hard
AddSpell(bloodspell)
if(istype(loc, /obj/effect/dummy/slaughter))
bloodspell.phased = 1
internal_gps = new/obj/item/device/gps/internal/bubblegum(src)
internal_gps = new/obj/item/gps/internal/bubblegum(src)
/mob/living/simple_animal/hostile/megafauna/bubblegum/do_attack_animation(atom/A, visual_effect_icon)
if(!charging)
@@ -95,7 +95,7 @@ Difficulty: Very Hard
/mob/living/simple_animal/hostile/megafauna/colossus/New()
..()
internal_gps = new/obj/item/device/gps/internal/colossus(src)
internal_gps = new/obj/item/gps/internal/colossus(src)
/obj/effect/temp_visual/at_shield
name = "anti-toolbox field"
@@ -257,7 +257,7 @@ Difficulty: Very Hard
if(isturf(target) || isobj(target))
target.ex_act(2)
/obj/item/device/gps/internal/colossus
/obj/item/gps/internal/colossus
icon_state = null
gpstag = "Angelic Signal"
desc = "Get in the fucking robot."
@@ -55,7 +55,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/dragon/New()
..()
internal_gps = new/obj/item/device/gps/internal/dragon(src)
internal_gps = new/obj/item/gps/internal/dragon(src)
/mob/living/simple_animal/hostile/megafauna/dragon/ex_act(severity, target)
if(severity == 3)
@@ -256,7 +256,7 @@ Difficulty: Medium
return
swoop_attack(1, A)
/obj/item/device/gps/internal/dragon
/obj/item/gps/internal/dragon
icon_state = null
gpstag = "Fiery Signal"
desc = "Here there be dragons."
@@ -73,10 +73,10 @@ Difficulty: Hard
/mob/living/simple_animal/hostile/megafauna/hierophant/New()
..()
internal_gps = new/obj/item/device/gps/internal/hierophant(src)
internal_gps = new/obj/item/gps/internal/hierophant(src)
spawned_rune = new(loc)
/mob/living/simple_animal/hostile/megafauna/hierophant/Life()
/mob/living/simple_animal/hostile/megafauna/hierophant/Life(seconds, times_fired)
. = ..()
if(. && spawned_rune && !client)
if(target || loc == spawned_rune.loc)
@@ -547,7 +547,7 @@ Difficulty: Hard
L.apply_damage(damage, BURN, limb_to_hit, armor)
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid))
L.adjustBruteLoss(damage)
add_logs(caster, L, "struck with a [name]")
add_attack_logs(caster, L, "Struck with a [name]")
for(var/obj/mecha/M in T.contents - hit_things) //and mechs.
hit_things += M
if(M.occupant)
@@ -587,7 +587,7 @@ Difficulty: Hard
else
..()
/obj/item/device/gps/internal/hierophant
/obj/item/gps/internal/hierophant
icon_state = null
gpstag = "Zealous Signal"
desc = "Heed its words."
@@ -53,7 +53,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/legion/New()
..()
internal_gps = new/obj/item/device/gps/internal/legion(src)
internal_gps = new/obj/item/gps/internal/legion(src)
/mob/living/simple_animal/hostile/megafauna/legion/AttackingTarget()
..()
@@ -133,7 +133,7 @@ Difficulty: Medium
/mob/living/simple_animal/hostile/megafauna/legion/Process_Spacemove(movement_dir = 0)
return 1
/obj/item/device/gps/internal/legion
/obj/item/gps/internal/legion
icon_state = null
gpstag = "Echoing Signal"
desc = "The message repeats."
@@ -37,7 +37,7 @@
var/score_type = BOSS_SCORE
var/elimination = 0
var/anger_modifier = 0
var/obj/item/device/gps/internal_gps
var/obj/item/gps/internal_gps
anchored = TRUE
mob_size = MOB_SIZE_LARGE
layer = MOB_LAYER + 0.5 //Looks weird with them slipping under mineral walls and cameras and shit otherwise
@@ -51,7 +51,7 @@
var/attempt_open = 0
// Pickup loot
/mob/living/simple_animal/hostile/mimic/crate/initialize()
/mob/living/simple_animal/hostile/mimic/crate/Initialize()
..()
for(var/obj/item/I in loc)
I.loc = src
@@ -174,8 +174,6 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
melee_damage_lower = 2 + I.force
melee_damage_upper = 2 + I.force
move_to_delay = 2 * I.w_class + 1
if(istype(O, /obj/item/device))
is_electronic = 1
maxHealth = health
if(user)
creator = user
@@ -62,7 +62,7 @@
/obj/item/organ/internal/hivelord_core/New()
..()
addtimer(src, "inert_check", 2400)
addtimer(CALLBACK(src, .proc/inert_check), 2400)
/obj/item/organ/internal/hivelord_core/proc/inert_check()
if(!owner && !preserved)
@@ -151,7 +151,7 @@
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/New()
..()
addtimer(src, "death", 100)
addtimer(CALLBACK(src, .proc/death), 100)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood
name = "blood brood"
@@ -269,7 +269,7 @@
stat_attack = 1
robust_searching = 1
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life()
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(seconds, times_fired)
if(isturf(loc))
for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile
if(H.stat == UNCONSCIOUS)
@@ -42,7 +42,7 @@
else
to_chat(user, "<span class='info'>It looks like it's been roughed up.</span>")
/mob/living/simple_animal/hostile/mushroom/Life()
/mob/living/simple_animal/hostile/mushroom/Life(seconds, times_fired)
..()
if(!stat)//Mushrooms slowly regenerate if conscious, for people who want to save them from being eaten
adjustBruteLoss(-2)

Some files were not shown because too many files have changed in this diff Show More