Merge branch 'master' into shep-dev-upstream-screenport

This commit is contained in:
Rykka Stormheart
2020-05-30 06:54:08 -04:00
committed by GitHub
392 changed files with 2445 additions and 2293 deletions
+1 -3
View File
@@ -91,8 +91,6 @@
var/track = null
if(isobserver(src))
if(italics && is_preference_enabled(/datum/client_preference/ghost_radio))
return
if(speaker_name != speaker.real_name && speaker.real_name)
speaker_name = "[speaker.real_name] ([speaker_name])"
track = "([ghost_follow_link(speaker, src)]) "
@@ -281,4 +279,4 @@
name = speaker.voice_name
var/rendered = "<span class='game say'><span class='name'>[name]</span> [message]</span>"
to_chat(src, rendered)
to_chat(src, rendered)
+1 -1
View File
@@ -40,7 +40,7 @@
if(emagged)
projectile = /obj/item/projectile/beam/shock
playsound(loc, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
playsound(src, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src
+2 -2
View File
@@ -22,7 +22,7 @@
/mob/living/bot/cleanbot/handleIdle()
if(!screwloose && !oddbutton && prob(2))
custom_emote(2, "makes an excited booping sound!")
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(screwloose && prob(5)) // Make a mess
if(istype(loc, /turf/simulated))
@@ -179,7 +179,7 @@
if(!screwloose || !oddbutton)
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
oddbutton = 1
screwloose = 1
return 1
+1 -1
View File
@@ -65,7 +65,7 @@
if(emagged)
projectile = /obj/item/projectile/beam
playsound(loc, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
playsound(src, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src
+2 -2
View File
@@ -27,7 +27,7 @@
/mob/living/bot/cleanbot/edCLN/handleIdle()
if(prob(10))
custom_emote(2, "makes a less than thrilled beeping sound.")
playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged)
if(istype(loc, /turf/simulated))
@@ -124,7 +124,7 @@
if(!emagged)
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
emagged = 1
return 1
+2 -2
View File
@@ -180,7 +180,7 @@
busy = 1
if(do_after(src, 30, A))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
visible_message("<span class='notice'>[src] waters \the [A].</span>")
tank.reagents.trans_to(T, 100 - T.waterlevel)
if(FARMBOT_UPROOT)
@@ -218,7 +218,7 @@
while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume)
tank.reagents.add_reagent("water", 10)
if(prob(5))
playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
playsound(src, 'sound/effects/slosh.ogg', 25, 1)
busy = 0
action = ""
+3 -3
View File
@@ -58,7 +58,7 @@
emagged = 1
if(user)
to_chat(user, "<span class='notice'>The [src] buzzes and beeps.</span>")
playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
return 1
/mob/living/bot/floorbot/Topic(href, href_list)
@@ -102,7 +102,7 @@
if(prob(1))
custom_emote(2, "makes an excited beeping sound!")
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
/mob/living/bot/floorbot/handleAdjacentTarget()
if(get_turf(target) == src.loc)
@@ -278,7 +278,7 @@
/mob/living/bot/floorbot/explode()
turn_off()
visible_message("<span class='danger'>\The [src] blows apart!</span>")
playsound(src.loc, "sparks", 50, 1)
playsound(src, "sparks", 50, 1)
var/turf/Tsec = get_turf(src)
var/obj/item/weapon/storage/toolbox/mechanical/N = new /obj/item/weapon/storage/toolbox/mechanical(Tsec)
+5 -5
View File
@@ -44,7 +44,7 @@
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
playsound(src, message_options[message], 50, 0)
/mob/living/bot/medbot/handleAdjacentTarget()
UnarmedAttack(target)
@@ -88,7 +88,7 @@
)
var/message = pick(message_options)
say(message)
playsound(loc, message_options[message], 50, 0)
playsound(src, message_options[message], 50, 0)
custom_emote(1, "points at [H.name].")
last_newpatient_speak = world.time
break
@@ -133,7 +133,7 @@
)
var/message = pick(death_messages)
say(message)
playsound(loc, death_messages[message], 50, 0)
playsound(src, death_messages[message], 50, 0)
// This is down here for the same reason as above.
else
@@ -148,7 +148,7 @@
)
var/message = pick(possible_messages)
say(message)
playsound(loc, possible_messages[message], 50, 0)
playsound(src, possible_messages[message], 50, 0)
busy = 0
update_icons()
@@ -293,7 +293,7 @@
reagent_glass = null
if(emagged && prob(25))
playsound(loc, 'sound/voice/medbot/minsult.ogg', 50, 0)
playsound(src, 'sound/voice/medbot/minsult.ogg', 50, 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
+5 -5
View File
@@ -183,7 +183,7 @@
locked = !locked
to_chat(user, "<span class='notice'>You [locked ? "lock" : "unlock"] the mulebot's controls!</span>")
flick("mulebot-emagged", src)
playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
playsound(src, 'sound/effects/sparks1.ogg', 100, 0)
return 1
/mob/living/bot/mulebot/update_icons()
@@ -202,13 +202,13 @@
/mob/living/bot/mulebot/handleFrustrated()
custom_emote(2, "makes a sighing buzz.")
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
..()
/mob/living/bot/mulebot/handleAdjacentTarget()
if(target == src.loc)
custom_emote(2, "makes a chiming sound.")
playsound(loc, 'sound/machines/chime.ogg', 50, 0)
playsound(src, 'sound/machines/chime.ogg', 50, 0)
UnarmedAttack(target)
resetTarget()
if(auto_return && home && (loc != home))
@@ -244,7 +244,7 @@
/mob/living/bot/mulebot/proc/runOver(var/mob/living/carbon/human/H)
if(istype(H)) // No safety checks - WILL run over lying humans. Stop ERPing in the maint!
visible_message("<span class='warning'>[src] drives over [H]!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/damage = rand(5, 7)
H.apply_damage(2 * damage, BRUTE, BP_HEAD)
@@ -298,7 +298,7 @@
if(crates_only && !istype(C,/obj/structure/closet/crate))
custom_emote(2, "makes a sighing buzz.")
playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
var/obj/structure/closet/crate/crate = C
+8 -8
View File
@@ -158,7 +158,7 @@
return
if(!target)
playsound(src.loc, pick(threat_found_sounds), 50)
playsound(src, pick(threat_found_sounds), 50)
global_announcer.autosay("[src] was attacked by a hostile <b>[target_name(attacker)]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
target = attacker
attacked = TRUE
@@ -169,7 +169,7 @@
if(declare_arrests)
global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect <b>[suspect_name]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME*2] seconds to comply.")
playsound(src.loc, pick(preparing_arrest_sounds), 50)
playsound(src, pick(preparing_arrest_sounds), 50)
// Register to be told when the target moves
GLOB.moved_event.register(target, src, /mob/living/bot/secbot/proc/target_moved)
@@ -207,7 +207,7 @@
awaiting_surrender = 0
say("Level [threat] infraction alert!")
custom_emote(1, "points at [M.name]!")
playsound(src.loc, pick(threat_found_sounds), 50)
playsound(src, pick(threat_found_sounds), 50)
return
/mob/living/bot/secbot/handleAdjacentTarget()
@@ -256,10 +256,10 @@
if(can_next_insult > world.time)
return
if(threat >= 10)
playsound(src.loc, 'sound/voice/binsult.ogg', 75)
playsound(src, 'sound/voice/binsult.ogg', 75)
can_next_insult = world.time + 20 SECONDS
else
playsound(src.loc, pick(fighting_sounds), 75)
playsound(src, pick(fighting_sounds), 75)
can_next_insult = world.time + 5 SECONDS
@@ -278,7 +278,7 @@
cuff = FALSE
if(!cuff)
H.stun_effect_act(0, stun_strength, null)
playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1, -1)
do_attack_animation(H)
busy = TRUE
update_icons()
@@ -288,7 +288,7 @@
visible_message("<span class='warning'>\The [H] was prodded by \the [src] with a stun baton!</span>")
insult(H)
else
playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
playsound(src, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
visible_message("<span class='warning'>\The [src] is trying to put handcuffs on \the [H]!</span>")
busy = TRUE
if(do_mob(src, H, 60))
@@ -303,7 +303,7 @@
var/mob/living/L = M
L.adjustBruteLoss(xeno_harm_strength)
do_attack_animation(M)
playsound(loc, "swing_hit", 50, 1, -1)
playsound(src, "swing_hit", 50, 1, -1)
busy = TRUE
update_icons()
spawn(2)
@@ -25,7 +25,7 @@
LAssailant = M
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<font color='red'>[] has grabbed [] passively!</font>", M, src), 1)
@@ -40,7 +40,7 @@
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
playsound(src, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<font color='red'><B>[] has punched []!</B></font>", M, src), 1)
@@ -52,7 +52,7 @@
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<font color='red'><B>[] has attempted to punch []!</B></font>", M, src), 1)
@@ -98,7 +98,7 @@
m_type = 2
if("chirp")
message = "<B>[src]</B> chirps!"
playsound(loc, 'sound/misc/nymphchirp.ogg', 50, 0)
playsound(src, 'sound/misc/nymphchirp.ogg', 50, 0)
m_type = 2
if("help")
to_chat(src, "<span class='filter_say'>burp, chirp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper</span>")
+6 -7
View File
@@ -65,7 +65,7 @@
else
src.take_organ_damage(d)
user.visible_message("<span class='danger'>[user] attacks [src]'s stomach wall with the [I.name]!</span>")
playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
playsound(user, 'sound/effects/attackblob.ogg', 50, 1)
if(prob(src.getBruteLoss() - 50))
for(var/atom/movable/A in stomach_contents)
@@ -110,7 +110,7 @@
src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
playsound(loc, "sparks", 50, 1, -1)
playsound(src, "sparks", 50, 1, -1)
if (shock_damage > 15)
src.visible_message(
"<span class='warning'>[src] was electrocuted[source ? " by the [source]" : ""]!</span>", \
@@ -198,7 +198,7 @@
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
H.play_xylophone()
else if (on_fire)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if (M.on_fire)
M.visible_message("<span class='warning'>[M] tries to pat out [src]'s flames, but to no avail!</span>",
"<span class='warning'>You try to pat out [src]'s flames, but to no avail! Put yourself out first!</span>")
@@ -265,7 +265,7 @@
AdjustStunned(-3)
AdjustWeakened(-3)
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
/mob/living/carbon/proc/eyecheck()
return 0
@@ -315,8 +315,7 @@
legcuffed = null
update_inv_legcuffed()
else
..()
..()
//generates realistic-ish pulse output based on preset levels
/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
@@ -365,7 +364,7 @@
return 0
stop_pulling()
to_chat(src, "<span class='warning'>You slipped on [slipped_on]!</span>")
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
Weaken(FLOOR(stun_duration/2, 1))
return 1
@@ -92,7 +92,7 @@
user.visible_message("<span class='danger'>\The [user] cut [src]'s neck with \the [W]!</span>")
if(W.hitsound)
playsound(loc, W.hitsound, 50, 1, -1)
playsound(src, W.hitsound, 50, 1, -1)
G.last_action = world.time
flick(G.hud.icon_state, G.hud)
@@ -112,7 +112,7 @@
apply_damage(damage, W.damtype, "torso", 0, sharp=W.sharp, edge=W.edge)
if(W.hitsound)
playsound(loc, W.hitsound, 50, 1, -1)
playsound(src, W.hitsound, 50, 1, -1)
add_attack_logs(user,src,"Knifed (shanked)")
@@ -87,7 +87,7 @@
to_chat(O, "<span class='deadsay'><b>[src]</b> has died in <b>[get_area(src)]</b>. [ghost_follow_link(src, O)] </span>")
if(!gibbed && species.death_sound)
playsound(loc, species.death_sound, 80, 1, 1)
playsound(src, species.death_sound, 80, 1, 1)
if(ticker && ticker.mode)
sql_report_death(src)
+13 -13
View File
@@ -75,7 +75,7 @@
message = "[display_msg] at [param]."
else
message = "[display_msg]."
playsound(src.loc, use_sound, 50, 0)
playsound(src, use_sound, 50, 0)
m_type = 1
//Promethean-only emotes
@@ -84,7 +84,7 @@
to_chat(src, "<span class='warning'>You are not a slime thing!</span>")
return
playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
playsound(src, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
message = "squishes."
m_type = 1
@@ -94,7 +94,7 @@
to_chat(src, "<span class='warning'>You are not a Skrell!</span>")
return
playsound(src.loc, 'sound/effects/warble.ogg', 50, 0) // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound.
playsound(src, 'sound/effects/warble.ogg', 50, 0) // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound.
message = "warbles."
m_type = 2
@@ -186,7 +186,7 @@
if("clap")
if(!src.restrained())
message = "claps."
playsound(src.loc, 'sound/misc/clapping.ogg')
playsound(src, 'sound/misc/clapping.ogg')
m_type = 2
if(miming)
m_type = 1
@@ -267,7 +267,7 @@
use_sound = pick('sound/effects/mob_effects/f_machine_cougha.ogg','sound/effects/mob_effects/f_machine_coughb.ogg')
else
use_sound = pick('sound/effects/mob_effects/m_machine_cougha.ogg','sound/effects/mob_effects/m_machine_coughb.ogg', 'sound/effects/mob_effects/m_machine_coughc.ogg')
playsound(src.loc, use_sound, 50, 0)
playsound(src, use_sound, 50, 0)
else
message = "makes a strong noise."
m_type = 2
@@ -540,7 +540,7 @@
use_sound = 'sound/effects/mob_effects/machine_sneeze.ogg'
else
use_sound = 'sound/effects/mob_effects/f_machine_sneeze.ogg'
playsound(src.loc, use_sound, 50, 0)
playsound(src, use_sound, 50, 0)
else
message = "makes a strange noise."
m_type = 2
@@ -653,14 +653,14 @@
break
if(M)
message = "<span class='danger'>slaps [M] across the face. Ouch!</span>"
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
if(ishuman(M)) //Snowflakey!
var/mob/living/carbon/human/H = M
if(istype(H.wear_mask,/obj/item/clothing/mask/smokable))
H.drop_from_inventory(H.wear_mask)
else
message = "<span class='danger'>slaps [T.himself]!</span>"
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
if("scream", "screams")
if(miming)
@@ -672,9 +672,9 @@
m_type = 2
/* Removed, pending the location of some actually good, properly licensed sounds.
if(get_gender() == FEMALE)
playsound(loc, "[species.female_scream_sound]", 80, 1)
playsound(src, "[species.female_scream_sound]", 80, 1)
else
playsound(loc, "[species.male_scream_sound]", 80, 1) //default to male screams if no gender is present.
playsound(src, "[species.male_scream_sound]", 80, 1) //default to male screams if no gender is present.
*/
else
message = "makes a very loud noise."
@@ -697,7 +697,7 @@
return
message = "snaps [T.his] fingers."
playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3)
playsound(src, 'sound/effects/fingersnap.ogg', 50, 1, -3)
if("swish")
src.animate_tail_once()
@@ -721,14 +721,14 @@
if("whistle" || "whistles")
if(!muzzled)
message = "whistles a tune."
playsound(loc, 'sound/misc/longwhistle.ogg') //praying this doesn't get abused
playsound(src, 'sound/misc/longwhistle.ogg') //praying this doesn't get abused
else
message = "makes a light spitting noise, a poor attempt at a whistle."
if("qwhistle")
if(!muzzled)
message = "whistles quietly."
playsound(loc, 'sound/misc/shortwhistle.ogg')
playsound(src, 'sound/misc/shortwhistle.ogg')
else
message = "makes a light spitting noise, a poor attempt at a whistle."
@@ -747,7 +747,7 @@
var/datum/gender/T = gender_datums[get_visible_gender()]
visible_message("<font color='red'>\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.</font>","<font color='blue'>You begin to play a spooky refrain on your ribcage.</font>","<font color='red'>You hear a spooky xylophone melody.</font>")
var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg')
playsound(loc, song, 50, 1, -1)
playsound(src, song, 50, 1, -1)
xylophone = 1
spawn(1200)
xylophone=0
@@ -38,7 +38,7 @@
var/hit_zone = get_zone_with_miss_chance(H.zone_sel.selecting, src, H.get_accuracy_penalty())
if(!hit_zone)
H.do_attack_animation(src)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<font color='red'><B>[H] reaches for [src], but misses!</B></font>")
return FALSE
@@ -111,7 +111,7 @@
LAssailant = M
H.do_attack_animation(src)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed [src][(M.zone_sel.selecting == "l_hand" || M.zone_sel.selecting == "r_hand")? " by their hands!":" passively!"]</span>")
return TRUE
@@ -220,7 +220,7 @@
else
H.visible_message("<span class='danger'>[attack_message]</span>")
playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
playsound(src, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
add_attack_logs(H,src,"Melee attacked with fists (miss/block)")
@@ -286,7 +286,7 @@
if((shoes || !(species.flags & NO_SLIP)) && randn <= 25)
var/armor_check = run_armor_check(affecting, "melee")
apply_effect(3, WEAKEN, armor_check)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 60)
visible_message("<span class='danger'>[M] has pushed [src]!</span>")
else
@@ -296,7 +296,7 @@
if(randn <= 60)
//See about breaking grips or pulls
if(break_all_grabs(M))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
//Actually disarm them
@@ -304,10 +304,10 @@
if(I)
drop_from_inventory(I)
visible_message("<span class='danger'>[M] has disarmed [src]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<font color='red'> <B>[M] attempted to disarm [src]!</B></font>")
return
@@ -227,7 +227,7 @@ emp_act
if(!hit_zone)
user.do_attack_animation(src)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>\The [user] misses [src] with \the [I]!</span>")
return null
@@ -72,7 +72,7 @@
else
failed = 1
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/pierce.ogg', 25, 1, -1)
if(failed)
src.Weaken(rand(2,4))
@@ -92,4 +92,4 @@
/datum/unarmed_attack/stomp/weak/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] jumped up and down on \the [target]'s [affecting.name]!</span>")
playsound(user.loc, attack_sound, 25, 1, -1)
playsound(user, attack_sound, 25, 1, -1)
@@ -15,7 +15,6 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 3 //note: can be picked up by aliens unlike most other items of w_class below 4
flags = PROXMOVE
body_parts_covered = FACE|EYES
throw_range = 5
@@ -144,7 +144,7 @@
P.firer = src
P.old_style_target(A)
P.fire()
playsound(loc, 'sound/weapons/pierce.ogg', 25, 0)
playsound(src, 'sound/weapons/pierce.ogg', 25, 0)
else
..()
@@ -295,7 +295,7 @@
src.visible_message("<span class='danger'>\The [src] leaps at [T]!</span>")
src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src)
playsound(src.loc, 'sound/voice/hiss5.ogg', 50, 1)
playsound(src, 'sound/voice/hiss5.ogg', 50, 1)
sleep(5)
@@ -91,7 +91,7 @@ var/global/list/sparring_attack_cache = list()
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.name]!</span>")
playsound(user.loc, attack_sound, 25, 1, -1)
playsound(user, attack_sound, 25, 1, -1)
/datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target)
var/obj/item/organ/internal/eyes/eyes = target.internal_organs_by_name[O_EYES]
+32 -9
View File
@@ -81,7 +81,7 @@ default behaviour is:
return 0
/mob/living/Bump(atom/movable/AM)
if(now_pushing || !loc)
if(now_pushing || !loc || buckled == AM)
return
now_pushing = 1
if (istype(AM, /mob/living))
@@ -165,7 +165,7 @@ default behaviour is:
if (!istype(AM, /atom/movable) || AM.anchored)
if(confused && prob(50) && m_intent=="run")
Weaken(2)
playsound(loc, "punch", 25, 1, -1)
playsound(src, "punch", 25, 1, -1)
visible_message("<span class='warning'>[src] [pick("ran", "slammed")] into \the [AM]!</span>")
src.apply_damage(5, BRUTE)
to_chat(src, "<span class='warning'>You just [pick("ran", "slammed")] into \the [AM]!</span>")
@@ -774,19 +774,18 @@ default behaviour is:
handle_footstep(loc)
if(pulling) // we were pulling a thing and didn't lose it during our move.
var/pull_dir = get_dir(src, pulling)
if(pulling.anchored || !isturf(pulling.loc))
stop_pulling()
return
var/pull_dir = get_dir(src, pulling)
if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
else if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
// If it is too far away or across z-levels from old location, stop pulling.
if(get_dist(pulling.loc, oldloc) > 1 || pulling.loc.z != oldloc?.z)
stop_pulling()
return
// living might take damage from drags
if(isliving(pulling))
else if(isliving(pulling))
var/mob/living/M = pulling
M.dragged(src, oldloc)
@@ -794,6 +793,30 @@ default behaviour is:
if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up
stop_pulling()
if(!isturf(loc))
return
else if(lastarea?.has_gravity == 0)
inertial_drift()
else if(!isspace(loc))
inertia_dir = 0
make_floating(0)
/mob/living/proc/inertial_drift()
if(x > 1 && x < (world.maxx) && y > 1 && y < (world.maxy))
if(Process_Spacemove(1))
inertia_dir = 0
return
var/locthen = loc
spawn(5)
if(!anchored && !pulledby && loc == locthen)
var/stepdir = inertia_dir ? inertia_dir : last_move
if(!stepdir)
return
var/turf/T = get_step(src, stepdir)
if(!T)
return
Move(T, stepdir, 5)
/mob/living/proc/handle_footstep(turf/T)
return FALSE
@@ -955,7 +978,7 @@ default behaviour is:
Stun(5)
src.visible_message("<span class='warning'>[src] throws up!</span>","<span class='warning'>You throw up!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs
if(istype(T))
+1 -1
View File
@@ -209,7 +209,7 @@
damage *= 0.66 // Take 2/3s as much damage.
visible_message("<span class='danger'>\The [B] [attack_verb] \the [src]!</span>", "<span class='danger'>[attack_message]!</span>")
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
//Armor
var/soaked = get_armor_soak(def_zone, armor_check, armor_pen)
+6 -6
View File
@@ -23,7 +23,7 @@
message = "<b>[src]</b> beeps at [param]."
else
message = "<b>[src]</b> beeps."
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 1
if("ping")
@@ -40,7 +40,7 @@
message = "<b>[src]</b> pings at [param]."
else
message = "<b>[src]</b> pings."
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
playsound(src, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
@@ -57,7 +57,7 @@
message = "<b>[src]</b> buzzes at [param]."
else
message = "<b>[src]</b> buzzes."
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if("yes", "ye")
@@ -74,7 +74,7 @@
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)
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 1
if("dwoop")
@@ -90,7 +90,7 @@
message = "<b>[src]</b> chirps happily at [param]"
else
message = "<b>[src]</b> chirps happily."
playsound(src.loc, 'sound/machines/dwoop.ogg', 50, 0)
playsound(src, 'sound/machines/dwoop.ogg', 50, 0)
m_type = 1
if("no")
@@ -107,7 +107,7 @@
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)
playsound(src, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 1
..(act, m_type, message)
+1 -1
View File
@@ -8,7 +8,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("<font color='red'>The data cable rapidly retracts back into its spool.</font>", 3, "<font color='red'>You hear a click and the sound of wire spooling rapidly.</font>", 2)
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
playsound(src, 'sound/machines/click.ogg', 50, 1)
qdel(src.cable)
src.cable = null
@@ -127,7 +127,7 @@ var/list/mob_hat_cache = list()
if(!module) module = new module_type(src)
flavor_text = "It's a tiny little repair drone. The casing is stamped with an corporate logo and the subscript: '[using_map.company_name] Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
//Redefining some robot procs...
/mob/living/silicon/robot/drone/SetName(pickedName as text)
@@ -123,7 +123,7 @@
if(istype(module,/obj/item/weapon/robot_module/robot/security))
message = "<b>[src]</b> shows its legal authorization barcode."
playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
playsound(src, 'sound/voice/biamthelaw.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not THE LAW, pal.")
@@ -132,7 +132,7 @@
if(istype(module,/obj/item/weapon/robot_module/robot/security))
message = "<b>[src]</b> <B>'s</B> speakers skreech, \"Halt! Security!\"."
playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
playsound(src, 'sound/voice/halt.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not security.")
@@ -27,7 +27,7 @@
if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y
to_chat(user, "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down.")
flick("portable_analyzer_scan", src)
playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
playsound(src, 'sound/items/Welder2.ogg', 50, 1)
for(var/T in loaded_item.origin_tech)
files.UpdateTech(T, loaded_item.origin_tech[T])
to_chat(user, "\The [loaded_item] had level [loaded_item.origin_tech[T]] in [CallTechName(T)].")
@@ -63,10 +63,10 @@
files.RefreshResearch()
if(success)
to_chat(user, "You connect to the research server, push your data upstream to it, then pull the resulting merged data from the master branch.")
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "Reserch server ping response timed out. Unable to connect. Please contact the system administrator.")
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
playsound(src, 'sound/machines/buzz-two.ogg', 50, 1)
if(response == "Eject")
if(loaded_item)
loaded_item.loc = get_turf(src)
@@ -276,7 +276,7 @@
var/choice = input("Would you like to change colour or mode?") as null|anything in list("Colour","Mode")
if(!choice) return
playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
playsound(src, 'sound/effects/pop.ogg', 50, 0)
switch(choice)
@@ -486,7 +486,7 @@
return
stored_doors++
qdel(A)
playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("\The [user] deflates \the [A] with \the [src]!")
return
if(istype(A, /obj/item/inflatable))
@@ -17,9 +17,9 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
/mob/living/silicon/robot/proc/post_mmi_setup()
if(istype(mmi, /obj/item/device/mmi/inert/ai_remote))
make_shell()
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
else
playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
playsound(src, 'sound/voice/liveagain.ogg', 75, 1)
return
/mob/living/silicon/robot/proc/make_shell()
@@ -24,4 +24,4 @@
laws = new /datum/ai_laws/gravekeeper()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
@@ -21,7 +21,7 @@
if(!cell)
cell = new /obj/item/weapon/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface.
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/lost/speech_bubble_appearance()
return "synthetic_evil"
@@ -25,7 +25,7 @@
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/syndicate/protector/init()
..()
@@ -25,4 +25,4 @@
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+1 -1
View File
@@ -143,7 +143,7 @@
if(do_after(src, reload_time))
if(reload_sound)
playsound(src.loc, reload_sound, 50, 1)
playsound(src, reload_sound, 50, 1)
reload_count = 0
. = TRUE
else
@@ -163,7 +163,7 @@
return 0
apply_damage(damage = shock_damage, damagetype = BURN, def_zone = null, blocked = null, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE)
playsound(loc, "sparks", 50, 1, -1)
playsound(src, "sparks", 50, 1, -1)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, loc)
@@ -104,7 +104,7 @@
var/mob/living/L = A
L.Weaken(cloaked_weaken_amount)
to_chat(L, span("danger", "\The [src] ambushes you!"))
playsound(L, 'sound/weapons/spiderlunge.ogg', 75, 1)
playsound(src, 'sound/weapons/spiderlunge.ogg', 75, 1)
uncloak()
..() // For the poison.
@@ -115,7 +115,7 @@
continue
visible_message(span("danger","\The [src] erupts from underneath, and hits \the [L]!"))
playsound(L, 'sound/weapons/heavysmash.ogg', 75, 1)
playsound(src, 'sound/weapons/heavysmash.ogg', 75, 1)
L.Weaken(3)
overshoot = FALSE
@@ -164,7 +164,7 @@
// Stun anyone in our way.
for(var/mob/living/L in T)
playsound(L, 'sound/weapons/heavysmash.ogg', 75, 1)
playsound(src, 'sound/weapons/heavysmash.ogg', 75, 1)
L.Weaken(2)
// Get into the tile.
@@ -93,7 +93,7 @@
var/was_stunned = L.incapacitated(INCAPACITATION_DISABLED)
L.Weaken(weaken_amount)
playsound(L, 'sound/effects/break_stone.ogg', 75, 1)
playsound(src, 'sound/effects/break_stone.ogg', 75, 1)
if(was_stunned) // Try to prevent chain-stuns by having them thrown.
var/throwdir = get_dir(src, L)
L.throw_at(get_edge_target_turf(L, throwdir), 5, 1, src)
@@ -56,7 +56,7 @@
/mob/living/simple_mob/illusion/attack_hand(mob/living/carbon/human/M)
if(!realistic)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("warning", "\The [M]'s hand goes through \the [src]!"))
return
else
@@ -67,10 +67,10 @@
span("notice", "\The [M] hugs [src] to make [T.him] feel better!"), \
span("notice", "You hug [src] to make [T.him] feel better!")
) // slightly redundant as at the moment most mobs still use the normal gender var, but it works and future-proofs it
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(I_DISARM)
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("danger", "\The [M] attempted to disarm [src]!"))
M.do_attack_animation(src)
@@ -86,7 +86,7 @@
if(realistic)
return ..()
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("warning", "\The [user]'s [I] goes through \the [src]!"))
return FALSE
@@ -152,7 +152,7 @@
visible_message(span("warning", "\The [src] creates \an [energy_ball] around itself!"))
playsound(src.loc, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
playsound(src, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
// Shock nearby things that aren't ourselves.
for(var/i = 1 to 10)
@@ -179,7 +179,7 @@
// Shoot a tesla bolt, and flashes people who are looking at the mecha without sufficent eye protection.
visible_message(span("warning", "\The [energy_ball] explodes in a flash of light, sending a shock everywhere!"))
playsound(src.loc, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
playsound(src, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
tesla_zap(src.loc, 5, ELECTRIC_ZAP_POWER, FALSE)
for(var/mob/living/L in viewers(src))
if(L == src)
@@ -38,6 +38,6 @@
/mob/living/simple_mob/animal/space/tree/death()
..(null,"is hacked into pieces!")
playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
new /obj/item/stack/material/wood(loc)
qdel(src)
@@ -69,7 +69,7 @@
sharp = TRUE
/obj/item/projectile/icicle/on_impact(atom/A)
playsound(get_turf(A), "shatter", 70, 1)
playsound(A, "shatter", 70, 1)
return ..()
/obj/item/projectile/icicle/get_structure_damage()
@@ -1,217 +1,217 @@
// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
/mob/living/simple_mob/slime
name = "slime"
desc = "It's a slime."
tt_desc = "A Macrolimbus vulgaris"
icon = 'icons/mob/slime2.dmi'
icon_state = "slime baby"
icon_living = "slime baby"
icon_dead = "slime baby dead"
var/shiny = FALSE // If true, will add a 'shiny' overlay.
var/icon_state_override = null // Used for special slime appearances like the rainbow slime.
color = "#CACACA"
glow_range = 3
glow_intensity = 2
gender = NEUTER
faction = "slime" // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified).
maxHealth = 150
movement_cooldown = 0
pass_flags = PASSTABLE
makes_dirt = FALSE // Goop
mob_class = MOB_CLASS_SLIME
response_help = "pets"
// Atmos stuff.
minbodytemp = T0C-30
heat_damage_per_tick = 0
cold_damage_per_tick = 40
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
shock_resist = 0.5 // Slimes are resistant to electricity, and it actually charges them.
taser_kill = FALSE
water_resist = 0 // Slimes are very weak to water.
melee_damage_lower = 10
melee_damage_upper = 15
base_attack_cooldown = 10 // One attack a second.
attack_sound = 'sound/weapons/bite.ogg'
attacktext = list("glomped")
speak_emote = list("chirps")
friendly = list("pokes")
ai_holder_type = /datum/ai_holder/simple_mob/melee
say_list_type = /datum/say_list/slime
var/cores = 1 // How many cores you get when placed in a Processor.
var/obj/item/clothing/head/hat = null // The hat the slime may be wearing.
var/slime_color = "grey" // Used for updating the name and for slime color-ism.
var/unity = FALSE // If true, slimes will consider other colors as their own. Other slimes will see this slime as the same color as well.
var/coretype = /obj/item/slime_extract/grey // What core is inside the slime, and what you get from the processor.
var/reagent_injected = null // Some slimes inject reagents on attack. This tells the game what reagent to use.
var/injection_amount = 5 // This determines how much.
var/mood = ":3" // Icon to use to display 'mood', as an overlay.
can_enter_vent_with = list(/obj/item/clothing/head)
/datum/say_list/slime
speak = list("Blorp...", "Blop...")
emote_see = list("bounces", "jiggles", "sways")
emote_hear = list("squishes")
/mob/living/simple_mob/slime/Initialize()
verbs += /mob/living/proc/ventcrawl
update_mood()
glow_color = color
handle_light()
update_icon()
return ..()
/mob/living/simple_mob/slime/Destroy()
if(hat)
drop_hat()
return ..()
/mob/living/simple_mob/slime/death()
// Make dead slimes stop glowing.
glow_toggle = FALSE
handle_light()
..()
/mob/living/simple_mob/slime/revive()
// Make revived slimes resume glowing.
glow_toggle = initial(glow_toggle)
handle_light()
..()
/mob/living/simple_mob/slime/update_icon()
..() // Do the regular stuff first.
if(stat != DEAD)
// General slime shine.
var/image/I = image(icon, src, "slime light")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// 'Shiny' overlay, for gemstone-slimes.
if(shiny)
I = image(icon, src, "slime shiny")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Mood overlay.
I = image(icon, src, "aslime-[mood]")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Hat simulator.
if(hat)
var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
var/image/I = image('icons/mob/head.dmi', src, hat_state)
I.pixel_y = -7 // Slimes are small.
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Controls the 'mood' overlay. Overrided in subtypes for specific behaviour.
/mob/living/simple_mob/slime/proc/update_mood()
mood = "feral" // This is to avoid another override in the /feral subtype.
/mob/living/simple_mob/slime/proc/unify()
unity = TRUE
// Interface override, because slimes are supposed to attack other slimes of different color regardless of faction.
// (unless Unified, of course).
/mob/living/simple_mob/slime/IIsAlly(mob/living/L)
. = ..()
if(istype(L, /mob/living/simple_mob/slime)) // Slimes should care about their color subfaction compared to another's.
var/mob/living/simple_mob/slime/S = L
if(S.unity || src.unity)
return TRUE
if(S.slime_color == src.slime_color)
return TRUE
else
return FALSE
// The other stuff was already checked in parent proc, and the . variable will implicitly return the correct value.
// Slimes regenerate passively.
/mob/living/simple_mob/slime/handle_special()
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)
adjustCloneLoss(-1)
adjustBruteLoss(-1)
// Clicked on by empty hand.
/mob/living/simple_mob/slime/attack_hand(mob/living/L)
if(L.a_intent == I_GRAB && hat)
remove_hat(L)
else
..()
// Clicked on while holding an object.
/mob/living/simple_mob/slime/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/clothing/head)) // Handle hat simulator.
give_hat(I, user)
return
// Otherwise they're probably fighting the slime.
if(prob(25))
visible_message(span("warning", "\The [user]'s [I] passes right through \the [src]!"))
user.setClickCooldown(user.get_attack_speed(I))
return
..()
// Called when hit with an active slimebaton (or xeno taser).
// Subtypes react differently.
/mob/living/simple_mob/slime/proc/slimebatoned(mob/living/user, amount)
return
// Hat simulator
/mob/living/simple_mob/slime/proc/give_hat(var/obj/item/clothing/head/new_hat, var/mob/living/user)
if(!istype(new_hat))
to_chat(user, span("warning", "\The [new_hat] isn't a hat."))
return
if(hat)
to_chat(user, span("warning", "\The [src] is already wearing \a [hat]."))
return
else
user.drop_item(new_hat)
hat = new_hat
new_hat.forceMove(src)
to_chat(user, span("notice", "You place \a [new_hat] on \the [src]. How adorable!"))
update_icon()
return
/mob/living/simple_mob/slime/proc/remove_hat(var/mob/living/user)
if(!hat)
to_chat(user, "<span class='warning'>\The [src] doesn't have a hat to remove.</span>")
else
hat.forceMove(get_turf(src))
user.put_in_hands(hat)
to_chat(user, "<span class='warning'>You take away \the [src]'s [hat.name]. How mean.</span>")
hat = null
update_icon()
/mob/living/simple_mob/slime/proc/drop_hat()
if(!hat)
return
hat.forceMove(get_turf(src))
hat = null
update_icon()
/mob/living/simple_mob/slime/speech_bubble_appearance()
return "slime"
/mob/living/simple_mob/slime/proc/squish()
playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0)
// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
/mob/living/simple_mob/slime
name = "slime"
desc = "It's a slime."
tt_desc = "A Macrolimbus vulgaris"
icon = 'icons/mob/slime2.dmi'
icon_state = "slime baby"
icon_living = "slime baby"
icon_dead = "slime baby dead"
var/shiny = FALSE // If true, will add a 'shiny' overlay.
var/icon_state_override = null // Used for special slime appearances like the rainbow slime.
color = "#CACACA"
glow_range = 3
glow_intensity = 2
gender = NEUTER
faction = "slime" // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified).
maxHealth = 150
movement_cooldown = 0
pass_flags = PASSTABLE
makes_dirt = FALSE // Goop
mob_class = MOB_CLASS_SLIME
response_help = "pets"
// Atmos stuff.
minbodytemp = T0C-30
heat_damage_per_tick = 0
cold_damage_per_tick = 40
min_oxy = 0
max_oxy = 0
min_tox = 0
max_tox = 0
min_co2 = 0
max_co2 = 0
min_n2 = 0
max_n2 = 0
unsuitable_atoms_damage = 0
shock_resist = 0.5 // Slimes are resistant to electricity, and it actually charges them.
taser_kill = FALSE
water_resist = 0 // Slimes are very weak to water.
melee_damage_lower = 10
melee_damage_upper = 15
base_attack_cooldown = 10 // One attack a second.
attack_sound = 'sound/weapons/bite.ogg'
attacktext = list("glomped")
speak_emote = list("chirps")
friendly = list("pokes")
ai_holder_type = /datum/ai_holder/simple_mob/melee
say_list_type = /datum/say_list/slime
var/cores = 1 // How many cores you get when placed in a Processor.
var/obj/item/clothing/head/hat = null // The hat the slime may be wearing.
var/slime_color = "grey" // Used for updating the name and for slime color-ism.
var/unity = FALSE // If true, slimes will consider other colors as their own. Other slimes will see this slime as the same color as well.
var/coretype = /obj/item/slime_extract/grey // What core is inside the slime, and what you get from the processor.
var/reagent_injected = null // Some slimes inject reagents on attack. This tells the game what reagent to use.
var/injection_amount = 5 // This determines how much.
var/mood = ":3" // Icon to use to display 'mood', as an overlay.
can_enter_vent_with = list(/obj/item/clothing/head)
/datum/say_list/slime
speak = list("Blorp...", "Blop...")
emote_see = list("bounces", "jiggles", "sways")
emote_hear = list("squishes")
/mob/living/simple_mob/slime/Initialize()
verbs += /mob/living/proc/ventcrawl
update_mood()
glow_color = color
handle_light()
update_icon()
return ..()
/mob/living/simple_mob/slime/Destroy()
if(hat)
drop_hat()
return ..()
/mob/living/simple_mob/slime/death()
// Make dead slimes stop glowing.
glow_toggle = FALSE
handle_light()
..()
/mob/living/simple_mob/slime/revive()
// Make revived slimes resume glowing.
glow_toggle = initial(glow_toggle)
handle_light()
..()
/mob/living/simple_mob/slime/update_icon()
..() // Do the regular stuff first.
if(stat != DEAD)
// General slime shine.
var/image/I = image(icon, src, "slime light")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// 'Shiny' overlay, for gemstone-slimes.
if(shiny)
I = image(icon, src, "slime shiny")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Mood overlay.
I = image(icon, src, "aslime-[mood]")
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Hat simulator.
if(hat)
var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
var/image/I = image('icons/mob/head.dmi', src, hat_state)
I.pixel_y = -7 // Slimes are small.
I.appearance_flags = RESET_COLOR
add_overlay(I)
// Controls the 'mood' overlay. Overrided in subtypes for specific behaviour.
/mob/living/simple_mob/slime/proc/update_mood()
mood = "feral" // This is to avoid another override in the /feral subtype.
/mob/living/simple_mob/slime/proc/unify()
unity = TRUE
// Interface override, because slimes are supposed to attack other slimes of different color regardless of faction.
// (unless Unified, of course).
/mob/living/simple_mob/slime/IIsAlly(mob/living/L)
. = ..()
if(istype(L, /mob/living/simple_mob/slime)) // Slimes should care about their color subfaction compared to another's.
var/mob/living/simple_mob/slime/S = L
if(S.unity || src.unity)
return TRUE
if(S.slime_color == src.slime_color)
return TRUE
else
return FALSE
// The other stuff was already checked in parent proc, and the . variable will implicitly return the correct value.
// Slimes regenerate passively.
/mob/living/simple_mob/slime/handle_special()
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)
adjustCloneLoss(-1)
adjustBruteLoss(-1)
// Clicked on by empty hand.
/mob/living/simple_mob/slime/attack_hand(mob/living/L)
if(L.a_intent == I_GRAB && hat)
remove_hat(L)
else
..()
// Clicked on while holding an object.
/mob/living/simple_mob/slime/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/clothing/head)) // Handle hat simulator.
give_hat(I, user)
return
// Otherwise they're probably fighting the slime.
if(prob(25))
visible_message(span("warning", "\The [user]'s [I] passes right through \the [src]!"))
user.setClickCooldown(user.get_attack_speed(I))
return
..()
// Called when hit with an active slimebaton (or xeno taser).
// Subtypes react differently.
/mob/living/simple_mob/slime/proc/slimebatoned(mob/living/user, amount)
return
// Hat simulator
/mob/living/simple_mob/slime/proc/give_hat(var/obj/item/clothing/head/new_hat, var/mob/living/user)
if(!istype(new_hat))
to_chat(user, span("warning", "\The [new_hat] isn't a hat."))
return
if(hat)
to_chat(user, span("warning", "\The [src] is already wearing \a [hat]."))
return
else
user.drop_item(new_hat)
hat = new_hat
new_hat.forceMove(src)
to_chat(user, span("notice", "You place \a [new_hat] on \the [src]. How adorable!"))
update_icon()
return
/mob/living/simple_mob/slime/proc/remove_hat(var/mob/living/user)
if(!hat)
to_chat(user, "<span class='warning'>\The [src] doesn't have a hat to remove.</span>")
else
hat.forceMove(get_turf(src))
user.put_in_hands(hat)
to_chat(user, "<span class='warning'>You take away \the [src]'s [hat.name]. How mean.</span>")
hat = null
update_icon()
/mob/living/simple_mob/slime/proc/drop_hat()
if(!hat)
return
hat.forceMove(get_turf(src))
hat = null
update_icon()
/mob/living/simple_mob/slime/speech_bubble_appearance()
return "slime"
/mob/living/simple_mob/slime/proc/squish()
playsound(src, 'sound/effects/slime_squish.ogg', 50, 0)
visible_message("<b>\The [src]</b> squishes!")
@@ -1,54 +1,54 @@
// Contains code for slimes getting attacked, beat, touched, etc, and reacting to that.
// Clicked on by empty hand.
// Handles trying to wrestle a slime off of someone being eatten.
/mob/living/simple_mob/slime/xenobio/attack_hand(mob/living/L)
if(victim) // Are we eating someone?
var/fail_odds = 30
if(victim == L) // Harder to get the slime off if it's you that is being eatten.
fail_odds = 60
if(prob(fail_odds))
visible_message(span("warning", "\The [L] attempts to wrestle \the [name] off!"))
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
else
visible_message(span("warning", "\The [L] manages to wrestle \the [name] off!"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(prob(40))
adjust_discipline(1) // Do this here so that it will be justified discipline.
stop_consumption()
step_away(src, L)
else
..()
// Handles the actual harming by a melee weapon.
/mob/living/simple_mob/slime/xenobio/hit_with_weapon(obj/item/I, mob/living/user, effective_force, hit_zone)
..() // Apply damage and etc.
if(!stat && effective_force > 0)
if(!is_justified_to_discipline()) // Wow, buddy, why am I getting attacked??
adjust_discipline(1) // This builds resentment due to being unjustified.
if(user in friends) // Friend attacking us for no reason.
if(prob(25))
friends -= user
say("[user]... not friend...")
else // We're actually being bad.
var/prob_to_back_down = round(effective_force)
if(is_adult)
prob_to_back_down /= 2
if(prob(prob_to_back_down))
adjust_discipline(2) // Justified.
// Shocked grilles don't hurt slimes, and in fact give them charge.
/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
power_charge = between(0, power_charge + round(shock_damage / 10), 10)
to_chat(src, span("notice", "\The [source] shocks you, and it charges you."))
// Getting slimebatoned/xenotased.
/mob/living/simple_mob/slime/xenobio/slimebatoned(mob/living/user, amount)
adjust_discipline(round(amount/2))
Weaken(amount) // This needs to come afterwards or else it will always be considered abuse to the slime.
// Contains code for slimes getting attacked, beat, touched, etc, and reacting to that.
// Clicked on by empty hand.
// Handles trying to wrestle a slime off of someone being eatten.
/mob/living/simple_mob/slime/xenobio/attack_hand(mob/living/L)
if(victim) // Are we eating someone?
var/fail_odds = 30
if(victim == L) // Harder to get the slime off if it's you that is being eatten.
fail_odds = 60
if(prob(fail_odds))
visible_message(span("warning", "\The [L] attempts to wrestle \the [name] off!"))
playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
else
visible_message(span("warning", "\The [L] manages to wrestle \the [name] off!"))
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(prob(40))
adjust_discipline(1) // Do this here so that it will be justified discipline.
stop_consumption()
step_away(src, L)
else
..()
// Handles the actual harming by a melee weapon.
/mob/living/simple_mob/slime/xenobio/hit_with_weapon(obj/item/I, mob/living/user, effective_force, hit_zone)
..() // Apply damage and etc.
if(!stat && effective_force > 0)
if(!is_justified_to_discipline()) // Wow, buddy, why am I getting attacked??
adjust_discipline(1) // This builds resentment due to being unjustified.
if(user in friends) // Friend attacking us for no reason.
if(prob(25))
friends -= user
say("[user]... not friend...")
else // We're actually being bad.
var/prob_to_back_down = round(effective_force)
if(is_adult)
prob_to_back_down /= 2
if(prob(prob_to_back_down))
adjust_discipline(2) // Justified.
// Shocked grilles don't hurt slimes, and in fact give them charge.
/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
power_charge = between(0, power_charge + round(shock_damage / 10), 10)
to_chat(src, span("notice", "\The [source] shocks you, and it charges you."))
// Getting slimebatoned/xenotased.
/mob/living/simple_mob/slime/xenobio/slimebatoned(mob/living/user, amount)
adjust_discipline(round(amount/2))
Weaken(amount) // This needs to come afterwards or else it will always be considered abuse to the slime.
+1 -15
View File
@@ -133,20 +133,6 @@
return M
return 0
/mob/proc/movement_delay(oldloc, direct)
. = 0
if(locate(/obj/item/weapon/grab) in src)
. += 7
// Movespeed delay based on movement mode
switch(m_intent)
if("run")
if(drowsyness > 0)
. += 6
. += config.run_speed
if("walk")
. += config.walk_speed
/mob/proc/Life()
// if(organStructure)
// organStructure.ProcessOrgans()
@@ -229,7 +215,7 @@
if((is_blind(src) || usr.stat) && !isobserver(src))
to_chat(src, "<span class='notice'>Something is there but you can't see it.</span>")
return 1
//Could be gone by the time they finally pick something
if(!A)
return 1
-1
View File
@@ -3,7 +3,6 @@
layer = MOB_LAYER
plane = MOB_PLANE
animate_movement = 2
flags = PROXMOVE
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
+2 -2
View File
@@ -108,7 +108,7 @@
target.apply_effect(20, PARALYZE)
target.visible_message("<span class='danger'>[target] [target.species.get_knockout_message(target)]</span>")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
playsound(attacker, "swing_hit", 25, 1, -1)
add_attack_logs(attacker,target,"Headbutted using grab")
attacker.drop_from_inventory(src)
@@ -121,7 +121,7 @@
to_chat(attacker, "<span class='warning'>You require a better grab to do this.</span>")
return
if(target.grab_joint(attacker, target_zone))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
/obj/item/weapon/grab/proc/pin_down(mob/target, mob/attacker)
+34 -30
View File
@@ -6,6 +6,20 @@
return FALSE // Need to wait more.
return TRUE
/mob/proc/movement_delay(oldloc, direct)
. = 0
if(locate(/obj/item/weapon/grab) in src)
. += 5
// Movespeed delay based on movement mode
switch(m_intent)
if("run")
if(drowsyness > 0)
. += 6
. += config.run_speed
if("walk")
. += config.walk_speed
/client/proc/client_dir(input, direction=-1)
return turn(input, direction*dir2angle(dir))
@@ -219,12 +233,13 @@
return
return my_mob.buckled.relaymove(my_mob,direct)
var/total_delay = my_mob.movement_delay(n, direct)
if(my_mob.pulledby || my_mob.buckled) // Wheelchair driving!
if(isspace(loc))
return // No wheelchair driving in space
if(istype(my_mob.pulledby, /obj/structure/bed/chair/wheelchair))
my_mob.setMoveCooldown(3)
return my_mob.pulledby.relaymove(my_mob, direct)
total_delay += 3
else if(istype(my_mob.buckled, /obj/structure/bed/chair/wheelchair))
if(ishuman(my_mob))
var/mob/living/carbon/human/driver = my_mob
@@ -241,12 +256,10 @@
if("walk")
if(prob(25))
direct = turn(direct, pick(90, -90))
my_mob.setMoveCooldown(3)
return my_mob.buckled.relaymove(my_mob,direct)
total_delay += 3
// We are now going to move
moving = 1
var/total_delay = my_mob.movement_delay(n, direct)
var/pre_move_loc = loc
// Confused direction randomization
@@ -260,28 +273,34 @@
if(prob(25))
direct = turn(direct, pick(90, -90))
n = get_step(my_mob, direct)
total_delay = DS2NEARESTTICK(total_delay) //Rounded to the next tick in equivalent ds
my_mob.setMoveCooldown(total_delay)
. = my_mob.SelfMove(n, direct, total_delay)
if(istype(my_mob.pulledby, /obj/structure/bed/chair/wheelchair))
. = my_mob.pulledby.relaymove(my_mob, direct)
else if(istype(my_mob.buckled, /obj/structure/bed/chair/wheelchair))
. = my_mob.buckled.relaymove(my_mob,direct)
else
. = my_mob.SelfMove(n, direct, total_delay)
// If we have a grab
var/list/grablist = my_mob.ret_grab()
if(grablist.len)
grablist -= my_mob // Just in case we're in a circular grab chain
// It's just us and another person
if(grablist.len == 1)
var/mob/M = grablist[1]
if(!my_mob.Adjacent(M)) //Oh no, we moved away
M.Move(pre_move_loc, get_dir(M, pre_move_loc), total_delay) //Have them step towards where we were
// It's a grab chain
else
for(var/mob/M in grablist)
my_mob.other_mobs = 1
M.other_mobs = 1 //Has something to do with people being able or unable to pass a chain of mobs
//Ugly!
spawn(0) //Step
M.Move(pre_move_loc, get_dir(M, pre_move_loc), total_delay)
@@ -297,7 +316,7 @@
G.adjust_position()
for (var/obj/item/weapon/grab/G in my_mob.grabbed_by)
G.adjust_position()
// We're not in the middle of a move anymore
moving = 0
@@ -388,9 +407,9 @@
//Check to see if we slipped
if(prob(Process_Spaceslipping(5)) && !buckled)
to_chat(src, "<font color='blue'><B>You slipped!</B></font>")
src.inertia_dir = src.last_move
step(src, src.inertia_dir)
to_chat(src, "<span class='notice'><B>You slipped!</B></span>")
inertia_dir = last_move
step(src, src.inertia_dir) // Not using Move for smooth glide here because this is a 'slip' so should be sudden.
return 0
//If not then we can reset inertia and move
inertia_dir = 0
@@ -402,7 +421,7 @@
var/shoegrip
for(var/turf/turf in oview(1,src))
if(istype(turf,/turf/space))
if(isspace(turf))
continue
if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity
@@ -452,21 +471,6 @@
/mob/proc/update_gravity()
return
// Called when a mob successfully moves.
// Would've been an /atom/movable proc but it caused issues.
/mob/Moved(atom/oldloc)
. = ..()
for(var/obj/O in contents)
O.on_loc_moved(oldloc)
// Received from Moved(), useful for items that need to know that their loc just moved.
/obj/proc/on_loc_moved(atom/oldloc)
return
/obj/item/weapon/storage/on_loc_moved(atom/oldloc)
for(var/obj/O in contents)
O.on_loc_moved(oldloc)
/client/verb/moveup()
set name = ".moveup"
set instant = 1
@@ -289,3 +289,29 @@
break
return highJob
/datum/preferences/proc/get_valid_hairstyles()
var/list/valid_hairstyles = list()
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(!(species in S.species_allowed))
continue
valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
return valid_hairstyles
/datum/preferences/proc/get_valid_facialhairstyles()
var/list/valid_facialhairstyles = list()
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(biological_gender == MALE && S.gender == FEMALE)
continue
if(biological_gender == FEMALE && S.gender == MALE)
continue
if(!(species in S.species_allowed))
continue
valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
return valid_facialhairstyles