mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 13:12:22 +00:00
Alter playsound paradigm
This commit is contained in:
@@ -28,7 +28,7 @@ var/list/sounds_cache = list()
|
||||
|
||||
log_admin("[key_name(src)] played a local sound [S]")
|
||||
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
|
||||
playsound(get_turf(src.mob), S, 50, 0, 0)
|
||||
playsound(src.mob, S, 50, 0, 0)
|
||||
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
|
||||
if(holder.say_list)
|
||||
holder.ISay(safepick(holder.say_list.say_threaten))
|
||||
playsound(holder.loc, holder.say_list.threaten_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
|
||||
playsound(target.loc, holder.say_list.threaten_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
|
||||
playsound(holder, holder.say_list.threaten_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
|
||||
playsound(target, holder.say_list.threaten_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
|
||||
else // Otherwise we are waiting for them to go away or to wait long enough for escalate.
|
||||
if(target in list_targets()) // Are they still visible?
|
||||
var/should_escalate = FALSE
|
||||
@@ -57,8 +57,8 @@
|
||||
set_stance(STANCE_IDLE)
|
||||
if(holder.say_list)
|
||||
holder.ISay(safepick(holder.say_list.say_stand_down))
|
||||
playsound(holder.loc, holder.say_list.stand_down_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
|
||||
playsound(target.loc, holder.say_list.stand_down_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
|
||||
playsound(holder, holder.say_list.stand_down_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
|
||||
playsound(target, holder.say_list.stand_down_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
|
||||
|
||||
// Determines what is deserving of a warning when STANCE_ALERT is active.
|
||||
/datum/ai_holder/proc/will_threaten(mob/living/the_target)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
/obj/item/weapon/deadringer/proc/reveal()
|
||||
if(watchowner)
|
||||
watchowner.alpha = 255
|
||||
playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
|
||||
playsound(src, 'sound/effects/uncloak.ogg', 35, 1, -1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/deadringer/proc/makeacorpse(var/mob/living/carbon/human/H)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/mob/living/simple_mob/animal/passive/mouse/M = target
|
||||
visible_message("<font color='red'><b>SPLAT!</b></font>")
|
||||
M.splat()
|
||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
playsound(target, 'sound/effects/snap.ogg', 50, 1)
|
||||
layer = MOB_LAYER - 0.2
|
||||
armed = 0
|
||||
update_icon()
|
||||
@@ -65,7 +65,7 @@
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
playsound(user, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_hand(var/mob/living/user)
|
||||
if(armed)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/obj/effect/blob/proc/take_damage(var/damage)
|
||||
health -= damage
|
||||
if(health < 0)
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
||||
qdel(src)
|
||||
else
|
||||
update_icon()
|
||||
@@ -103,7 +103,7 @@
|
||||
if(L.stat == DEAD)
|
||||
continue
|
||||
L.visible_message("<span class='danger'>The blob attacks \the [L]!</span>", "<span class='danger'>The blob attacks you!</span>")
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
L.take_organ_damage(rand(30, 40))
|
||||
return
|
||||
new expandType(T, min(health, 30))
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
var/damage = 0
|
||||
switch(W.damtype)
|
||||
|
||||
@@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
|
||||
/obj/structure/blob/Destroy()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary.
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary.
|
||||
GLOB.all_blobs -= src
|
||||
overmind = null
|
||||
return ..()
|
||||
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
if(istype(T, /turf/space) && !(locate(/obj/structure/lattice) in T) && prob(80))
|
||||
make_blob = FALSE
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it
|
||||
|
||||
consume_tile() //hit the tile we're in, making sure there are no border objects blocking us
|
||||
|
||||
@@ -223,7 +223,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
/obj/structure/blob/attack_generic(var/mob/user, var/damage, var/attack_verb)
|
||||
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
|
||||
user.do_attack_animation(src)
|
||||
if(overmind)
|
||||
damage *= overmind.blob_type.brute_multiplier
|
||||
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
|
||||
/obj/structure/blob/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
visible_message("<span class='danger'>\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]</span>")
|
||||
var/damage = W.force
|
||||
switch(W.damtype)
|
||||
@@ -318,7 +318,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
damage *= 2
|
||||
|
||||
if(damage > 0)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(src, 'sound/items/welder.ogg', 100, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(BRUTE, SEARING, TOX, CLONE)
|
||||
@@ -328,7 +328,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
damage *= 2
|
||||
|
||||
if(damage > 0)
|
||||
playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
if(overmind)
|
||||
@@ -369,7 +369,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
|
||||
/obj/structure/blob/proc/adjust_integrity(amount)
|
||||
integrity = between(0, integrity + amount, max_integrity)
|
||||
if(integrity == 0)
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
||||
if(overmind)
|
||||
overmind.blob_type.on_death(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -111,25 +111,25 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
box_segments = draw_box(target, scan_range, user.client)
|
||||
color_box(box_segments, "#00FF00", scan_delay)
|
||||
|
||||
playsound(src.loc, 'sound/machines/beep.ogg', 50)
|
||||
playsound(src, 'sound/machines/beep.ogg', 50)
|
||||
|
||||
// The delay, and test for if the scan succeeds or not.
|
||||
var/scan_start_time = world.time
|
||||
if(do_after(user, scan_delay, target, ignore_movement = TRUE, max_distance = scan_range))
|
||||
if(target.can_catalogue(user))
|
||||
to_chat(user, span("notice", "You successfully scan \the [target] with \the [src]."))
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50)
|
||||
playsound(src, 'sound/machines/ping.ogg', 50)
|
||||
catalogue_object(target, user)
|
||||
else
|
||||
// In case someone else scans it first, or it died, etc.
|
||||
to_chat(user, span("warning", "\The [target] is no longer valid to scan with \the [src]."))
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
|
||||
partial_scanned = null
|
||||
partial_scan_time = 0
|
||||
else
|
||||
to_chat(user, span("warning", "You failed to finish scanning \the [target] with \the [src]."))
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
color_box(box_segments, "#FF0000", 3)
|
||||
partial_scanned = weakref(target)
|
||||
partial_scan_time += world.time - scan_start_time // This is added to the existing value so two partial scans will add up correctly.
|
||||
@@ -204,7 +204,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, 'sound/machines/beep.ogg', 50)
|
||||
playsound(src, 'sound/machines/beep.ogg', 50)
|
||||
|
||||
// First, get everything able to be scanned.
|
||||
var/list/scannable_atoms = list()
|
||||
@@ -232,9 +232,9 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
|
||||
busy = FALSE
|
||||
update_icon()
|
||||
if(scannable_atoms.len)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50)
|
||||
playsound(src, 'sound/machines/ping.ogg', 50)
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
|
||||
playsound(src, 'sound/machines/buzz-two.ogg', 50)
|
||||
to_chat(user, span("notice", "\The [src] found [scannable_atoms.len] object\s that can be scanned."))
|
||||
|
||||
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
user.visible_message("<font color='red'>[user] cuts the fingertips off of the [src].</font>","<font color='red'>You cut the fingertips off of the [src].</font>")
|
||||
|
||||
clipped = 1
|
||||
@@ -588,7 +588,7 @@
|
||||
|
||||
if(usr.put_in_hands(holding))
|
||||
usr.visible_message("<span class='danger'>\The [usr] pulls a knife out of their boot!</span>")
|
||||
playsound(get_turf(src), 'sound/weapons/holster/sheathout.ogg', 25)
|
||||
playsound(src, 'sound/weapons/holster/sheathout.ogg', 25)
|
||||
holding = null
|
||||
overlays -= image(icon, "[icon_state]_knife")
|
||||
else
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
set_slowdown()
|
||||
force = 5
|
||||
if(icon_base) icon_state = "[icon_base]1"
|
||||
playsound(get_turf(src), 'sound/effects/magnetclamp.ogg', 20)
|
||||
playsound(src, 'sound/effects/magnetclamp.ogg', 20)
|
||||
to_chat(user, "You enable the mag-pulse traction system.")
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
user.update_action_buttons()
|
||||
|
||||
@@ -405,7 +405,7 @@
|
||||
drain_loc = interfaced_with.loc
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
return 0
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
H.break_cloak()
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
for(var/mob/O in oviewers(H))
|
||||
O.show_message("[H.name] appears from thin air!",1)
|
||||
playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
|
||||
/obj/item/rig_module/teleporter
|
||||
@@ -83,8 +83,8 @@
|
||||
return
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(T, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(T, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(src, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(T,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
|
||||
|
||||
/obj/item/rig_module/teleporter/proc/phase_out(var/mob/M,var/turf/T)
|
||||
|
||||
@@ -50,4 +50,4 @@
|
||||
H.alpha = initial(H.alpha)
|
||||
|
||||
H.visible_message("[H.name] appears from thin air!")
|
||||
playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
playsound(H, 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
@@ -57,7 +57,7 @@
|
||||
drain_loc = interfaced_with.loc
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return 0
|
||||
|
||||
holder.spark_system.start()
|
||||
playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
|
||||
H.break_cloak()
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
tacknife.loc = get_turf(src)
|
||||
if(M.put_in_active_hand(tacknife))
|
||||
to_chat(M, "<span class='notice'>You slide \the [tacknife] out of [src].</span>")
|
||||
playsound(M, 'sound/weapons/flipblade.ogg', 40, 1)
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 40, 1)
|
||||
tacknife = null
|
||||
update_icon()
|
||||
return
|
||||
@@ -83,7 +83,7 @@
|
||||
tacknife = I
|
||||
I.loc = src
|
||||
to_chat(M, "<span class='notice'>You slide the [I] into [src].</span>")
|
||||
playsound(M, 'sound/weapons/flipblade.ogg', 40, 1)
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 40, 1)
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(user.loc, "sparks", 50, 1)
|
||||
playsound(src, "sparks", 50, 1)
|
||||
|
||||
user.loc = picked
|
||||
return PROJECTILE_FORCE_MISS
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
return
|
||||
|
||||
if(holster_in)
|
||||
playsound(get_turf(src), holster_in, 50)
|
||||
playsound(src, holster_in, 50)
|
||||
|
||||
if(istype(user))
|
||||
user.stop_aiming(no_message=1)
|
||||
@@ -55,7 +55,7 @@
|
||||
)
|
||||
|
||||
if(holster_out)
|
||||
playsound(get_turf(src), holster_out, sound_vol)
|
||||
playsound(src, holster_out, sound_vol)
|
||||
|
||||
user.put_in_hands(holstered)
|
||||
holstered.add_fingerprint(user)
|
||||
|
||||
@@ -58,9 +58,9 @@ log transactions
|
||||
for(var/obj/item/weapon/spacecash/S in src)
|
||||
S.loc = src.loc
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
break
|
||||
|
||||
/obj/machinery/atm/emag_act(var/remaining_charges, var/mob/user)
|
||||
@@ -103,9 +103,9 @@ log transactions
|
||||
//consume the money
|
||||
authenticated_account.money += I:worth
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
@@ -383,9 +383,9 @@ log transactions
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Automatic Teller Machine.</i>"
|
||||
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
if ("print_transaction")
|
||||
if(authenticated_account)
|
||||
var/obj/item/weapon/paper/R = new(src.loc)
|
||||
@@ -425,9 +425,9 @@ log transactions
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Automatic Teller Machine.</i>"
|
||||
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
|
||||
if("insert_card")
|
||||
if(!held_card)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
message = pick("Luxury watches for Blowout sale prices!",\
|
||||
"Watches, Jewelry & Accessories, Bags & Wallets !",\
|
||||
"Deposit 100$ and get 300$ totally free!",\
|
||||
" 100K NT.|WOWGOLD <20>nly $89 <HOT>",\
|
||||
" 100K NT.|WOWGOLD <20>nly $89 <HOT>",\
|
||||
"We have been filed with a complaint from one of your customers in respect of their business relations with you.",\
|
||||
"We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..")
|
||||
if(4)
|
||||
@@ -111,7 +111,7 @@
|
||||
//P.tnote += "<i><b>← From [sender] (Unknown / spam?):</b></i><br>[message]<br>"
|
||||
|
||||
if (!P.message_silent)
|
||||
playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
playsound(P, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
for (var/mob/O in hearers(3, P.loc))
|
||||
if(!P.message_silent) O.show_message(text("[bicon(P)] *[P.ttone]*"))
|
||||
//Search for holder of the PDA.
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/feed_sound(var/mob/user)
|
||||
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
playsound(src, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/condiment/self_feed_message(var/mob/user)
|
||||
to_chat(user, "<span class='notice'>You swallow some of contents of \the [src].</span>")
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
open(user)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user)
|
||||
playsound(loc,"canopen", rand(10,50), 1)
|
||||
playsound(src,"canopen", rand(10,50), 1)
|
||||
to_chat(user, "<span class='notice'>You open [src] with an audible pop!</span>")
|
||||
flags |= OPENCONTAINER
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
to_chat(user, "<span class='notice'>You swallow a gulp from \the [src].</span>")
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user)
|
||||
playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
playsound(src, 'sound/items/drink.ogg', rand(10, 50), 1)
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken")
|
||||
|
||||
/obj/item/weapon/broken_bottle/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
return
|
||||
|
||||
if(reagents) //Handle ingestion of the reagent.
|
||||
playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
playsound(M,'sound/items/eatfood.ogg', rand(10,50), 1)
|
||||
if(reagents.total_volume)
|
||||
if(reagents.total_volume > bitesize)
|
||||
reagents.trans_to_mob(M, bitesize, CHEM_INGEST)
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
qdel(cooking_obj)
|
||||
src.visible_message("<span class='notice'>\The [src] pings!</span>")
|
||||
if(cooked_sound)
|
||||
playsound(get_turf(src), cooked_sound, 50, 1)
|
||||
playsound(src, cooked_sound, 50, 1)
|
||||
|
||||
if(!can_burn_food)
|
||||
icon_state = off_icon
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
occupant.gib()
|
||||
occupant = null
|
||||
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1)
|
||||
operating = 0
|
||||
for (var/obj/thing in contents)
|
||||
// There's a chance that the gibber will fail to destroy some evidence.
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/machinery/microwave/proc/muck_start()
|
||||
playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
|
||||
src.icon_state = "mwbloody1" // Make it look dirty!!
|
||||
|
||||
/obj/machinery/microwave/proc/muck_finish()
|
||||
|
||||
@@ -230,7 +230,7 @@
|
||||
cards -= P
|
||||
cards = newcards
|
||||
user.visible_message("<span class = 'notice'>\The [user] shuffles [src].</span>")
|
||||
playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/cardshuffle.ogg', 50, 1)
|
||||
cooldown = world.time
|
||||
else
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
newcards += P
|
||||
cards -= P
|
||||
cards = newcards
|
||||
playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/cardshuffle.ogg', 50, 1)
|
||||
user.visible_message("\The [user] shuffles [src].")
|
||||
cooldown = world.time
|
||||
else
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
SSnanoui.update_uis(src)
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
last_to_emag = user //emag again to change the owner
|
||||
if (!emagged)
|
||||
emagged = 1
|
||||
|
||||
@@ -137,7 +137,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
user.do_attack_animation(src)
|
||||
var/damage = rand(0, 9)
|
||||
if(!damage)
|
||||
playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
|
||||
target.visible_message("<font color='red'><B>[user] has attempted to punch [target]!</B></font>")
|
||||
return TRUE
|
||||
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
|
||||
@@ -147,7 +147,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
if(HULK in user.mutations)
|
||||
damage += 5
|
||||
|
||||
playsound(target.loc, "punch", 25, 1, -1)
|
||||
playsound(target, "punch", 25, 1, -1)
|
||||
|
||||
target.visible_message("<font color='red'><B>[user] has punched [target]!</B></font>")
|
||||
|
||||
@@ -204,7 +204,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -222,7 +222,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
|
||||
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
|
||||
var/aforce = I.force
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
visible_message("<font color='red'><B>[src] was hit by [I].</B></font>")
|
||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
||||
take_damage(aforce)
|
||||
@@ -289,7 +289,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, user.loc)
|
||||
spark_system.start()
|
||||
playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -299,13 +299,13 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
|
||||
force = 30
|
||||
item_state = "[icon_state]_blade"
|
||||
w_class = ITEMSIZE_LARGE
|
||||
playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>[src] is now active.</span>")
|
||||
else
|
||||
force = 3
|
||||
item_state = "[icon_state]"
|
||||
w_class = ITEMSIZE_SMALL
|
||||
playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
return
|
||||
else if(I.is_wrench())
|
||||
anchored = !anchored
|
||||
playsound(loc, I.usesound, 50, 1)
|
||||
playsound(src, I.usesound, 50, 1)
|
||||
user.visible_message("<span class='notice'>[user] [anchored ? "wrenches" : "unwrenches"] \the [src].</span>", "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/bee_smoker))
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
M.stop_pulling()
|
||||
to_chat(M, "<span class='notice'>You slipped on the [name]!</span>")
|
||||
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
M.Stun(8)
|
||||
M.Weaken(5)
|
||||
seed.thrown_at(src,M)
|
||||
@@ -199,7 +199,7 @@
|
||||
else if(seed.chems)
|
||||
if(W.sharp && W.edge && !isnull(seed.chems["woodpulp"]))
|
||||
user.show_message("<span class='notice'>You make planks out of \the [src]!</span>", 1)
|
||||
playsound(loc, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
|
||||
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
|
||||
for(var/i=0,i<2,i++)
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
to_chat(user, "<span class='notice'>There are no seeds in \the [O.name].</span>")
|
||||
return
|
||||
else if(O.is_wrench())
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
|
||||
else if(O.is_screwdriver())
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
pestlevel -= spray.pest_kill_str
|
||||
weedlevel -= spray.weed_kill_str
|
||||
to_chat(user, "You spray [src] with [O].")
|
||||
playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
playsound(src, 'sound/effects/spray3.ogg', 50, 1, -6)
|
||||
qdel(O)
|
||||
check_health()
|
||||
|
||||
@@ -568,7 +568,7 @@
|
||||
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
|
||||
return ..()
|
||||
|
||||
playsound(loc, O.usesound, 50, 1)
|
||||
playsound(src, O.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
|
||||
|
||||
|
||||
@@ -248,12 +248,12 @@
|
||||
return FALSE
|
||||
if(add_circuit(I, user))
|
||||
to_chat(user, "<span class='notice'>You slide \the [I] inside \the [src].</span>")
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
else if(I.is_crowbar())
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
opened = !opened
|
||||
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
||||
update_icon()
|
||||
@@ -284,7 +284,7 @@
|
||||
user.drop_item(cell)
|
||||
cell.forceMove(src)
|
||||
battery = cell
|
||||
playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
to_chat(user, "<span class='notice'>You slot \the [cell] inside \the [src]'s power supplier.</span>")
|
||||
interact(user)
|
||||
return TRUE
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/assembly/electronic_assembly/proc/toggle_open(mob/user)
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
opened = !opened
|
||||
EA.opened = opened
|
||||
to_chat(user, "<span class='notice'>You [opened ? "opened" : "closed"] \the [src].</span>")
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
if(!istype(T, /turf/simulated/floor))
|
||||
to_chat(user, "<span class='warning'>You cannot place \the [src] on this spot!</span>")
|
||||
return
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
|
||||
playsound(src, 'sound/machines/click.ogg', 75, 1)
|
||||
user.visible_message("\The [user] attaches \the [src] to the wall.",
|
||||
"<span class='notice'>You attach \the [src] to the wall.</span>",
|
||||
"<span class='italics'>You hear clicking.</span>")
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
size += gun.w_class
|
||||
gun.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>")
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
installed_gun.forceMove(get_turf(src))
|
||||
to_chat(user, "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>")
|
||||
size = initial(size)
|
||||
playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
installed_gun = null
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There's no weapon to remove from the mechanism.</span>")
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
if(!selected_sound)
|
||||
return
|
||||
vol = between(0, vol, 100)
|
||||
playsound(get_turf(src), selected_sound, vol, freq, -1)
|
||||
playsound(src, selected_sound, vol, freq, -1)
|
||||
|
||||
/obj/item/integrated_circuit/output/sound/beeper
|
||||
name = "beeper circuit"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/integrated_circuit/reagent/smoke/do_work()
|
||||
playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
|
||||
var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new()
|
||||
smoke_system.set_up(reagents, 10, 0, get_turf(src))
|
||||
spawn(0)
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
else
|
||||
name = ("bookcase ([newname])")
|
||||
else if(O.is_wrench())
|
||||
playsound(loc, O.usesound, 100, 1)
|
||||
playsound(src, O.usesound, 100, 1)
|
||||
to_chat(user, (anchored ? "<span class='notice'>You unfasten \the [src] from the floor.</span>" : "<span class='notice'>You secure \the [src] to the floor.</span>"))
|
||||
anchored = !anchored
|
||||
else if(O.is_screwdriver())
|
||||
playsound(loc, O.usesound, 75, 1)
|
||||
playsound(src, O.usesound, 75, 1)
|
||||
to_chat(user, "<span class='notice'>You begin dismantling \the [src].</span>")
|
||||
if(do_after(user,25 * O.toolspeed))
|
||||
to_chat(user, "<span class='notice'>You dismantle \the [src].</span>")
|
||||
@@ -195,9 +195,9 @@ Book Cart End
|
||||
if(src.dat)
|
||||
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
|
||||
playsound(loc, 'sound/bureaucracy/bookopen.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/bookopen.ogg', 50, 1)
|
||||
onclose(user, "book")
|
||||
playsound(loc, 'sound/bureaucracy/bookclose.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/bookclose.ogg', 50, 1)
|
||||
else
|
||||
to_chat(user, "This book is completely blank!")
|
||||
|
||||
@@ -280,7 +280,7 @@ Book Cart End
|
||||
to_chat(user, "<span class='notice'>You begin to carve out [title].</span>")
|
||||
if(do_after(user, 30))
|
||||
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
|
||||
playsound(loc, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
|
||||
new /obj/item/weapon/shreddedp(get_turf(src))
|
||||
carved = 1
|
||||
return
|
||||
@@ -353,11 +353,11 @@ Book Cart End
|
||||
if(href_list["next_page"])
|
||||
if(page != pages.len)
|
||||
page++
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
playsound(src, "pageturn", 50, 1)
|
||||
if(href_list["prev_page"])
|
||||
if(page > 1)
|
||||
page--
|
||||
playsound(src.loc, "pageturn", 50, 1)
|
||||
playsound(src, "pageturn", 50, 1)
|
||||
src.attack_self(usr)
|
||||
updateUsrDialog()
|
||||
else
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/obj/machinery/computer/looking_glass/emag_act(var/remaining_charges, var/mob/user as mob)
|
||||
if (!emagged)
|
||||
playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='notice'>You unlock several programs that were hidden somewhere in memory.</span>")
|
||||
log_game("[key_name(usr)] emagged the [name]")
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
user.setClickCooldown(time)
|
||||
if(do_after(user, time, src) && use(1))
|
||||
to_chat(user, "<span class='notice'>You cut up a log into planks.</span>")
|
||||
playsound(get_turf(src), 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
|
||||
var/obj/item/stack/material/wood/existing_wood = null
|
||||
for(var/obj/item/stack/material/wood/M in user.loc)
|
||||
if(M.material.name == src.material.name)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
|
||||
else if(check_input(input))
|
||||
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
|
||||
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
|
||||
set_locked(0)
|
||||
else
|
||||
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
to_chat(user, "<span class='notice'>You begin sweeping \the [src] about, scanning for metal deposits.</span>")
|
||||
playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6)
|
||||
playsound(src, 'sound/items/goggles_charge.ogg', 50, 1, -6)
|
||||
|
||||
if(!do_after(user, scan_time))
|
||||
return
|
||||
|
||||
@@ -93,7 +93,7 @@ var/global/list/total_extraction_beacons = list()
|
||||
balloon.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
|
||||
holder_obj.cut_overlay(balloon2)
|
||||
holder_obj.add_overlay(balloon)
|
||||
playsound(holder_obj.loc, 'sound/items/fulext_deploy.wav', 50, 1, -3)
|
||||
playsound(holder_obj, 'sound/items/fulext_deploy.wav', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 10, time = 20)
|
||||
sleep(20)
|
||||
animate(holder_obj, pixel_z = 15, time = 10)
|
||||
@@ -104,7 +104,7 @@ var/global/list/total_extraction_beacons = list()
|
||||
sleep(10)
|
||||
animate(holder_obj, pixel_z = 10, time = 10)
|
||||
sleep(10)
|
||||
playsound(holder_obj.loc, 'sound/items/fultext_launch.wav', 50, 1, -3)
|
||||
playsound(holder_obj, 'sound/items/fultext_launch.wav', 50, 1, -3)
|
||||
animate(holder_obj, pixel_z = 1000, time = 30)
|
||||
if(ishuman(A))
|
||||
var/mob/living/carbon/human/L = A
|
||||
|
||||
@@ -327,7 +327,7 @@ turf/simulated/mineral/floor/light_corner
|
||||
return
|
||||
|
||||
to_chat(user, "<span class='notice'>You start digging.</span>")
|
||||
playsound(user.loc, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
|
||||
if(!do_after(user,40)) return
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 = ""
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -1,403 +1,403 @@
|
||||
/mob/living/carbon/Initialize()
|
||||
. = ..()
|
||||
//setup reagent holders
|
||||
bloodstr = new/datum/reagents/metabolism/bloodstream(500, src)
|
||||
ingested = new/datum/reagents/metabolism/ingested(500, src)
|
||||
touching = new/datum/reagents/metabolism/touch(500, src)
|
||||
reagents = bloodstr
|
||||
if (!default_language && species_language)
|
||||
default_language = GLOB.all_languages[species_language]
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
handle_viruses()
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
qdel(ingested)
|
||||
qdel(touching)
|
||||
// We don't qdel(bloodstr) because it's the same as qdel(reagents)
|
||||
for(var/guts in internal_organs)
|
||||
qdel(guts)
|
||||
for(var/food in stomach_contents)
|
||||
qdel(food)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/rejuvenate()
|
||||
bloodstr.clear_reagents()
|
||||
ingested.clear_reagents()
|
||||
touching.clear_reagents()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(src.nutrition && src.stat != 2)
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
if(src.m_intent == "run")
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/living/user, direction)
|
||||
if((user in src.stomach_contents) && istype(user))
|
||||
if(user.last_special <= world.time)
|
||||
user.last_special = world.time + 50
|
||||
src.visible_message("<span class='danger'>You hear something rumbling inside [src]'s stomach...</span>")
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if(I && I.force)
|
||||
var/d = rand(round(I.force / 4), I.force)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/organ/external/organ = H.get_organ(BP_TORSO)
|
||||
if (istype(organ))
|
||||
if(organ.take_damage(d, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
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)
|
||||
|
||||
if(prob(src.getBruteLoss() - 50))
|
||||
for(var/atom/movable/A in stomach_contents)
|
||||
A.loc = loc
|
||||
stomach_contents.Remove(A)
|
||||
src.gib()
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
for(var/mob/M in src)
|
||||
if(M in src.stomach_contents)
|
||||
src.stomach_contents.Remove(M)
|
||||
M.loc = src.loc
|
||||
for(var/mob/N in viewers(src, null))
|
||||
if(N.client)
|
||||
N.show_message(text("<font color='red'><B>[M] bursts out of [src]!</B></font>"), 2)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(H, "<font color='red'>You can't use your [temp.name]</font>")
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(def_zone == "l_hand" || def_zone == "r_hand") //Diona (And any other potential plant people) hands don't get shocked.
|
||||
if(species.flags & IS_PLANT)
|
||||
return 0
|
||||
shock_damage *= siemens_coeff
|
||||
if (shock_damage<1)
|
||||
return 0
|
||||
|
||||
src.apply_damage(0.2 * shock_damage, BURN, def_zone, used_weapon="Electrocution") //shock the target organ
|
||||
src.apply_damage(0.4 * shock_damage, BURN, BP_TORSO, used_weapon="Electrocution") //shock the torso more
|
||||
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)
|
||||
if (shock_damage > 15)
|
||||
src.visible_message(
|
||||
"<span class='warning'>[src] was electrocuted[source ? " by the [source]" : ""]!</span>", \
|
||||
"<span class='danger'>You feel a powerful shock course through your body!</span>", \
|
||||
"<span class='warning'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
else
|
||||
src.visible_message(
|
||||
"<span class='warning'>[src] was shocked[source ? " by the [source]" : ""].</span>", \
|
||||
"<span class='warning'>You feel a shock course through your body.</span>", \
|
||||
"<span class='warning'>You hear a zapping sound.</span>" \
|
||||
)
|
||||
|
||||
if(stun)
|
||||
switch(shock_damage)
|
||||
if(16 to 20)
|
||||
Stun(2)
|
||||
if(21 to 25)
|
||||
Weaken(2)
|
||||
if(26 to 30)
|
||||
Weaken(5)
|
||||
if(31 to INFINITY)
|
||||
Weaken(10) //This should work for now, more is really silly and makes you lay there forever
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, loc)
|
||||
s.start()
|
||||
|
||||
return shock_damage
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health >= config.health_threshold_crit)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
src.visible_message( \
|
||||
"<span class='notice'>[src] examines [T.himself].</span>", \
|
||||
"<span class='notice'>You check yourself for injuries.</span>" \
|
||||
)
|
||||
|
||||
for(var/obj/item/organ/external/org in H.organs)
|
||||
var/list/status = list()
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
/*
|
||||
if(halloss > 0) //Makes halloss show up as actual wounds on self examine.
|
||||
if(prob(30))
|
||||
brutedamage += halloss
|
||||
if(prob(30))
|
||||
burndamage += halloss
|
||||
*/
|
||||
switch(brutedamage)
|
||||
if(1 to 20)
|
||||
status += "bruised"
|
||||
if(20 to 40)
|
||||
status += "wounded"
|
||||
if(40 to INFINITY)
|
||||
status += "mangled"
|
||||
|
||||
switch(burndamage)
|
||||
if(1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
|
||||
if(org.is_stump())
|
||||
status += "MISSING"
|
||||
if(org.status & ORGAN_MUTATED)
|
||||
status += "weirdly shapen"
|
||||
if(org.dislocated == 2)
|
||||
status += "dislocated"
|
||||
if(org.status & ORGAN_BROKEN)
|
||||
status += "hurts when touched"
|
||||
if(org.status & ORGAN_DEAD)
|
||||
status += "is bruised and necrotic"
|
||||
if(!org.is_usable() || org.is_dislocated())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].</span>",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.</span>",1)
|
||||
|
||||
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)
|
||||
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>")
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] tries to pat out [src]'s flames!</span>",
|
||||
"<span class='warning'>You try to pat out [src]'s flames! Hot!</span>")
|
||||
if(do_mob(M, src, 15))
|
||||
src.adjust_fire_stacks(-0.5)
|
||||
if (prob(10) && (M.fire_stacks <= 0))
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
if (M.on_fire)
|
||||
M.visible_message("<span class='danger'>The fire spreads from [src] to [M]!</span>",
|
||||
"<span class='danger'>The fire spreads to you as well!</span>")
|
||||
else
|
||||
src.adjust_fire_stacks(-0.5) //Less effective than stop, drop, and roll - also accounting for the fact that it takes half as long.
|
||||
if (src.fire_stacks <= 0)
|
||||
M.visible_message("<span class='warning'>[M] successfully pats out [src]'s flames.</span>",
|
||||
"<span class='warning'>You successfully pat out [src]'s flames.</span>")
|
||||
src.ExtinguishMob()
|
||||
src.fire_stacks = 0
|
||||
else
|
||||
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
var/show_ssd
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
|
||||
if(istype(H)) show_ssd = H.species.show_ssd
|
||||
if(show_ssd && !client && !teleop)
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [T.him] up!</span>", \
|
||||
"<span class='notice'>You shake [src], but [T.he] [T.does] not respond... Maybe [T.he] [T.has] S.S.D?</span>")
|
||||
else if(lying || src.sleeping)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [T.him] up!</span>", \
|
||||
"<span class='notice'>You shake [src] trying to wake [T.him] up!</span>")
|
||||
else
|
||||
var/mob/living/carbon/human/hugger = M
|
||||
var/datum/gender/TM = gender_datums[M.get_visible_gender()]
|
||||
if(M.resting == 1) //Are they resting on the ground?
|
||||
M.visible_message("<span class='notice'>[M] grabs onto [src] and pulls [TM.himself] up</span>", \
|
||||
"<span class='notice'>You grip onto [src] and pull yourself up off the ground!</span>")
|
||||
if(M.fire_stacks >= (src.fire_stacks + 3)) //Fire checks.
|
||||
src.adjust_fire_stacks(1)
|
||||
M.adjust_fire_stacks(-1)
|
||||
if(M.on_fire)
|
||||
src.IgniteMob()
|
||||
if(do_after(M, 0.5 SECONDS)) //.5 second delay. Makes it a bit stronger than just typing rest.
|
||||
M.resting = 0 //Hoist yourself up up off the ground. No para/stunned/weakened removal.
|
||||
else if(istype(hugger))
|
||||
hugger.species.hug(hugger,src)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [T.him] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [T.him] feel better!</span>")
|
||||
if(M.fire_stacks >= (src.fire_stacks + 3))
|
||||
src.adjust_fire_stacks(1)
|
||||
M.adjust_fire_stacks(-1)
|
||||
if(M.on_fire)
|
||||
src.IgniteMob()
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
|
||||
playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
if(eyecheck() < intensity || override_blindness_check)
|
||||
return ..()
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
|
||||
// Stop! ... Hammertime! ~Carn
|
||||
|
||||
/mob/living/carbon/proc/getDNA()
|
||||
return dna
|
||||
|
||||
/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
|
||||
dna = newDNA
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
|
||||
bodytemperature += temp_inc
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
if(handcuffed)
|
||||
return 0
|
||||
if(buckled && istype(buckled, /obj/structure/bed/nest)) // buckling does not restrict hands
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/carbon/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed()
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
//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
|
||||
var/temp = 0 //see setup.dm:694
|
||||
switch(src.pulse)
|
||||
if(PULSE_NONE)
|
||||
return "0"
|
||||
if(PULSE_SLOW)
|
||||
temp = rand(40, 60)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_NORM)
|
||||
temp = rand(60, 90)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_FAST)
|
||||
temp = rand(90, 120)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_2FAST)
|
||||
temp = rand(120, 160)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_THREADY)
|
||||
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
|
||||
// output for machines^ ^^^^^^^output for people^^^^^^^^^
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping)
|
||||
to_chat(usr, "<font color='red'>You are already sleeping</font>")
|
||||
return
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.sleeping = 20 //Short nap
|
||||
|
||||
/mob/living/carbon/Bump(atom/A)
|
||||
if(now_pushing)
|
||||
return
|
||||
..()
|
||||
if(istype(A, /mob/living/carbon) && prob(10))
|
||||
spread_disease_to(A, "Contact")
|
||||
|
||||
/mob/living/carbon/cannot_use_vents()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
|
||||
if(buckled)
|
||||
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)
|
||||
Weaken(FLOOR(stun_duration/2, 1))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] += magnitude
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
/mob/living/carbon/get_default_language()
|
||||
if(default_language)
|
||||
if(can_speak(default_language))
|
||||
return default_language
|
||||
else
|
||||
return GLOB.all_languages[LANGUAGE_GIBBERISH]
|
||||
|
||||
if(!species)
|
||||
return null
|
||||
|
||||
return species.default_language ? GLOB.all_languages[species.default_language] : null
|
||||
|
||||
/mob/living/carbon/proc/should_have_organ(var/organ_check)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/can_feel_pain(var/check_organ)
|
||||
if(isSynthetic())
|
||||
return 0
|
||||
return !(species.flags & NO_PAIN)
|
||||
|
||||
/mob/living/carbon/needs_to_breathe()
|
||||
if(does_not_breathe)
|
||||
return FALSE
|
||||
return ..()
|
||||
/mob/living/carbon/Initialize()
|
||||
. = ..()
|
||||
//setup reagent holders
|
||||
bloodstr = new/datum/reagents/metabolism/bloodstream(500, src)
|
||||
ingested = new/datum/reagents/metabolism/ingested(500, src)
|
||||
touching = new/datum/reagents/metabolism/touch(500, src)
|
||||
reagents = bloodstr
|
||||
if (!default_language && species_language)
|
||||
default_language = GLOB.all_languages[species_language]
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
handle_viruses()
|
||||
|
||||
// Increase germ_level regularly
|
||||
if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
qdel(ingested)
|
||||
qdel(touching)
|
||||
// We don't qdel(bloodstr) because it's the same as qdel(reagents)
|
||||
for(var/guts in internal_organs)
|
||||
qdel(guts)
|
||||
for(var/food in stomach_contents)
|
||||
qdel(food)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/rejuvenate()
|
||||
bloodstr.clear_reagents()
|
||||
ingested.clear_reagents()
|
||||
touching.clear_reagents()
|
||||
..()
|
||||
|
||||
/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
|
||||
. = ..()
|
||||
if(src.nutrition && src.stat != 2)
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
if(src.m_intent == "run")
|
||||
adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
|
||||
|
||||
if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
|
||||
src.bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/living/user, direction)
|
||||
if((user in src.stomach_contents) && istype(user))
|
||||
if(user.last_special <= world.time)
|
||||
user.last_special = world.time + 50
|
||||
src.visible_message("<span class='danger'>You hear something rumbling inside [src]'s stomach...</span>")
|
||||
var/obj/item/I = user.get_active_hand()
|
||||
if(I && I.force)
|
||||
var/d = rand(round(I.force / 4), I.force)
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/organ/external/organ = H.get_organ(BP_TORSO)
|
||||
if (istype(organ))
|
||||
if(organ.take_damage(d, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
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, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
|
||||
if(prob(src.getBruteLoss() - 50))
|
||||
for(var/atom/movable/A in stomach_contents)
|
||||
A.loc = loc
|
||||
stomach_contents.Remove(A)
|
||||
src.gib()
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
for(var/mob/M in src)
|
||||
if(M in src.stomach_contents)
|
||||
src.stomach_contents.Remove(M)
|
||||
M.loc = src.loc
|
||||
for(var/mob/N in viewers(src, null))
|
||||
if(N.client)
|
||||
N.show_message(text("<font color='red'><B>[M] bursts out of [src]!</B></font>"), 2)
|
||||
..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
if(!istype(M, /mob/living/carbon)) return
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
to_chat(H, "<font color='red'>You can't use your [temp.name]</font>")
|
||||
return
|
||||
|
||||
return
|
||||
|
||||
/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(def_zone == "l_hand" || def_zone == "r_hand") //Diona (And any other potential plant people) hands don't get shocked.
|
||||
if(species.flags & IS_PLANT)
|
||||
return 0
|
||||
shock_damage *= siemens_coeff
|
||||
if (shock_damage<1)
|
||||
return 0
|
||||
|
||||
src.apply_damage(0.2 * shock_damage, BURN, def_zone, used_weapon="Electrocution") //shock the target organ
|
||||
src.apply_damage(0.4 * shock_damage, BURN, BP_TORSO, used_weapon="Electrocution") //shock the torso more
|
||||
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(src, "sparks", 50, 1, -1)
|
||||
if (shock_damage > 15)
|
||||
src.visible_message(
|
||||
"<span class='warning'>[src] was electrocuted[source ? " by the [source]" : ""]!</span>", \
|
||||
"<span class='danger'>You feel a powerful shock course through your body!</span>", \
|
||||
"<span class='warning'>You hear a heavy electrical crack.</span>" \
|
||||
)
|
||||
else
|
||||
src.visible_message(
|
||||
"<span class='warning'>[src] was shocked[source ? " by the [source]" : ""].</span>", \
|
||||
"<span class='warning'>You feel a shock course through your body.</span>", \
|
||||
"<span class='warning'>You hear a zapping sound.</span>" \
|
||||
)
|
||||
|
||||
if(stun)
|
||||
switch(shock_damage)
|
||||
if(16 to 20)
|
||||
Stun(2)
|
||||
if(21 to 25)
|
||||
Weaken(2)
|
||||
if(26 to 30)
|
||||
Weaken(5)
|
||||
if(31 to INFINITY)
|
||||
Weaken(10) //This should work for now, more is really silly and makes you lay there forever
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, loc)
|
||||
s.start()
|
||||
|
||||
return shock_damage
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health >= config.health_threshold_crit)
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
src.visible_message( \
|
||||
"<span class='notice'>[src] examines [T.himself].</span>", \
|
||||
"<span class='notice'>You check yourself for injuries.</span>" \
|
||||
)
|
||||
|
||||
for(var/obj/item/organ/external/org in H.organs)
|
||||
var/list/status = list()
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
/*
|
||||
if(halloss > 0) //Makes halloss show up as actual wounds on self examine.
|
||||
if(prob(30))
|
||||
brutedamage += halloss
|
||||
if(prob(30))
|
||||
burndamage += halloss
|
||||
*/
|
||||
switch(brutedamage)
|
||||
if(1 to 20)
|
||||
status += "bruised"
|
||||
if(20 to 40)
|
||||
status += "wounded"
|
||||
if(40 to INFINITY)
|
||||
status += "mangled"
|
||||
|
||||
switch(burndamage)
|
||||
if(1 to 10)
|
||||
status += "numb"
|
||||
if(10 to 40)
|
||||
status += "blistered"
|
||||
if(40 to INFINITY)
|
||||
status += "peeling away"
|
||||
|
||||
if(org.is_stump())
|
||||
status += "MISSING"
|
||||
if(org.status & ORGAN_MUTATED)
|
||||
status += "weirdly shapen"
|
||||
if(org.dislocated == 2)
|
||||
status += "dislocated"
|
||||
if(org.status & ORGAN_BROKEN)
|
||||
status += "hurts when touched"
|
||||
if(org.status & ORGAN_DEAD)
|
||||
status += "is bruised and necrotic"
|
||||
if(!org.is_usable() || org.is_dislocated())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].</span>",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.</span>",1)
|
||||
|
||||
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
else if (on_fire)
|
||||
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>")
|
||||
else
|
||||
M.visible_message("<span class='warning'>[M] tries to pat out [src]'s flames!</span>",
|
||||
"<span class='warning'>You try to pat out [src]'s flames! Hot!</span>")
|
||||
if(do_mob(M, src, 15))
|
||||
src.adjust_fire_stacks(-0.5)
|
||||
if (prob(10) && (M.fire_stacks <= 0))
|
||||
M.adjust_fire_stacks(1)
|
||||
M.IgniteMob()
|
||||
if (M.on_fire)
|
||||
M.visible_message("<span class='danger'>The fire spreads from [src] to [M]!</span>",
|
||||
"<span class='danger'>The fire spreads to you as well!</span>")
|
||||
else
|
||||
src.adjust_fire_stacks(-0.5) //Less effective than stop, drop, and roll - also accounting for the fact that it takes half as long.
|
||||
if (src.fire_stacks <= 0)
|
||||
M.visible_message("<span class='warning'>[M] successfully pats out [src]'s flames.</span>",
|
||||
"<span class='warning'>You successfully pat out [src]'s flames.</span>")
|
||||
src.ExtinguishMob()
|
||||
src.fire_stacks = 0
|
||||
else
|
||||
if (istype(src,/mob/living/carbon/human) && src:w_uniform)
|
||||
var/mob/living/carbon/human/H = src
|
||||
H.w_uniform.add_fingerprint(M)
|
||||
|
||||
var/show_ssd
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
|
||||
if(istype(H)) show_ssd = H.species.show_ssd
|
||||
if(show_ssd && !client && !teleop)
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [T.him] up!</span>", \
|
||||
"<span class='notice'>You shake [src], but [T.he] [T.does] not respond... Maybe [T.he] [T.has] S.S.D?</span>")
|
||||
else if(lying || src.sleeping)
|
||||
src.sleeping = max(0,src.sleeping-5)
|
||||
if(src.sleeping == 0)
|
||||
src.resting = 0
|
||||
M.visible_message("<span class='notice'>[M] shakes [src] trying to wake [T.him] up!</span>", \
|
||||
"<span class='notice'>You shake [src] trying to wake [T.him] up!</span>")
|
||||
else
|
||||
var/mob/living/carbon/human/hugger = M
|
||||
var/datum/gender/TM = gender_datums[M.get_visible_gender()]
|
||||
if(M.resting == 1) //Are they resting on the ground?
|
||||
M.visible_message("<span class='notice'>[M] grabs onto [src] and pulls [TM.himself] up</span>", \
|
||||
"<span class='notice'>You grip onto [src] and pull yourself up off the ground!</span>")
|
||||
if(M.fire_stacks >= (src.fire_stacks + 3)) //Fire checks.
|
||||
src.adjust_fire_stacks(1)
|
||||
M.adjust_fire_stacks(-1)
|
||||
if(M.on_fire)
|
||||
src.IgniteMob()
|
||||
if(do_after(M, 0.5 SECONDS)) //.5 second delay. Makes it a bit stronger than just typing rest.
|
||||
M.resting = 0 //Hoist yourself up up off the ground. No para/stunned/weakened removal.
|
||||
else if(istype(hugger))
|
||||
hugger.species.hug(hugger,src)
|
||||
else
|
||||
M.visible_message("<span class='notice'>[M] hugs [src] to make [T.him] feel better!</span>", \
|
||||
"<span class='notice'>You hug [src] to make [T.him] feel better!</span>")
|
||||
if(M.fire_stacks >= (src.fire_stacks + 3))
|
||||
src.adjust_fire_stacks(1)
|
||||
M.adjust_fire_stacks(-1)
|
||||
if(M.on_fire)
|
||||
src.IgniteMob()
|
||||
AdjustParalysis(-3)
|
||||
AdjustStunned(-3)
|
||||
AdjustWeakened(-3)
|
||||
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
|
||||
/mob/living/carbon/proc/eyecheck()
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
|
||||
if(eyecheck() < intensity || override_blindness_check)
|
||||
return ..()
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
|
||||
// Stop! ... Hammertime! ~Carn
|
||||
|
||||
/mob/living/carbon/proc/getDNA()
|
||||
return dna
|
||||
|
||||
/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
|
||||
dna = newDNA
|
||||
|
||||
// ++++ROCKDTBEN++++ MOB PROCS //END
|
||||
|
||||
/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
|
||||
bodytemperature += temp_inc
|
||||
|
||||
/mob/living/carbon/can_use_hands()
|
||||
if(handcuffed)
|
||||
return 0
|
||||
if(buckled && istype(buckled, /obj/structure/bed/nest)) // buckling does not restrict hands
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/restrained()
|
||||
if (handcuffed)
|
||||
return 1
|
||||
return
|
||||
|
||||
/mob/living/carbon/u_equip(obj/item/W as obj)
|
||||
if(!W) return 0
|
||||
|
||||
else if (W == handcuffed)
|
||||
handcuffed = null
|
||||
update_inv_handcuffed()
|
||||
if(buckled && buckled.buckle_require_restraints)
|
||||
buckled.unbuckle_mob()
|
||||
|
||||
else if (W == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
else
|
||||
..()
|
||||
|
||||
return
|
||||
|
||||
//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
|
||||
var/temp = 0 //see setup.dm:694
|
||||
switch(src.pulse)
|
||||
if(PULSE_NONE)
|
||||
return "0"
|
||||
if(PULSE_SLOW)
|
||||
temp = rand(40, 60)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_NORM)
|
||||
temp = rand(60, 90)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_FAST)
|
||||
temp = rand(90, 120)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_2FAST)
|
||||
temp = rand(120, 160)
|
||||
return num2text(method ? temp : temp + rand(-10, 10))
|
||||
if(PULSE_THREADY)
|
||||
return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
|
||||
// output for machines^ ^^^^^^^output for people^^^^^^^^^
|
||||
|
||||
/mob/living/carbon/verb/mob_sleep()
|
||||
set name = "Sleep"
|
||||
set category = "IC"
|
||||
|
||||
if(usr.sleeping)
|
||||
to_chat(usr, "<font color='red'>You are already sleeping</font>")
|
||||
return
|
||||
if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
|
||||
usr.sleeping = 20 //Short nap
|
||||
|
||||
/mob/living/carbon/Bump(atom/A)
|
||||
if(now_pushing)
|
||||
return
|
||||
..()
|
||||
if(istype(A, /mob/living/carbon) && prob(10))
|
||||
spread_disease_to(A, "Contact")
|
||||
|
||||
/mob/living/carbon/cannot_use_vents()
|
||||
return
|
||||
|
||||
/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
|
||||
if(buckled)
|
||||
return 0
|
||||
stop_pulling()
|
||||
to_chat(src, "<span class='warning'>You slipped on [slipped_on]!</span>")
|
||||
playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
Weaken(FLOOR(stun_duration/2, 1))
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
|
||||
if(effect in chem_effects)
|
||||
chem_effects[effect] += magnitude
|
||||
else
|
||||
chem_effects[effect] = magnitude
|
||||
|
||||
/mob/living/carbon/get_default_language()
|
||||
if(default_language)
|
||||
if(can_speak(default_language))
|
||||
return default_language
|
||||
else
|
||||
return GLOB.all_languages[LANGUAGE_GIBBERISH]
|
||||
|
||||
if(!species)
|
||||
return null
|
||||
|
||||
return species.default_language ? GLOB.all_languages[species.default_language] : null
|
||||
|
||||
/mob/living/carbon/proc/should_have_organ(var/organ_check)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/can_feel_pain(var/check_organ)
|
||||
if(isSynthetic())
|
||||
return 0
|
||||
return !(species.flags & NO_PAIN)
|
||||
|
||||
/mob/living/carbon/needs_to_breathe()
|
||||
if(does_not_breathe)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -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]
|
||||
|
||||
@@ -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>")
|
||||
@@ -975,7 +975,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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -441,7 +441,7 @@
|
||||
visible_message("<span class='warning'>\The [src] falls from above and slams into \the [landing]!</span>", \
|
||||
"<span class='danger'>You fall off and hit \the [landing]!</span>", \
|
||||
"You hear something slam into \the [landing].")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
playsound(src, "punch", 25, 1, -1)
|
||||
|
||||
// Because wounds heal rather quickly, 10 (the default for this proc) should be enough to discourage jumping off but not be enough to ruin you, at least for the first time.
|
||||
// Hits 10 times, because apparently targeting individual limbs lets certain species survive the fall from atmosphere
|
||||
@@ -538,7 +538,7 @@
|
||||
visible_message("<span class='warning'>\The [src] falls from above and slams into \the [landing]!</span>", \
|
||||
"<span class='danger'>You fall off and hit \the [landing]!</span>", \
|
||||
"You hear something slam into \the [landing].")
|
||||
playsound(loc, "punch", 25, 1, -1)
|
||||
playsound(src, "punch", 25, 1, -1)
|
||||
|
||||
// And now to hurt the mech.
|
||||
if(!planetary)
|
||||
|
||||
@@ -79,7 +79,7 @@ obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
|
||||
|
||||
obj/machinery/atmospherics/pipe/zpipe/proc/burst()
|
||||
src.visible_message("<span class='warning'>\The [src] bursts!</span>");
|
||||
playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
|
||||
playsound(src, 'sound/effects/bang.ogg', 25, 1)
|
||||
var/datum/effect/effect/system/smoke_spread/smoke = new
|
||||
smoke.set_up(1,0, src.loc, 0)
|
||||
smoke.start()
|
||||
|
||||
@@ -1039,7 +1039,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(organ_can_feel_pain())
|
||||
owner.emote("scream")
|
||||
|
||||
playsound(src.loc, "fracture", 10, 1, -2)
|
||||
playsound(src, "fracture", 10, 1, -2)
|
||||
status |= ORGAN_BROKEN
|
||||
broken_description = pick("broken","fracture","hairline fracture")
|
||||
|
||||
|
||||
@@ -160,11 +160,11 @@
|
||||
if(W.is_crowbar())
|
||||
if(opened)
|
||||
to_chat(user, "<spawn class='notice'>You tightly shut \the [src] door.")
|
||||
playsound(src.loc, 'sound/effects/locker_close.ogg', 25, 0, -3)
|
||||
playsound(src, 'sound/effects/locker_close.ogg', 25, 0, -3)
|
||||
opened = 0
|
||||
else
|
||||
to_chat(user, "<spawn class='notice'>You open up \the [src] door.")
|
||||
playsound(src.loc, 'sound/effects/locker_open.ogg', 15, 1, -3)
|
||||
playsound(src, 'sound/effects/locker_open.ogg', 15, 1, -3)
|
||||
opened = 1
|
||||
else if(istype(W,/obj/item/weapon/tank))
|
||||
if(!opened)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
if (href_list["scan"])
|
||||
var/obj/effect/overmap/O = locate(href_list["scan"])
|
||||
if(istype(O) && !QDELETED(O) && (O in view(7,linked)))
|
||||
playsound(loc, "sound/machines/dotprinter.ogg", 30, 1)
|
||||
playsound(src, "sound/machines/dotprinter.ogg", 30, 1)
|
||||
new/obj/item/weapon/paper/(get_turf(src), O.get_scan_data(user), "paper (Sensor Scan - [O])")
|
||||
return TOPIC_HANDLED
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
if(!removed)
|
||||
return 0
|
||||
. = calculate_thrust(removed)
|
||||
playsound(loc, 'sound/machines/thruster.ogg', 100 * thrust_limit, 0, world.view * 4, 0.1)
|
||||
playsound(src, 'sound/machines/thruster.ogg', 100 * thrust_limit, 0, world.view * 4, 0.1)
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
|
||||
return 0 //You can't send faxes to "Unknown"
|
||||
|
||||
flick("faxreceive", src)
|
||||
playsound(loc, "sound/effects/printer.ogg", 50, 1)
|
||||
playsound(src, "sound/effects/printer.ogg", 50, 1)
|
||||
|
||||
|
||||
// give the sprite some time to flick
|
||||
|
||||
@@ -38,19 +38,19 @@
|
||||
P.loc = src
|
||||
icon_state = "[initial(icon_state)]-open"
|
||||
flick("[initial(icon_state)]-open",src)
|
||||
playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
sleep(40)
|
||||
icon_state = initial(icon_state)
|
||||
updateUsrDialog()
|
||||
else if(P.is_wrench())
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
anchored = !anchored
|
||||
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
|
||||
else if(P.is_screwdriver())
|
||||
to_chat(user, "<span class='notice'>You begin taking the [name] apart.</span>")
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
if(do_after(user, 10 * P.toolspeed))
|
||||
playsound(loc, P.usesound, 50, 1)
|
||||
playsound(src, P.usesound, 50, 1)
|
||||
to_chat(user, "<span class='notice'>You take the [name] apart.</span>")
|
||||
new /obj/item/stack/material/steel( src.loc, 4 )
|
||||
for(var/obj/item/I in contents)
|
||||
@@ -101,7 +101,7 @@
|
||||
usr.put_in_hands(P)
|
||||
updateUsrDialog()
|
||||
flick("[initial(icon_state)]-open",src)
|
||||
playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
|
||||
spawn(0)
|
||||
sleep(20)
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user