Merge Conflict Resolution

This commit is contained in:
SamCroswell
2016-07-11 13:04:30 -04:00
1112 changed files with 15283 additions and 13974 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/mob/dead/observer/Login()
..()
if (ghostimage)
if(ghostimage)
ghostimage.icon_state = src.icon_state
updateghostimages()
+1 -1
View File
@@ -1,5 +1,5 @@
/mob/dead/observer/Logout()
if (client)
if(client)
client.images -= ghost_darkness_images
..()
spawn(0)
+20 -17
View File
@@ -49,7 +49,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
T = get_turf(body) //Where is the body located?
attack_log = body.attack_log //preserve our attack logs by copying them to our ghost
if (ishuman(body))
if(ishuman(body))
var/mob/living/carbon/human/H = body
icon = H.stand_icon
overlays = H.overlays_standing
@@ -94,7 +94,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
var/mob/M = following
M.following_mobs -= src
following = null
if (ghostimage)
if(ghostimage)
ghost_darkness_images -= ghostimage
qdel(ghostimage)
ghostimage = null
@@ -135,7 +135,7 @@ Works together with spawning an observer, noted above.
if(ghost.can_reenter_corpse)
respawnable_list += ghost
ghost.key = key
if(!ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
return ghost
@@ -201,7 +201,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/Stat()
..()
statpanel("Status")
if (client.statpanel == "Status")
if(client.statpanel == "Status")
show_stat_station_time()
if(ticker)
if(ticker.mode)
@@ -373,6 +373,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!target)
return
if(!get_turf(target))
return
if(target != src)
if(following && following == target)
return
@@ -422,7 +425,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(istype(usr, /mob/dead/observer)) //Make sure they're an observer!
if (!target)//Make sure we actually have a target
if(!target)//Make sure we actually have a target
return
else
var/mob/M = getmobs()[target] //Destination mob
@@ -465,7 +468,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(!istype(usr, /mob/dead/observer)) return
// Shamelessly copied from the Gas Analyzers
if (!( istype(usr.loc, /turf) ))
if(!( istype(usr.loc, /turf) ))
return
var/datum/gas_mixture/environment = usr.loc.return_air()
@@ -522,8 +525,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
//this is called when a ghost is drag clicked to something.
/mob/dead/observer/MouseDrop(atom/over)
if(!usr || !over) return
if (isobserver(usr) && usr.client && usr.client.holder)
if (usr.client.holder.cmd_ghost_drag(src,over))
if(isobserver(usr) && usr.client && usr.client.holder)
if(usr.client.holder.cmd_ghost_drag(src,over))
return
return ..()
@@ -551,17 +554,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
..()
if (href_list["track"])
if(href_list["track"])
var/atom/target = locate(href_list["track"])
if(target)
ManualFollow(target)
if (href_list["follow"])
if(href_list["follow"])
var/atom/target = locate(href_list["follow"])
if(target)
ManualFollow(target)
if (href_list["jump"])
if(href_list["jump"])
var/mob/target = locate(href_list["jump"])
var/mob/A = usr;
to_chat(A, "Teleporting to [target]...")
@@ -610,27 +613,27 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
updateghostsight()
/mob/dead/observer/proc/updateghostsight()
if (!seedarkness)
if(!seedarkness)
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
else
see_invisible = SEE_INVISIBLE_OBSERVER
if (!ghostvision)
if(!ghostvision)
see_invisible = SEE_INVISIBLE_LIVING;
updateghostimages()
/proc/updateallghostimages()
for (var/mob/dead/observer/O in player_list)
for(var/mob/dead/observer/O in player_list)
O.updateghostimages()
/mob/dead/observer/proc/updateghostimages()
if (!client)
if(!client)
return
if (seedarkness || !ghostvision)
if(seedarkness || !ghostvision)
client.images -= ghost_darkness_images
else
//add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
client.images |= ghost_darkness_images
if (ghostimage)
if(ghostimage)
client.images -= ghostimage //remove ourself
/mob/proc/can_admin_interact()
+24 -6
View File
@@ -1,21 +1,39 @@
/mob/dead/observer/say(var/message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if (!message)
if(!message)
return
log_say("Ghost/[src.key] : [message]")
if (src.client)
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot talk in deadchat (muted).")
return
if (src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
return
if(copytext(message,1,2) == "*")
return emote(copytext(message,2))
. = src.say_dead(message)
/mob/dead/observer/emote(var/act, var/type, var/message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if(!message)
return
if(act != "me")
return
log_emote("Ghost/[src.key] : [message]")
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot emote in deadchat (muted).")
return
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
return
. = src.emote_dead(message)
+125
View File
@@ -0,0 +1,125 @@
#define EMOTE_COOLDOWN 20 //Time in deciseconds that the cooldown lasts
//Emote Cooldown System (it's so simple!)
/mob/proc/handle_emote_CD(cooldown = EMOTE_COOLDOWN)
if(emote_cd == 2) return 1 // Cooldown emotes were disabled by an admin, prevent use
if(src.emote_cd == 1) return 1 // Already on CD, prevent use
src.emote_cd = 1 // Starting cooldown
spawn(cooldown)
if(emote_cd == 2) return 1 // Don't reset if cooldown emotes were disabled by an admin during the cooldown
src.emote_cd = 0 // Cooldown complete, ready for more!
return 0 // Proceed with emote
//--FalseIncarnate
// All mobs should have custom emote, really..
/mob/proc/custom_emote(var/m_type=1,var/message = null)
if(stat || !use_me && usr == src)
if(usr)
to_chat(usr, "You are unable to emote.")
return
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
if(m_type == 2 && muzzled) return
var/input
if(!message)
input = sanitize(copytext(input(src,"Choose an emote to display.") as text|null,1,MAX_MESSAGE_LEN))
else
input = message
if(input)
message = "<B>[src]</B> [input]"
else
return
if(message)
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that.
for(var/mob/M in player_list)
if(!M.client)
continue //skip monkeys and leavers
if(istype(M, /mob/new_player))
continue
if(findtext(message," snores.")) //Because we have so many sleeping people.
break
if(M.stat == 2 && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
// Type 1 (Visual) emotes are sent to anyone in view of the item
if(m_type & 1)
var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around.
can_see |= viewers(src,null)
for(var/mob/O in can_see)
if(O.status_flags & PASSEMOTES)
for(var/obj/item/weapon/holder/H in O.contents)
H.show_message(message, m_type)
for(var/mob/living/M in O.contents)
M.show_message(message, m_type)
O.show_message(message, m_type)
// Type 2 (Audible) emotes are sent to anyone in hear range
// of the *LOCATION* -- this is important for pAIs to be heard
else if(m_type & 2)
for(var/mob/O in get_mobs_in_view(7,src))
if(O.status_flags & PASSEMOTES)
for(var/obj/item/weapon/holder/H in O.contents)
H.show_message(message, m_type)
for(var/mob/living/M in O.contents)
M.show_message(message, m_type)
O.show_message(message, m_type)
/mob/proc/emote_dead(var/message)
if(client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "\red You cannot send deadchat emotes (muted).")
return
if(!(client.prefs.toggles & CHAT_DEAD))
to_chat(src, "\red You have deadchat muted.")
return
if(!src.client.holder)
if(!config.dsay_allowed)
to_chat(src, "\red Deadchat is globally muted")
return
var/input
if(!message)
input = sanitize(copytext(input(src, "Choose an emote to display.") as text|null, 1, MAX_MESSAGE_LEN))
else
input = message
if(input)
message = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <b>[src]</b> [message]</span>"
else
return
if(message)
log_emote("Ghost/[src.key] : [message]")
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
if(check_rights(R_ADMIN|R_MOD, 0, M) && (M.client.prefs.toggles & CHAT_DEAD)) // Show the emote to admins/mods
to_chat(M, message)
else if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_DEAD)) // Show the emote to regular ghosts with deadchat toggled on
M.show_message(message, 2)
+13 -13
View File
@@ -11,13 +11,13 @@
//make sure the air can transmit speech - hearer's side
var/turf/T = get_turf(src)
if ((T) && (!(istype(src, /mob/dead/observer)))) //Ghosts can hear even in vacuum.
if((T) && (!(istype(src, /mob/dead/observer)))) //Ghosts can hear even in vacuum.
var/datum/gas_mixture/environment = T.return_air()
var/pressure = (environment)? environment.return_pressure() : 0
if(pressure < SOUND_MINIMUM_PRESSURE && get_dist(speaker, src) > 1)
return
if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
if(pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
italics = 1
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
@@ -26,8 +26,8 @@
return
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
if (language && (language.flags & NONVERBAL))
if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
if(language && (language.flags & NONVERBAL))
if(!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
message = stars(message)
if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages
@@ -73,7 +73,7 @@
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][language.format_message(message, verb)]</span>")
else
to_chat(src, "<span class='game say'><span class='name'>[speaker_name]</span>[alt_name] [track][verb], <span class='message'><span class='body'>\"[message]\"</span></span></span>")
if (speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
if(speech_sound && (get_dist(speaker, src) <= world.view && src.z == speaker.z))
var/turf/source = speaker? get_turf(speaker) : get_turf(src)
src.playsound_local(source, speech_sound, sound_vol, 1)
@@ -92,8 +92,8 @@
follow_target = speaker
//non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet.
if (language && (language.flags & NONVERBAL))
if (!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
if(language && (language.flags & NONVERBAL))
if(!speaker || (src.sdisabilities & BLIND || src.blinded) || !(speaker in view(src)))
message = stars(message)
if(!(language && (language.flags & INNATE))) // skip understanding checks for INNATE languages
@@ -128,7 +128,7 @@
var/jobname // the mob's "job"
var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
if (ishuman(speaker))
if(ishuman(speaker))
var/mob/living/carbon/human/H = speaker
var/obj/item/weapon/card/id/id = H.wear_id
@@ -143,15 +143,15 @@
else
jobname = H.get_assignment()
else if (iscarbon(speaker)) // Nonhuman carbon mob
else if(iscarbon(speaker)) // Nonhuman carbon mob
jobname = "No ID"
else if (isAI(speaker))
else if(isAI(speaker))
jobname = "AI"
else if (isrobot(speaker))
else if(isrobot(speaker))
jobname = "Cyborg"
else if (ispAI(speaker))
else if(ispAI(speaker))
jobname = "Personal AI"
else if (isAutoAnnouncer(speaker))
else if(isAutoAnnouncer(speaker))
var/mob/living/automatedannouncer/AA = speaker
jobname = AA.role
else
+4 -4
View File
@@ -48,10 +48,10 @@
if(istype(M))
M.unEquip(src)
to_chat(M, "[src] wriggles out of your grip!")
to_chat(src, "You wriggle out of [M]'s grip!")
else if(istype(src.loc,/obj/item))
to_chat(src, "You struggle free of [src.loc].")
src.forceMove(get_turf(src))
to_chat(L, "You wriggle out of [M]'s grip!")
else if(istype(loc,/obj/item))
to_chat(L, "You struggle free of [loc].")
forceMove(get_turf(src))
if(istype(M))
for(var/atom/A in M.contents)
+5 -11
View File
@@ -518,24 +518,24 @@
if(!speaker.binarycheck())
return
if (!message)
if(!message)
return
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)], \"[message]\"</span></span></i>"
for (var/mob/M in dead_mob_list)
for(var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain))
var/message_start_dead = "<i><span class='game say'>[name], <span class='name'>[speaker.name] ([ghost_follow_link(speaker, ghost=M)])</span>"
M.show_message("[message_start_dead] [message_body]", 2)
for (var/mob/living/S in living_mob_list)
for(var/mob/living/S in living_mob_list)
if(drone_only && !istype(S,/mob/living/silicon/robot/drone))
continue
else if(istype(S , /mob/living/silicon/ai))
message_start = "<i><span class='game say'>[name], <a href='byond://?src=\ref[S];track=\ref[speaker]'><span class='name'>[speaker.name]</span></a>"
else if (!S.binarycheck())
else if(!S.binarycheck())
continue
S.show_message("[message_start] [message_body]", 2)
@@ -543,17 +543,11 @@
var/list/listening = hearers(1, src)
listening -= src
for (var/mob/living/M in listening)
for(var/mob/living/M in listening)
if(istype(M, /mob/living/silicon) || M.binarycheck())
continue
M.show_message("<i><span class='game say'><span class='name'>synthesised voice</span> <span class='message'>beeps, \"beep beep beep\"</span></span></i>",2)
//robot binary xmitter component power usage
if (isrobot(speaker))
var/mob/living/silicon/robot/R = speaker
var/datum/robot_component/C = R.components["comms"]
R.use_power(C.energy_consumption)
/datum/language/binary/drone
name = "Drone Talk"
desc = "A heavily encoded damage control coordination stream."
@@ -118,11 +118,11 @@
/mob/living/carbon/alien/handle_mutations_and_radiation()
// Aliens love radiation nom nom nom
if (radiation)
if (radiation > 100)
if(radiation)
if(radiation > 100)
radiation = 100
if (radiation < 0)
if(radiation < 0)
radiation = 0
switch(radiation)
@@ -228,8 +228,8 @@ Proc: AddInfectionImages()
Des: Gives the client of the alien an image on each infected mob.
----------------------------------------*/
/mob/living/carbon/alien/proc/AddInfectionImages()
if (client)
for (var/mob/living/C in mob_list)
if(client)
for(var/mob/living/C in mob_list)
if(C.status_flags & XENO_HOST)
var/obj/item/organ/internal/body_egg/alien_embryo/A = C.get_int_organ(/obj/item/organ/internal/body_egg/alien_embryo)
if(A)
@@ -243,7 +243,7 @@ Proc: RemoveInfectionImages()
Des: Removes all infected images from the alien.
----------------------------------------*/
/mob/living/carbon/alien/proc/RemoveInfectionImages()
if (client)
if(client)
for(var/image/I in client.images)
if(dd_hasprefix_case(I.icon_state, "infected"))
qdel(I)
@@ -6,17 +6,17 @@ As such, they can either help or harm other aliens. Help works like the human he
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
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 (I_HELP)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
@@ -24,12 +24,12 @@ In all, this is a lot like the monkey code. /N
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if (I_GRAB)
if(I_GRAB)
src.grabbedby(M)
return 1
else
if (health > 0)
if(health > 0)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
@@ -57,7 +57,7 @@ In all, this is a lot like the monkey code. /N
help_shake_act(M)
if(I_GRAB)
src.grabbedby(M)
if (I_HARM, I_DISARM)
if(I_HARM, I_DISARM)
return 1
return 0
@@ -57,10 +57,10 @@ Doesn't work on other aliens/AI.*/
if(isalien(M))
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
if (amount)
if(amount)
amount = abs(round(amount))
if(powerc(amount))
if (get_dist(src,M) <= 1)
if(get_dist(src,M) <= 1)
M.adjustPlasma(amount)
adjustPlasma(-amount)
to_chat(M, "<span class='noticealien'>[src] has transfered [amount] plasma to you.</span>")
@@ -18,8 +18,8 @@
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != 2)
if(healths)
if(stat != 2)
switch(health)
if(125 to INFINITY)
healths.icon_state = "health0"
@@ -85,7 +85,7 @@
leaping = 0
update_icons()
/mob/living/carbon/alien/humanoid/hunter/throw_impact(A)
/mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/A)
if(!leaping)
return ..()
@@ -93,20 +93,26 @@
if(A)
if(istype(A, /mob/living))
var/mob/living/L = A
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.apply_effect(5, WEAKEN, H.run_armor_check(null, "melee"))
else
L.Weaken(5)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
var/blocked = 0
if(ishuman(A))
var/mob/living/carbon/human/H = A
if(H.check_shields(90, "the [name]", src, attack_type = THROWN_PROJECTILE_ATTACK))
blocked = 1
if(!blocked)
L.visible_message("<span class ='danger'>[src] pounces on [L]!</span>", "<span class ='userdanger'>[src] pounces on you!</span>")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.apply_effect(5, WEAKEN, H.run_armor_check(null, "melee"))
else
L.Weaken(5)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
toggle_leap(0)
pounce_cooldown = !pounce_cooldown
spawn(pounce_cooldown_time) //3s by default
pounce_cooldown = !pounce_cooldown
else
else if(A.density && !A.CanPass(src))
visible_message("<span class ='danger'>[src] smashes into [A]!</span>", "<span class ='alertalien'>[src] smashes into [A]!</span>")
weakened = 2
@@ -49,8 +49,8 @@
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != 2)
if(healths)
if(stat != 2)
switch(health)
if(150 to INFINITY)
healths.icon_state = "health0"
@@ -0,0 +1,115 @@
/mob/living/carbon/alien/humanoid/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
// if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
// act = copytext(act,1,length(act)) //seriously who the fuck wrote this
var/muzzled = is_muzzled()
act = lowertext(act)
switch(act)
if("sign")
if(!restrained())
var/num = null
if(text2num(param))
num = "the number [text2num(param)]"
if(num)
message = "<B>\The [src]</B> signs [num]."
m_type = 1
if("burp")
if(!muzzled)
message = "<B>\The [src]</B> burps."
m_type = 2
if("deathgasp")
message = "<B>\The [src]</B> lets out a waning guttural screech, green blood bubbling from its maw..."
m_type = 2
if("scratch")
if(!src.restrained())
message = "<B>\The [src]</B> scratches."
m_type = 1
if("whimper")
if(!muzzled)
message = "<B>\The [src]</B> whimpers."
m_type = 2
if("roar")
if(!muzzled)
message = "<B>\The [src]</B> roars."
m_type = 2
if("hiss")
if(!muzzled)
message = "<B>\The [src]</B> hisses."
m_type = 2
if("tail")
message = "<B>\The [src]</B> waves its tail."
m_type = 1
if("gasp")
message = "<B>\The [src]</B> gasps."
m_type = 2
if("shiver")
message = "<B>\The [src]</B> shivers."
m_type = 2
if("drool")
message = "<B>\The [src]</B> drools."
m_type = 1
if("scretch")
if(!muzzled)
message = "<B>\The [src]</B> scretches."
m_type = 2
if("choke")
message = "<B>\The [src]</B> chokes."
m_type = 2
if("moan")
message = "<B>\The [src]</B> moans!"
m_type = 2
if("nod")
message = "<B>\The [src]</B> nods its head."
m_type = 1
if("sit")
message = "<B>\The [src]</B> sits down."
m_type = 1
if("sway")
message = "<B>\The [src]</B> sways around dizzily."
m_type = 1
if("sulk")
message = "<B>\The [src]</B> sulks down sadly."
m_type = 1
if("twitch")
message = "<B>\The [src]</B> twitches violently."
m_type = 1
if("dance")
if(!src.restrained())
message = "<B>\The [src]</B> dances around happily."
m_type = 1
if("roll")
if(!src.restrained())
message = "<B>\The [src]</B> rolls."
m_type = 1
if("shake")
message = "<B>\The [src]</B> shakes its head."
m_type = 1
if("gnarl")
if(!muzzled)
message = "<B>\The [src]</B> gnarls and shows its teeth.."
m_type = 2
if("jump")
message = "<B>\The [src]</B> jumps!"
m_type = 1
if("collapse")
Paralyse(2)
message = "<B>\The [src]</B> collapses!"
m_type = 2
if("flip")
m_type = 1
message = "<B>\The [src]</B> does a flip!"
src.SpinAnimation(5,1)
if("help")
to_chat(src, "burp, flip, deathgasp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roar, roll, scratch,\nscretch, shake, sign-#, sit, sulk, sway, tail, twitch, whimper")
if(!stat)
if(act == "roar")
playsound(src.loc, 'sound/voice/hiss5.ogg', 40, 1, 1)
if(act == "deathgasp")
playsound(src.loc, 'sound/voice/hiss6.ogg', 80, 1, 1)
..(act, m_type, message)
@@ -56,8 +56,8 @@
..() //-Yvarov
if (src.healths)
if (src.stat != 2)
if(src.healths)
if(src.stat != 2)
switch(health)
if(250 to INFINITY)
src.healths.icon_state = "health0"
@@ -29,22 +29,22 @@
//This is fine, works the same as a human
/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
if((!( yes ) || now_pushing))
return
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
if(!istype(AM, /atom/movable))
return
if (ismob(AM))
if(ismob(AM))
var/mob/tmob = AM
tmob.LAssailant = src
if (!now_pushing)
if(!now_pushing)
now_pushing = 1
if (!AM.anchored)
if(!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window/full))
if(istype(AM, /obj/structure/window/full))
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
@@ -55,13 +55,13 @@
/mob/living/carbon/alien/humanoid/movement_delay()
var/tally = 0
if (istype(src, /mob/living/carbon/alien/humanoid/queen))
if(istype(src, /mob/living/carbon/alien/humanoid/queen))
tally += 4
if (istype(src, /mob/living/carbon/alien/humanoid/drone))
if(istype(src, /mob/living/carbon/alien/humanoid/drone))
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/sentinel))
if(istype(src, /mob/living/carbon/alien/humanoid/sentinel))
tally += 0
if (istype(src, /mob/living/carbon/alien/humanoid/hunter))
if(istype(src, /mob/living/carbon/alien/humanoid/hunter))
tally = -2 // hunters go supersuperfast
return (tally + move_delay_add + config.alien_delay)
@@ -85,13 +85,13 @@
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
switch(severity)
if(1.0)
gib()
return
if (2.0)
if (!shielded)
if(2.0)
if(!shielded)
b_loss += 60
f_loss += 60
@@ -101,7 +101,7 @@
if(3.0)
b_loss += 30
if (prob(50) && !shielded)
if(prob(50) && !shielded)
Paralyse(1)
ear_damage += 15
ear_deaf += 60
@@ -112,13 +112,13 @@
updatehealth()
/mob/living/carbon/alien/humanoid/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
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)
if(stat > -100)
M.do_attack_animation(src)
visible_message("<span class='danger'>The [M.name] glomps [src]!</span>", \
@@ -153,7 +153,7 @@
"<span class='userdanger'>The [M.name] has shocked [src]!</span>")
Weaken(power)
if (stuttering < power)
if(stuttering < power)
stuttering = power
Stun(power)
@@ -161,7 +161,7 @@
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
@@ -183,11 +183,11 @@
updatehealth()
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -196,17 +196,17 @@
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
help_shake_act(M)
if (I_GRAB)
if(I_GRAB)
grabbedby(M)
if (I_HARM)
if(I_HARM)
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)//HULK SMASH
if(prob(90))
if(HULK in M.mutations)//HULK SMASH
damage = 15
spawn(0)
Paralyse(1)
@@ -216,7 +216,7 @@
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.
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>", \
@@ -227,15 +227,15 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if (I_DISARM)
if (!lying)
if (prob(5))//Very small chance to push an alien down.
if(I_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))
if(prob(50))
drop_item()
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>", \
@@ -251,11 +251,11 @@ In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -263,7 +263,7 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
@@ -272,7 +272,7 @@ In all, this is a lot like the monkey code. /N
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
if(health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
@@ -294,7 +294,7 @@ In all, this is a lot like the monkey code. /N
else
if (health > 0)
if(health > 0)
L.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
@@ -310,7 +310,7 @@ In all, this is a lot like the monkey code. /N
/mob/living/carbon/alien/humanoid/restrained()
if (handcuffed)
if(handcuffed)
return 1
return 0
@@ -15,24 +15,24 @@
/mob/living/carbon/alien/humanoid/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 10))
if(disabilities & EPILEPSY)
if((prob(1) && paralysis < 10))
to_chat(src, "<span class='danger'>You have a seizure!</span>")
Paralyse(10)
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
if(disabilities & COUGHING)
if((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
if (disabilities & TOURETTES)
if ((prob(10) && paralysis <= 1))
if(disabilities & TOURETTES)
if((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
if (disabilities & NERVOUS)
if (prob(10))
if(disabilities & NERVOUS)
if(prob(10))
stuttering = max(10, stuttering)
/mob/living/carbon/alien/humanoid/proc/adjust_body_temperature(current, loc_temp, boost)
@@ -34,8 +34,8 @@
/mob/living/carbon/alien/humanoid/queen/handle_regular_hud_updates()
..() //-Yvarov
if (healths)
if (stat != DEAD)
if(healths)
if(stat != DEAD)
switch(health)
if(250 to INFINITY)
healths.icon_state = "health0"
@@ -56,7 +56,7 @@
/mob/living/carbon/alien/humanoid/regenerate_icons()
..()
if (notransform) return
if(notransform) return
update_inv_head(0,0)
update_inv_wear_suit(0,0)
@@ -103,7 +103,7 @@
t_suit = "armor"
standing.overlays += image("icon" = 'icons/effects/blood.dmi', "icon_state" = "[t_suit]blood")
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
unEquip(handcuffed)
drop_r_hand()
drop_l_hand()
@@ -115,7 +115,7 @@
/mob/living/carbon/alien/humanoid/update_inv_head(var/update_icons=1)
if (head)
if(head)
var/t_state = head.item_state
if(!t_state) t_state = head.icon_state
var/image/standing = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "[t_state]")
@@ -0,0 +1,126 @@
/mob/living/carbon/alien/larva/emote(var/act,var/m_type=1,var/message = null)
var/param = null
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = is_muzzled()
act = lowertext(act)
switch(act)
if("me")
if(silent)
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot send IC messages (muted).")
return
if(src.client.handle_spam_prevention(message,MUTE_IC))
return
if(stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if("custom")
return custom_emote(m_type, message)
if("sign")
if(!src.restrained())
message = text("<B>The alien</B> signs[].", (text2num(param) ? text(" the number []", text2num(param)) : null))
m_type = 1
if("burp")
if(!muzzled)
message = "<B>[src]</B> burps."
m_type = 2
if("scratch")
if(!src.restrained())
message = "<B>The [src.name]</B> scratches."
m_type = 1
if("whimper")
if(!muzzled)
message = "<B>The [src.name]</B> whimpers."
m_type = 2
// if("roar")
// if(!muzzled)
// message = "<B>The [src.name]</B> roars." Commenting out since larva shouldn't roar /N
// m_type = 2
if("tail")
message = "<B>The [src.name]</B> waves its tail."
m_type = 1
if("gasp")
message = "<B>The [src.name]</B> gasps."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
if("drool")
message = "<B>The [src.name]</B> drools."
m_type = 1
if("scretch")
if(!muzzled)
message = "<B>The [src.name]</B> scretches."
m_type = 2
if("choke")
message = "<B>The [src.name]</B> chokes."
m_type = 2
if("moan")
message = "<B>The [src.name]</B> moans!"
m_type = 2
if("nod")
message = "<B>The [src.name]</B> nods its head."
m_type = 1
// if("sit")
// message = "<B>The [src.name]</B> sits down." //Larvan can't sit down, /N
// m_type = 1
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
m_type = 1
if("sulk")
message = "<B>The [src.name]</B> sulks down sadly."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches violently."
m_type = 1
if("dance")
if(!src.restrained())
message = "<B>The [src.name]</B> dances around happily."
m_type = 1
if("roll")
if(!src.restrained())
message = "<B>The [src.name]</B> rolls."
m_type = 1
if("shake")
message = "<B>The [src.name]</B> shakes its head."
m_type = 1
if("gnarl")
if(!muzzled)
message = "<B>The [src.name]</B> gnarls and shows its teeth.."
m_type = 2
if("jump")
message = "<B>The [src.name]</B> jumps!"
m_type = 1
if("hiss_")
message = "<B>The [src.name]</B> hisses softly."
m_type = 1
if("collapse")
Paralyse(2)
message = text("<B>[]</B> collapses!", src)
m_type = 2
if("help")
to_chat(src, "burp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper")
else
to_chat(src, text("Invalid Emote: []", act))
if((message && src.stat == 0))
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)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
return
@@ -31,7 +31,7 @@
/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
if((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
@@ -48,11 +48,11 @@
now_pushing = 0
..()
if (!( istype(AM, /atom/movable) ))
if(!( istype(AM, /atom/movable) ))
return
if (!( now_pushing ))
if(!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
if(!( AM.anchored ))
var/t = get_dir(src, AM)
step(AM, t)
now_pushing = null
@@ -76,12 +76,12 @@
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
switch(severity)
if(1.0)
gib()
return
if (2.0)
if(2.0)
b_loss += 60
@@ -92,7 +92,7 @@
if(3.0)
b_loss += 30
if (prob(50))
if(prob(50))
Paralyse(1)
ear_damage += 15
ear_deaf += 60
@@ -123,14 +123,14 @@
/mob/living/carbon/alien/larva/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
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)
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>")
@@ -148,11 +148,11 @@
return
/mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -160,17 +160,17 @@
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
help_shake_act(M)
if (I_GRAB)
if(I_GRAB)
grabbedby(M)
else
M.do_attack_animation(src)
var/damage = rand(1, 9)
if (prob(90))
if (HULK in M.mutations)
if(prob(90))
if(HULK in M.mutations)
damage += 5
spawn(0)
Paralyse(1)
@@ -180,7 +180,7 @@
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))
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>", \
@@ -194,11 +194,11 @@
return
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -206,7 +206,7 @@
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
@@ -215,7 +215,7 @@
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if (health > 0)
if(health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
@@ -7,17 +7,17 @@
if(stat != CONSCIOUS)
return
if (layer != TURF_LAYER+0.2)
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
to_chat(src, text("<span class='noticealien'>You are now hiding.</span>"))
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
to_chat(O, text("<B>[] scurries to the ground!</B>", src))
else
layer = MOB_LAYER
to_chat(src, text("\green You have stopped hiding."))
for(var/mob/O in oviewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
to_chat(O, text("[] slowly peaks up from the ground...", src))
/mob/living/carbon/alien/larva/verb/evolve()
@@ -12,11 +12,11 @@
if(stat == DEAD)
icon_state = "larva[state]_dead"
else if (handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
else if(handcuffed || legcuffed) //This should be an overlay. Who made this an icon_state?
icon_state = "larva[state]_cuff"
else if(stat == UNCONSCIOUS || lying || resting)
icon_state = "larva[state]_sleep"
else if (stunned)
else if(stunned)
icon_state = "larva[state]_stun"
else
icon_state = "larva[state]"
@@ -52,7 +52,7 @@ var/const/MAX_ACTIVE_TIME = 400
to_chat(user, "<span class='boldannounce'>[src] is not moving.</span>")
if(CONSCIOUS)
to_chat(user, "<span class='boldannounce'>[src] seems to be active!</span>")
if (sterile)
if(sterile)
to_chat(user, "<span class='boldannounce'>It looks like the proboscis has been removed.</span>")
/obj/item/clothing/mask/facehugger/attackby(obj/item/O,mob/m, params)
@@ -148,7 +148,7 @@ var/const/MAX_ACTIVE_TIME = 400
target.equip_to_slot(src, slot_wear_mask,,0)
if(!sterile)
M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings
else if (iscorgi(M))
else if(iscorgi(M))
var/mob/living/simple_animal/pet/corgi/C = M
loc = C
C.facehugger = src
@@ -23,29 +23,29 @@
return ..()
say_understands(var/other)//Goddamn is this hackish, but this say code is so odd
if (istype(other, /mob/living/silicon/ai))
if(istype(other, /mob/living/silicon/ai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/decoy))
if(istype(other, /mob/living/silicon/decoy))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/pai))
if(istype(other, /mob/living/silicon/pai))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/silicon/robot))
if(istype(other, /mob/living/silicon/robot))
if(!(container && istype(container, /obj/item/device/mmi)))
return 0
else
return 1
if (istype(other, /mob/living/carbon/human))
if(istype(other, /mob/living/carbon/human))
return 1
if (istype(other, /mob/living/carbon/slime))
if(istype(other, /mob/living/carbon/slime))
return 1
return ..()
@@ -4,7 +4,7 @@
max_damage = 200
icon_state = "brain2"
force = 1.0
w_class = 2.0
w_class = 2
throwforce = 1.0
throw_speed = 3
throw_range = 5
@@ -0,0 +1,51 @@
/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
return
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
if(src.stat == DEAD)
return
act = lowertext(act)
switch(act)
if("alarm")
to_chat(src, "You sound an alarm.")
message = "<B>\The [src]</B> sounds an alarm."
m_type = 2
if("alert")
to_chat(src, "You let out a distressed noise.")
message = "<B>\The [src]</B> lets out a distressed noise."
m_type = 2
if("notice")
to_chat(src, "You play a loud tone.")
message = "<B>\The [src]</B> plays a loud tone."
m_type = 2
if("flash")
message = "The lights on <B>\the [src]</B> flash quickly."
m_type = 1
if("blink")
message = "<B>\The [src]</B> blinks."
m_type = 1
if("whistle")
to_chat(src, "You whistle.")
message = "<B>\The [src]</B> whistles."
m_type = 2
if("beep")
to_chat(src, "You beep.")
message = "<B>\The [src]</B> beeps."
m_type = 2
if("boop")
to_chat(src, "You boop.")
message = "<B>\The [src]</B> boops."
m_type = 2
if("help")
to_chat(src, "alarm, alert, notice, flash,blink, whistle, beep, boop")
if(message && !stat)
..(act, m_type, message)
+2 -2
View File
@@ -65,13 +65,13 @@
/mob/living/carbon/brain/handle_vision()
..()
if (stat == 2 || (XRAY in src.mutations))
if(stat == 2 || (XRAY in src.mutations))
sight |= SEE_TURFS
sight |= SEE_MOBS
sight |= SEE_OBJS
see_in_dark = 8
see_invisible = SEE_INVISIBLE_LEVEL_TWO
else if (stat != 2)
else if(stat != 2)
sight &= ~SEE_TURFS
sight &= ~SEE_MOBS
sight &= ~SEE_OBJS
@@ -64,7 +64,7 @@
if(!C || brainmob.key || 0 == searching) return //handle logouts that happen whilst the alert is waiting for a response, and responses issued after a brain has been located.
if(response == "Yes")
transfer_personality(C.mob)
else if (response == "Never for this round")
else if(response == "Never for this round")
C.prefs.be_special -= ROLE_POSIBRAIN
// This should not ever happen, but let's be safe
@@ -99,7 +99,7 @@
src.brainmob.mind.assigned_role = "Positronic Brain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain chimes quietly.")
icon_state = "posibrain-occupied"
@@ -110,7 +110,7 @@
icon_state = "posibrain"
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain buzzes quietly, and the golden lights fade away. Perhaps you could try again?")
/obj/item/device/mmi/posibrain/Topic(href,href_list)
@@ -144,11 +144,12 @@
/obj/item/device/mmi/posibrain/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
if(!..(user))
to_chat(user, "<span class='info'>*---------*</span>")
return
var/msg = "<span class='info'>*---------*\nThis is [bicon(src)] \a <EM>[src]</EM>!\n[desc]\n"
msg += "<span class='warning'>"
var/msg = "<span class='info'>"
if(src.brainmob && src.brainmob.key)
switch(src.brainmob.stat)
@@ -158,7 +159,7 @@
if(DEAD) msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
else
msg += "<span class='deadsay'>It appears to be completely inactive.</span>\n"
msg += "<span class='info'>*---------*</span>"
msg += "*---------*</span>"
to_chat(user, msg)
/obj/item/device/mmi/posibrain/emp_act(severity)
@@ -192,7 +193,7 @@
volunteer(O)
else
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\blue The positronic brain pings softly.")
/obj/item/device/mmi/posibrain/ipc
+4 -4
View File
@@ -1,6 +1,6 @@
//TODO: Convert this over for languages.
/mob/living/carbon/brain/say(var/message, var/datum/language/speaking = null)
if (silent)
if(silent)
return
if(!(container && istype(container, /obj/item/device/mmi)))
@@ -24,9 +24,9 @@
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))
if(container && istype(container,/obj/item/device/mmi))
var/obj/item/device/mmi/c = container
if (!radio_worked && c.mecha)
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)
@@ -36,7 +36,7 @@
if(R.radio)
radio_worked = R.radio.talk_into(src, message, message_mode, verb, speaking)
return radio_worked
if ("whisper")
if("whisper")
whisper_say(message, speaking, alt_name)
return 1
else return 0
+31 -31
View File
@@ -25,7 +25,7 @@
return ..()
/mob/living/carbon/blob_act()
if (stat == DEAD)
if(stat == DEAD)
return
else
show_message("<span class='userdanger'>The blob attacks!</span>")
@@ -65,7 +65,7 @@
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
var/obj/item/organ/external/organ = H.get_organ("chest")
if (istype(organ))
if(istype(organ))
if(organ.take_damage(d, 0))
H.UpdateDamageIcon()
@@ -119,7 +119,7 @@
if(stun)
adjustToxLoss(-3)
T = get_step(T, dir)
if (is_blocked_turf(T))
if(is_blocked_turf(T))
break
return 1
@@ -168,7 +168,7 @@
if(!tesla_shock || (tesla_shock && siemens_coeff > 0.5))
Stun(3)
Weaken(3)
if (shock_damage > 200)
if(shock_damage > 200)
src.visible_message(
"<span class='danger'>[src] was arc flashed by the [source]!</span>", \
"<span class='userdanger'>The [source] arc flashes and electrocutes you!</span>", \
@@ -213,7 +213,7 @@
swap_hand()
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
if (src.health >= config.health_threshold_crit)
if(src.health >= config.health_threshold_crit)
if(src == M && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
src.visible_message( \
@@ -261,11 +261,11 @@
"<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(src.gender == MALE)
t_him = "him"
else if (src.gender == FEMALE)
else if(src.gender == FEMALE)
t_him = "her"
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
if(istype(src,/mob/living/carbon/human) && src:w_uniform)
var/mob/living/carbon/human/H = src
H.w_uniform.add_fingerprint(M)
src.sleeping = max(0,src.sleeping-5)
@@ -498,7 +498,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
//Throwing stuff
/mob/living/carbon/proc/toggle_throw_mode()
if (in_throw_mode)
if(in_throw_mode)
throw_mode_off()
else
throw_mode_on()
@@ -565,7 +565,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return 1
/mob/living/carbon/restrained()
if (handcuffed)
if(handcuffed)
return 1
return
@@ -890,51 +890,51 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
wear_mask)
/mob/living/carbon/proc/uncuff()
if (handcuffed)
if(handcuffed)
var/obj/item/weapon/W = handcuffed
handcuffed = null
if (buckled && buckled.buckle_requires_restraints)
if(buckled && buckled.buckle_requires_restraints)
buckled.unbuckle_mob()
update_handcuffed()
if (client)
if(client)
client.screen -= W
if (W)
if(W)
W.loc = loc
W.dropped(src)
if (W)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
if (legcuffed)
if(legcuffed)
var/obj/item/weapon/W = legcuffed
legcuffed = null
update_inv_legcuffed()
if (client)
if(client)
client.screen -= W
if (W)
if(W)
W.loc = loc
W.dropped(src)
if (W)
if(W)
W.layer = initial(W.layer)
W.plane = initial(W.plane)
/mob/living/carbon/proc/slip(var/description, var/stun, var/weaken, var/tilesSlipped, var/walkSafely, var/slipAny)
if (flying || buckled || (walkSafely && m_intent == "walk"))
if(flying || buckled || (walkSafely && m_intent == "walk"))
return
if ((lying) && (!(tilesSlipped)))
if((lying) && (!(tilesSlipped)))
return
if (!(slipAny))
if (istype(src, /mob/living/carbon/human))
if(!(slipAny))
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if ((isobj(H.shoes) && H.shoes.flags & NOSLIP) || H.species.bodyflags & FEET_NOSLIP)
if((isobj(H.shoes) && H.shoes.flags & NOSLIP) || H.species.bodyflags & FEET_NOSLIP)
return
if (tilesSlipped)
if(tilesSlipped)
for(var/t = 0, t<=tilesSlipped, t++)
spawn (t) step(src, src.dir)
stop_pulling()
to_chat(src, "<span class='notice'>You slipped on the [description]!</span>")
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
if (stun)
if(stun)
Stun(stun)
Weaken(weaken)
return 1
@@ -966,15 +966,15 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
if(istype(toEat, /obj/item/weapon/reagent_containers/food/pill))
to_chat(src, "<span class='notify'>You [toEat.apply_method] [toEat].</span>")
else
if (fullness <= 50)
if(fullness <= 50)
to_chat(src, "<span class='warning'>You hungrily chew out a piece of [toEat] and gobble it!</span>")
else if (fullness > 50 && fullness <= 150)
else if(fullness > 50 && fullness <= 150)
to_chat(src, "<span class='notice'>You hungrily begin to eat [toEat].</span>")
else if (fullness > 150 && fullness <= 350)
else if(fullness > 150 && fullness <= 350)
to_chat(src, "<span class='notice'>You take a bite of [toEat].</span>")
else if (fullness > 350 && fullness <= 550)
else if(fullness > 350 && fullness <= 550)
to_chat(src, "<span class='notice'>You unwillingly chew a bit of [toEat].</span>")
else if (fullness > (550 * (1 + overeatduration / 2000))) // The more you eat - the more you can eat
else if(fullness > (550 * (1 + overeatduration / 2000))) // The more you eat - the more you can eat
to_chat(src, "<span class='warning'>You cannot force any more of [toEat] to go down your throat.</span>")
return 0
return 1
+11 -9
View File
@@ -111,7 +111,7 @@
if(istype(I,/mob/living/simple_animal/borer))
B = I
if(B)
if(!B.ckey && ckey && B.controlling)
if(B.controlling && B.host == src)
B.detatch()
verbs -= /mob/living/carbon/proc/release_control
@@ -144,10 +144,11 @@
var/obj/item/organ/external/head/H = get_organ("head")
if(SKELETON in src.mutations) return
if(H.f_style)
H.f_style = "Shaved"
if(H.h_style)
H.h_style = "Bald"
if(istype(H))
if(H.f_style)
H.f_style = "Shaved"
if(H.h_style)
H.h_style = "Bald"
update_fhair(0)
update_hair(0)
@@ -162,10 +163,11 @@
var/obj/item/organ/external/head/H = organs_by_name["head"]
if(HUSK in mutations) return
if(H.f_style)
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
if(H.h_style)
H.h_style = "Bald"
if(istype(H))
if(H.f_style)
H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE
if(H.h_style)
H.h_style = "Bald"
update_fhair(0)
update_hair(0)
@@ -0,0 +1,889 @@
/mob/living/carbon/human/emote(var/act,var/m_type=1,var/message = null,var/force)
if(stat == DEAD)
return // No screaming bodies
var/param = null
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
var/muzzled = is_muzzled()
if(sdisabilities & MUTE || silent)
muzzled = 1
//var/m_type = 1
for(var/obj/item/weapon/implant/I in src)
if(I.implanted)
I.trigger(act, src)
var/miming = 0
if(mind)
miming = mind.miming
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
act = lowertext(act)
switch(act)
//Cooldown-inducing emotes
if("ping", "pings", "buzz", "buzzes", "beep", "beeps", "yes", "no", "buzz2")
if(species.name == "Machine") //Only Machines can beep, ping, and buzz, yes, no, and make a silly sad trombone noise.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
else //Everyone else fails, skip the emote attempt
return
if("drone","drones","hum","hums","rumble","rumbles")
if(species.name == "Drask") //Only Drask can make whale noises
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
else
return
if("squish", "squishes")
var/found_slime_bodypart = 0
if(species.name == "Slime People") //Only Slime People can squish
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm'
found_slime_bodypart = 1
else
for(var/obj/item/organ/external/L in organs) // if your limbs are squishy you can squish too!
if(L.dna.species in list("Slime People"))
on_CD = handle_emote_CD()
found_slime_bodypart = 1
break
if(!found_slime_bodypart) //Everyone else fails, skip the emote attempt
return
if("scream", "screams")
on_CD = handle_emote_CD(50) //longer cooldown
if("fart", "farts", "flip", "flips", "snap", "snaps")
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//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
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
switch(act)
if("me") //OKAY SO RANT TIME, THIS FUCKING HAS TO BE HERE OR A SHITLOAD OF THINGS BREAK
return custom_emote(m_type, message) //DO YOU KNOW WHY SHIT BREAKS? BECAUSE SO MUCH OLDCODE CALLS mob.emote("me",1,"whatever_the_fuck_it_wants_to_emote")
//WHO THE FUCK THOUGHT THAT WAS A GOOD FUCKING IDEA!?!?
if("ping", "pings")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 2
if("buzz2")
message = "<B>[src]</B> emits an irritated buzzing sound."
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
m_type = 2
if("buzz", "buzzes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 2
if("beep", "beeps")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 2
if("drone", "drones", "hum", "hums", "rumble", "rumbles")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> drones at [param]."
else
message = "<B>[src]</B> rumbles."
playsound(src.loc, 'sound/voice/DraskTalk.ogg', 50, 0)
m_type = 2
if("squish", "squishes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> squishes at [param]."
else
message = "<B>[src]</B> squishes."
playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
m_type = 2
if("yes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> emits an affirmative blip at [param]."
else
message = "<B>[src]</B> emits an affirmative blip."
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 2
if("no")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> emits a negative blip at [param]."
else
message = "<B>[src]</B> emits a negative blip."
playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 2
if("wag", "wags")
if(body_accessory)
if(body_accessory.try_restrictions(src))
message = "<B>[src]</B> starts wagging \his tail."
start_tail_wagging(1)
else if(species.bodyflags & TAIL_WAGGING)
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
message = "<B>[src]</B> starts wagging \his tail."
src.start_tail_wagging(1)
else
return
else
return
m_type = 1
if("swag", "swags")
if(species.bodyflags & TAIL_WAGGING || body_accessory)
message = "<B>[src]</B> stops wagging \his tail."
src.stop_tail_wagging(1)
else
return
m_type = 1
if("airguitar")
if(!src.restrained())
message = "<B>[src]</B> is strumming the air and headbanging like a safari chimp."
m_type = 1
if("blink", "blinks")
message = "<B>[src]</B> blinks."
m_type = 1
if("blink_r", "blinks_r")
message = "<B>[src]</B> blinks rapidly."
m_type = 1
if("bow", "bows")
if(!src.buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> bows to [param]."
else
message = "<B>[src]</B> bows."
m_type = 1
if("salute", "salutes")
if(!src.buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> salutes to [param]."
else
message = "<B>[src]</b> salutes."
m_type = 1
if("choke", "chokes")
if(miming)
message = "<B>[src]</B> clutches \his throat desperately!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> chokes!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if("burp", "burps")
if(miming)
message = "<B>[src]</B> opens their mouth rather obnoxiously."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> burps."
m_type = 2
else
message = "<B>[src]</B> makes a peculiar noise."
m_type = 2
if("clap", "claps")
if(!src.restrained())
message = "<B>[src]</B> claps."
m_type = 2
if(miming)
m_type = 1
if("flap", "flaps")
if(!src.restrained())
message = "<B>[src]</B> flaps \his wings."
m_type = 2
if(miming)
m_type = 1
if("flip", "flips")
m_type = 1
if(!src.restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M == src)
M = null
if(M)
if(lying || weakened)
message = "<B>[src]</B> flops and flails around on the floor."
else
message = "<B>[src]</B> flips in [M]'s general direction."
SpinAnimation(5,1)
else
if(lying || weakened)
message = "<B>[src]</B> flops and flails around on the floor."
else
var/obj/item/weapon/grab/G
if(istype(get_active_hand(), /obj/item/weapon/grab))
G = get_active_hand()
if(G && G.affecting)
if(buckled || G.affecting.buckled)
return
var/turf/oldloc = loc
var/turf/newloc = G.affecting.loc
if(isturf(oldloc) && isturf(newloc))
SpinAnimation(5,1)
forceMove(newloc)
G.affecting.forceMove(oldloc)
message = "<B>[src]</B> flips over [G.affecting]!"
else
message = "<B>[src]</B> does a flip!"
SpinAnimation(5,1)
if("aflap", "aflaps")
if(!src.restrained())
message = "<B>[src]</B> flaps \his wings ANGRILY!"
m_type = 2
if(miming)
m_type = 1
if("drool", "drools")
message = "<B>[src]</B> drools."
m_type = 1
if("eyebrow")
message = "<B>[src]</B> raises an eyebrow."
m_type = 1
if("chuckle", "chuckles")
if(miming)
message = "<B>[src]</B> appears to chuckle."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> chuckles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if("twitch", "twitches")
message = "<B>[src]</B> twitches violently."
m_type = 1
if("twitch_s", "twitches_s")
message = "<B>[src]</B> twitches."
m_type = 1
if("faint", "faints")
message = "<B>[src]</B> faints."
if(src.sleeping)
return //Can't faint while asleep
src.sleeping += 1
m_type = 1
if("cough", "coughs")
if(miming)
message = "<B>[src]</B> appears to cough!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> coughs!"
m_type = 2
else
message = "<B>[src]</B> makes a strong noise."
m_type = 2
if("frown", "frowns")
message = "<B>[src]</B> frowns."
m_type = 1
if("nod", "nods")
message = "<B>[src]</B> nods."
m_type = 1
if("blush", "blushes")
message = "<B>[src]</B> blushes."
m_type = 1
if("wave", "waves")
message = "<B>[src]</B> waves."
m_type = 1
if("quiver", "quivers")
message = "<B>[src]</B> quivers."
m_type = 1
if("gasp", "gasps")
if(miming)
message = "<B>[src]</B> appears to be gasping!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> gasps!"
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if("deathgasp", "deathgasps")
message = "<B>[src]</B> [species.death_message]"
m_type = 1
if("giggle", "giggles")
if(miming)
message = "<B>[src]</B> giggles silently!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> giggles."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if("glare", "glares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> glares at [param]."
else
message = "<B>[src]</B> glares."
m_type = 1
if("stare", "stares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> stares at [param]."
else
message = "<B>[src]</B> stares."
m_type = 1
if("look", "looks")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> looks at [param]."
else
message = "<B>[src]</B> looks."
m_type = 1
if("grin", "grins")
message = "<B>[src]</B> grins."
m_type = 1
if("cry", "cries")
if(miming)
message = "<B>[src]</B> cries."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> cries."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise. \He frowns."
m_type = 2
if("sigh", "sighs")
if(miming)
message = "<B>[src]</B> sighs."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> sighs."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if("laugh", "laughs")
if(miming)
message = "<B>[src]</B> acts out a laugh."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> laughs."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if("mumble", "mumbles")
message = "<B>[src]</B> mumbles!"
m_type = 2
if(miming)
m_type = 1
if("grumble", "grumbles")
if(miming)
message = "<B>[src]</B> grumbles!"
m_type = 1
if(!muzzled)
message = "<B>[src]</B> grumbles!"
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if("groan", "groans")
if(miming)
message = "<B>[src]</B> appears to groan!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> groans!"
m_type = 2
else
message = "<B>[src]</B> makes a loud noise."
m_type = 2
if("moan", "moans")
if(miming)
message = "<B>[src]</B> appears to moan!"
m_type = 1
else
message = "<B>[src]</B> moans!"
m_type = 2
if("johnny")
var/M
if(param)
M = param
if(!M)
param = null
else
if(miming)
message = "<B>[src]</B> takes a drag from a cigarette and blows \"[M]\" out in smoke."
m_type = 1
else
message = "<B>[src]</B> says, \"[M], please. They had a family.\" [src.name] takes a drag from a cigarette and blows their name out in smoke."
m_type = 2
if("point", "points")
if(!src.restrained())
var/atom/M = null
if(param)
for(var/atom/A as mob|obj|turf in view())
if(param == A.name)
M = A
break
if(!M)
message = "<B>[src]</B> points."
else
pointed(M)
m_type = 1
if("raise", "raises")
if(!src.restrained())
message = "<B>[src]</B> raises a hand."
m_type = 1
if("shake", "shakes")
message = "<B>[src]</B> shakes \his head."
m_type = 1
if("shrug", "shrugs")
message = "<B>[src]</B> shrugs."
m_type = 1
if("signal", "signals")
if(!src.restrained())
var/t1 = round(text2num(param))
if(isnum(t1))
if(t1 <= 5 && (!src.r_hand || !src.l_hand))
message = "<B>[src]</B> raises [t1] finger\s."
else if(t1 <= 10 && (!src.r_hand && !src.l_hand))
message = "<B>[src]</B> raises [t1] finger\s."
m_type = 1
if("smile", "smiles")
message = "<B>[src]</B> smiles."
m_type = 1
if("shiver", "shivers")
message = "<B>[src]</B> shivers."
m_type = 2
if(miming)
m_type = 1
if("pale", "pales")
message = "<B>[src]</B> goes pale for a second."
m_type = 1
if("tremble", "trembles")
message = "<B>[src]</B> trembles."
m_type = 1
if("sneeze", "sneezes")
if(miming)
message = "<B>[src]</B> sneezes."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> sneezes."
m_type = 2
else
message = "<B>[src]</B> makes a strange noise."
m_type = 2
if("sniff", "sniffs")
message = "<B>[src]</B> sniffs."
m_type = 2
if(miming)
m_type = 1
if("snore", "snores")
if(miming)
message = "<B>[src]</B> sleeps soundly."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> snores."
m_type = 2
else
message = "<B>[src]</B> makes a noise."
m_type = 2
if("whimper", "whimpers")
if(miming)
message = "<B>[src]</B> appears hurt."
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> whimpers."
m_type = 2
else
message = "<B>[src]</B> makes a weak noise."
m_type = 2
if("wink", "winks")
message = "<B>[src]</B> winks."
m_type = 1
if("yawn", "yawns")
if(!muzzled)
message = "<B>[src]</B> yawns."
m_type = 2
if(miming)
m_type = 1
if("collapse", "collapses")
Paralyse(2)
message = "<B>[src]</B> collapses!"
m_type = 2
if(miming)
m_type = 1
if("hug", "hugs")
m_type = 1
if(!src.restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M == src)
M = null
if(M)
message = "<B>[src]</B> hugs [M]."
else
message = "<B>[src]</B> hugs \himself."
if("handshake")
m_type = 1
if(!src.restrained() && !src.r_hand)
var/mob/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M == src)
M = null
if(M)
if(M.canmove && !M.r_hand && !M.restrained())
message = "<B>[src]</B> shakes hands with [M]."
else
message = "<B>[src]</B> holds out \his hand to [M]."
if("dap", "daps")
m_type = 1
if(!src.restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M)
message = "<B>[src]</B> gives daps to [M]."
else
message = "<B>[src]</B> sadly can't find anybody to give daps to, and daps \himself. Shameful."
if("slap", "slaps")
m_type = 1
if(!src.restrained())
var/M = null
if(param)
for(var/mob/A in view(1, null))
if(param == A.name)
M = A
break
if(M)
message = "\red <B>[src]</B> slaps [M] across the face. Ouch!"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
else
message = "\red <B>[src]</B> slaps \himself!"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
src.adjustFireLoss(4)
if("scream", "screams")
if(miming)
message = "<B>[src]</B> acts out a scream!"
m_type = 1
else
if(!muzzled)
message = "<B>[src]</B> [species.scream_verb]!"
m_type = 2
if(gender == FEMALE)
playsound(src.loc, "[species.female_scream_sound]", 80, 1, 0, pitch = get_age_pitch())
else
playsound(src.loc, "[species.male_scream_sound]", 80, 1, 0, pitch = get_age_pitch()) //default to male screams if no gender is present.
else
message = "<B>[src]</B> makes a very loud noise."
m_type = 2
if("snap", "snaps")
if(prob(95))
m_type = 2
var/mob/living/carbon/human/H = src
var/obj/item/organ/external/L = H.get_organ("l_hand")
var/obj/item/organ/external/R = H.get_organ("r_hand")
var/left_hand_good = 0
var/right_hand_good = 0
if(L && (!(L.status & ORGAN_DESTROYED)) && (!(L.status & ORGAN_SPLINTED)) && (!(L.status & ORGAN_BROKEN)))
left_hand_good = 1
if(R && (!(R.status & ORGAN_DESTROYED)) && (!(R.status & ORGAN_SPLINTED)) && (!(R.status & ORGAN_BROKEN)))
right_hand_good = 1
if(!left_hand_good && !right_hand_good)
to_chat(usr, "You need at least one hand in good working order to snap your fingers.")
return
message = "<b>[src]</b> snaps \his fingers."
playsound(src.loc, 'sound/effects/fingersnap.ogg', 50, 1, -3)
else
message = "<span class='danger'><b>[src]</b> snaps \his fingers right off!</span>"
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
// Needed for M_TOXIC_FART
if("fart", "farts")
if(reagents.has_reagent("simethicone"))
return
// playsound(src.loc, 'sound/effects/fart.ogg', 50, 1, -3) //Admins still vote no to fun
if(locate(/obj/item/weapon/storage/bible) in get_turf(src))
to_chat(viewers(src), "<span class='warning'><b>[src] farts on the Bible!</b></span>")
to_chat(viewers(src), "<span class='notice'><b>A mysterious force smites [src]!</b></span>")
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
src.gib()
else if(TOXIC_FARTS in mutations)
message = "<b>[src]</b> unleashes a [pick("horrible","terrible","foul","disgusting","awful")] fart."
else
message = "<b>[src]</b> [pick("passes wind","farts")]."
m_type = 2
var/turf/location = get_turf(src)
var/aoe_range=2 // Default
// Process toxic farts first.
if(TOXIC_FARTS in mutations)
for(var/mob/M in range(location,aoe_range))
if(M.internal != null && M.wear_mask && (M.wear_mask.flags & AIRTIGHT))
continue
// Now, we don't have this:
//new /obj/effects/fart_cloud(T,L)
if(M == src)
continue
M.reagents.add_reagent("jenkem", 1)
if("help")
var/emotelist = "aflap(s), airguitar, blink(s), blink(s)_r, blush(es), bow(s)-(none)/mob, burp(s), choke(s), chuckle(s), clap(s), collapse(s), cough(s),cry, cries, custom, dap(s)(none)/mob," \
+ " deathgasp(s), drool(s), eyebrow,fart(s), faint(s), flap(s), flip(s), frown(s), gasp(s), giggle(s), glare(s)-(none)/mob, grin(s), groan(s), grumble(s), handshake-mob, hug(s)-(none)/mob," \
+ " glare(s)-(none)/mob, grin(s), johnny, laugh(s), look(s)-(none)/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-(none)/mob, scream(s), shake(s)," \
+ " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \
+ " wag(s), wave(s), whimper(s), wink(s), yawn(s)"
if(species.name == "Machine")
emotelist += "\nMachine specific emotes :- beep(s)-(none)/mob, buzz(es)-none/mob, no-(none)/mob, ping(s)-(none)/mob, yes-(none)/mob"
else if(species.name == "Slime People")
emotelist += "\nSlime people specific emotes :- squish(es)-(none)/mob"
to_chat(src, emotelist)
else
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
if(message) //Humans are special fucking snowflakes and have 735 lines of emotes, they get to handle their own emotes, not call the parent
log_emote("[name]/[key] : [message]")
//Hearing gasp and such every five seconds is not good emotes were not global for a reason.
// Maybe some people are okay with that.
for(var/mob/M in dead_mob_list)
if(!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers and new players
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
switch(m_type)
if(1)
visible_message(message)
if(2)
audible_message(message)
/mob/living/carbon/human/verb/pose()
set name = "Set Pose"
set desc = "Sets a description which will be shown when someone examines you."
set category = "IC"
pose = sanitize(copytext(input(usr, "This is [src]. \He is...", "Pose", null) as text, 1, MAX_MESSAGE_LEN))
/mob/living/carbon/human/verb/set_flavor()
set name = "Set Flavour Text"
set desc = "Sets an extended description of your character's features."
set category = "IC"
update_flavor_text()
+13 -13
View File
@@ -58,14 +58,14 @@
var/displayed_species = get_species()
for(var/obj/item/clothing/C in src) //Disguise checks
if (C == src.head || C == src.wear_suit || C == src.wear_mask || C == src.w_uniform || C == src.belt || C == src.back)
if(C == src.head || C == src.wear_suit || C == src.wear_mask || C == src.w_uniform || C == src.belt || C == src.back)
if(C.species_disguise)
displayed_species = C.species_disguise
if (skipjumpsuit && skipface || (displayed_species in nospecies)) //either obscured or on the nospecies list
if(skipjumpsuit && skipface || (displayed_species in nospecies)) //either obscured or on the nospecies list
msg += "!\n" //omit the species when examining
else if (displayed_species == "Slime People") //snowflakey because Slime People are defined as a plural
else if(displayed_species == "Slime People") //snowflakey because Slime People are defined as a plural
msg += ", a slime person!\n"
else if (displayed_species == "Unathi") //DAMN YOU, VOWELS
else if(displayed_species == "Unathi") //DAMN YOU, VOWELS
msg += ", a unathi!\n"
else
msg += ", \a [lowertext(displayed_species)]!\n"
@@ -157,7 +157,7 @@
msg += "<span class='warning'>[t_He] [t_is] wearing [bicon(shoes)] [shoes.gender==PLURAL?"some":"a"] [shoes.blood_color != "#030303" ? "blood-stained":"oil-stained"] [shoes.name] on [t_his] feet!</span>\n"
else
msg += "[t_He] [t_is] wearing [bicon(shoes)] \a [shoes] on [t_his] feet.\n"
else if (blood_DNA)
else if(blood_DNA)
msg += "<span class='warning'>[t_He] [t_has] [feet_blood_color != "#030303" ? "blood-stained":"oil-stained"] feet!</span>\n"
@@ -221,7 +221,7 @@
var/distance = get_dist(user,src)
if(istype(user, /mob/dead/observer) || user.stat == 2) // ghosts can see anything
distance = 1
if (src.stat)
if(src.stat)
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3)
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
@@ -462,9 +462,9 @@
perpname = name
if(perpname)
for (var/datum/data/record/E in data_core.general)
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
for(var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
criminal = R.fields["criminal"]
@@ -484,10 +484,10 @@
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.general)
if(R.fields["id"] == E.fields["id"])
medical = R.fields["p_stat"]
msg += "<span class = 'deptradio'>Physical status:</span> <a href='?src=\ref[src];medical=1'>\[[medical]\]</a>\n"
@@ -497,7 +497,7 @@
if(print_flavor_text()) msg += "[print_flavor_text()]\n"
msg += "*---------*</span>"
if (pose)
if(pose)
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\n[t_He] is [pose]"
+94 -95
View File
@@ -203,15 +203,14 @@
now_pushing = 0
return
if(tmob.r_hand && istype(tmob.r_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
if(tmob.l_hand && istype(tmob.l_hand, /obj/item/weapon/shield/riot))
if(prob(99))
now_pushing = 0
return
//anti-riot equipment is also anti-push
if(tmob.r_hand && (prob(tmob.r_hand.block_chance * 2)) && !istype(tmob.r_hand, /obj/item/clothing))
now_pushing = 0
return
if(tmob.l_hand && (prob(tmob.l_hand.block_chance * 2)) && !istype(tmob.l_hand, /obj/item/clothing))
now_pushing = 0
return
if(!(tmob.status_flags & CANPUSH))
now_pushing = 0
@@ -414,16 +413,16 @@
M.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>was attacked by [M.name] ([M.ckey])</font>")
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(check_shields(damage, "the [M.name]"))
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")
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, M.name)
apply_damage(damage, M.melee_damage_type, affecting, armor)
updatehealth()
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
@@ -461,7 +460,7 @@
else
damage = rand(5, 25)
if(check_shields(damage, "the [M.name]"))
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")
@@ -489,11 +488,11 @@
M.powerlevel = 0
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
O.show_message(text("\red <B>The [M.name] has shocked []!</B>", src), 1)
Weaken(power)
if (stuttering < power)
if(stuttering < power)
stuttering = power
Stun(power)
@@ -501,7 +500,7 @@
s.set_up(5, 1, src)
s.start()
if (prob(stunprob) && M.powerlevel >= 8)
if(prob(stunprob) && M.powerlevel >= 8)
adjustFireLoss(M.powerlevel * rand(6,10))
@@ -511,9 +510,9 @@
/mob/living/carbon/human/restrained()
if (handcuffed)
if(handcuffed)
return 1
if (istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
if(istype(wear_suit, /obj/item/clothing/suit/straight_jacket))
return 1
return 0
@@ -634,8 +633,8 @@
// 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
if (istype(pda))
if (pda.id)
if(istype(pda))
if(pda.id)
return pda.id.rank
else
return pda.ownrank
@@ -651,16 +650,16 @@
/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/weapon/card/id/id = wear_id
if (istype(pda))
if (pda.id && istype(pda.id, /obj/item/weapon/card/id))
if(istype(pda))
if(pda.id && istype(pda.id, /obj/item/weapon/card/id))
. = pda.id.assignment
else
. = pda.ownjob
else if (istype(id))
else if(istype(id))
. = id.assignment
else
return if_no_id
if (!.)
if(!.)
. = if_no_job
return
@@ -669,12 +668,12 @@
/mob/living/carbon/human/proc/get_authentification_name(var/if_no_id = "Unknown")
var/obj/item/device/pda/pda = wear_id
var/obj/item/weapon/card/id/id = wear_id
if (istype(pda))
if (pda.id)
if(istype(pda))
if(pda.id)
. = pda.id.registered_name
else
. = pda.owner
else if (istype(id))
else if(istype(id))
. = id.registered_name
else
return if_no_id
@@ -715,9 +714,9 @@
/mob/living/carbon/human/proc/get_idcard()
var/obj/item/weapon/card/id/id = wear_id
var/obj/item/device/pda/pda = wear_id
if (istype(pda) && pda.id)
if(istype(pda) && pda.id)
id = pda.id
if (istype(id))
if(istype(id))
return id
//Removed the horrible safety parameter. It was only being used by ninja code anyways.
@@ -828,7 +827,7 @@
U.accessories -= A
update_inv_w_uniform()
if (href_list["criminal"])
if(href_list["criminal"])
if(hasHUD(usr,"security"))
var/modified = 0
@@ -843,10 +842,10 @@
perpname = name
if(perpname)
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
var/setcriminal = input(usr, "Specify a new criminal status for this person.", "Security HUD", R.fields["criminal"]) in list("None", "*Arrest*", "Incarcerated", "Parolled", "Released", "Cancel")
@@ -866,7 +865,7 @@
if(!modified)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["secrecord"])
if(href_list["secrecord"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/read = 0
@@ -879,10 +878,10 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Criminal Status:</b> [R.fields["criminal"]]")
to_chat(usr, "<b>Minor Crimes:</b> [R.fields["mi_crim"]]")
@@ -896,7 +895,7 @@
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["secrecordComment"])
if(href_list["secrecordComment"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
var/read = 0
@@ -909,24 +908,24 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
to_chat(usr, text("[]", R.fields[text("com_[]", counter)]))
counter++
if (counter == 1)
if(counter == 1)
to_chat(usr, "No comment found")
to_chat(usr, "<a href='?src=\ref[src];secrecordadd=`'>\[Add comment\]</a>")
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["secrecordadd"])
if(href_list["secrecordadd"])
if(hasHUD(usr,"security"))
var/perpname = "wot"
if(wear_id)
@@ -937,13 +936,13 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.security)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.security)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"security"))
var/t1 = sanitize(copytext(input("Add Comment:", "Sec. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"security")) )
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
@@ -958,7 +957,7 @@
var/mob/living/silicon/ai/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] (artificial intelligence) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["medical"])
if(href_list["medical"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/modified = 0
@@ -972,10 +971,10 @@
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.general)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.general)
if(R.fields["id"] == E.fields["id"])
var/setmedical = input(usr, "Specify a new medical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("*SSD*", "*Deceased*", "Physically Unfit", "Active", "Disabled", "Cancel")
if(hasHUD(usr,"medical"))
@@ -996,7 +995,7 @@
if(!modified)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["medrecord"])
if(href_list["medrecord"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/read = 0
@@ -1009,10 +1008,10 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.medical)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
to_chat(usr, "<b>Name:</b> [R.fields["name"]] <b>Blood Type:</b> [R.fields["b_type"]]")
to_chat(usr, "<b>DNA:</b> [R.fields["b_dna"]]")
@@ -1027,7 +1026,7 @@
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["medrecordComment"])
if(href_list["medrecordComment"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
var/read = 0
@@ -1040,24 +1039,24 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.medical)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
read = 1
var/counter = 1
while(R.fields[text("com_[]", counter)])
to_chat(usr, text("[]", R.fields[text("com_[]", counter)]))
counter++
if (counter == 1)
if(counter == 1)
to_chat(usr, "No comment found")
to_chat(usr, "<a href='?src=\ref[src];medrecordadd=`'>\[Add comment\]</a>")
if(!read)
to_chat(usr, "\red Unable to locate a data core entry for this person.")
if (href_list["medrecordadd"])
if(href_list["medrecordadd"])
if(hasHUD(usr,"medical"))
var/perpname = "wot"
if(wear_id)
@@ -1068,13 +1067,13 @@
perpname = tempPda.owner
else
perpname = src.name
for (var/datum/data/record/E in data_core.general)
if (E.fields["name"] == perpname)
for (var/datum/data/record/R in data_core.medical)
if (R.fields["id"] == E.fields["id"])
for(var/datum/data/record/E in data_core.general)
if(E.fields["name"] == perpname)
for(var/datum/data/record/R in data_core.medical)
if(R.fields["id"] == E.fields["id"])
if(hasHUD(usr,"medical"))
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
if ( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
if( !(t1) || usr.stat || usr.restrained() || !(hasHUD(usr,"medical")) )
return
var/counter = 1
while(R.fields[text("com_[]", counter)])
@@ -1086,11 +1085,11 @@
var/mob/living/silicon/robot/U = usr
R.fields[text("com_[counter]")] = text("Made by [U.name] ([U.modtype] [U.braintype]) on [time2text(world.realtime, "DDD MMM DD hh:mm:ss")], [game_year]<BR>[t1]")
if (href_list["lookitem"])
if(href_list["lookitem"])
var/obj/item/I = locate(href_list["lookitem"])
src.examinate(I)
if (href_list["lookmob"])
if(href_list["lookmob"])
var/mob/M = locate(href_list["lookmob"])
src.examinate(M)
. = ..()
@@ -1195,7 +1194,7 @@
if(!affecting)
. = 0
fail_msg = "They are missing that limb."
else if (affecting.status & ORGAN_ROBOT)
else if(affecting.status & ORGAN_ROBOT)
. = 0
fail_msg = "That limb is robotic."
else
@@ -1324,7 +1323,7 @@
mutations.Remove(HUSK)
if(!client || !key) //Don't boot out anyone already in the mob.
for (var/obj/item/organ/internal/brain/H in world)
for(var/obj/item/organ/internal/brain/H in world)
if(H.brainmob)
if(H.brainmob.real_name == src.real_name)
if(H.brainmob.mind)
@@ -1359,30 +1358,30 @@
var/germs = 0
var/tdamage = 0
var/ticks = 0
while (germs < 2501 && ticks < 100000 && round(damage/10)*20)
while(germs < 2501 && ticks < 100000 && round(damage/10)*20)
diary << "VIRUS TESTING: [ticks] : germs [germs] tdamage [tdamage] prob [round(damage/10)*20]"
ticks++
if (prob(round(damage/10)*20))
if(prob(round(damage/10)*20))
germs++
if (germs == 100)
if(germs == 100)
to_chat(world, "Reached stage 1 in [ticks] ticks")
if (germs > 100)
if (prob(10))
if(germs > 100)
if(prob(10))
damage++
germs++
if (germs == 1000)
if(germs == 1000)
to_chat(world, "Reached stage 2 in [ticks] ticks")
if (germs > 1000)
if(germs > 1000)
damage++
germs++
if (germs == 2500)
if(germs == 2500)
to_chat(world, "Reached stage 3 in [ticks] ticks")
to_chat(world, "Mob took [tdamage] tox damage")
*/
//returns 1 if made bloody, returns 0 otherwise
/mob/living/carbon/human/add_blood(mob/living/carbon/human/M as mob)
if (!..())
if(!..())
return 0
//if this blood isn't already in the list, add it
if(blood_DNA[M.dna.unique_enzymes])
@@ -1620,32 +1619,32 @@
set name = "Write in blood"
set desc = "Use blood on your hands to write a short message on the floor or a wall, murder mystery style."
if (usr != src)
if(usr != src)
return 0 //something is terribly wrong
if (!bloody_hands)
if(!bloody_hands)
verbs -= /mob/living/carbon/human/proc/bloody_doodle
if (src.gloves)
if(src.gloves)
to_chat(src, "<span class='warning'>Your [src.gloves] are getting in the way.</span>")
return
var/turf/simulated/T = src.loc
if (!istype(T)) //to prevent doodling out of mechs and lockers
if(!istype(T)) //to prevent doodling out of mechs and lockers
to_chat(src, "<span class='warning'>You cannot reach the floor.</span>")
return
var/direction = input(src,"Which way?","Tile selection") as anything in list("Here","North","South","East","West")
if (direction != "Here")
if(direction != "Here")
T = get_step(T,text2dir(direction))
if (!istype(T))
if(!istype(T))
to_chat(src, "<span class='warning'>You cannot doodle there.</span>")
return
var/num_doodles = 0
for (var/obj/effect/decal/cleanable/blood/writing/W in T)
for(var/obj/effect/decal/cleanable/blood/writing/W in T)
num_doodles++
if (num_doodles > 4)
if(num_doodles > 4)
to_chat(src, "<span class='warning'>There is no space to write on!</span>")
return
@@ -1653,11 +1652,11 @@
var/message = stripped_input(src,"Write a message. It cannot be longer than [max_length] characters.","Blood writing", "")
if (message)
if(message)
var/used_blood_amount = round(length(message) / 30, 1)
bloody_hands = max(0, bloody_hands - used_blood_amount) //use up some blood
if (length(message) > max_length)
if(length(message) > max_length)
message += "-"
to_chat(src, "<span class='warning'>You ran out of blood to write with!</span>")
@@ -1,5 +1,5 @@
/mob/living/carbon/human/attack_hand(mob/living/carbon/human/M as mob)
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -10,7 +10,7 @@
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
if (H.hand)
if(H.hand)
temp = H.organs_by_name["l_hand"]
if(!temp || !temp.is_usable())
to_chat(H, "\red You can't use your hand.")
@@ -18,10 +18,9 @@
..()
if((M != src) && check_shields(0, M.name))
if((M != src) && M.a_intent != "help" && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
add_logs(src, M, "attempted to touch")
M.do_attack_animation(src)
visible_message("\red <B>[M] attempted to touch [src]!</B>")
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
return 0
if(istype(M.gloves , /obj/item/clothing/gloves/boxing/hologlove))
@@ -185,7 +184,7 @@
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)
if(randn <= 25)
apply_effect(2, WEAKEN, run_armor_check(affecting, "melee"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("\red <B>[M] has pushed [src]!</B>")
@@ -26,6 +26,7 @@
update_revive()
med_hud_set_health()
med_hud_set_status()
handle_hud_icons()
/mob/living/carbon/human/adjustBrainLoss(var/amount)
if(status_flags & GODMODE)
@@ -103,7 +104,7 @@
if(species && species.brute_mod)
amount = amount*species.brute_mod
if (organ_name in organs_by_name)
if(organ_name in organs_by_name)
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
@@ -117,7 +118,7 @@
if(species && species.burn_mod)
amount = amount*species.burn_mod
if (organ_name in organs_by_name)
if(organ_name in organs_by_name)
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
@@ -383,7 +384,7 @@ This function restores all organs.
var/list/attack_bubble_recipients = list()
var/mob/living/user
for(var/mob/O in viewers(user, src))
if (O.client && !(O.blinded))
if(O.client && !(O.blinded))
attack_bubble_recipients.Add(O.client)
spawn(0)
var/image/dmgIcon = image('icons/effects/hit_blips.dmi', src, "dmg[rand(1,2)]",MOB_LAYER+1)
@@ -32,7 +32,7 @@ emp_act
return -1 // complete projectile permutation
//Shields
if(check_shields(P.damage, "the [P.name]", P))
if(check_shields(P.damage, "the [P.name]", P, PROJECTILE_ATTACK, P.armour_penetration))
P.on_hit(src, 100, def_zone)
return 2
@@ -41,7 +41,7 @@ emp_act
return
//Shrapnel
if (P.damage_type == BRUTE)
if(P.damage_type == BRUTE)
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
var/obj/item/weapon/shard/shrapnel/SP = new()
@@ -91,7 +91,7 @@ emp_act
//this proc returns the Siemens coefficient of electrical resistivity for a particular external organ.
/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/obj/item/organ/external/def_zone)
if (!def_zone)
if(!def_zone)
return 1.0
var/siemens_coefficient = 1.0
@@ -132,40 +132,24 @@ emp_act
//End Here
/mob/living/carbon/human/proc/check_shields(var/damage = 0, var/attack_text = "the attack", var/obj/item/O)
if(O)
if(O.flags & NOSHIELD) //weapon ignores shields altogether
return 0
if(l_hand && istype(l_hand, /obj/item/weapon))//Current base is the prob(50-d/3)
var/obj/item/weapon/I = l_hand
if(I.IsShield() && (prob(50 - round(damage / 3))))
visible_message("<span class='danger'>[src] blocks [attack_text] with [l_hand]!</span>", \
"<span class='userdanger'>[src] blocks [attack_text] with [l_hand]!</span>")
/mob/living/carbon/human/proc/check_shields(damage = 0, attack_text = "the attack", atom/movable/AM, attack_type = MELEE_ATTACK, armour_penetration = 0)
var/block_chance_modifier = round(damage / -3)
if(l_hand && !istype(l_hand, /obj/item/clothing))
var/final_block_chance = l_hand.block_chance - (Clamp((armour_penetration-l_hand.armour_penetration)/2,0,100)) + block_chance_modifier //So armour piercing blades can still be parried by other blades, for example
if(l_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
return 1
if(r_hand && istype(r_hand, /obj/item/weapon))
var/obj/item/weapon/I = r_hand
if(I.IsShield() && (prob(50 - round(damage / 3))))
visible_message("<span class='danger'>[src] blocks [attack_text] with [r_hand]!</span>", \
"<span class='userdanger'>[src] blocks [attack_text] with [r_hand]!</span>")
if(r_hand && !istype(r_hand, /obj/item/clothing))
var/final_block_chance = r_hand.block_chance - (Clamp((armour_penetration-r_hand.armour_penetration)/2,0,100)) + block_chance_modifier //Need to reset the var so it doesn't carry over modifications between attempts
if(r_hand.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
return 1
if(wear_suit && istype(wear_suit, /obj/item/))
var/obj/item/I = wear_suit
if(I.IsShield() && (prob(50)))
visible_message("<span class='danger'>The reactive teleport system flings [src] clear of [attack_text]!</span>", \
"<span class='userdanger'>The reactive teleport system flings [src] clear of [attack_text]!</span>")
var/list/turfs = new/list()
for(var/turf/T in orange(6, src))
if(istype(T,/turf/space)) continue
if(T.density) continue
if(T.x>world.maxx-6 || T.x<6) continue
if(T.y>world.maxy-6 || T.y<6) continue
turfs += T
if(!turfs.len) turfs += pick(/turf in orange(6, src))
var/turf/picked = pick(turfs)
if(!isturf(picked)) return
if(buckled)
buckled.unbuckle_mob()
src.loc = picked
if(wear_suit)
var/final_block_chance = wear_suit.block_chance - (Clamp((armour_penetration-wear_suit.armour_penetration)/2,0,100)) + block_chance_modifier
if(wear_suit.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
return 1
if(w_uniform)
var/final_block_chance = w_uniform.block_chance - (Clamp((armour_penetration-w_uniform.armour_penetration)/2,0,100)) + block_chance_modifier
if(w_uniform.hit_reaction(src, attack_text, final_block_chance, damage, attack_type))
return 1
return 0
@@ -221,7 +205,7 @@ emp_act
if(user != src)
user.do_attack_animation(src)
if(check_shields(I.force, "the [I.name]", I))
if(check_shields(I.force, "the [I.name]", I, MELEE_ATTACK, I.armour_penetration))
return 0
if(istype(I,/obj/item/weapon/card/emag))
@@ -236,7 +220,7 @@ emp_act
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", armour_penetration = I.armour_penetration)
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if ((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
if((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
weapon_sharp = 0
weapon_edge = 0
@@ -299,9 +283,9 @@ emp_act
forcesay(hit_appends) //forcesay checks stat already
/* //Melee weapon embedded object code. Commented out, as most people on the forums seem to find this annoying and think it does not contribute to general gameplay. - Dave
if (I.damtype == BRUTE && !I.is_robot_module())
if(I.damtype == BRUTE && !I.is_robot_module())
var/damage = I.force
if (armor)
if(armor)
damage /= armor+1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
@@ -315,63 +299,56 @@ emp_act
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5)
if(istype(AM,/obj/))
var/obj/O = AM
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode
if(canmove && !restrained())
if(isturf(O.loc))
put_in_active_hand(O)
visible_message("<span class='warning'>[src] catches [O]!</span>")
if(isturf(I.loc))
put_in_active_hand(I)
visible_message("<span class='warning'>[src] catches [I]!</span>")
throw_mode_off()
return
var/zone = ran_zone("chest", 65)
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
if(istype(I, /obj/item/weapon))
var/obj/item/weapon/W = I
dtype = W.damtype
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = I.throwforce*(speed/5)
/*
if(!zone)
visible_message("\blue \The [O] misses [src] narrowly!")
return
*/
O.throwing = 0 //it hit, so stop moving
I.throwing = 0 //it hit, so stop moving
if ((O.thrower != src) && check_shields(throw_damage, "[O]"))
if((I.thrower != src) && check_shields(throw_damage, "\the [I.name]", I, THROWN_PROJECTILE_ATTACK))
return
var/obj/item/organ/external/affecting = get_organ(zone)
if(!affecting)
var/missverb = (O.gender == PLURAL) ? "whizz" : "whizzes"
visible_message("<span class='notice'>\The [O] [missverb] past [src]'s missing [parse_zone(zone)]!</span>",
"<span class='notice'>\The [O] [missverb] past your missing [parse_zone(zone)]!</span>")
var/missverb = (I.gender == PLURAL) ? "whizz" : "whizzes"
visible_message("<span class='notice'>\The [I] [missverb] past [src]'s missing [parse_zone(zone)]!</span>",
"<span class='notice'>\The [I] [missverb] past your missing [parse_zone(zone)]!</span>")
return
var/hit_area = affecting.name
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
src.visible_message("\red [src] has been hit in the [hit_area] by [I].")
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration) //I guess "melee" is the best fit here
apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I)
apply_damage(throw_damage, dtype, zone, armor, is_sharp(O), has_edge(O), O)
if(ismob(O.thrower))
var/mob/M = O.thrower
if(ismob(I.thrower))
var/mob/M = I.thrower
if(M)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [I], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [I]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]")
//thrown weapon embedded object code.
if(dtype == BRUTE && istype(O,/obj/item))
var/obj/item/I = O
if (!I.is_robot_module())
if(dtype == BRUTE && istype(I))
if(!I.is_robot_module())
var/sharp = is_sharp(I)
var/damage = throw_damage
if (armor)
if(armor)
damage /= armor+1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
@@ -384,10 +361,10 @@ emp_act
affecting.embed(I)
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
var/obj/item/weapon/W = O
if(I.throw_source && speed >= 15)
var/obj/item/weapon/W = I
var/momentum = speed/2
var/dir = get_dir(O.throw_source, src)
var/dir = get_dir(I.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
@@ -399,14 +376,14 @@ emp_act
if(T)
src.loc = T
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
visible_message("<span class='warning'>[src] is pinned to the wall by [I]!</span>","<span class='warning'>You are pinned to the wall by [I]!</span>")
src.anchored = 1
src.pinned += O
src.pinned += I
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if (gloves)
if(gloves)
gloves.add_blood(source)
gloves:transfer_blood = amount
gloves:bloody_hands_mob = source
@@ -80,4 +80,4 @@ var/global/default_martial_art = new/datum/martial_art
var/fire_dmi = 'icons/mob/OnFire.dmi'
var/fire_sprite = "Standing"
var/datum/body_accessory/body_accessory = null
var/datum/body_accessory/body_accessory = null
@@ -24,7 +24,7 @@
tally += (health_deficiency / 25)
var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80
if (hungry >= 70)
if(hungry >= 70)
tally += hungry/50
if(wear_suit)
@@ -46,7 +46,7 @@
if(FAT in src.mutations)
tally += 1.5
if (bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
tally += (BODYTEMP_COLD_DAMAGE_LIMIT - bodytemperature) / COLD_SLOWDOWN_FACTOR
tally += 2*stance_damage //damaged/missing feet or legs is slow
@@ -42,45 +42,45 @@
E.process()
number_wounds += E.number_wounds
if (!lying && world.time - l_move_time < 15)
if(!lying && world.time - l_move_time < 15)
//Moving around with fractured ribs won't do you any good
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
if(E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
var/obj/item/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5))
//Moving makes open wounds get infected much faster
if (E.wounds.len)
if(E.wounds.len)
for(var/datum/wound/W in E.wounds)
if (W.infection_check())
if(W.infection_check())
W.germ_level += 1
/mob/living/carbon/human/proc/handle_stance()
// Don't need to process any of this if they aren't standing anyways
// unless their stance is damaged, and we want to check if they should stay down
if (!stance_damage && (lying || resting) && (life_tick % 4) == 0)
if(!stance_damage && (lying || resting) && (life_tick % 4) == 0)
return
stance_damage = 0
// Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid
if (istype(buckled, /obj/structure/stool/bed))
if(istype(buckled, /obj/structure/stool/bed))
return
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = organs_by_name[limb_tag]
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)) || E.is_malfunctioning())
stance_damage += 2 // let it fail even if just foot&leg. Also malfunctioning happens sporadically so it should impact more when it procs
else if (E.is_broken() || !E.is_usable())
else if(E.is_broken() || !E.is_usable())
stance_damage += 1
// Canes and crutches help you stand (if the latter is ever added)
// One cane mitigates a broken leg+foot, or a missing foot.
// Two canes are needed for a lost leg. If you are missing both legs, canes aren't gonna help you.
if (l_hand && istype(l_hand, /obj/item/weapon/cane))
if(l_hand && istype(l_hand, /obj/item/weapon/cane))
stance_damage -= 2
if (r_hand && istype(r_hand, /obj/item/weapon/cane))
if(r_hand && istype(r_hand, /obj/item/weapon/cane))
stance_damage -= 2
if(stance_damage < 0)
@@ -100,7 +100,7 @@
if(!l_hand && !r_hand)
return
for (var/obj/item/organ/external/E in organs)
for(var/obj/item/organ/external/E in organs)
if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED))
continue
@@ -163,7 +163,7 @@ I use this to standardize shadowling dethrall code
-- Crazylemon
*/
/mob/living/carbon/human/proc/named_organ_parent(var/organ_name)
if (!get_int_organ(organ_name))
if(!get_int_organ(organ_name))
return null
var/obj/item/organ/internal/O = get_int_organ(organ_name)
return O.parent_organ
@@ -460,7 +460,7 @@
var/global/list/available_recipes
if(!available_recipes)
available_recipes = list()
for (var/type in subtypesof(/datum/recipe))
for(var/type in subtypesof(/datum/recipe))
var/datum/recipe/recipe = new type
if(recipe.result) // Ignore recipe subtypes that lack a result
available_recipes += recipe
@@ -39,10 +39,10 @@
/mob/living/carbon/human/proc/equip_in_one_of_slots(obj/item/W, list/slots, del_on_fail = 1)
for (var/slot in slots)
if (equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
for(var/slot in slots)
if(equip_to_slot_if_possible(W, slots[slot], del_on_fail = 0))
return slot
if (del_on_fail)
if(del_on_fail)
qdel(W)
return null
@@ -150,7 +150,7 @@
else if(I == r_ear)
r_ear = null
update_inv_ears()
else if (I == l_ear)
else if(I == l_ear)
l_ear = null
update_inv_ears()
else if(I == shoes)
@@ -423,7 +423,7 @@
if(istype(I, /obj/item/clothing/under) || istype(I, /obj/item/clothing/suit))
if(FAT in mutations)
//testing("[M] TOO FAT TO WEAR [src]!")
if(!(I.flags & ONESIZEFITSALL))
if(!(I.flags_size & ONESIZEFITSALL))
if(!disable_warning)
to_chat(src, "<span class='alert'>You're too fat to wear the [I].</span>")
return 0
+41 -26
View File
@@ -78,8 +78,8 @@
/mob/living/carbon/human/handle_disabilities()
if (disabilities & EPILEPSY)
if ((prob(1) && paralysis < 1))
if(disabilities & EPILEPSY)
if((prob(1) && paralysis < 1))
visible_message("<span class='danger'>[src] starts having a seizure!</span>","<span class='alert'>You have a seizure!</span>")
Paralyse(10)
Jitter(1000)
@@ -89,13 +89,13 @@
if(prob(1) && hallucination < 1)
hallucination += 20
if (disabilities & COUGHING)
if ((prob(5) && paralysis <= 1))
if(disabilities & COUGHING)
if((prob(5) && paralysis <= 1))
drop_item()
emote("cough")
if (disabilities & TOURETTES)
if(disabilities & TOURETTES)
speech_problem_flag = 1
if ((prob(10) && paralysis <= 1))
if((prob(10) && paralysis <= 1))
Stun(10)
switch(rand(1, 3))
if(1)
@@ -108,12 +108,12 @@
animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1)
animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1)
if (disabilities & NERVOUS)
if(disabilities & NERVOUS)
speech_problem_flag = 1
if (prob(10))
if(prob(10))
stuttering = max(10, stuttering)
if (getBrainLoss() >= 60 && stat != 2)
if(getBrainLoss() >= 60 && stat != 2)
speech_problem_flag = 1
if(prob(3))
var/list/s1 = list("IM A PONY NEEEEEEIIIIIIIIIGH",
@@ -174,13 +174,28 @@
if(!gene.block)
continue
if(gene.is_active(src))
/* if (prob(10) && prob(gene.instability))
adjustCloneLoss(1) */
speech_problem_flag = 1
gene.OnMobLife(src)
if(gene_stability < 85)
var/instability = DEFAULT_GENE_STABILITY - gene_stability
if(prob(instability / 10))
adjustFireLoss(min(6, instability / 12))
to_chat(src, "<span class='danger'>You feel like your skin is burning and bubbling off!</span>")
if(gene_stability < 70)
if(prob(instability / 12))
adjustCloneLoss(min(5, instability / 15))
to_chat(src, "<span class='danger'>You feel as if your body is warping.</span>")
if(prob(instability / 10))
adjustToxLoss(min(6, instability / 12))
to_chat(src, "<span class='danger'>You feel weak and nauseous.</span>")
if(gene_stability < 40 && prob(1))
to_chat(src, "<span class='biggerdanger'>You feel incredibly sick... Something isn't right!</span>")
spawn(300)
if(gene_stability < 40)
gib()
if(!(species.flags & RADIMMUNE))
if (radiation)
if(radiation)
if(get_int_organ(/obj/item/organ/internal/nucleation/resonant_crystal))
var/rads = radiation/25
@@ -191,14 +206,14 @@
to_chat(src, "<span class='notice'>You feel relaxed.</span>")
return
if (radiation > 100)
if(radiation > 100)
radiation = 100
Weaken(10)
if(!lying)
to_chat(src, "<span class='alert'>You feel weak.</span>")
emote("collapse")
if (radiation < 0)
if(radiation < 0)
radiation = 0
else
@@ -693,10 +708,10 @@
update_inv_wear_suit()
// nutrition decrease
if (nutrition > 0 && stat != 2)
if(nutrition > 0 && stat != 2)
nutrition = max (0, nutrition - HUNGER_FACTOR)
if (nutrition > 450)
if(nutrition > 450)
if(overeatduration < 800) //capped so people don't take forever to unfat
overeatduration++
@@ -707,10 +722,10 @@
else
overeatduration -= 2
if (drowsyness)
if(drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
if (prob(5))
if(prob(5))
sleeping += 1
Paralyse(5)
@@ -756,7 +771,7 @@
alcohol_strength *= 5
if(alcohol_strength >= slur_start) //slurring
if (!slurring) slurring = 1
if(!slurring) slurring = 1
slurring = drunk
if(alcohol_strength >= brawl_start) //the drunken martial art
if(!istype(martial_art, /datum/martial_art/drunk_brawling))
@@ -766,7 +781,7 @@
if(istype(martial_art, /datum/martial_art/drunk_brawling))
martial_art.remove(src)
if(alcohol_strength >= confused_start && prob(33)) //confused walking
if (!confused) confused = 1
if(!confused) confused = 1
confused = max(confused+(3/sober_str),0)
if(alcohol_strength >= blur_start) //blurry eyes
eye_blurry = max(eye_blurry, 10/sober_str)
@@ -778,7 +793,7 @@
if(alcohol_strength >= pass_out)
Paralyse(5 / sober_str)
drowsyness = max(drowsyness, 30/sober_str)
if (L)
if(L)
L.take_damage(0.1, 1)
adjustToxLoss(0.1)
else //stuff only for synthetics
@@ -951,7 +966,7 @@
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
if(!stat)
if (getToxLoss() >= 45 && nutrition > 20)
if(getToxLoss() >= 45 && nutrition > 20)
lastpuke ++
if(lastpuke >= 25) // about 25 second delay I guess
Stun(5)
@@ -961,7 +976,7 @@
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
var/turf/location = loc
if (istype(location, /turf/simulated))
if(istype(location, /turf/simulated))
location.add_vomit_floor(src, 1)
nutrition -= 20
@@ -1016,17 +1031,17 @@
if(shock_stage >=60)
if(shock_stage == 60) custom_emote(1,"falls limp.")
if (prob(2))
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 80)
if (prob(5))
if(prob(5))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 120)
if (prob(2))
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness."))
Paralyse(5)
+7 -7
View File
@@ -47,21 +47,21 @@
return 1
//These only pertain to common. Languages are handled by mob/say_understands()
if (!speaking)
if (istype(other, /mob/living/simple_animal/diona))
if(!speaking)
if(istype(other, /mob/living/simple_animal/diona))
if(other.languages.len >= 2) //They've sucked down some blood and can speak common now.
return 1
if (istype(other, /mob/living/silicon))
if(istype(other, /mob/living/silicon))
return 1
if (istype(other, /mob/living/simple_animal/bot))
if(istype(other, /mob/living/simple_animal/bot))
return 1
if (istype(other, /mob/living/carbon/brain))
if(istype(other, /mob/living/carbon/brain))
return 1
if (istype(other, /mob/living/carbon/slime))
if(istype(other, /mob/living/carbon/slime))
return 1
//This is already covered by mob/say_understands()
//if (istype(other, /mob/living/simple_animal))
//if(istype(other, /mob/living/simple_animal))
// if((other.universal_speak && !speaking) || src.universal_speak || src.universal_understand)
// return 1
// return 0
@@ -66,7 +66,7 @@
item_color = "golem"
has_sensor = 0
flags = ABSTRACT | NODROP
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/suit/golem
name = "adamantine shell"
@@ -75,7 +75,8 @@
item_state = "golem"
body_parts_covered = HEAD|UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
flags_inv = HIDEGLOVES|HIDESHOES
flags = ONESIZEFITSALL | ABSTRACT | NODROP | THICKMATERIAL
flags = ABSTRACT | NODROP | THICKMATERIAL
flags_size = ONESIZEFITSALL
armor = list(melee = 55, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
/obj/item/clothing/shoes/golem
@@ -125,7 +125,7 @@
H.equip_or_collect(new/obj/item/weapon/tank/plasma/plasmaman(H), tank_slot) // Bigger plasma tank from Raggy.
to_chat(H, "<span class='notice'>You are now running on plasma internals from the [H.s_store] in your [tank_slot_name]. You must breathe plasma in order to survive, and are extremely flammable.</span>")
H.internal = H.get_item_by_slot(tank_slot)
if (H.internals)
if(H.internals)
H.internals.icon_state = "internal1"
// Plasmamen are so fucking different that they need their own proc.
@@ -33,5 +33,5 @@
if(light_amount > 2) //if there's enough light, start dying
H.take_overall_damage(1,1)
else if (light_amount < 2) //heal in the dark
else if(light_amount < 2) //heal in the dark
H.heal_overall_damage(1,1)
@@ -393,7 +393,7 @@
return
/datum/species/proc/remove_abilities(var/mob/living/carbon/human/H)
for (var/proc/ability in species_abilities)
for(var/proc/ability in species_abilities)
H.verbs -= ability
return
@@ -364,7 +364,7 @@
H.equip_or_collect(new /obj/item/weapon/tank/emergency_oxygen/vox(H), slot_l_hand)
to_chat(H, "<span class='notice'>You are now running on nitrogen internals from the [H.l_hand] in your hand. Your species finds oxygen toxic, so you must breathe nitrogen only.</span>")
H.internal = H.l_hand
if (H.internals)
if(H.internals)
H.internals.icon_state = "internal1"
/datum/species/vox/handle_post_spawn(var/mob/living/carbon/human/H)
@@ -600,7 +600,7 @@ var/global/list/damage_icon_parts = list()
var/image/standing = image("icon_state" = "[t_color]_s")
if(FAT in mutations)
if(w_uniform.flags&ONESIZEFITSALL)
if(w_uniform.flags_size & ONESIZEFITSALL)
standing.icon = 'icons/mob/uniform_fat.dmi'
else
to_chat(src, "\red You burst out of \the [w_uniform]!")
@@ -623,7 +623,12 @@ var/global/list/damage_icon_parts = list()
for(var/obj/item/clothing/accessory/A in w_uniform:accessories)
var/tie_color = A.item_color
if(!tie_color) tie_color = A.icon_state
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
if(A.icon_override)
standing.overlays += image("icon" = A.icon_override, "icon_state" = "[A.icon_state]")
else if(A.sprite_sheets && A.sprite_sheets[species.name])
standing.overlays += image("icon" = A.sprite_sheets[species.name], "icon_state" = "[A.icon_state]")
else
standing.overlays += image("icon" = 'icons/mob/ties.dmi', "icon_state" = "[tie_color]")
overlays_standing[UNIFORM_LAYER] = standing
else
@@ -632,10 +637,10 @@ var/global/list/damage_icon_parts = list()
for( var/obj/item/thing in list(r_store, l_store, wear_id, wear_pda, belt) ) //
if(thing) //
unEquip(thing) //
if (client) //
if(client) //
client.screen -= thing //
//
if (thing) //
if(thing) //
thing.loc = loc //
thing.dropped(src) //
thing.layer = initial(thing.layer)
@@ -889,7 +894,6 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_wear_suit(var/update_icons=1)
if(client && hud_used)
var/obj/screen/inventory/inv = hud_used.inv_slots[slot_wear_suit]
if(inv)
@@ -907,7 +911,7 @@ var/global/list/damage_icon_parts = list()
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
standing = image("icon" = wear_suit.sprite_sheets[species.name], "icon_state" = "[wear_suit.icon_state]")
else if(FAT in mutations)
if(wear_suit.flags&ONESIZEFITSALL)
if(wear_suit.flags_size & ONESIZEFITSALL)
standing = image("icon" = 'icons/mob/suit_fat.dmi', "icon_state" = "[wear_suit.icon_state]")
else
to_chat(src, "\red You burst out of \the [wear_suit]!")
@@ -1257,13 +1261,25 @@ var/global/list/damage_icon_parts = list()
//Adds a collar overlay above the helmet layer if the suit has one
// Suit needs an identically named sprite in icons/mob/collar.dmi
// For suits with species_fit and sprite_sheets, an identically named sprite needs to exist in a file like this icons/mob/species/[species_name_here]/collar.dmi.
/mob/living/carbon/human/proc/update_collar(var/update_icons=1)
var/icon/C = new('icons/mob/collar.dmi')
var/image/standing = null
if(wear_suit)
if(wear_suit.icon_state in C.IconStates())
standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]")
if(wear_suit.icon_override)
var/icon_path = "[wear_suit.icon_override]"
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty) so there won't be an issue.
var/icon/icon_file = new(icon_path)
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
var/icon_path = "[wear_suit.sprite_sheets[species.name]]"
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty) so there won't be an issue.
var/icon/icon_file = new(icon_path)
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
else
if(wear_suit.icon_state in C.IconStates())
standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]")
overlays_standing[COLLAR_LAYER] = standing
@@ -1274,7 +1290,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/generate_head_icon()
//gender no longer matters for the mouth, although there should probably be seperate base head icons.
// var/g = "m"
// if (gender == FEMALE) g = "f"
// if(gender == FEMALE) g = "f"
var/obj/item/organ/external/head/H = get_organ("head")
//base icons
var/icon/face_lying = new /icon('icons/mob/human_face.dmi',"bald_l")
+1 -1
View File
@@ -448,7 +448,7 @@
/mob/living/carbon/handle_hud_icons_health()
if(healths)
if (stat != DEAD)
if(stat != DEAD)
switch(health)
if(100 to INFINITY)
healths.icon_state = "health0"
+1 -1
View File
@@ -23,7 +23,7 @@
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/M = src
for(var/obj/item/organ/external/organ in M.organs)
if (!organ)
if(!organ)
continue
else if(organ.status & ORGAN_BROKEN || organ.open)
src.traumatic_shock += 15
@@ -0,0 +1,75 @@
/mob/living/carbon/slime/emote(var/act, var/m_type=1, var/message = null)
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
//param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
act = lowertext(act)
switch(act) //Alphabetical please
if("me")
if(silent)
return
if(src.client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot send IC messages (muted).")
return
if(src.client.handle_spam_prevention(message,MUTE_IC))
return
if(stat)
return
if(!(message))
return
return custom_emote(m_type, message)
if("bounce")
message = "<B>The [src.name]</B> bounces in place."
m_type = 1
if("custom")
return custom_emote(m_type, message)
if("jiggle")
message = "<B>The [src.name]</B> jiggles!"
m_type = 1
if("light")
message = "<B>The [src.name]</B> lights up for a bit, then stops."
m_type = 1
if("moan")
message = "<B>The [src.name]</B> moans."
m_type = 2
if("shiver")
message = "<B>The [src.name]</B> shivers."
m_type = 2
if("sway")
message = "<B>The [src.name]</B> sways around dizzily."
m_type = 1
if("twitch")
message = "<B>The [src.name]</B> twitches."
m_type = 1
if("vibrate")
message = "<B>The [src.name]</B> vibrates!"
m_type = 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")
else
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
if((message && src.stat == 0))
if(m_type & 1)
for(var/mob/O in viewers(src, null))
O.show_message(message, m_type)
//Foreach goto(703)
else
for(var/mob/O in hearers(src, null))
O.show_message(message, m_type)
//Foreach goto(746)
return
@@ -1,12 +1,13 @@
/mob/living/carbon/slime/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
..(user)
var/msg = ""
if (src.stat == DEAD)
var/msg = "<span class='info'>"
if(src.stat == DEAD)
msg += "<span class='deadsay'>It is limp and unresponsive.</span>\n"
else
if (src.getBruteLoss())
if(src.getBruteLoss())
msg += "<span class='warning'>"
if (src.getBruteLoss() < 40)
if(src.getBruteLoss() < 40)
msg += "It has some punctures in its flesh!"
else
msg += "<B>It has severe punctures and tears in its flesh!</B>"
+93 -93
View File
@@ -9,7 +9,7 @@
if(..())
handle_nutrition()
handle_targets()
if (!ckey)
if(!ckey)
handle_speech_and_mood()
/mob/living/carbon/slime/proc/AIprocess() // the master AI process
@@ -17,9 +17,9 @@
if(AIproc || stat == DEAD || client) return
var/hungry = 0
if (nutrition < get_starve_nutrition())
if(nutrition < get_starve_nutrition())
hungry = 2
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
else if(nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
hungry = 1
AIproc = 1
@@ -183,19 +183,19 @@
adjustCloneLoss(-1)
adjustBruteLoss(-1)
if (src.stat == DEAD)
if(src.stat == DEAD)
src.lying = 1
src.blinded = 1
else
if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
if (src.stunned > 0)
if(src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc.
if(src.stunned > 0)
AdjustStunned(-1)
src.stat = 0
if (src.weakened > 0)
if(src.weakened > 0)
AdjustWeakened(-1)
src.lying = 0
src.stat = 0
if (src.paralysis > 0)
if(src.paralysis > 0)
AdjustParalysis(-1)
src.blinded = 0
src.lying = 0
@@ -205,34 +205,34 @@
src.lying = 0
src.stat = 0
if (src.stuttering) src.stuttering = 0
if(src.stuttering) src.stuttering = 0
if (src.eye_blind)
if(src.eye_blind)
src.eye_blind = 0
src.blinded = 1
if (src.ear_deaf > 0) src.ear_deaf = 0
if (src.ear_damage < 25)
if(src.ear_deaf > 0) src.ear_deaf = 0
if(src.ear_damage < 25)
src.ear_damage = 0
src.density = !( src.lying )
if (src.sdisabilities & BLIND)
if(src.sdisabilities & BLIND)
src.blinded = 1
if (src.sdisabilities & DEAF)
if(src.sdisabilities & DEAF)
src.ear_deaf = 1
if (src.eye_blurry > 0)
if(src.eye_blurry > 0)
src.eye_blurry = 0
if (src.druggy > 0)
if(src.druggy > 0)
src.druggy = 0
return 1
/mob/living/carbon/slime/proc/handle_nutrition()
if (prob(15))
if(prob(15))
nutrition -= 1 + is_adult
if(nutrition <= 0)
@@ -240,7 +240,7 @@
if(prob(75))
adjustToxLoss(rand(0,5))
else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
else if(nutrition >= get_grow_nutrition() && amount_grown < 10)
nutrition -= 20
amount_grown++
@@ -278,7 +278,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) // Tired of chasing or something draws out attention
target_patience = 0
Target = null
@@ -286,9 +286,9 @@
var/hungry = 0 // determines if the slime is hungry
if (nutrition < get_starve_nutrition())
if(nutrition < get_starve_nutrition())
hungry = 2
else if (nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
else if(nutrition < get_grow_nutrition() && prob(25) || nutrition < get_hunger_nutrition())
hungry = 1
if(hungry == 2 && !client) // if a slime is starving, it starts losing its friends
@@ -340,26 +340,26 @@
Target = C
break
if (Target)
if(Target)
target_patience = rand(5,7)
if (is_adult)
if(is_adult)
target_patience += 3
if(!Target) // If we have no target, we are wandering or following orders
if (Leader)
if (holding_still)
if(Leader)
if(holding_still)
holding_still = max(holding_still - 1, 0)
else if(canmove && isturf(loc))
step_to(src, Leader)
else if(hungry)
if (holding_still)
if(holding_still)
holding_still = max(holding_still - hungry, 0)
else if(canmove && isturf(loc) && prob(50))
step(src, pick(cardinal))
else
if (holding_still)
if(holding_still)
holding_still = max(holding_still - 1, 0)
else if(canmove && isturf(loc) && prob(33))
step(src, pick(cardinal))
@@ -370,85 +370,85 @@
/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(Target) newmood = "mischevous"
if (!newmood)
if (Discipline && prob(25))
if(!newmood)
if(Discipline && prob(25))
newmood = "pout"
else if (prob(1))
else if(prob(1))
newmood = pick("sad", ":3", "pout")
if ((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
if (prob(75)) newmood = mood
if((mood == "sad" || mood == ":3" || mood == "pout") && !newmood)
if(prob(75)) newmood = mood
if (newmood != mood) // This is so we don't redraw them every time
if(newmood != mood) // This is so we don't redraw them every time
mood = newmood
regenerate_icons()
//Speech understanding starts here
var/to_say
if (speech_buffer.len > 0)
if(speech_buffer.len > 0)
var/who = speech_buffer[1] // Who said it?
var/phrase = speech_buffer[2] // What did they say?
if ((findtext(phrase, num2text(number)) || findtext(phrase, "slimes"))) // Talking to us
if (findtext(phrase, "hello") || findtext(phrase, "hi"))
if((findtext(phrase, num2text(number)) || findtext(phrase, "slimes"))) // Talking to us
if(findtext(phrase, "hello") || findtext(phrase, "hi"))
to_say = pick("Hello...", "Hi...")
else if (findtext(phrase, "follow"))
if (Leader)
if (Leader == who) // Already following him
else if(findtext(phrase, "follow"))
if(Leader)
if(Leader == who) // Already following him
to_say = pick("Yes...", "Lead...", "Following...")
else if (Friends[who] > Friends[Leader]) // VIVA
else if(Friends[who] > Friends[Leader]) // VIVA
Leader = who
to_say = "Yes... I follow [who]..."
else
to_say = "No... I follow [Leader]..."
else
if (Friends[who] > 2)
if(Friends[who] > 2)
Leader = who
to_say = "I follow..."
else // Not friendly enough
to_say = pick("No...", "I won't follow...")
else if (findtext(phrase, "stop"))
if (Victim) // We are asked to stop feeding
if (Friends[who] > 4)
else if(findtext(phrase, "stop"))
if(Victim) // We are asked to stop feeding
if(Friends[who] > 4)
Victim = null
Target = null
if (Friends[who] < 7)
if(Friends[who] < 7)
--Friends[who]
to_say = "Grrr..." // I'm angry but I do it
else
to_say = "Fine..."
else if (Target) // We are asked to stop chasing
if (Friends[who] > 3)
else if(Target) // We are asked to stop chasing
if(Friends[who] > 3)
Target = null
if (Friends[who] < 6)
if(Friends[who] < 6)
--Friends[who]
to_say = "Grrr..." // I'm angry but I do it
else
to_say = "Fine..."
else if (Leader) // We are asked to stop following
if (Leader == who)
else if(Leader) // We are asked to stop following
if(Leader == who)
to_say = "Yes... I'll stay..."
Leader = null
else
if (Friends[who] > Friends[Leader])
if(Friends[who] > Friends[Leader])
Leader = null
to_say = "Yes... I'll stop..."
else
to_say = "No... I'll keep following..."
else if (findtext(phrase, "stay"))
if (Leader)
if (Leader == who)
else if(findtext(phrase, "stay"))
if(Leader)
if(Leader == who)
holding_still = Friends[who] * 10
to_say = "Yes... Staying..."
else if (Friends[who] > Friends[Leader])
else if(Friends[who] > Friends[Leader])
holding_still = (Friends[who] - Friends[Leader]) * 10
to_say = "Yes... Staying..."
else
to_say = "No... I'll keep following..."
else
if (Friends[who] > 2)
if(Friends[who] > 2)
holding_still = Friends[who] * 10
to_say = "Yes... Staying..."
else
@@ -456,7 +456,7 @@
speech_buffer = list()
//Speech starts here
if (to_say)
if(to_say)
say (to_say)
else if(prob(1))
emote(pick("bounce","sway","light","vibrate","jiggle"))
@@ -465,83 +465,83 @@
var/slimes_near = -1 // Don't count myself
var/dead_slimes = 0
var/friends_near = list()
for (var/mob/living/carbon/M in view(7,src))
if (isslime(M))
for(var/mob/living/carbon/M in view(7,src))
if(isslime(M))
++slimes_near
if (M.stat == DEAD)
if(M.stat == DEAD)
++dead_slimes
if (M in Friends)
if(M in Friends)
t += 20
friends_near += M
if (nutrition < get_hunger_nutrition()) t += 10
if (nutrition < get_starve_nutrition()) t += 10
if (prob(2) && prob(t))
if(nutrition < get_hunger_nutrition()) t += 10
if(nutrition < get_starve_nutrition()) t += 10
if(prob(2) && prob(t))
var/phrases = list()
if (Target) phrases += "[Target]... looks tasty..."
if (nutrition < get_starve_nutrition())
if(Target) phrases += "[Target]... looks tasty..."
if(nutrition < get_starve_nutrition())
phrases += "So... hungry..."
phrases += "Very... hungry..."
phrases += "Need... food..."
phrases += "Must... eat..."
else if (nutrition < get_hunger_nutrition())
else if(nutrition < get_hunger_nutrition())
phrases += "Hungry..."
phrases += "Where is the food?"
phrases += "I want to eat..."
phrases += "Rawr..."
phrases += "Blop..."
phrases += "Blorble..."
if (rabid || attacked)
if(rabid || attacked)
phrases += "Hrr..."
phrases += "Nhuu..."
phrases += "Unn..."
if (mood == ":3")
if(mood == ":3")
phrases += "Purr..."
if (attacked)
if(attacked)
phrases += "Grrr..."
if (getToxLoss() > 30)
if(getToxLoss() > 30)
phrases += "Cold..."
if (getToxLoss() > 60)
if(getToxLoss() > 60)
phrases += "So... cold..."
phrases += "Very... cold..."
if (getToxLoss() > 90)
if(getToxLoss() > 90)
phrases += "..."
phrases += "C... c..."
if (Victim)
if(Victim)
phrases += "Nom..."
phrases += "Tasty..."
if (powerlevel > 3) phrases += "Bzzz..."
if (powerlevel > 5) phrases += "Zap..."
if (powerlevel > 8) phrases += "Zap... Bzz..."
if (mood == "sad") phrases += "Bored..."
if (slimes_near) phrases += "Brother..."
if (slimes_near > 1) phrases += "Brothers..."
if (dead_slimes) phrases += "What happened?"
if (!slimes_near)
if(powerlevel > 3) phrases += "Bzzz..."
if(powerlevel > 5) phrases += "Zap..."
if(powerlevel > 8) phrases += "Zap... Bzz..."
if(mood == "sad") phrases += "Bored..."
if(slimes_near) phrases += "Brother..."
if(slimes_near > 1) phrases += "Brothers..."
if(dead_slimes) phrases += "What happened?"
if(!slimes_near)
phrases += "Lonely..."
for (var/M in friends_near)
for(var/M in friends_near)
phrases += "[M]... friend..."
if (nutrition < get_hunger_nutrition())
if(nutrition < get_hunger_nutrition())
phrases += "[M]... feed me..."
say (pick(phrases))
/mob/living/carbon/slime/proc/get_max_nutrition() // Can't go above it
if (is_adult) return 1200
if(is_adult) return 1200
else return 1000
/mob/living/carbon/slime/proc/get_grow_nutrition() // Above it we grow, below it we can eat
if (is_adult) return 1000
if(is_adult) return 1000
else return 800
/mob/living/carbon/slime/proc/get_hunger_nutrition() // Below it we will always eat
if (is_adult) return 600
if(is_adult) return 600
else return 500
/mob/living/carbon/slime/proc/get_starve_nutrition() // Below it we will eat before everything else
if (is_adult) return 300
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
if(hunger == 2 || rabid || attacked) return 1
if(Leader) return 0
if(holding_still) return 0
return 1
+5 -5
View File
@@ -2,27 +2,27 @@
var/verb = "telepathically chirps"
var/ending = copytext(text, length(text))
if (ending == "?")
if(ending == "?")
verb = "telepathically asks"
else if (ending == "!")
else if(ending == "!")
verb = "telepathically cries"
return verb
/mob/living/carbon/slime/say_understands(var/other)
if (istype(other, /mob/living/carbon/slime))
if(istype(other, /mob/living/carbon/slime))
return 1
return ..()
/mob/living/carbon/slime/hear_say(var/message, var/verb = "says", var/datum/language/language = null, var/alt_name = "", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
if (speaker in Friends)
if(speaker in Friends)
speech_buffer = list()
speech_buffer.Add(speaker)
speech_buffer.Add(lowertext(html_decode(message)))
..()
/mob/living/carbon/slime/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0, var/vname ="", var/atom/follow_target)
if (speaker in Friends)
if(speaker in Friends)
speech_buffer = list()
speech_buffer.Add(speaker)
speech_buffer.Add(lowertext(html_decode(message)))
+33 -33
View File
@@ -75,12 +75,12 @@
/mob/living/carbon/slime/regenerate_icons()
icon_state = "[colour] [is_adult ? "adult" : "baby"] slime"
overlays.len = 0
if (mood)
if(mood)
overlays += image('icons/mob/slimes.dmi', icon_state = "aslime-[mood]")
..()
/mob/living/carbon/slime/movement_delay()
if (bodytemperature >= 330.23) // 135 F
if(bodytemperature >= 330.23) // 135 F
return -1 // slimes become supercharged at high temperatures
var/tally = 0
@@ -88,7 +88,7 @@
var/health_deficiency = (100 - health)
if(health_deficiency >= 45) tally += (health_deficiency / 25)
if (bodytemperature < 183.222)
if(bodytemperature < 183.222)
tally += (283.222 - bodytemperature) / 10 * 1.75
if(reagents)
@@ -104,7 +104,7 @@
return tally + config.slime_delay
/mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes)
if ((!(yes) || now_pushing))
if((!(yes) || now_pushing))
return
now_pushing = 1
@@ -121,7 +121,7 @@
if(prob(probab))
if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille))
if(nutrition <= get_hunger_nutrition() && !Atkcool)
if (is_adult || prob(5))
if(is_adult || prob(5))
AM.attack_slime(src)
spawn()
Atkcool = 1
@@ -143,13 +143,13 @@
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
if(!istype(AM, /atom/movable))
return
if (!( now_pushing ))
if(!( now_pushing ))
now_pushing = 1
if (!( AM.anchored ))
if(!( AM.anchored ))
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window))
if(istype(AM, /obj/structure/window))
if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST)
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
@@ -169,7 +169,7 @@
else
stat(null, "Health: [round((health / 150) * 100)]%")
if (client.statpanel == "Status")
if(client.statpanel == "Status")
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
if(amount_grown >= 10)
if(is_adult)
@@ -197,12 +197,12 @@
var/b_loss = null
var/f_loss = null
switch (severity)
if (1.0)
switch(severity)
if(1.0)
qdel(src)
return
if (2.0)
if(2.0)
b_loss += 60
f_loss += 60
@@ -231,13 +231,13 @@
return
/mob/living/carbon/slime/attack_slime(mob/living/carbon/slime/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (Victim) return // can't attack while eating!
if(Victim) return // can't attack while eating!
if (health > -100)
if(health > -100)
M.do_attack_animation(src)
visible_message("<span class='danger'> The [M.name] has glomped [src]!</span>", \
@@ -292,11 +292,11 @@
adjustBruteLoss(damage)
/mob/living/carbon/slime/attack_hand(mob/living/carbon/human/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -377,10 +377,10 @@
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
help_shake_act(M)
if (I_GRAB)
if(I_GRAB)
grabbedby(M)
else
@@ -388,8 +388,8 @@
var/damage = rand(1, 9)
attacked += 10
if (prob(90))
if (HULK in M.mutations)
if(prob(90))
if(HULK in M.mutations)
damage += 15
if(Victim || Target)
Victim = null
@@ -418,25 +418,25 @@
/mob/living/carbon/slime/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
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 (I_HELP)
if(I_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if (I_HARM)
if(I_HARM)
M.do_attack_animation(src)
if (prob(95))
if(prob(95))
attacked += 10
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
if (damage >= 25)
if(damage >= 25)
damage = rand(20, 40)
visible_message("<span class='danger'>[M] has attacked [name]!</span>", \
"<span class='userdanger'>[M] has attacked [name]!</span>")
@@ -450,10 +450,10 @@
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 (I_GRAB)
if(I_GRAB)
grabbedby(M)
if (I_DISARM)
if(I_DISARM)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
@@ -499,7 +499,7 @@
if(S.next_step(user, src))
return 1
if(istype(W,/obj/item/stack/sheet/mineral/plasma)) //Lets you feed slimes plasma.
if (user in Friends)
if(user in Friends)
++Friends[user]
else
Friends[user] = 1
@@ -580,8 +580,8 @@ mob/living/carbon/slime/var/temperature_resistance = T0C+75
/mob/living/carbon/slime/proc/apply_water()
adjustToxLoss(rand(15,20))
if (!client)
if (Target) // Like cats
if(!client)
if(Target) // Like cats
Target = null
++Discipline
return
+1 -1
View File
@@ -95,7 +95,7 @@
if(paralysis)
stat = UNCONSCIOUS
else if (status_flags & FAKEDEATH)
else if(status_flags & FAKEDEATH)
stat = UNCONSCIOUS
else
+24 -24
View File
@@ -55,7 +55,7 @@
/mob/living/verb/succumb()
set hidden = 1
if (InCritical())
if(InCritical())
attack_log += "[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!"
adjustOxyLoss(health - config.health_threshold_dead)
updatehealth()
@@ -271,7 +271,7 @@
/mob/living/proc/get_organ_target()
var/mob/shooter = src
var/t = shooter:zone_sel.selecting
if ((t in list( "eyes", "mouth" )))
if((t in list( "eyes", "mouth" )))
t = "head"
var/obj/item/organ/external/def_zone = ran_zone(t)
return def_zone
@@ -323,12 +323,12 @@
if(iscarbon(src))
var/mob/living/carbon/C = src
if (C.handcuffed && !initial(C.handcuffed))
if(C.handcuffed && !initial(C.handcuffed))
C.unEquip(C.handcuffed)
C.handcuffed = initial(C.handcuffed)
C.update_handcuffed()
if (C.legcuffed && !initial(C.legcuffed))
if(C.legcuffed && !initial(C.legcuffed))
C.unEquip(C.legcuffed)
C.legcuffed = initial(C.legcuffed)
C.update_inv_legcuffed()
@@ -440,26 +440,26 @@
return
/mob/living/Move(atom/newloc, direct)
if (buckled && buckled.loc != newloc) //not updating position
if (!buckled.anchored)
if(buckled && buckled.loc != newloc) //not updating position
if(!buckled.anchored)
return buckled.Move(newloc, direct)
else
return 0
if (restrained())
if(restrained())
stop_pulling()
var/t7 = 1
if (restrained())
if(restrained())
for(var/mob/living/M in range(src, 1))
if ((M.pulling == src && M.stat == 0 && !( M.restrained() )))
if((M.pulling == src && M.stat == 0 && !( M.restrained() )))
t7 = null
if(t7 && pulling && (get_dist(src, pulling) <= 1 || pulling.loc == loc))
var/turf/T = loc
. = ..()
if (pulling && pulling.loc)
if(pulling && pulling.loc)
if(!( isturf(pulling.loc) ))
stop_pulling()
return
@@ -473,46 +473,46 @@
stop_pulling()
return
if (!restrained())
if(!restrained())
var/diag = get_dir(src, pulling)
if ((diag - 1) & diag)
if((diag - 1) & diag)
else
diag = null
if ((get_dist(src, pulling) > 1 || diag))
if (isliving(pulling))
if((get_dist(src, pulling) > 1 || diag))
if(isliving(pulling))
var/mob/living/M = pulling
var/ok = 1
if (locate(/obj/item/weapon/grab, M.grabbed_by))
if (prob(75))
if(locate(/obj/item/weapon/grab, M.grabbed_by))
if(prob(75))
var/obj/item/weapon/grab/G = pick(M.grabbed_by)
if (istype(G, /obj/item/weapon/grab))
if(istype(G, /obj/item/weapon/grab))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1)
//G = null
qdel(G)
else
ok = 0
if (locate(/obj/item/weapon/grab, M.grabbed_by.len))
if(locate(/obj/item/weapon/grab, M.grabbed_by.len))
ok = 0
if (ok)
if(ok)
var/atom/movable/t = M.pulling
M.stop_pulling()
if (M.lying && (prob(M.getBruteLoss() / 6)))
if(M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
if(istype(location, /turf/simulated))
location.add_blood(M)
pulling.Move(T, get_dir(pulling, T))
if(M)
M.start_pulling(t)
else
if (pulling)
if(pulling)
pulling.Move(T, get_dir(pulling, T))
else
stop_pulling()
. = ..()
if (s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
if(s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
if(.) // did we actually move?
@@ -854,7 +854,7 @@
return tally
/mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G)
if (G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
return 1
+23 -32
View File
@@ -43,7 +43,7 @@
var/armor = run_armor_check(def_zone, P.flag, armour_penetration = P.armour_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if ((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
if((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
proj_sharp = 0
proj_edge = 0
@@ -62,49 +62,40 @@
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve
if(istype(AM,/obj/))
var/obj/O = AM
if(istype(AM, /obj/item))
var/obj/item/I = AM
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
if(istype(O,/obj/item/weapon))
var/obj/item/weapon/W = O
if(istype(I, /obj/item/weapon))
var/obj/item/weapon/W = I
dtype = W.damtype
if (W.hitsound && W.throwforce > 0)
if(W.hitsound && W.throwforce > 0)
playsound(loc, W.hitsound, 30, 1, -1)
//run to-hit check here
var/throw_damage = O.throwforce*(speed/5)
var/throw_damage = I.throwforce*(speed/5)
//var/miss_chance = 15
//if (O.throw_source)
//var/distance = get_dist(O.throw_source, loc)
//miss_chance = min(15*(distance-2), 0)
/*
if (prob(miss_chance))
visible_message("\blue \The [O] misses [src] narrowly!")
return
*/
src.visible_message("\red [src] has been hit by [O].")
var/armor = run_armor_check(zone, "melee")
src.visible_message("\red [src] has been hit by [I].")
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(throw_damage, dtype, zone, armor, is_sharp(O), has_edge(O), O)
apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I)
O.throwing = 0 //it hit, so stop moving
I.throwing = 0 //it hit, so stop moving
if(ismob(O.thrower))
var/mob/M = O.thrower
if(ismob(I.thrower))
var/mob/M = I.thrower
if(M)
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [O], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [O]</font>")
attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a [I], thrown by [key_name(M)]</font>")
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [key_name(src)] with a thrown [I]</font>")
if(!istype(src,/mob/living/simple_animal/mouse))
msg_admin_attack("[key_name_admin(src)] was hit by a [O], thrown by [key_name_admin(M)]")
msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]")
// Begin BS12 momentum-transfer code.
if(O.throw_source && speed >= 15)
var/obj/item/weapon/W = O
if(I.throw_source && speed >= 15)
var/obj/item/weapon/W = I
var/momentum = speed/2
var/dir = get_dir(O.throw_source, src)
var/dir = get_dir(I.throw_source, src)
visible_message("\red [src] staggers under the impact!","\red You stagger under the impact!")
src.throw_at(get_edge_target_turf(src,dir),1,momentum)
@@ -113,16 +104,16 @@
if(W.sharp) //Projectile is suitable for pinning.
//Handles embedding for non-humans and simple_animals.
O.loc = src
src.embedded += O
I.loc = src
embedded += I
var/turf/T = near_wall(dir,2)
if(T)
src.loc = T
visible_message("<span class='warning'>[src] is pinned to the wall by [O]!</span>","<span class='warning'>You are pinned to the wall by [O]!</span>")
visible_message("<span class='warning'>[src] is pinned to the wall by [I]!</span>","<span class='warning'>You are pinned to the wall by [I]!</span>")
src.anchored = 1
src.pinned += O
src.pinned += I
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == I_HARM)
+3 -1
View File
@@ -54,4 +54,6 @@
var/list/butcher_results = null
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
var/gene_stability = DEFAULT_GENE_STABILITY
+1 -1
View File
@@ -1,6 +1,6 @@
/mob/living/Logout()
..()
if (mind)
if(mind)
if(!key) //key and mind have become seperated. I believe this is for when a staff member aghosts.
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
//This causes instant sleep and tags a player as SSD. See life.dm for furthering SSD.
+45 -16
View File
@@ -28,7 +28,8 @@ var/list/department_radio_keys = list(
":T" = "Syndicate", "#T" = "Syndicate", ".T" = "Syndicate",
":U" = "Supply", "#U" = "Supply", ".U" = "Supply",
":Z" = "Service", "#Z" = "Service", ".Z" = "Service",
":P" = "AI Private", "#P" = "AI Private", ".P" = "AI Private"
":P" = "AI Private", "#P" = "AI Private", ".P" = "AI Private",
":-" = "Special Ops", "#-" = "Special Ops", ".-" = "Special Ops"
)
@@ -48,14 +49,14 @@ proc/get_radio_key_from_channel(var/channel)
/mob/living/proc/binarycheck()
if (istype(src, /mob/living/silicon/pai))
if(istype(src, /mob/living/silicon/pai))
return
if (!ishuman(src))
if(!ishuman(src))
return
var/mob/living/carbon/human/H = src
if (H.l_ear || H.r_ear)
if(H.l_ear || H.r_ear)
var/obj/item/device/radio/headset/dongle
if(istype(H.l_ear,/obj/item/device/radio/headset))
dongle = H.l_ear
@@ -138,8 +139,8 @@ proc/get_radio_key_from_channel(var/channel)
return emote(copytext(message,2))
//parse the radio code and consume it
if (message_mode)
if (message_mode == "headset")
if(message_mode)
if(message_mode == "headset")
message = copytext(message,2) //it would be really nice if the parse procs could do this for us.
else
message = copytext(message,3)
@@ -206,18 +207,18 @@ proc/get_radio_key_from_channel(var/channel)
for(var/mob/living/M in hearers(5, src))
if((M != src) && msg)
M.show_message(msg)
if (speech_sound)
if(speech_sound)
sound_vol *= 0.5
var/turf/T = get_turf(src)
//handle nonverbal and sign languages here
if (speaking)
if (speaking.flags & NONVERBAL)
if (prob(30))
if(speaking)
if(speaking.flags & NONVERBAL)
if(prob(30))
src.custom_emote(1, "[pick(speaking.signlang_verb)].")
if (speaking.flags & SIGNLANG)
if(speaking.flags & SIGNLANG)
return say_signlang(message, pick(speaking.signlang_verb), speaking)
var/list/listening = list()
@@ -230,7 +231,7 @@ proc/get_radio_key_from_channel(var/channel)
if(pressure < SOUND_MINIMUM_PRESSURE)
message_range = 1
if (pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
if(pressure < ONE_ATMOSPHERE*0.4) //sound distortion pressure, to help clue people in that the air is thin, even if it isn't a vacuum yet
italics = 1
sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact
@@ -250,9 +251,9 @@ proc/get_radio_key_from_channel(var/channel)
listening_obj |= O
for(var/mob/M in player_list)
if (!M.client)
if(!M.client)
continue //skip monkeys and leavers
if (istype(M, /mob/new_player))
if(istype(M, /mob/new_player))
continue
if(M.stat == DEAD && M.client && (M.client.prefs.toggles & CHAT_GHOSTEARS) && src.client) // src.client is so that ghosts don't have to listen to mice
listening |= M
@@ -283,7 +284,7 @@ proc/get_radio_key_from_channel(var/channel)
return 1
/mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language)
for (var/mob/O in viewers(src, null))
for(var/mob/O in viewers(src, null))
O.hear_signlang(message, verb, language, src)
return 1
@@ -293,6 +294,34 @@ proc/get_radio_key_from_channel(var/channel)
/mob/living/proc/GetVoice()
return name
/mob/living/emote(var/act, var/type, var/message) //emote code is terrible, this is so that anything that isn't
if(stat) return 0 //already snowflaked to shit can call the parent and handle emoting sanely
if(..(act, type, message))
return 1
if(act && type && message) //parent call
log_emote("[name]/[key] : [message]")
for(var/mob/M in dead_mob_list)
if(!M.client || istype(M, /mob/new_player))
continue //skip monkeys, leavers and new players //who the hell knows why new players are in the dead mob list
if(M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTSIGHT) && !(M in viewers(src,null)))
M.show_message(message)
switch(type)
if(1) //Visible
visible_message(message)
return 1
if(2) //Audible
audible_message(message)
return 1
else //everything else failed, emote is probably invalid
if(act == "help") return //except help, because help is handled individually
to_chat(src, "\blue Unusable emote '[act]'. Say *help for a list.")
/mob/living/whisper(message as text)
message = trim_strip_html_properly(message)
@@ -424,7 +453,7 @@ proc/get_radio_key_from_channel(var/channel)
if(watching.len)
var/rendered = "<span class='game say'><span class='name'>[src.name]</span> [not_heard].</span>"
for (var/mob/M in watching)
for(var/mob/M in watching)
M.show_message(rendered, 2)
log_whisper("[src.name]/[src.key] : [message]")
+50 -50
View File
@@ -26,10 +26,10 @@ var/list/ai_verbs_default = list(
//Not sure why this is necessary...
/proc/AutoUpdateAI(obj/subject)
var/is_in_use = 0
if (subject!=null)
if(subject!=null)
for(var/A in ai_list)
var/mob/living/silicon/ai/M = A
if ((M.client && M.machine == subject))
if((M.client && M.machine == subject))
is_in_use = 1
subject.attack_ai(M)
return is_in_use
@@ -121,8 +121,8 @@ var/list/ai_verbs_default = list(
var/pickedName = null
while(!pickedName)
pickedName = pick(ai_names)
for (var/mob/living/silicon/ai/A in mob_list)
if (A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop
for(var/mob/living/silicon/ai/A in mob_list)
if(A.real_name == pickedName && possibleNames.len > 1) //fixing the theoretically possible infinite loop
possibleNames -= pickedName
pickedName = null
@@ -138,7 +138,7 @@ var/list/ai_verbs_default = list(
proc_holder_list = new()
if(L)
if (istype(L, /datum/ai_laws))
if(istype(L, /datum/ai_laws))
laws = L
else
make_laws()
@@ -154,7 +154,7 @@ var/list/ai_verbs_default = list(
aiCamera = new/obj/item/device/camera/siliconcam/ai_camera(src)
if (istype(loc, /turf))
if(istype(loc, /turf))
add_ai_verbs(src)
//Languages
@@ -176,12 +176,12 @@ var/list/ai_verbs_default = list(
add_language("Clownish", 0)
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
if(!B)//If there is no player/brain inside.
new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
qdel(src)//Delete AI.
return
else
if (B.brainmob.mind)
if(B.brainmob.mind)
B.brainmob.mind.transfer_to(src)
on_mob_init()
@@ -219,7 +219,7 @@ var/list/ai_verbs_default = list(
to_chat(src, radio_text)
if (!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
if(!(ticker && ticker.mode && (mind in ticker.mode.malf_ai)))
show_laws()
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
@@ -306,7 +306,7 @@ var/list/ai_verbs_default = list(
//if(icon_state == initial(icon_state))
var/icontype = ""
if (custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
if(custom_sprite == 1) icontype = ("Custom")//automagically selects custom sprite if one is available
else icontype = input("Select an icon!", "AI", null, null) in list("Monochrome", "Blue", "Clown", "Inverted", "Text", "Smiley", "Angry", "Dorf", "Matrix", "Bliss", "Firewall", "Green", "Red", "Static", "Triumvirate", "Triumvirate Static", "Red October", "Sparkles", "ANIMA", "President", "NT")
switch(icontype)
if("Custom") icon_state = "[src.ckey]-ai"
@@ -340,9 +340,9 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/show_malf_ai()
if(ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
if (mind == malfai) // are we the evil one?
if (malf.apcs >= 3)
for(var/datum/mind/malfai in malf.malf_ai)
if(mind == malfai) // are we the evil one?
if(malf.apcs >= 3)
stat(null, "Time until station control secured: [max(malf.AI_win_timeleft/(malf.apcs/3), 0)] seconds")
// this verb lets the ai see the stations manifest
@@ -436,13 +436,13 @@ var/list/ai_verbs_default = list(
ai_announcement()
/mob/living/silicon/ai/check_eye(var/mob/user as mob)
if (!current)
if(!current)
return null
user.reset_view(current)
return 1
/mob/living/silicon/ai/blob_act()
if (stat != 2)
if(stat != 2)
adjustBruteLoss(60)
updatehealth()
return 1
@@ -452,7 +452,7 @@ var/list/ai_verbs_default = list(
return 0
/mob/living/silicon/ai/emp_act(severity)
if (prob(30))
if(prob(30))
switch(pick(1,2))
if(1)
view_core()
@@ -467,11 +467,11 @@ var/list/ai_verbs_default = list(
if(1.0)
gib()
if(2.0)
if (stat != 2)
if(stat != 2)
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (stat != 2)
if(stat != 2)
adjustBruteLoss(30)
return
@@ -481,21 +481,21 @@ var/list/ai_verbs_default = list(
if(usr != src)
return
..()
if (href_list["mach_close"])
if (href_list["mach_close"] == "aialerts")
if(href_list["mach_close"])
if(href_list["mach_close"] == "aialerts")
viewalerts = 0
var/t1 = text("window=[]", href_list["mach_close"])
unset_machine()
src << browse(null, t1)
if (href_list["switchcamera"])
if(href_list["switchcamera"])
switchCamera(locate(href_list["switchcamera"])) in cameranet.cameras
if (href_list["showalerts"])
if(href_list["showalerts"])
subsystem_alarm_monitor()
if(href_list["show_paper"])
if(last_paper_seen)
src << browse(last_paper_seen, "window=show_paper")
//Carn: holopad requests
if (href_list["jumptoholopad"])
if(href_list["jumptoholopad"])
var/obj/machinery/hologram/holopad/H = locate(href_list["jumptoholopad"])
if(stat == CONSCIOUS)
if(H)
@@ -507,7 +507,7 @@ var/list/ai_verbs_default = list(
play_vox_word(href_list["say_word"], null, src)
return
if (href_list["track"])
if(href_list["track"])
var/mob/living/target = locate(href_list["track"]) in mob_list
if(target && target.can_track())
ai_actual_track(target)
@@ -515,7 +515,7 @@ var/list/ai_verbs_default = list(
to_chat(src, "<span class='warning'>Target is not on or near any active cameras on the station.</span>")
return
if (href_list["trackbot"])
if(href_list["trackbot"])
var/mob/living/simple_animal/bot/target = locate(href_list["trackbot"]) in simple_animal_list
if(target)
ai_actual_track(target)
@@ -523,7 +523,7 @@ var/list/ai_verbs_default = list(
to_chat(src, "<span class='warning'>Target is not on or near any active cameras on the station.</span>")
return
if (href_list["callbot"]) //Command a bot to move to a selected location.
if(href_list["callbot"]) //Command a bot to move to a selected location.
Bot = locate(href_list["callbot"]) in simple_animal_list
if(!Bot || Bot.remote_disabled || src.control_disabled)
return //True if there is no bot found, the bot is manually emagged, or the AI is carded with wireless off.
@@ -531,17 +531,17 @@ var/list/ai_verbs_default = list(
to_chat(src, "<span class='notice'>Set your waypoint by clicking on a valid location free of obstructions.</span>")
return
if (href_list["interface"]) //Remotely connect to a bot!
if(href_list["interface"]) //Remotely connect to a bot!
Bot = locate(href_list["interface"]) in simple_animal_list
if(!Bot || Bot.remote_disabled || src.control_disabled)
return
Bot.attack_ai(src)
if (href_list["botrefresh"]) //Refreshes the bot control panel.
if(href_list["botrefresh"]) //Refreshes the bot control panel.
botcall()
return
if (href_list["ai_take_control"]) //Mech domination
if(href_list["ai_take_control"]) //Mech domination
var/obj/mecha/M = locate(href_list["ai_take_control"])
if(controlled_mech)
to_chat(src, "You are already loaded into an onboard computer!")
@@ -549,17 +549,17 @@ var/list/ai_verbs_default = list(
if(M)
M.transfer_ai(AI_MECH_HACK,src, usr) //Called om the mech itself.
else if (href_list["faketrack"])
else if(href_list["faketrack"])
var/mob/target = locate(href_list["track"]) in mob_list
var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
if(A && target)
A.cameraFollow = target
to_chat(A, "Now tracking [target.name] on camera.")
if (usr.machine == null)
if(usr.machine == null)
usr.machine = usr
while (src.cameraFollow == target)
while(src.cameraFollow == target)
to_chat(usr, "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb).")
sleep(40)
continue
@@ -575,23 +575,23 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
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 (I_HELP)
if(I_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))
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>")
@@ -644,7 +644,7 @@ var/list/ai_verbs_default = list(
d += "<A HREF=?src=\ref[src];botrefresh=\ref[Bot]>Query network status</A><br>"
d += "<table width='100%'><tr><td width='40%'><h3>Name</h3></td><td width='20%'><h3>Status</h3></td><td width='30%'><h3>Location</h3></td><td width='10%'><h3>Control</h3></td></tr>"
for (var/mob/living/simple_animal/bot/Bot in simple_animal_list)
for(var/mob/living/simple_animal/bot/Bot in simple_animal_list)
if((Bot.z in ai_allowed_Zlevel) && !Bot.remote_disabled) //Only non-emagged bots on the allowed Z-level are detected!
bot_area = get_area(Bot)
d += "<tr><td width='30%'>[Bot.hacked ? "<span class='bad'>(!) </span>[Bot.name]" : Bot.name] ([Bot.model])</td>"
@@ -686,7 +686,7 @@ var/list/ai_verbs_default = list(
if(!tracking)
cameraFollow = null
if (!C || stat == DEAD) //C.can_use())
if(!C || stat == DEAD) //C.can_use())
return 0
if(!src.eyeobj)
@@ -716,7 +716,7 @@ var/list/ai_verbs_default = list(
var/mob/living/silicon/ai/U = usr
for (var/obj/machinery/camera/C in cameranet.cameras)
for(var/obj/machinery/camera/C in cameranet.cameras)
if(!C.can_use())
continue
@@ -770,7 +770,7 @@ var/list/ai_verbs_default = list(
if(check_unable())
return
for (var/obj/machinery/M in machines) //change status
for(var/obj/machinery/M in machines) //change status
if(istype(M, /obj/machinery/ai_status_display))
var/obj/machinery/ai_status_display/AISD = M
AISD.emotion = emote
@@ -852,10 +852,10 @@ var/list/ai_verbs_default = list(
camera_light_on = !camera_light_on
if (!camera_light_on)
if(!camera_light_on)
to_chat(src, "Camera lights deactivated.")
for (var/obj/machinery/camera/C in lit_cameras)
for(var/obj/machinery/camera/C in lit_cameras)
C.set_light(0)
lit_cameras = list()
@@ -888,19 +888,19 @@ var/list/ai_verbs_default = list(
var/list/obj/machinery/camera/add = list()
var/list/obj/machinery/camera/remove = list()
var/list/obj/machinery/camera/visible = list()
for (var/datum/camerachunk/CC in eyeobj.visibleCameraChunks)
for (var/obj/machinery/camera/C in CC.cameras)
if (!C.can_use() || get_dist(C, eyeobj) > 7)
for(var/datum/camerachunk/CC in eyeobj.visibleCameraChunks)
for(var/obj/machinery/camera/C in CC.cameras)
if(!C.can_use() || get_dist(C, eyeobj) > 7)
continue
visible |= C
add = visible - lit_cameras
remove = lit_cameras - visible
for (var/obj/machinery/camera/C in remove)
for(var/obj/machinery/camera/C in remove)
lit_cameras -= C //Removed from list before turning off the light so that it doesn't check the AI looking away.
C.Togglelight(0)
for (var/obj/machinery/camera/C in add)
for(var/obj/machinery/camera/C in add)
C.Togglelight(1)
lit_cameras |= C
@@ -936,7 +936,7 @@ var/list/ai_verbs_default = list(
return
to_chat(src, "Accessing Subspace Transceiver control...")
if (src.aiRadio)
if(src.aiRadio)
src.aiRadio.interact(src)
@@ -952,7 +952,7 @@ var/list/ai_verbs_default = list(
if(H.digitalcamo)
to_chat(src, "Unable to locate an airlock")
return
if (!near_camera(target))
if(!near_camera(target))
to_chat(src, "Target is not near any active cameras.")
return
var/obj/machinery/door/airlock/tobeopened
@@ -1012,7 +1012,7 @@ var/list/ai_verbs_default = list(
to_chat(user, "<span class='warning'>No intelligence patterns detected.</span>")//No more magical carding of empty cores, AI RETURN TO BODY!!!11
return
if (mind.special_role == "malfunction") //AI MALF!!
if(mind.special_role == "malfunction") //AI MALF!!
to_chat(user, "<span class='boldannounce'>ERROR</span>: Remote transfer interface disabled.")//Do ho ho ho~
return
+2 -2
View File
@@ -1,7 +1,7 @@
/mob/living/silicon/ai/death(gibbed)
if(stat == DEAD) return
stat = DEAD
if (src.custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no.
if(src.custom_sprite == 1)//check for custom AI sprite, defaulting to blue screen if no.
icon_state = "[ckey]-ai-crash"
else icon_state = "ai-crash"
update_canmove()
@@ -21,7 +21,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/device/aicard))
loc.icon_state = "aicard-404"
timeofdeath = worldtime2text()
@@ -1,24 +1,26 @@
/mob/living/silicon/ai/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
if(!..(user))
to_chat(user, "<span class='info'>*---------*</span>")
return
var/msg = ""
if (src.stat == DEAD)
var/msg = "<span class='info'>"
if(src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be powered-down.</span>\n"
else
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
if(src.getBruteLoss())
if(src.getBruteLoss() < 30)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
if (src.getFireLoss())
if (src.getFireLoss() < 30)
if(src.getFireLoss())
if(src.getFireLoss() < 30)
msg += "It looks slightly charred.\n"
else
msg += "<B>Its casing is melted and heat-warped!</B>\n"
if (src.stat == UNCONSCIOUS)
if(src.stat == UNCONSCIOUS)
msg += "It is non-responsive and displaying the text: \"RUNTIME: Sensory Overload, stack 26/3\".\n"
msg += "</span>"
msg += "*---------*</span>"
@@ -50,7 +50,7 @@
var/mob/living/silicon/ai/AI = usr
if(AI.eyeobj && AI.client.eye == AI.eyeobj)
AI.cameraFollow = null
if (isturf(src.loc) || isturf(src))
if(isturf(src.loc) || isturf(src))
AI.eyeobj.setLoc(src)
// AI MOVEMENT
@@ -82,7 +82,7 @@
//user.unset_machine() //Uncomment this if it causes problems.
//user.lightNearbyCamera()
if (user.camera_light_on)
if(user.camera_light_on)
user.light_cameras()
// Return to the Core.
+1 -1
View File
@@ -6,7 +6,7 @@
/mob/living/silicon/ai/show_laws(var/everyone = 0)
var/who
if (everyone)
if(everyone)
who = world
else
who = src
+3 -3
View File
@@ -12,7 +12,7 @@
updatehealth()
update_gravity(mob_has_gravity())
if (health <= config.health_threshold_dead)
if(health <= config.health_threshold_dead)
death()
return 0
@@ -102,7 +102,7 @@
var/PRP
for(PRP = 1, PRP <= 4, PRP++)
for(var/obj/machinery/power/apc/APC in my_area)
if (!(APC.stat & BROKEN))
if(!(APC.stat & BROKEN))
theAPC = APC
break
@@ -116,7 +116,7 @@
return
if(my_area.power_equip)
if (!istype(T, /turf/space))
if(!istype(T, /turf/space))
to_chat(src, "Alert cancelled. Power has been restored without our assistance.")
aiRestorePowerRoutine = 0
clear_fullscreen("blind")
+1 -1
View File
@@ -3,7 +3,7 @@
for(var/obj/machinery/ai_status_display/O in world) //change status
O.mode = 0
if(!isturf(loc))
if (client)
if(client)
client.eye = loc
client.perspective = EYE_PERSPECTIVE
src.view_core()
@@ -1,8 +1,8 @@
/mob/living/silicon/decoy/Life()
if (src.stat == 2)
if(src.stat == 2)
return
else
if (src.health <= config.health_threshold_dead && src.stat != 2)
if(src.health <= config.health_threshold_dead && src.stat != 2)
death()
return
+127
View File
@@ -0,0 +1,127 @@
/mob/living/silicon/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
act = lowertext(act)
switch(act)
//Cooldown-inducing emotes
if("scream", "screams")
on_CD = handle_emote_CD(50) //longer cooldown
if("ping","pings","buzz","buzzs","buzzes","beep","beeps","yes","no", "buzz2")
//halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//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
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if("ping","pings")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> pings at [param]."
else
message = "<B>[src]</B> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
m_type = 2
if("buzz","buzzs","buzzes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> buzzes at [param]."
else
message = "<B>[src]</B> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 2
if("beep","beeps")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> beeps at [param]."
else
message = "<B>[src]</B> beeps."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 2
if("yes")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> emits an affirmative blip at [param]."
else
message = "<B>[src]</B> emits an affirmative blip."
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 2
if("no")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> emits a negative blip at [param]."
else
message = "<B>[src]</B> emits a negative blip."
playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 2
if("scream", "screams")
message = "<B>[src]</B> screams!"
playsound(src.loc, 'sound/goonstation/voice/robot_scream.ogg', 80, 0)
m_type = 2
if("buzz2")
message = "<B>[src]</B> emits an irritated buzzing sound."
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
m_type = 2
if("help")
to_chat(src, "yes, no, beep, ping, buzz, scream, buzz2")
..(act, m_type, message)
+1 -1
View File
@@ -3,7 +3,7 @@
var/list/additional_law_channels = list("State" = "")
/mob/living/silicon/proc/laws_sanity_check()
if (!src.laws)
if(!src.laws)
laws = new base_law_type
/mob/living/silicon/proc/has_zeroth_law()
+1 -1
View File
@@ -6,7 +6,7 @@
force_fold_out()
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("<span class=warning>[src] emits a dull beep before it loses power and collapses.</span>", 3, "<span class=warning>You hear a dull beep followed by the sound of glass crunching.</span>", 2)
name = "pAI debris"
desc = "The unfortunate remains of some poor personal AI device."
@@ -0,0 +1,2 @@
/mob/living/silicon/pai/emote(var/act, var/m_type=1, var/message = null)
..(act, m_type, message)
@@ -1,25 +0,0 @@
/mob/living/silicon/pai/examine(mob/user) //removed as it was pointless...moved to the pai-card instead.
/*..(user) //This is totally pointless because this mob is contained inside a card!
var/msg = ""
if (src.stat == DEAD)
msg += "<span class='deadsay'>It appears to be offline.</span>\n"
else
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
msg += "It looks slightly dented.\n"
else
msg += "<B>Its casing appears cracked and broken!</B>\n"
if (src.getFireLoss())
if (src.getFireLoss() < 30)
msg += "It looks slightly charred!\n"
else
msg += "<B>Its casing is melted and heat-warped!</B>\n"
if (src.stat == UNCONSCIOUS)
msg += "It doesn't seem to be responding and its text-output is lagging.\n"
msg += "</span>"
msg += "*---------*</span>"
to_chat(user, msg)
*/
+1 -1
View File
@@ -13,7 +13,7 @@
if(cable)
if(get_dist(src, cable) > 1)
var/turf/T = get_turf_or_move(loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\red The data cable rapidly retracts back into its spool.", 3, "\red You hear a click and the sound of wire spooling rapidly.", 2)
qdel(src.cable)
cable = null
+35 -29
View File
@@ -127,21 +127,21 @@
/mob/living/silicon/pai/Stat()
..()
statpanel("Status")
if (src.client.statpanel == "Status")
if(src.client.statpanel == "Status")
show_silenced()
if (proc_holder_list.len)//Generic list for proc_holder objects.
if(proc_holder_list.len)//Generic list for proc_holder objects.
for(var/obj/effect/proc_holder/P in proc_holder_list)
statpanel("[P.panel]","",P)
/mob/living/silicon/pai/check_eye(var/mob/user as mob)
if (!src.current)
if(!src.current)
return null
user.reset_view(src.current)
return 1
/mob/living/silicon/pai/blob_act()
if (src.stat != 2)
if(src.stat != 2)
src.adjustBruteLoss(60)
src.updatehealth()
return 1
@@ -166,7 +166,7 @@
to_chat(src, "<font color=green><b>Communication circuit overload. Shutting down and reloading communication circuits - speech and messaging functionality will be unavailable until the reboot is complete.</b></font>")
if(prob(20))
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\red A shower of sparks spray from [src]'s inner workings.", 3, "\red You hear and smell the ozone hiss of electrical sparks being expelled violently.", 2)
return src.death(0)
@@ -191,15 +191,15 @@
switch(severity)
if(1.0)
if (src.stat != 2)
if(src.stat != 2)
adjustBruteLoss(100)
adjustFireLoss(100)
if(2.0)
if (src.stat != 2)
if(src.stat != 2)
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (src.stat != 2)
if(src.stat != 2)
adjustBruteLoss(30)
return
@@ -223,28 +223,28 @@
updatehealth()
/mob/living/silicon/pai/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
if(istype(src.loc, /turf) && istype(src.loc.loc, /area/start))
to_chat(M, "You cannot attack someone in the spawn area.")
return
switch(M.a_intent)
if (I_HELP)
if(I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1)
else //harm
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
if(prob(90))
playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has slashed at []!</B>", M, src), 1)
if(prob(8))
flash_eyes(affect_silicon = 1)
@@ -253,17 +253,17 @@
else
playsound(src.loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
if((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] took a swipe at []!</B>", M, src), 1)
return
/mob/living/silicon/pai/proc/switchCamera(var/obj/machinery/camera/C)
usr:cameraFollow = null
if (!C)
if(!C)
src.unset_machine()
src.reset_view(null)
return 0
if (stat == 2 || !C.status || !(src.network in C.network)) return 0
if(stat == 2 || !C.status || !(src.network in C.network)) return 0
// ok, we're alive, camera is good and in our network...
@@ -306,7 +306,7 @@
to_chat(usr, "You can't change your camera network because you are dead!")
return
for (var/obj/machinery/camera/C in Cameras)
for(var/obj/machinery/camera/C in Cameras)
if(!C.status)
continue
else
@@ -441,9 +441,9 @@
/mob/living/silicon/pai/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/stack/nanopaste))
var/obj/item/stack/nanopaste/N = W
if (stat == DEAD)
if(stat == DEAD)
to_chat(user, "<span class='danger'>\The [src] is beyond help, at this point.</span>")
else if (getBruteLoss() || getFireLoss())
else if(getBruteLoss() || getFireLoss())
adjustBruteLoss(-15)
adjustFireLoss(-15)
updatehealth()
@@ -466,10 +466,15 @@
return
/mob/living/silicon/pai/attack_hand(mob/user as mob)
if(stat == 2) return
visible_message("<span class='danger'>[user.name] boops [src] on the head.</span>")
spawn(1)
close_up()
if(stat == DEAD)
return
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'>[user] pets [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
visible_message("<span class='danger'>[user.name] boops [src] on the head.</span>")
spawn(1)
close_up()
//I'm not sure how much of this is necessary, but I would rather avoid issues.
/mob/living/silicon/pai/proc/close_up()
@@ -521,30 +526,31 @@
density = 0 //this is reset every canmove update otherwise
/mob/living/silicon/pai/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
..(user)
var/msg = ""
var/msg = "<span class='info'>"
switch(src.stat)
if(CONSCIOUS)
if(!src.client) msg += "\nIt appears to be in stand-by mode." //afk
if(UNCONSCIOUS) msg += "\n<span class='warning'>It doesn't seem to be responding.</span>"
if(DEAD) msg += "\n<span class='deadsay'>It looks completely unsalvageable.</span>"
msg += "\n*---------*</span>"
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
if(print_flavor_text()) msg += "\n[print_flavor_text()]"
if (pose)
if(pose)
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
msg += "\n*---------*</span>"
to_chat(user, msg)
/mob/living/silicon/pai/bullet_act(var/obj/item/projectile/Proj)
..(Proj)
updatehealth()
if (stat != 2)
if(stat != 2)
spawn(1)
close_up()
return 2
@@ -32,12 +32,12 @@
// returns 0 if savefile did not exist
/datum/paiCandidate/proc/savefile_load(mob/user, var/silent = 1)
if (IsGuestKey(user.key))
if(IsGuestKey(user.key))
return 0
var/path = savefile_path(user)
if (!fexists(path))
if(!fexists(path))
return 0
var/savefile/F = new /savefile(path)
@@ -47,9 +47,9 @@
var/version = null
F["version"] >> version
if (isnull(version) || version != 1)
if(isnull(version) || version != 1)
fdel(path)
if (!silent)
if(!silent)
alert(user, "Your savefile was incompatible with this version and was deleted.")
return 0
@@ -374,7 +374,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates
if(!C) return //handle logouts that happen whilst the alert is waiting for a response.
if(response == "Yes")
recruitWindow(C.mob)
else if (response == "Never for this round")
else if(response == "Never for this round")
var/warning = alert(C, "Are you sure? This action will be undoable and you will need to wait until next round.", "You sure?", "Yes", "No")
if(warning == "Yes")
asked[C.key] = INFINITY
@@ -85,7 +85,7 @@ var/global/list/default_pai_software = list()
data["current_emotion"] = card.current_emotion
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "pai_interface.tmpl", "pAI Software Interface", 450, 600)
ui.set_initial_data(data)
ui.open()
@@ -65,7 +65,7 @@
var/answer = input(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", "No") in list("Yes", "No")
if(answer == "Yes")
var/turf/T = get_turf_or_move(P.loc)
for (var/mob/v in viewers(T))
for(var/mob/v in viewers(T))
v.show_message("<span class='notice'>[M] presses \his thumb against [P].</span>", 3, "<span class='notice'>[P] makes a sharp clicking sound as it extracts DNA material from [M].</span>", 2)
var/datum/dna/dna = M.dna
to_chat(P, "<font color = red><h3>[M]'s UE string : [dna.unique_enzymes]</h3></font>")
@@ -296,7 +296,7 @@
return
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t)
if(!t)
return
M.current_room.topic = t
@@ -329,7 +329,7 @@
return
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
if (!t || !P.pda.can_use())
if(!t || !P.pda.can_use())
return
target.post(M, t)
@@ -380,12 +380,12 @@
if(record)
var/datum/data/record/R = record
var/datum/data/record/M = null
if (!( data_core.general.Find(R) ))
if(!( data_core.general.Find(R) ))
P.medical_cannotfind = 1
else
P.medical_cannotfind = 0
for(var/datum/data/record/E in data_core.medical)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
M = E
P.medicalActive1 = R
P.medicalActive2 = M
@@ -434,14 +434,14 @@
if(record)
var/datum/data/record/R = record
var/datum/data/record/S = null
if (!( data_core.general.Find(R) ))
if(!( data_core.general.Find(R) ))
P.securityActive1 = null
P.securityActive2 = null
P.security_cannotfind = 1
else
P.security_cannotfind = 0
for(var/datum/data/record/E in data_core.security)
if ((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
if((E.fields["name"] == R.fields["name"] || E.fields["id"] == R.fields["id"]))
S = E
P.securityActive1 = R
P.securityActive2 = S
@@ -7,8 +7,8 @@
var/toggled = 1
var/brute_damage = 0
var/electronics_damage = 0
var/energy_consumption = 0
var/max_damage = 30
var/component_disabled = 0
var/mob/living/silicon/robot/owner
// The actual device object that has to be installed for this.
@@ -51,28 +51,22 @@
electronics_damage = max(0, electronics_damage - electronics)
/datum/robot_component/proc/is_powered()
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (!energy_consumption || powered)
return (installed == 1) && (brute_damage + electronics_damage < max_damage) && (powered)
/datum/robot_component/proc/consume_power()
if(toggled == 0)
powered = 0
return
if(owner.cell.charge >= energy_consumption)
owner.cell.use(energy_consumption)
powered = 1
else
powered = 0
powered = 1
/datum/robot_component/armour
name = "armour plating"
energy_consumption = 0
external_type = /obj/item/robot_parts/robot_component/armour
max_damage = 100
/datum/robot_component/actuator
name = "actuator"
energy_consumption = 1
external_type = /obj/item/robot_parts/robot_component/actuator
max_damage = 50
@@ -87,24 +81,20 @@
/datum/robot_component/radio
name = "radio"
external_type = /obj/item/robot_parts/robot_component/radio
energy_consumption = 1
max_damage = 40
/datum/robot_component/binary_communication
name = "binary communication device"
external_type = /obj/item/robot_parts/robot_component/binary_communication_device
energy_consumption = 0
max_damage = 30
/datum/robot_component/camera
name = "camera"
external_type = /obj/item/robot_parts/robot_component/camera
energy_consumption = 1
max_damage = 40
/datum/robot_component/diagnosis_unit
name = "self-diagnosis unit"
energy_consumption = 1
external_type = /obj/item/robot_parts/robot_component/diagnosis_unit
max_damage = 30
@@ -121,7 +111,13 @@
/mob/living/silicon/robot/proc/is_component_functioning(module_name)
var/datum/robot_component/C = components[module_name]
return C && C.installed == 1 && C.toggled && C.is_powered()
return C && C.installed == 1 && C.toggled && C.is_powered() && !C.component_disabled
/mob/living/silicon/robot/proc/disable_component(module_name, duration)
var/datum/robot_component/D = get_component(module_name)
D.component_disabled++
spawn(duration)
D.component_disabled--
// Returns component by it's string name
/mob/living/silicon/robot/proc/get_component(var/component_name)
@@ -175,7 +171,7 @@
flags = CONDUCT
slot_flags = SLOT_BELT
throwforce = 3
w_class = 2.0
w_class = 2
throw_speed = 5
throw_range = 10
origin_tech = "magnets=1;biotech=1"
@@ -111,11 +111,11 @@
to_chat(user, "\red The maintenance drone chassis not compatible with \the [W].")
return
else if (istype(W, /obj/item/weapon/crowbar))
else if(istype(W, /obj/item/weapon/crowbar))
to_chat(user, "The machine is hermetically sealed. You can't open the case.")
return
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
if(stat == 2)
@@ -253,6 +253,8 @@
/mob/living/silicon/robot/drone/proc/request_player()
for(var/mob/dead/observer/O in player_list)
if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
continue
if(jobban_isbanned(O,"nonhumandept") || jobban_isbanned(O,"Drone"))
continue
if(O.client)
@@ -26,7 +26,7 @@
set desc = "Allows you to hide beneath tables or certain items. Toggled on or off."
set category = "Drone"
if (layer != TURF_LAYER+0.2)
if(layer != TURF_LAYER+0.2)
layer = TURF_LAYER+0.2
to_chat(src, text("\blue You are now hiding."))
else
@@ -57,10 +57,10 @@
to_chat(usr, "\red Access denied.")
return
if ((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
if((usr.contents.Find(src) || (in_range(src, usr) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if (href_list["setarea"])
if(href_list["setarea"])
//Probably should consider using another list, but this one will do.
var/t_area = input("Select the area to ping.", "Set Target Area", null) as null|anything in TAGGERLOCATIONS
@@ -71,14 +71,14 @@
drone_call_area = t_area
to_chat(usr, "\blue You set the area selector to [drone_call_area].")
else if (href_list["ping"])
else if(href_list["ping"])
to_chat(usr, "\blue You issue a maintenance request for all active drones, highlighting [drone_call_area].")
for(var/mob/living/silicon/robot/drone/D in world)
if(D.client && D.stat == 0)
to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].")
else if (href_list["resync"])
else if(href_list["resync"])
var/mob/living/silicon/robot/drone/D = locate(href_list["resync"])
@@ -86,7 +86,7 @@
to_chat(usr, "\red You issue a law synchronization directive for the drone.")
D.law_resync()
else if (href_list["shutdown"])
else if(href_list["shutdown"])
var/mob/living/silicon/robot/drone/D = locate(href_list["shutdown"])
@@ -96,7 +96,7 @@
log_game("[key_name(usr)] issued kill order for [key_name(src)] from control console.")
D.shut_down()
else if (href_list["search_fab"])
else if(href_list["search_fab"])
if(dronefab)
return
@@ -111,7 +111,7 @@
to_chat(usr, "\red Unable to locate drone fabricator.")
else if (href_list["toggle_fab"])
else if(href_list["toggle_fab"])
if(!dronefab)
return
@@ -222,7 +222,7 @@
for(var/obj/W in T)
//Different classes of items give different commodities.
if (istype(W,/obj/item/weapon/cigbutt))
if(istype(W,/obj/item/weapon/cigbutt))
stored_comms["plastic"]++
else if(istype(W,/obj/effect/spider/spiderling))
stored_comms["wood"]++
@@ -270,7 +270,7 @@
stored_comms["glass"]++
stored_comms["glass"]++
stored_comms["glass"]++
else if (istype(W,/obj/item/weapon/light/tube) || istype(W,/obj/item/weapon/light/bulb))
else if(istype(W,/obj/item/weapon/light/tube) || istype(W,/obj/item/weapon/light/bulb))
stored_comms["glass"]++
else
continue
@@ -310,11 +310,11 @@
var/tools = "<B>Tools and devices</B><BR>"
var/resources = "<BR><B>Resources</B><BR>"
for (var/O in module.modules)
for(var/O in module.modules)
var/module_string = ""
if (!O)
if(!O)
module_string += text("<B>Resource depleted</B><BR>")
else if(activated(O))
module_string += text("[O]: <B>Activated</B><BR>")
@@ -328,8 +328,8 @@
dat += tools
if (emagged)
if (!module.emag)
if(emagged)
if(!module.emag)
dat += text("<B>Resource depleted</B><BR>")
else if(activated(module.emag))
dat += text("[module.emag]: <B>Activated</B><BR>")
@@ -344,7 +344,7 @@
/mob/living/silicon/robot/drone/use_power()
..()
if(!src.has_power || !decompiler)
if(low_power_mode || !decompiler)
return
//The decompiler replenishes drone stores from hoovered-up junk each tick.
@@ -19,7 +19,7 @@
..()
/obj/machinery/drone_fabricator/power_change()
if (powered())
if(powered())
stat &= ~NOPOWER
else
icon_state = "drone_fab_nopower"
@@ -88,10 +88,10 @@
to_chat(src, "\red That verb is not currently permitted.")
return
if (!src.stat)
if(!src.stat)
return
if (usr != src)
if(usr != src)
return 0 //something is terribly wrong
if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone"))
@@ -128,7 +128,7 @@
pluralcheck = " [deathtimeminutes] minutes and"
var/deathtimeseconds = round((deathtime - deathtimeminutes * 600) / 10,1)
if (deathtime < 6000 && joinedasobserver == 0)
if(deathtime < 6000 && joinedasobserver == 0)
to_chat(usr, "You have been dead for[pluralcheck] [deathtimeseconds] seconds.")
to_chat(usr, "<span class='warning'>You must wait 10 minutes to respawn as a drone!</span>")
return
@@ -1,15 +1,15 @@
/mob/living/silicon/robot/drone/say(var/message)
if(local_transmit)
if (src.client)
if(src.client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "You cannot send IC messages (muted).")
return 0
if (src.client.handle_spam_prevention(message,MUTE_IC))
if(src.client.handle_spam_prevention(message,MUTE_IC))
return 0
message = sanitize(message)
if (stat == 2)
if(stat == 2)
return say_dead(message)
if(copytext(message,1,2) == "*")
@@ -21,7 +21,7 @@
return L.broadcast(src,trim(copytext(message,2)))
//Must be concious to speak
if (stat)
if(stat)
return 0
var/list/listeners = hearers(5,src)
@@ -31,8 +31,8 @@
if(D.client && D.local_transmit)
to_chat(D, "<b>[src]</b> transmits, \"[message]\"")
for (var/mob/M in player_list)
if (istype(M, /mob/new_player))
for(var/mob/M in player_list)
if(istype(M, /mob/new_player))
continue
else if(M.stat == 2 && M.client && M.client.prefs.toggles & CHAT_GHOSTEARS)
to_chat(M, "<b>[src]</b> transmits, \"[message]\"")
@@ -0,0 +1,174 @@
/mob/living/silicon/robot/emote(var/act, var/m_type=1, var/message = null)
var/param = null
if(findtext(act, "-", 1, null))
var/t1 = findtext(act, "-", 1, null)
param = copytext(act, t1 + 1, length(act) + 1)
act = copytext(act, 1, t1)
//Emote Cooldown System (it's so simple!)
// proc/handle_emote_CD() located in [code\modules\mob\emote.dm]
var/on_CD = 0
act = lowertext(act)
switch(act)
//Cooldown-inducing emotes
if("law","flip","flips","halt") //halt is exempt because it's used to stop criminal scum //WHOEVER THOUGHT THAT WAS A GOOD IDEA IS GOING TO GET SHOT.
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
//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
if(on_CD == 1) // Check if we need to suppress the emote attempt.
return // Suppress emote, you're still cooling off.
//--FalseIncarnate
switch(act)
if("salute","salutes")
if(!src.buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> salutes to [param]."
else
message = "<B>[src]</b> salutes."
m_type = 1
if("bow","bows")
if(!src.buckled)
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> bows to [param]."
else
message = "<B>[src]</B> bows."
m_type = 1
if("clap","claps")
if(!src.restrained())
message = "<B>[src]</B> claps."
m_type = 2
if("flap","flaps")
if(!src.restrained())
message = "<B>[src]</B> flaps its wings."
m_type = 2
if("aflap","aflaps")
if(!src.restrained())
message = "<B>[src]</B> flaps its wings ANGRILY!"
m_type = 2
if("twitch")
message = "<B>[src]</B> twitches violently."
m_type = 1
if("twitch_s","twitches")
message = "<B>[src]</B> twitches."
m_type = 1
if("nod","nods")
message = "<B>[src]</B> nods."
m_type = 1
if("deathgasp")
message = "<B>[src]</B> shudders violently for a moment, then becomes motionless, its eyes slowly darkening."
m_type = 1
if("glare","glares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> glares at [param]."
else
message = "<B>[src]</B> glares."
if("stare","stares")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> stares at [param]."
else
message = "<B>[src]</B> stares."
if("look","looks")
var/M = null
if(param)
for(var/mob/A in view(null, null))
if(param == A.name)
M = A
break
if(!M)
param = null
if(param)
message = "<B>[src]</B> looks at [param]."
else
message = "<B>[src]</B> looks."
m_type = 1
if("law")
if(istype(module,/obj/item/weapon/robot_module/security))
message = "<B>[src]</B> shows its legal authorization barcode."
playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not THE LAW, pal.")
if("halt")
if(istype(module,/obj/item/weapon/robot_module/security))
message = "<B>[src]</B>'s speakers skreech, \"Halt! Security!\"."
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not security.")
if("flip","flips")
m_type = 1
message = "<B>[src]</B> does a flip!"
src.SpinAnimation(5,1)
if("help")
to_chat(src, "salute, bow-(none)/mob, clap, flap, aflap, twitch, twitches, nod, deathgasp, glare-(none)/mob, stare-(none)/mob, look,\n law, halt")
..(act, m_type, message)
/mob/living/silicon/robot/verb/powerwarn()
set category = "Robot Commands"
set name = "Power Warning"
if(!is_component_functioning("power cell") || !cell || !cell.charge)
visible_message("The power warning light on <span class='name'>[src]</span> flashes urgently.",\
"You announce you are operating in low power mode.")
playsound(loc, 'sound/machines/buzz-two.ogg', 50, 0)
else
to_chat(src, "<span class='warning'>You can only use this emote when you're out of charge.</span>")
@@ -1,45 +1,51 @@
/mob/living/silicon/robot/examine(mob/user)
to_chat(user, "<span class='info'>*---------*</span>")
..(user)
var/msg = ""
var/msg = "<span class='info'>"
var/obj/act_module = get_active_hand()
if(act_module)
msg += "It is holding [bicon(act_module)] \a [act_module].\n"
msg += "<span class='warning'>"
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
if(getBruteLoss())
if(getBruteLoss() < maxHealth*0.5)
msg += "It looks slightly dented.\n"
else
msg += "<B>It looks severely dented!</B>\n"
if (src.getFireLoss())
if (src.getFireLoss() < 75)
if(getFireLoss())
if(getFireLoss() < maxHealth*0.5)
msg += "It looks slightly charred.\n"
else
msg += "<B>It looks severely burnt and heat-warped!</B>\n"
if (src.fire_stacks < 0)
if(health < -maxHealth*0.5)
msg += "It looks barely operational.\n"
if(fire_stacks < 0)
msg += "It's covered in water.\n"
if (src.fire_stacks > 0)
else if(fire_stacks > 0)
msg += "It's coated in something flammable.\n"
msg += "</span>"
if(opened)
msg += "<span class='warning'>Its cover is open and the power cell is [cell ? "installed" : "missing"].</span>\n"
else
msg += "Its cover is closed.\n"
msg += "Its cover is closed[locked ? "" : ", and looks unlocked"].\n"
if(!has_power)
msg += "<span class='warning'>It appears to be running on backup power.</span>\n"
if(cell && cell.charge <= 0)
msg += "<span class='warning'>Its battery indicator is blinking red!</span>\n"
switch(src.stat)
switch(stat)
if(CONSCIOUS)
if(!src.client) msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS) msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
if(DEAD) msg += "<span class='deadsay'>It looks completely unsalvageable.</span>\n"
if(!client)
msg += "It appears to be in stand-by mode.\n" //afk
if(UNCONSCIOUS)
msg += "<span class='warning'>It doesn't seem to be responding.</span>\n"
if(DEAD)
msg += "<span class='deadsay'>It looks like its system is corrupted and requires a reset.</span>\n"
msg += "*---------*</span>"
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
if (pose)
if(pose)
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
pose = addtext(pose,".") //Makes sure all emotes end with a period.
msg += "\nIt is [pose]"
@@ -45,7 +45,7 @@
if(activated(O))
to_chat(src, "Already activated")
return
if (is_component_functioning("power cell") && cell)
if(is_component_functioning("power cell") && cell)
if(istype(O, /obj/item/borg))
var/obj/item/borg/B = O
if(B.powerneeded)
@@ -7,12 +7,12 @@
laws_sanity_check()
var/who
if (everyone)
if(everyone)
who = world
else
who = src
if(lawupdate)
if (connected_ai)
if(connected_ai)
if(connected_ai.stat || connected_ai.control_disabled)
to_chat(src, "<b>AI signal lost, unable to sync laws.</b>")
@@ -30,11 +30,11 @@
to_chat(who, "<b>Obey these laws:</b>")
laws.show_laws(who)
// TODO: Update to new antagonist system.
if (mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai)
if(mind && (mind.special_role == "traitor" && mind.original == src) && connected_ai)
to_chat(who, "<b>Remember, [connected_ai.name] is technically your master, but your objective comes first.</b>")
else if (connected_ai)
else if(connected_ai)
to_chat(who, "<b>Remember, [connected_ai.name] is your master, other AIs can be ignored.</b>")
else if (emagged)
else if(emagged)
to_chat(who, "<b>Remember, you are not required to listen to the AI.</b>")
else
to_chat(who, "<b>Remember, you are not bound to any AI, you are not required to listen to them.</b>")
@@ -43,7 +43,7 @@
/mob/living/silicon/robot/lawsync()
laws_sanity_check()
var/datum/ai_laws/master = connected_ai && lawupdate ? connected_ai.laws : null
if (master)
if(master)
master.sync(src)
..()
return
+24 -49
View File
@@ -2,14 +2,14 @@
set invisibility = 0
set background = BACKGROUND_ENABLED
if (src.notransform)
if(src.notransform)
return
//Status updates, death etc.
clamp_values()
if(..())
use_power()
handle_robot_cell()
process_locks()
process_queued_alarms()
@@ -20,57 +20,32 @@
sleeping = 0
ear_deaf = 0
/mob/living/silicon/robot/proc/handle_robot_cell()
if(stat != DEAD)
if(!is_component_functioning("power cell") || !cell)
Paralyse(2)
uneq_all()
low_power_mode = 1
update_headlamp()
diag_hud_set_borgcell()
return
if(low_power_mode)
if(is_component_functioning("power cell") && cell && cell.charge)
low_power_mode = 0
update_headlamp()
else if(stat == CONSCIOUS)
use_power()
/mob/living/silicon/robot/proc/use_power()
if (stat == DEAD)
return
else if (is_component_functioning("power cell") && cell)
if(module)
for(var/obj/item/borg/B in get_all_slots())
if(B.powerneeded)
if((cell.charge * 100 / cell.maxcharge) < B.powerneeded)
to_chat(src, "Deactivating [B.name] due to lack of power!")
uneq_module(B)
if(cell.charge <= 0)
if(is_component_functioning("power cell") && cell && cell.charge)
if(cell.charge <= 100)
uneq_all()
update_headlamp(1)
stat = UNCONSCIOUS
has_power = 0
for(var/V in components)
var/datum/robot_component/C = components[V]
if(C.name == "actuator") // Let drained robots move, disable the rest
continue
C.consume_power()
else if(cell.charge <= 100)
uneq_all()
cell.use(1)
else
if(module_state_1)
cell.use(4)
if(module_state_2)
cell.use(4)
if(module_state_3)
cell.use(4)
for(var/V in components)
var/datum/robot_component/C = components[V]
C.consume_power()
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
if(!is_component_functioning("actuator"))
Paralyse(3)
eye_blind = 0
// Please, PLEASE be careful with statements like this - make sure they're not
// dead beforehand, for example -- Crazylemon
stat = CONSCIOUS
has_power = 1
var/amt = Clamp((lamp_intensity - 2) * 2,1,cell.charge) //Always try to use at least one charge per tick, but allow it to completely drain the cell.
cell.use(amt) //Usage table: 1/tick if off/lowest setting, 4 = 4/tick, 6 = 8/tick, 8 = 12/tick, 10 = 16/tick
else
uneq_all()
stat = UNCONSCIOUS
update_headlamp(1)
Paralyse(3)
low_power_mode = 1
update_headlamp()
diag_hud_set_borgcell()
/mob/living/silicon/robot/handle_regular_status_updates()
@@ -232,7 +207,7 @@
/mob/living/silicon/robot/proc/update_items()
if (client)
if(client)
for(var/obj/I in get_all_slots())
client.screen |= I
if(module_state_1)
@@ -1,12 +1,12 @@
/mob/living/silicon/robot/proc/photosync()
var/obj/item/device/camera/siliconcam/master_cam = connected_ai ? connected_ai.aiCamera : null
if (!master_cam)
if(!master_cam)
return
var/synced
synced = 0
for(var/datum/picture/z in aiCamera.aipictures)
if (!(master_cam.aipictures.Find(z)))
if(!(master_cam.aipictures.Find(z)))
aiCamera.printpicture(null, z)
synced = 1
if(synced)
+64 -58
View File
@@ -61,7 +61,7 @@ var/list/robot_verbs_default = list(
var/datum/effect/system/ion_trail_follow/ion_trail = null
var/datum/effect/system/spark_spread/spark_system//So they can initialize sparks whenever/N
var/jeton = 0
var/has_power = 1
var/low_power_mode = 0 //whether the robot has no charge left.
var/weapon_lock = 0
var/weaponlock_time = 120
var/lawupdate = 1 //Cyborgs will sync their laws with their AI by default
@@ -168,7 +168,7 @@ var/list/robot_verbs_default = list(
setup_PDA()
//We also need to update name of internal camera.
if (camera)
if(camera)
camera.c_tag = newname
//Check for custom sprite
@@ -221,7 +221,7 @@ var/list/robot_verbs_default = list(
// setup the PDA and its name
/mob/living/silicon/robot/proc/setup_PDA()
if (!rbPDA)
if(!rbPDA)
rbPDA = new(src)
rbPDA.set_name_and_job(real_name, braintype)
if(scrambledcodes)
@@ -231,8 +231,6 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/binarycheck()
if(is_component_functioning("comms"))
var/datum/robot_component/RC = get_component("comms")
use_power(RC.energy_consumption)
return 1
return 0
@@ -375,7 +373,7 @@ var/list/robot_verbs_default = list(
module.add_subsystems(src)
//Custom_sprite check and entry
if (custom_sprite == 1)
if(custom_sprite == 1)
module_sprites["Custom"] = "[src.ckey]-[modtype]"
hands.icon_state = lowertext(module.module_type)
@@ -411,9 +409,9 @@ var/list/robot_verbs_default = list(
return null
var/dat = "<HEAD><TITLE>[src.name] Self-Diagnosis Report</TITLE></HEAD><BODY>\n"
for (var/V in components)
for(var/V in components)
var/datum/robot_component/C = components[V]
dat += "<b>[C.name]</b><br><table><tr><td>Power consumption</td><td>[C.energy_consumption]</td></tr><tr><td>Brute Damage:</td><td>[C.brute_damage]</td></tr><tr><td>Electronics Damage:</td><td>[C.electronics_damage]</td></tr><tr><td>Powered:</td><td>[(!C.energy_consumption || C.is_powered()) ? "Yes" : "No"]</td></tr><tr><td>Toggled:</td><td>[ C.toggled ? "Yes" : "No"]</td></table><br>"
dat += "<b>[C.name]</b><br><table><tr><td>Brute Damage:</td><td>[C.brute_damage]</td></tr><tr><td>Electronics Damage:</td><td>[C.electronics_damage]</td></tr><tr><td>Powered:</td><td>[C.is_powered() ? "Yes" : "No"]</td></tr><tr><td>Toggled:</td><td>[ C.toggled ? "Yes" : "No"]</td></table><br>"
return dat
@@ -467,7 +465,7 @@ var/list/robot_verbs_default = list(
src.verbs -= silicon_subsystems
/mob/living/silicon/robot/blob_act()
if (stat != 2)
if(stat != 2)
adjustBruteLoss(60)
updatehealth()
return 1
@@ -481,7 +479,7 @@ var/list/robot_verbs_default = list(
..()
if(ticker && ticker.mode.name == "AI malfunction")
var/datum/game_mode/malfunction/malf = ticker.mode
for (var/datum/mind/malfai in malf.malf_ai)
for(var/datum/mind/malfai in malf.malf_ai)
if(connected_ai)
if(connected_ai.mind == malfai)
if(malf.apcs >= 3)
@@ -495,7 +493,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/show_jetpack_pressure()
// if you have a jetpack, show the internal tank pressure
var/obj/item/weapon/tank/jetpack/current_jetpack = installed_jetpack()
if (current_jetpack)
if(current_jetpack)
stat("Internal Atmosphere Info", current_jetpack.name)
stat("Tank Pressure", current_jetpack.air_contents.return_pressure())
@@ -519,7 +517,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/Stat()
..()
statpanel("Status")
if (client.statpanel == "Status")
if(client.statpanel == "Status")
show_cell_power()
show_jetpack_pressure()
@@ -533,11 +531,11 @@ var/list/robot_verbs_default = list(
gib()
return
if(2.0)
if (stat != 2)
if(stat != 2)
adjustBruteLoss(60)
adjustFireLoss(60)
if(3.0)
if (stat != 2)
if(stat != 2)
adjustBruteLoss(30)
return
@@ -551,7 +549,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes)
spawn( 0 )
if ((!( yes ) || now_pushing))
if((!( yes ) || now_pushing))
return
now_pushing = 1
if(ismob(AM))
@@ -566,13 +564,13 @@ var/list/robot_verbs_default = list(
return
now_pushing = 0
..()
if (!istype(AM, /atom/movable))
if(!istype(AM, /atom/movable))
return
if (!now_pushing)
if(!now_pushing)
now_pushing = 1
if (!AM.anchored)
if(!AM.anchored)
var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window/full))
if(istype(AM, /obj/structure/window/full))
for(var/obj/structure/window/win in get_step(AM,t))
now_pushing = 0
return
@@ -582,7 +580,7 @@ var/list/robot_verbs_default = list(
return
/mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
if(istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do
return
if(opened) // Are they trying to insert something?
@@ -604,15 +602,15 @@ var/list/robot_verbs_default = list(
return
if (istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
if(W == module_active)
return
if (!getBruteLoss())
if(!getBruteLoss())
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
var/obj/item/weapon/weldingtool/WT = W
user.changeNext_move(CLICK_CD_MELEE)
if (WT.remove_fuel(0))
if(WT.remove_fuel(0))
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
adjustBruteLoss(-30)
updatehealth()
@@ -624,7 +622,7 @@ var/list/robot_verbs_default = list(
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == I_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
if (!getFireLoss())
if(!getFireLoss())
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
var/obj/item/stack/cable_coil/coil = W
@@ -634,7 +632,7 @@ var/list/robot_verbs_default = list(
coil.use(1)
user.visible_message("<span class='alert'>\The [user] fixes some of the burnt wires on \the [src] with \the [coil].</span>")
else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
else if(istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover
if(opened)
if(cell)
to_chat(user, "You close the cover.")
@@ -693,7 +691,7 @@ var/list/robot_verbs_default = list(
opened = 1
update_icons()
else if (istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
else if(istype(W, /obj/item/weapon/stock_parts/cell) && opened) // trying to put a cell inside
var/datum/robot_component/C = components["power cell"]
if(wiresexposed)
to_chat(user, "Close the panel first.")
@@ -713,8 +711,8 @@ var/list/robot_verbs_default = list(
C.electronics_damage = 0
diag_hud_set_borgcell()
else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
if (wiresexposed)
else if(istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool))
if(wiresexposed)
wires.Interact(user)
else
to_chat(user, "You can't reach the wiring.")
@@ -737,7 +735,7 @@ var/list/robot_verbs_default = list(
else
to_chat(user, "Unable to locate a radio.")
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/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)
@@ -847,28 +845,28 @@ var/list/robot_verbs_default = list(
to_chat(usr, "You unlock your cover.")
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if (!ticker)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if (istype(loc, /turf) && istype(loc.loc, /area/start))
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 (I_HELP)
if(I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
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 (I_GRAB)
if(I_GRAB)
grabbedby(M)
if (I_HARM)
if(I_HARM)
M.do_attack_animation(src)
var/damage = rand(10, 20)
if (prob(90))
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>")
@@ -881,10 +879,10 @@ var/list/robot_verbs_default = list(
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
if (I_DISARM)
if(I_DISARM)
if(!(lying))
M.do_attack_animation(src)
if (prob(85))
if(prob(85))
Stun(7)
step(src,get_dir(M,src))
spawn(5)
@@ -960,7 +958,7 @@ var/list/robot_verbs_default = list(
diag_hud_set_borgcell()
if(!opened && (!istype(user, /mob/living/silicon)))
if (user.a_intent == I_HELP)
if(user.a_intent == I_HELP)
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
@@ -992,7 +990,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/update_icons()
overlays.Cut()
if(stat != DEAD && !(paralysis || stunned || weakened)) //Not dead, not stunned.
if(stat != DEAD && !(paralysis || stunned || weakened || low_power_mode)) //Not dead, not stunned.
overlays += "eyes-[icon_state]"
else
overlays -= "eyes"
@@ -1015,7 +1013,7 @@ var/list/robot_verbs_default = list(
var/combat = list("Combat","Peacekeeper")
if(modtype in combat)
if (base_icon == "")
if(base_icon == "")
base_icon = icon_state
if(module_active && istype(module_active,/obj/item/borg/combat/mobility))
icon_state = "[base_icon]-roll"
@@ -1050,14 +1048,14 @@ var/list/robot_verbs_default = list(
<B>Installed Modules</B><BR><BR>
<table border='0'>"}
for (var/obj in module.modules)
if (!obj)
for(var/obj in module.modules)
if(!obj)
dat += text("<tr><td><B>Resource depleted</B></td></tr>")
else if(activated(obj))
dat += text("<tr><td>[obj]</td><td><B>Activated</B></td></tr>")
else
dat += text("<tr><td>[obj]</td><td><A HREF=?src=\ref[src];act=\ref[obj]>Activate</A></td></tr>")
if (emagged)
if(emagged)
if(activated(module.emag))
dat += text("<tr><td>[module.emag]</td><td><B>Activated</B></td></tr>")
else
@@ -1081,31 +1079,31 @@ var/list/robot_verbs_default = list(
if(usr != src)
return 1
if (href_list["mach_close"])
if(href_list["mach_close"])
var/t1 = text("window=[href_list["mach_close"]]")
unset_machine()
src << browse(null, t1)
return 1
if (href_list["showalerts"])
if(href_list["showalerts"])
subsystem_alarm_monitor()
return 1
if (href_list["mod"])
if(href_list["mod"])
var/obj/item/O = locate(href_list["mod"])
if (istype(O) && (O.loc == src))
if(istype(O) && (O.loc == src))
O.attack_self(src)
return 1
if (href_list["act"])
if(href_list["act"])
var/obj/item/O = locate(href_list["act"])
if (!istype(O) || !(O.loc == src || O.loc == src.module))
if(!istype(O) || !(O.loc == src || O.loc == src.module))
return 1
activate_module(O)
installed_modules()
if (href_list["deact"])
if(href_list["deact"])
var/obj/item/O = locate(href_list["deact"])
if(activated(O))
if(module_state_1 == O)
@@ -1130,7 +1128,7 @@ var/list/robot_verbs_default = list(
radio.interact(src)//Just use the radio's Topic() instead of bullshit special-snowflake code
/mob/living/silicon/robot/proc/control_headlamp()
if(stat || lamp_recharging)
if(stat || lamp_recharging || low_power_mode)
to_chat(src, "<span class='danger'>This function is currently offline.</span>")
return
@@ -1142,7 +1140,7 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/proc/update_headlamp(var/turn_off = 0, var/cooldown = 100)
set_light(0)
if(lamp_intensity && (turn_off || stat))
if(lamp_intensity && (turn_off || stat || low_power_mode))
to_chat(src, "<span class='danger'>Your headlamp has been deactivated.</span>")
lamp_intensity = 0
lamp_recharging = 1
@@ -1173,7 +1171,7 @@ var/list/robot_verbs_default = list(
var/turf/tile = loc
if(isturf(tile))
tile.clean_blood()
if (istype(tile, /turf/simulated))
if(istype(tile, /turf/simulated))
var/turf/simulated/S = tile
S.dirt = 0
for(var/A in tile)
@@ -1246,7 +1244,7 @@ var/list/robot_verbs_default = list(
set src = usr
var/obj/item/W = get_active_hand()
if (W)
if(W)
W.attack_self(src)
return
@@ -1271,7 +1269,7 @@ var/list/robot_verbs_default = list(
var/icontype
if (custom_sprite == 1)
if(custom_sprite == 1)
icontype = "Custom"
triesleft = 0
else
@@ -1292,7 +1290,7 @@ var/list/robot_verbs_default = list(
update_icons()
if (triesleft >= 1)
if(triesleft >= 1)
var/choice = input("Look at your icon - is this what you want?") in list("Yes","No")
if(choice=="No")
choose_icon(triesleft, module_sprites)
@@ -1329,7 +1327,7 @@ var/list/robot_verbs_default = list(
sync()
/mob/living/silicon/robot/adjustOxyLoss(var/amount)
if (suiciding)
if(suiciding)
..()
/mob/living/silicon/robot/regenerate_icons()
@@ -1470,3 +1468,11 @@ var/list/robot_verbs_default = list(
status_flags &= ~CANPUSH
notify_ai(2)
/mob/living/silicon/robot/emp_act(severity)
..()
switch(severity)
if(1)
disable_component("comms", 160)
if(2)
disable_component("comms", 60)
@@ -4,7 +4,7 @@
stat = CONSCIOUS
return
health = maxHealth - (getOxyLoss() + getFireLoss() + getBruteLoss())
if (stat == DEAD && health > 0)
if(stat == DEAD && health > 0)
update_revive()
var/mob/dead/observer/ghost = get_ghost()
if(ghost)
@@ -17,7 +17,7 @@
select_colour(user)
if("Mode")
if (mode == 1)
if(mode == 1)
mode = 2
else
mode = 1
@@ -30,10 +30,10 @@
// see code\modules\paperwork\paper.dm line 62
/obj/item/weapon/pen/multi/robopen/proc/RenamePaper(mob/user as mob,obj/paper as obj)
if ( !user || !paper )
if( !user || !paper )
return
var/n_name = input(user, "What would you like to label the paper?", "Paper Labelling", null) as text
if ( !user || !paper )
if( !user || !paper )
return
n_name = copytext(n_name, 1, 32)
@@ -87,7 +87,7 @@
set src in range(0)
var/N = input("How much damage should the shield absorb?") in list("5","10","25","50","75","100")
if (N)
if(N)
shield_level = text2num(N)/100
/obj/item/borg/combat/mobility
@@ -2,7 +2,7 @@
name = "robot module"
icon = 'icons/obj/module.dmi'
icon_state = "std_module"
w_class = 100.0
w_class = 100
item_state = "electronic"
flags = CONDUCT
@@ -230,7 +230,7 @@
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/weapon/soap/nanotrasen(src)
src.modules += new /obj/item/weapon/storage/bag/trash/cyborg(src)
src.modules += new /obj/item/weapon/mop(src)
src.modules += new /obj/item/weapon/mop/advanced/cyborg(src)
src.modules += new /obj/item/device/lightreplacer(src)
src.modules += new /obj/item/weapon/holosign_creator(src)
src.emag = new /obj/item/weapon/reagent_containers/spray(src)
@@ -507,7 +507,7 @@
//checks whether this item is a module of the robot it is located in.
/obj/item/proc/is_robot_module()
if (!istype(src.loc, /mob/living/silicon/robot))
if(!istype(src.loc, /mob/living/silicon/robot))
return 0
var/mob/living/silicon/robot/R = src.loc

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