[Ready]Hallucinations 2.0 (#24478)

* Hallucinations 2.0

* click defines

* tesla sounds and borer

* Fake doomsday and zombie delusion

* death message realism, less spawn, more first_name()

* fix + self delusion

* YUP THAT WAS ALL IT WAS NEEDED TO ENABLE SMOOTH HALLUCINATION MOVEMENT

* oh yeah

* realistic death + tweaks

* bubbleturn

* New fake alert hallucination

* dangerous

* defines and one less spawn

* New -> Initialize

* Initialize fix + new items_other hallucination

* extreme sound realism

* the error is always in the change you don't test

* mo' speech, better speech
This commit is contained in:
XDTM
2017-03-02 23:20:02 +01:00
committed by oranges
parent 5c6e813367
commit 5e91119fce
6 changed files with 439 additions and 118 deletions

View File

@@ -3,7 +3,7 @@
//PUBLIC - call these wherever you want //PUBLIC - call these wherever you want
/mob/proc/throw_alert(category, type, severity, obj/new_master) /mob/proc/throw_alert(category, type, severity, obj/new_master, override = FALSE)
/* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already /* Proc to create or update an alert. Returns the alert if the alert is new or updated, 0 if it was thrown already
category is a text string. Each mob may only have one alert per category; the previous one will be replaced category is a text string. Each mob may only have one alert per category; the previous one will be replaced
@@ -11,7 +11,9 @@
severity is an optional number that will be placed at the end of the icon_state for this alert severity is an optional number that will be placed at the end of the icon_state for this alert
For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2" For example, high pressure's icon_state is "highpressure" and can be serverity 1 or 2 to get "highpressure1" or "highpressure2"
new_master is optional and sets the alert's icon state to "template" in the ui_style icons with the master as an overlay. new_master is optional and sets the alert's icon state to "template" in the ui_style icons with the master as an overlay.
Clicks are forwarded to master */ Clicks are forwarded to master
Override makes it so the alert is not replaced until cleared by a clear_alert with clear_override, and it's used for hallucinations.
*/
if(!category) if(!category)
return return
@@ -19,8 +21,11 @@
var/obj/screen/alert/thealert var/obj/screen/alert/thealert
if(alerts[category]) if(alerts[category])
thealert = alerts[category] thealert = alerts[category]
if(thealert.override_alerts)
return 0
if(new_master && new_master != thealert.master) if(new_master && new_master != thealert.master)
WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [thealert.master]") WARNING("[src] threw alert [category] with new_master [new_master] while already having that alert with master [thealert.master]")
clear_alert(category) clear_alert(category)
return .() return .()
else if(thealert.type != type) else if(thealert.type != type)
@@ -34,6 +39,9 @@
return 0 return 0
else else
thealert = new type() thealert = new type()
thealert.override_alerts = override
if(override)
thealert.timeout = null
if(new_master) if(new_master)
var/old_layer = new_master.layer var/old_layer = new_master.layer
@@ -65,10 +73,12 @@
clear_alert(category) clear_alert(category)
// Proc to clear an existing alert. // Proc to clear an existing alert.
/mob/proc/clear_alert(category) /mob/proc/clear_alert(category, clear_override = FALSE)
var/obj/screen/alert/alert = alerts[category] var/obj/screen/alert/alert = alerts[category]
if(!alert) if(!alert)
return 0 return 0
if(alert.override_alerts && !clear_override)
return 0
alerts -= category alerts -= category
if(client && hud_used) if(client && hud_used)
@@ -85,6 +95,7 @@
var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds var/timeout = 0 //If set to a number, this alert will clear itself after that many deciseconds
var/severity = 0 var/severity = 0
var/alerttooltipstyle = "" var/alerttooltipstyle = ""
var/override_alerts = FALSE //If it is overriding other alerts of the same type
/obj/screen/alert/MouseEntered(location,control,params) /obj/screen/alert/MouseEntered(location,control,params)

View File

@@ -11,11 +11,16 @@ Gunshots/explosions/opening doors/less rare audio (done)
*/ */
#define SCREWYHUD_NONE 0
#define SCREWYHUD_CRIT 1
#define SCREWYHUD_DEAD 2
#define SCREWYHUD_HEALTHY 3
/mob/living/carbon /mob/living/carbon
var/image/halimage var/image/halimage
var/image/halbody var/image/halbody
var/obj/halitem var/obj/halitem
var/hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator, 5 - perfect health var/hal_screwyhud = SCREWYHUD_NONE
var/handling_hal = 0 var/handling_hal = 0
/mob/living/carbon/proc/handle_hallucinations() /mob/living/carbon/proc/handle_hallucinations()
@@ -23,31 +28,25 @@ Gunshots/explosions/opening doors/less rare audio (done)
return return
//Least obvious //Least obvious
var/list/minor = list("sounds"=20,"bolts_minor"=10,"whispers"=15,"message"=5) var/list/minor = list("sounds"=25,"bolts_minor"=5,"whispers"=15,"message"=10,"hudscrew"=15)
//Something's wrong here //Something's wrong here
var/list/medium = list("hudscrew"=15,"items"=15,"dangerflash"=15,"bolts"=10,"flood"=10,"husks"=10,"battle"=10) var/list/medium = list("fake_alert"=15,"items"=10,"items_other"=10,"dangerflash"=10,"bolts"=5,"flood"=5,"husks"=10,"battle"=15,"self_delusion"=10)
//AAAAH //AAAAH
var/list/major = list("fake"=10,"death"=5,"xeno"=10,"singulo"=10,"delusion"=10) var/list/major = list("fake"=20,"death"=10,"xeno"=10,"singulo"=10,"borer"=10,"delusion"=20,"koolaid"=10)
var/grade = 0
var/current = list()
var/trip_length = 0
handling_hal = 1 handling_hal = 1
while(hallucination > 20) while(hallucination > 20)
sleep(rand(200,500)/(hallucination/25)) sleep(rand(200,500)/(hallucination/25))
trip_length += 1
if(prob(min(20,trip_length*2)))
grade = min(3,grade+1)
if(prob(20)) if(prob(20))
continue continue
current = list() var/list/current = list()
for(var/a in minor) switch(rand(100))
current[a] = minor[a] * (grade==0?2:1) if(1 to 50)
for(var/b in medium) current = minor
current[b] = medium[b] * (grade==1?2:1) if(51 to 85)
for(var/c in major) current = medium
current[c] = major[c] * (grade==2?2:1) if(86 to 100)
current = major
var/halpick = pickweight(current) var/halpick = pickweight(current)
@@ -59,7 +58,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/mob/living/carbon/target = null var/mob/living/carbon/target = null
/obj/effect/hallucination/proc/wake_and_restore() /obj/effect/hallucination/proc/wake_and_restore()
target.hal_screwyhud = 0 target.hal_screwyhud = SCREWYHUD_NONE
target.SetSleeping(0) target.SetSleeping(0)
/obj/effect/hallucination/simple /obj/effect/hallucination/simple
@@ -72,13 +71,14 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/image_layer = MOB_LAYER var/image_layer = MOB_LAYER
var/active = 1 //qdelery var/active = 1 //qdelery
/obj/effect/hallucination/simple/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/simple/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
current_image = GetImage() current_image = GetImage()
if(target.client) target.client.images |= current_image if(target.client) target.client.images |= current_image
/obj/effect/hallucination/simple/proc/GetImage() /obj/effect/hallucination/simple/proc/GetImage()
var/image/I = image(image_icon,loc,image_state,image_layer,dir=src.dir) var/image/I = image(image_icon,src,image_state,image_layer,dir=src.dir)
I.pixel_x = px I.pixel_x = px
I.pixel_y = py I.pixel_y = py
if(col_mod) if(col_mod)
@@ -122,7 +122,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/radius = 0 var/radius = 0
var/next_expand = 0 var/next_expand = 0
/obj/effect/hallucination/fake_flood/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/fake_flood/Initialize(mapload, var/mob/living/carbon/T)
..() ..()
target = T target = T
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target)) for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target))
@@ -169,7 +169,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
image_icon = 'icons/mob/alien.dmi' image_icon = 'icons/mob/alien.dmi'
image_state = "alienh_pounce" image_state = "alienh_pounce"
/obj/effect/hallucination/simple/xeno/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/simple/xeno/Initialize(mapload, var/mob/living/carbon/T)
..() ..()
name = "alien hunter ([rand(1, 1000)])" name = "alien hunter ([rand(1, 1000)])"
@@ -184,7 +184,8 @@ Gunshots/explosions/opening doors/less rare audio (done)
var/obj/machinery/atmospherics/components/unary/vent_pump/pump = null var/obj/machinery/atmospherics/components/unary/vent_pump/pump = null
var/obj/effect/hallucination/simple/xeno/xeno = null var/obj/effect/hallucination/simple/xeno/xeno = null
/obj/effect/hallucination/xeno_attack/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/xeno_attack/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target)) for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target))
if(!U.welded) if(!U.welded)
@@ -210,7 +211,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
image_icon = 'icons/mob/animal.dmi' image_icon = 'icons/mob/animal.dmi'
image_state = "clown" image_state = "clown"
/obj/effect/hallucination/simple/clown/New(loc,var/mob/living/carbon/T,duration) /obj/effect/hallucination/simple/clown/Initialize(mapload, var/mob/living/carbon/T,duration)
..(loc, T) ..(loc, T)
name = pick(clown_names) name = pick(clown_names)
QDEL_IN(src,duration) QDEL_IN(src,duration)
@@ -218,18 +219,107 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/hallucination/simple/clown/scary /obj/effect/hallucination/simple/clown/scary
image_state = "scary_clown" image_state = "scary_clown"
/obj/effect/hallucination/simple/borer
image_icon = 'icons/mob/animal.dmi'
image_state = "brainslug"
/obj/effect/hallucination/borer
//A borer paralyzes you and crawls in your ear
var/obj/machinery/atmospherics/components/unary/vent_pump/pump = null
var/obj/effect/hallucination/simple/borer/borer = null
/obj/effect/hallucination/borer/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T
for(var/obj/machinery/atmospherics/components/unary/vent_pump/U in orange(7,target))
if(!U.welded)
pump = U
break
if(pump)
borer = new(pump.loc,target)
for(var/i=0, i<11, i++)
walk_to(borer, get_step(borer, get_cardinal_dir(borer, T)))
if(borer.Adjacent(T))
T << "<span class='userdanger'>You feel a creeping, horrible sense of dread come over you, freezing your limbs and setting your heart racing.</span>"
T.Stun(4)
sleep(50)
qdel(borer)
sleep(rand(60, 90))
T << "<span class='changeling'><i>Primary [rand(1000,9999)] states:</i> [pick("Hello","Hi","You're my slave now!","Don't try to get rid of me...")]</span>"
break
sleep(4)
if(!QDELETED(borer))
qdel(borer)
qdel(src)
/obj/effect/hallucination/simple/bubblegum
name = "Bubblegum"
image_icon = 'icons/mob/lavaland/96x96megafauna.dmi'
image_state = "bubblegum"
px = -32
/obj/effect/hallucination/oh_yeah
var/turf/closed/wall/wall
var/obj/effect/hallucination/simple/bubblegum/bubblegum = null
var/image/fakebroken
var/image/fakerune
/obj/effect/hallucination/oh_yeah/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T
for(var/turf/closed/wall/W in range(7,target))
wall = W
break
if(wall)
fakebroken = image('icons/turf/floors.dmi', wall, "plating", layer = TURF_LAYER)
var/turf/landing = get_turf(target)
var/turf/landing_image_turf = get_step(landing, SOUTHWEST) //the icon is 3x3
fakerune = image('icons/effects/96x96.dmi', landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER)
fakebroken.override = TRUE
if(target.client)
target.client.images |= fakebroken
target.client.images |= fakerune
target.playsound_local(wall,'sound/effects/meteorimpact.ogg', 150)
bubblegum = new(wall, target)
sleep(10) //ominous wait
var/charged = FALSE //only get hit once
while(get_turf(bubblegum) != landing)
bubblegum.forceMove(get_step_towards(bubblegum, landing))
bubblegum.setDir(get_dir(bubblegum, landing))
target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150)
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
target.Weaken(4)
target.staminaloss += 40
step_away(target, bubblegum)
shake_camera(target, 4, 3)
target.visible_message("<span class='warning'>[target] jumps backwards, falling on the ground!</span>","<span class='userdanger'>[bubblegum] slams into you!</span>")
sleep(2)
sleep(30)
qdel(bubblegum)
qdel(src)
/obj/effect/hallucination/oh_yeah/Destroy()
if(target.client)
target.client.images.Remove(fakebroken)
target.client.images.Remove(fakerune)
return ..()
/obj/effect/hallucination/singularity_scare /obj/effect/hallucination/singularity_scare
//Singularity moving towards you. //Singularity moving towards you.
//todo Hide where it moved with fake space images //todo Hide where it moved with fake space images
var/obj/effect/hallucination/simple/singularity/s = null var/obj/effect/hallucination/simple/singularity/s = null
/obj/effect/hallucination/singularity_scare/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/singularity_scare/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
var/turf/start = T.loc var/turf/start = get_turf(T)
var/screen_border = pick(SOUTH,EAST,WEST,NORTH) var/screen_border = pick(SOUTH,EAST,WEST,NORTH)
for(var/i = 0,i<11,i++) for(var/i = 0,i<11,i++)
start = get_step(start,screen_border) start = get_step(start,screen_border)
s = new(start,target) s = new(start,target)
s.parent = src
for(var/i = 0,i<11,i++) for(var/i = 0,i<11,i++)
sleep(5) sleep(5)
s.loc = get_step(get_turf(s),get_dir(s,target)) s.loc = get_step(get_turf(s),get_dir(s,target))
@@ -243,56 +333,111 @@ Gunshots/explosions/opening doors/less rare audio (done)
image_layer = MASSIVE_OBJ_LAYER image_layer = MASSIVE_OBJ_LAYER
px = -96 px = -96
py = -96 py = -96
var/obj/effect/hallucination/singularity_scare/parent
/obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir) /obj/effect/hallucination/simple/singularity/proc/Eat(atom/OldLoc, Dir)
var/target_dist = get_dist(src,target) var/target_dist = get_dist(src,target)
if(target_dist<=3) //"Eaten" if(target_dist<=3) //"Eaten"
target.hal_screwyhud = 1 target.hal_screwyhud = SCREWYHUD_CRIT
target.SetSleeping(20) target.SetSleeping(8, no_alert = TRUE)
addtimer(CALLBACK(src, .proc/wake_and_restore), rand(50, 100)) addtimer(CALLBACK(parent, .proc/wake_and_restore), rand(30, 50))
/obj/effect/hallucination/battle /obj/effect/hallucination/battle
/obj/effect/hallucination/battle/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/battle/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
var/hits = rand(3,6) var/hits = rand(3,6)
switch(rand(1,5)) switch(rand(1,5))
if(1) //Laser fight if(1) //Laser fight
for(var/i=0,i<hits,i++) for(var/i=0,i<hits,i++)
target << sound('sound/weapons/Laser.ogg',0,1,0,25) target.playsound_local(null, 'sound/weapons/Laser.ogg', 25)
sleep(rand(1,5)) if(prob(75))
target << sound(get_sfx("bodyfall"),0,1,0,25) addtimer(CALLBACK(target, /atom/.proc/playsound_local, null, 'sound/weapons/sear.ogg', 25), rand(10,20))
else
addtimer(CALLBACK(target, /atom/.proc/playsound_local, null, 'sound/weapons/effects/searwall.ogg', 25), rand(10,20))
sleep(rand(CLICK_CD_RANGE, CLICK_CD_RANGE + 4))
target.playsound_local(null, get_sfx("bodyfall"), 25)
if(2) //Esword fight if(2) //Esword fight
target << sound('sound/weapons/saberon.ogg',0,1,0,15) target.playsound_local(null, 'sound/weapons/saberon.ogg',15)
for(var/i=0,i<hits,i++) for(var/i=0,i<hits,i++)
target << sound('sound/weapons/blade1.ogg',,0,1,0,25) target.playsound_local(null, 'sound/weapons/blade1.ogg', 25)
sleep(rand(1,5)) sleep(CLICK_CD_MELEE)
target << sound(get_sfx("bodyfall"),0,1,0,25) target.playsound_local(null, get_sfx("bodyfall"), 25)
target << sound('sound/weapons/saberoff.ogg',0,1,0,15) target.playsound_local(null, 'sound/weapons/saberoff.ogg', 15)
if(3) //Gun fight if(3) //Gun fight
for(var/i=0,i<hits,i++) for(var/i=0,i<hits,i++)
target << sound(get_sfx("gunshot"),0,1,0,25) target.playsound_local(null, get_sfx("gunshot"), 25)
sleep(rand(1,5)) if(prob(75))
target << sound(get_sfx("bodyfall"),0,1,0,25) addtimer(CALLBACK(target, /atom/.proc/playsound_local, null, 'sound/weapons/pierce.ogg', 25), rand(10,20))
else
addtimer(CALLBACK(target, /atom/.proc/playsound_local, null, "ricochet", 25), rand(10,20))
sleep(rand(CLICK_CD_RANGE, CLICK_CD_RANGE + 4))
target.playsound_local(null, get_sfx("bodyfall"), 25)
if(4) //Stunprod + cablecuff if(4) //Stunprod + cablecuff
target << sound('sound/weapons/Egloves.ogg',0,1,40) target.playsound_local(null, 'sound/weapons/Egloves.ogg', 40)
target << sound(get_sfx("bodyfall"),0,1,0,25) target.playsound_local(null, get_sfx("bodyfall"), 25)
sleep(30) sleep(20)
target << sound('sound/weapons/cablecuff.ogg',0,1,0,15) target.playsound_local(null, 'sound/weapons/cablecuff.ogg', 15)
if(5) // Tick Tock if(5) // Tick Tock
for(var/i=0,i<hits,i++) for(var/i=0,i<hits,i++)
target << sound('sound/items/timer.ogg',0,1,0,25) target.playsound_local(null, 'sound/items/timer.ogg', 25)
sleep(15) sleep(15)
qdel(src) qdel(src)
/obj/effect/hallucination/items_other
/obj/effect/hallucination/items_other/Initialize(mapload, mob/living/carbon/T)
..()
target = T
var/item = pick(list("esword","dual_esword","stunpaper","clockspear","ttv","flash","armblade"))
var/image_file
var/image/A = null
for(var/mob/living/carbon/human/H in view(7,target))
if(H != target)
var/free_hand = H.get_empty_held_index_for_side(side = "left")
if(free_hand)
image_file = 'icons/mob/inhands/items_lefthand.dmi'
else
free_hand = H.get_empty_held_index_for_side(side = "right")
if(free_hand)
image_file = 'icons/mob/inhands/items_righthand.dmi'
if(image_file)
switch(item)
if("esword")
target.playsound_local(H, 'sound/weapons/saberon.ogg')
A = image(image_file,H,"swordred", layer=ABOVE_MOB_LAYER)
if("dual_esword")
target.playsound_local(H, 'sound/weapons/saberon.ogg')
A = image(image_file,H,"dualsaberred1", layer=ABOVE_MOB_LAYER)
if("stunpaper")
A = image(image_file,H,"paper", layer=ABOVE_MOB_LAYER)
A.color = rgb(255,0,0)
if("clockspear")
A = image(image_file,H,"ratvarian_spear", layer=ABOVE_MOB_LAYER)
if("ttv")
A = image(image_file,H,"ttv", layer=ABOVE_MOB_LAYER)
if("flash")
A = image(image_file,H,"flashtool", layer=ABOVE_MOB_LAYER)
if("armblade")
A = image(image_file,H,"arm_blade", layer=ABOVE_MOB_LAYER)
if(target.client)
target.client.images |= A
sleep(rand(150,250))
if(item == "esword" || item == "dual_esword")
target.playsound_local(H, 'sound/weapons/saberoff.ogg')
target.client.images.Remove(A)
break
qdel(src)
/obj/effect/hallucination/delusion /obj/effect/hallucination/delusion
var/list/image/delusions = list() var/list/image/delusions = list()
/obj/effect/hallucination/delusion/New(loc,mob/living/carbon/T,force_kind = null , duration = 300,skip_nearby = 1, custom_icon = null, custom_icon_file = null) /obj/effect/hallucination/delusion/Initialize(mapload, mob/living/carbon/T,force_kind = null , duration = 300,skip_nearby = 1, custom_icon = null, custom_icon_file = null)
..()
target = T target = T
var/image/A = null var/image/A = null
var/kind = force_kind ? force_kind : pick("clown","corgi","carp","skeleton","demon") var/kind = force_kind ? force_kind : pick("clown","corgi","carp","skeleton","demon","zombie")
for(var/mob/living/carbon/human/H in living_mob_list) for(var/mob/living/carbon/human/H in living_mob_list)
if(H == target) if(H == target)
continue continue
@@ -307,6 +452,8 @@ Gunshots/explosions/opening doors/less rare audio (done)
A = image('icons/mob/pets.dmi',H,"corgi") A = image('icons/mob/pets.dmi',H,"corgi")
if("skeleton")//Skeletons if("skeleton")//Skeletons
A = image('icons/mob/human.dmi',H,"skeleton") A = image('icons/mob/human.dmi',H,"skeleton")
if("zombie")//Zombies
A = image('icons/mob/human.dmi',H,"zombie")
if("demon")//Demon if("demon")//Demon
A = image('icons/mob/mob.dmi',H,"daemon") A = image('icons/mob/mob.dmi',H,"daemon")
if("custom") if("custom")
@@ -321,8 +468,49 @@ Gunshots/explosions/opening doors/less rare audio (done)
for(var/image/I in delusions) for(var/image/I in delusions)
if(target.client) if(target.client)
target.client.images.Remove(I) target.client.images.Remove(I)
return ..()
/obj/effect/hallucination/fakeattacker/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/self_delusion
var/image/delusion
/obj/effect/hallucination/self_delusion/Initialize(mapload, mob/living/carbon/T,force_kind = null , duration = 300, custom_icon = null, custom_icon_file = null)
..()
target = T
var/image/A = null
var/kind = force_kind ? force_kind : pick("clown","corgi","carp","skeleton","demon","zombie","robot")
switch(kind)
if("clown")//Clown
A = image('icons/mob/animal.dmi',target,"clown")
if("carp")//Carp
A = image('icons/mob/animal.dmi',target,"carp")
if("corgi")//Corgi
A = image('icons/mob/pets.dmi',target,"corgi")
if("skeleton")//Skeletons
A = image('icons/mob/human.dmi',target,"skeleton")
if("zombie")//Zombies
A = image('icons/mob/human.dmi',target,"zombie")
if("demon")//Demon
A = image('icons/mob/mob.dmi',target,"daemon")
if("robot")//Cyborg
A = image('icons/mob/robots.dmi',target,"robot")
target.playsound_local(target,'sound/voice/liveagain.ogg')
if("custom")
A = image(custom_icon_file, target, custom_icon)
A.override = 1
if(target.client)
target << "<span class='userdanger'>[target] is hit by a bolt of change in the chest!</span>"
target.playsound_local(target,'sound/magic/Staff_Change.ogg')
delusion = A
target.client.images |= A
QDEL_IN(src, duration)
/obj/effect/hallucination/self_delusion/Destroy()
if(target.client)
target.client.images.Remove(delusion)
return ..()
/obj/effect/hallucination/fakeattacker/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
var/mob/living/carbon/human/clone = null var/mob/living/carbon/human/clone = null
var/clone_weapon = null var/clone_weapon = null
@@ -382,7 +570,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
step_away(src,my_target,2) step_away(src,my_target,2)
user.changeNext_move(CLICK_CD_MELEE) user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src) user.do_attack_animation(src)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')) my_target.playsound_local(src, P.hitsound)
my_target.visible_message("<span class='danger'>[my_target] flails around wildly.</span>", \ my_target.visible_message("<span class='danger'>[my_target] flails around wildly.</span>", \
"<span class='danger'>[my_target] has attacked [src]!</span>") "<span class='danger'>[my_target] has attacked [src]!</span>")
@@ -395,7 +583,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
for(var/mob/O in oviewers(world.view , my_target)) for(var/mob/O in oviewers(world.view , my_target))
O << "<span class='danger'>[my_target] stumbles around.</span>" O << "<span class='danger'>[my_target] stumbles around.</span>"
/obj/effect/fake_attacker/New(loc,var/mob/living/carbon/T) /obj/effect/fake_attacker/Initialize(mapload, var/mob/living/carbon/T)
..() ..()
my_target = T my_target = T
QDEL_IN(src, 300) QDEL_IN(src, 300)
@@ -423,7 +611,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/fake_attacker/proc/attack_loop() /obj/effect/fake_attacker/proc/attack_loop()
while(1) while(1)
sleep(rand(5,10)) sleep(rand(5,10))
if(obj_integrity < 0) if(obj_integrity < 0 || my_target.stat)
collapse() collapse()
continue continue
if(get_dist(src,my_target) > 1) if(get_dist(src,my_target) > 1)
@@ -434,7 +622,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
if(prob(15)) if(prob(15))
do_attack_animation(my_target, ATTACK_EFFECT_PUNCH) do_attack_animation(my_target, ATTACK_EFFECT_PUNCH)
if(weapon_name) if(weapon_name)
my_target << sound(pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')) my_target.playsound_local(my_target, weap.hitsound)
my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1) my_target.show_message("<span class='danger'>[src.name] has attacked [my_target] with [weapon_name]!</span>", 1)
my_target.staminaloss += 30 my_target.staminaloss += 30
if(prob(20)) if(prob(20))
@@ -443,7 +631,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
if(!locate(/obj/effect/overlay) in my_target.loc) if(!locate(/obj/effect/overlay) in my_target.loc)
fake_blood(my_target) fake_blood(my_target)
else else
my_target << sound(pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')) my_target.playsound_local(my_target, pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg'))
my_target.show_message("<span class='userdanger'>[src.name] has punched [my_target]!</span>", 1) my_target.show_message("<span class='userdanger'>[src.name] has punched [my_target]!</span>", 1)
my_target.staminaloss += 30 my_target.staminaloss += 30
if(prob(33)) if(prob(33))
@@ -456,6 +644,7 @@ Gunshots/explosions/opening doors/less rare audio (done)
/obj/effect/fake_attacker/proc/collapse() /obj/effect/fake_attacker/proc/collapse()
collapse = 1 collapse = 1
updateimage() updateimage()
qdel(src)
/obj/effect/fake_attacker/proc/fake_blood(mob/target) /obj/effect/fake_attacker/proc/fake_blood(mob/target)
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc) var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
@@ -483,7 +672,8 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
/obj/effect/hallucination/bolts /obj/effect/hallucination/bolts
var/list/doors = list() var/list/doors = list()
/obj/effect/hallucination/bolts/New(loc,var/mob/living/carbon/T,var/door_number=-1) //-1 for sever 1-2 for subtle /obj/effect/hallucination/bolts/Initialize(mapload, var/mob/living/carbon/T,var/door_number=-1) //-1 for severe, 1-2 for subtle
..()
target = T target = T
var/image/I = null var/image/I = null
var/count = 0 var/count = 0
@@ -491,23 +681,27 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
if(count>door_number && door_number>0) if(count>door_number && door_number>0)
break break
count++ count++
I = image(A.icon,A,"door_locked",layer=A.layer+0.1) I = image(A.overlays_file, get_turf(A), "lights_bolts",layer=A.layer+0.1)
doors += I doors += I
if(target.client) if(target.client)
target.client.images |= I target.client.images |= I
sleep(2) target.playsound_local(get_turf(A), 'sound/machines/BoltsDown.ogg',30,0,3)
sleep(rand(6,12))
sleep(100) sleep(100)
for(var/image/B in doors) for(var/image/B in doors)
if(target.client) if(target.client)
target.client.images.Remove(B) target.client.images.Remove(B)
target.playsound_local(get_turf(B), 'sound/machines/BoltsUp.ogg',30,0,3)
sleep(rand(6,12))
qdel(src) qdel(src)
/obj/effect/hallucination/whispers /obj/effect/hallucination/whispers
/obj/effect/hallucination/whispers/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/whispers/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
var/speak_messages = list("I'm watching you...","[target.name]!","Go away!","Kchck-Chkck? Kchchck!","Did you hear that?","What did you do ?","Why?","Give me that!","Honk!","HELP!!") var/speak_messages = list("I'm watching you...","[target.first_name()]!","Get out!","Kchck-Chkck? Kchchck!","Did you hear that?","What did you do ?","Why?","Give me that!","Honk!","HELP!!","EI NATH!!", "RUN!!", "Kill me!","O bidai nabora se'sma!", "[text2ratvar("They're on to me!")]")
var/radio_messages = list("Xenos!","Singularity loose!","They are arming the nuke!","They butchered Ian!","H-help!","[pick(teleportlocs)]!!","Where's [target.name]?","Call the shuttle!") var/radio_messages = list("Xenos!","Singularity loose!","They are arming the nuke!","They butchered Ian!","H-help!","[pick("Cult", "Wizard", "Ling", "Ops", "Revenant", "Murderer", "Harm", "I hear flashing", "Help")] in [pick(teleportlocs)]!!","Where's [target.first_name()]?","Call the shuttle!","AI rogue!!")
var/list/mob/living/carbon/people = list() var/list/mob/living/carbon/people = list()
var/list/mob/living/carbon/person = null var/list/mob/living/carbon/person = null
@@ -521,7 +715,12 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
person = H person = H
people += H people += H
if(person) //Basic talk if(person) //Basic talk
var/image/speech_overlay = image('icons/mob/talk.dmi', person, "default0", layer = ABOVE_MOB_LAYER)
target << target.compose_message(person,person.languages_understood,pick(speak_messages),null,person.get_spans()) target << target.compose_message(person,person.languages_understood,pick(speak_messages),null,person.get_spans())
if(target.client)
target.client.images |= speech_overlay
sleep(30)
target.client.images.Remove(speech_overlay)
else // Radio talk else // Radio talk
var/list/humans = list() var/list/humans = list()
for(var/mob/living/carbon/human/H in living_mob_list) for(var/mob/living/carbon/human/H in living_mob_list)
@@ -532,7 +731,8 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
/obj/effect/hallucination/message /obj/effect/hallucination/message
/obj/effect/hallucination/message/New(loc,var/mob/living/carbon/T) /obj/effect/hallucination/message/Initialize(mapload, var/mob/living/carbon/T)
..()
target = T target = T
var/chosen = pick("<span class='userdanger'>The light burns you!</span>", \ var/chosen = pick("<span class='userdanger'>The light burns you!</span>", \
"<span class='danger'>You don't feel like yourself.</span>", \ "<span class='danger'>You don't feel like yourself.</span>", \
@@ -540,6 +740,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
"<span class='notice'>You hear something squeezing through the ducts...</span>", \ "<span class='notice'>You hear something squeezing through the ducts...</span>", \
"<span class='notice'>You hear a distant scream.</span>", \ "<span class='notice'>You hear a distant scream.</span>", \
"<span class='notice'>You feel invincible, nothing can hurt you!</span>", \ "<span class='notice'>You feel invincible, nothing can hurt you!</span>", \
"<span class='warning'>You feel a tiny prick!</span>", \
"<B>[target]</B> sneezes.", \ "<B>[target]</B> sneezes.", \
"<span class='warning'>You feel faint.</span>", \ "<span class='warning'>You feel faint.</span>", \
"<span class='noticealien'>You hear a strange, alien voice in your head...</span>[pick("Hiss","Ssss")]", \ "<span class='noticealien'>You hear a strange, alien voice in your head...</span>[pick("Hiss","Ssss")]", \
@@ -551,14 +752,20 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
switch(hal_type) switch(hal_type)
if("xeno") if("xeno")
new /obj/effect/hallucination/xeno_attack(src.loc,src) new /obj/effect/hallucination/xeno_attack(src.loc,src)
if("borer")
new /obj/effect/hallucination/borer(src.loc,src)
if("singulo") if("singulo")
new /obj/effect/hallucination/singularity_scare(src.loc,src) new /obj/effect/hallucination/singularity_scare(src.loc,src)
if("koolaid")
new /obj/effect/hallucination/oh_yeah(src.loc,src)
if("battle") if("battle")
new /obj/effect/hallucination/battle(src.loc,src) new /obj/effect/hallucination/battle(src.loc,src)
if("flood") if("flood")
new /obj/effect/hallucination/fake_flood(src.loc,src) new /obj/effect/hallucination/fake_flood(src.loc,src)
if("delusion") if("delusion")
new /obj/effect/hallucination/delusion(src.loc,src) new /obj/effect/hallucination/delusion(src.loc,src)
if("self_delusion")
new /obj/effect/hallucination/self_delusion(src.loc,src)
if("fake") if("fake")
new /obj/effect/hallucination/fakeattacker(src.loc,src) new /obj/effect/hallucination/fakeattacker(src.loc,src)
if("bolts") if("bolts")
@@ -569,31 +776,42 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
new /obj/effect/hallucination/whispers(src.loc,src) new /obj/effect/hallucination/whispers(src.loc,src)
if("message") if("message")
new /obj/effect/hallucination/message(src.loc,src) new /obj/effect/hallucination/message(src.loc,src)
if("items_other")
new /obj/effect/hallucination/items_other(src.loc,src)
if("sounds") if("sounds")
//Strange audio //Strange audio
//src << "Strange Audio" //src << "Strange Audio"
switch(rand(1,18)) switch(rand(1,20))
if(1) src << 'sound/machines/airlock.ogg' if(1) playsound_local(null,'sound/machines/airlock.ogg')
if(2) if(2)
if(prob(50))src << 'sound/effects/Explosion1.ogg' if(prob(50)) playsound_local(null,'sound/effects/Explosion1.ogg')
else src << 'sound/effects/Explosion2.ogg' else playsound_local(null, 'sound/effects/Explosion2.ogg')
if(3) src << 'sound/effects/explosionfar.ogg' if(3) playsound_local(null, 'sound/effects/explosionfar.ogg')
if(4) src << 'sound/effects/Glassbr1.ogg' if(4) playsound_local(null, pick('sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg'))
if(5) src << 'sound/effects/Glassbr2.ogg' if(5)
if(6) src << 'sound/effects/Glassbr3.ogg' playsound_local(null, 'sound/weapons/ring.ogg')
if(7) src << 'sound/machines/twobeep.ogg' sleep(15)
if(8) src << 'sound/machines/windowdoor.ogg' playsound_local(null, 'sound/weapons/ring.ogg')
sleep(15)
playsound_local(null, 'sound/weapons/ring.ogg')
if(6) playsound_local(null, 'sound/magic/Summon_guns.ogg')
if(7) playsound_local(null, 'sound/machines/Alarm.ogg')
if(8) playsound_local(null, 'sound/voice/bfreeze.ogg')
if(9) if(9)
//To make it more realistic, I added two gunshots (enough to kill) //To make it more realistic, I added two gunshots (enough to kill)
src << 'sound/weapons/Gunshot.ogg' playsound_local(null, 'sound/weapons/Gunshot.ogg', 25)
spawn(rand(10,30)) spawn(rand(10,30))
src << 'sound/weapons/Gunshot.ogg' playsound_local(null, 'sound/weapons/Gunshot.ogg', 25)
if(10) src << 'sound/weapons/smash.ogg' sleep(rand(5,10))
playsound_local(null, sound(get_sfx("bodyfall"), 25))
if(10) playsound_local(null, 'sound/effects/pray_chaplain.ogg')
if(11) if(11)
//Same as above, but with tasers. //Same as above, but with tasers.
src << 'sound/weapons/Taser.ogg' playsound_local(null, 'sound/weapons/Taser.ogg', 25)
spawn(rand(10,30)) spawn(rand(10,30))
src << 'sound/weapons/Taser.ogg' playsound_local(null, 'sound/weapons/Taser.ogg', 25)
sleep(rand(5,10))
playsound_local(null, sound(get_sfx("bodyfall"), 25))
//Rare audio //Rare audio
if(12) if(12)
//These sounds are (mostly) taken from Hidden: Source //These sounds are (mostly) taken from Hidden: Source
@@ -602,27 +820,99 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\ 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg', 'sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg',\
'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\ 'sound/hallucinations/look_up1.ogg', 'sound/hallucinations/look_up2.ogg', 'sound/hallucinations/over_here1.ogg', 'sound/hallucinations/over_here2.ogg', 'sound/hallucinations/over_here3.ogg',\
'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg') 'sound/hallucinations/turn_around1.ogg', 'sound/hallucinations/turn_around2.ogg', 'sound/hallucinations/veryfar_noise.ogg', 'sound/hallucinations/wail.ogg')
src << pick(creepyasssounds) playsound_local(null, pick(creepyasssounds))
if(13) if(13)
src << "<span class='warning'>You feel a tiny prick!</span>" playsound_local(null, 'sound/effects/ratvar_rises.ogg')
sleep(150)
playsound_local(null, 'sound/effects/ratvar_reveal.ogg')
if(14) if(14)
src << "<h1 class='alert'>Priority Announcement</h1>" src << "<h1 class='alert'>Priority Announcement</h1>"
src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>" src << "<br><br><span class='alert'>The Emergency Shuttle has docked with the station. You have 3 minutes to board the Emergency Shuttle.</span><br><br>"
src << sound('sound/AI/shuttledock.ogg') playsound_local(null, 'sound/AI/shuttledock.ogg')
//Deconstructing a wall
if(15) if(15)
src << 'sound/items/Welder.ogg' playsound_local(null, 'sound/items/Welder.ogg', 25)
sleep(105)
playsound_local(null, 'sound/items/Welder2.ogg', 25)
sleep(15)
playsound_local(null, 'sound/items/Ratchet.ogg', 25)
//Hacking a door
if(16) if(16)
src << 'sound/items/Screwdriver.ogg' playsound_local(null, 'sound/items/Screwdriver.ogg', 50)
sleep(rand(10,30))
for(var/i = rand(1,3), i>0, i--)
playsound_local(null, 'sound/weapons/empty.ogg', 50)
sleep(rand(10,30))
playsound_local(null, 'sound/machines/airlockforced.ogg', 50)
if(17) if(17)
src << 'sound/weapons/saberon.ogg' playsound_local(null, 'sound/weapons/saberon.ogg')
if(18) if(18)
src << 'sound/weapons/saberoff.ogg' src << "<h1 class='alert'>Biohazard Alert</h1>"
src << "<br><br><span class='alert'>Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.</span><br><br>"
playsound_local(null, 'sound/AI/outbreak5.ogg')
if(19) //Tesla loose!
playsound_local(null, 'sound/magic/lightningbolt.ogg', 35)
sleep(20)
playsound_local(null, 'sound/magic/lightningbolt.ogg', 65)
sleep(20)
playsound_local(null, 'sound/magic/lightningbolt.ogg', 100)
if(20) //AI is doomsdaying!
src << "<h1 class='alert'>Anomaly Alert</h1>"
src << "<br><br><span class='alert'>Hostile runtimes detected in all station systems, please deactivate your AI to prevent possible damage to its morality core.</span><br><br>"
playsound_local(null, 'sound/AI/aimalf.ogg')
if("hudscrew") if("hudscrew")
//Screwy HUD //Screwy HUD
//src << "Screwy HUD" //src << "Screwy HUD"
hal_screwyhud = pick(1,2,3,3,4,4) hal_screwyhud = pick(SCREWYHUD_NONE,SCREWYHUD_CRIT,SCREWYHUD_DEAD,SCREWYHUD_HEALTHY)
spawn(rand(100,250)) sleep(rand(100,250))
hal_screwyhud = 0 hal_screwyhud = 0
if("fake_alert")
var/alert_type = pick("oxy","not_enough_tox","not_enough_co2","too_much_oxy","too_much_co2","tox_in_air","newlaw","nutrition","charge","weightless","fire","locked","hacked","temp","pressure")
switch(alert_type)
if("oxy")
throw_alert("oxy", /obj/screen/alert/oxy, override = TRUE)
if("not_enough_tox")
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox, override = TRUE)
if("not_enough_co2")
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2, override = TRUE)
if("too_much_oxy")
throw_alert("too_much_oxy", /obj/screen/alert/too_much_oxy, override = TRUE)
if("too_much_co2")
throw_alert("too_much_co2", /obj/screen/alert/too_much_co2, override = TRUE)
if("tox_in_air")
throw_alert("tox_in_air", /obj/screen/alert/tox_in_air, override = TRUE)
if("nutrition")
if(prob(50))
throw_alert("nutrition", /obj/screen/alert/fat, override = TRUE)
else
throw_alert("nutrition", /obj/screen/alert/starving, override = TRUE)
if("weightless")
throw_alert("weightless", /obj/screen/alert/weightless, override = TRUE)
if("fire")
throw_alert("fire", /obj/screen/alert/fire, override = TRUE)
if("temp")
if(prob(50))
throw_alert("temp", /obj/screen/alert/hot, 3, override = TRUE)
else
throw_alert("temp", /obj/screen/alert/cold, 3, override = TRUE)
if("pressure")
if(prob(50))
throw_alert("pressure", /obj/screen/alert/highpressure, 2, override = TRUE)
else
throw_alert("pressure", /obj/screen/alert/lowpressure, 2, override = TRUE)
//BEEP BOOP I AM A ROBOT
if("newlaw")
throw_alert("newlaw", /obj/screen/alert/newlaw, override = TRUE)
if("locked")
throw_alert("locked", /obj/screen/alert/locked, override = TRUE)
if("hacked")
throw_alert("hacked", /obj/screen/alert/hacked, override = TRUE)
if("charge")
throw_alert("charge",/obj/screen/alert/emptycell, override = TRUE)
sleep(rand(100,200))
clear_alert(alert_type, clear_override = TRUE)
if("items") if("items")
//Strange items //Strange items
//src << "Traitor Items" //src << "Traitor Items"
@@ -683,28 +973,42 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
if(possible_points.len) if(possible_points.len)
var/turf/open/floor/target = pick(possible_points) var/turf/open/floor/target = pick(possible_points)
switch(rand(1,3)) switch(rand(1,4))
if(1) if(1)
//src << "Space" //src << "Space"
halimage = image('icons/turf/space.dmi',target,"[rand(1,25)]",TURF_LAYER) halimage = image('icons/turf/space.dmi',target,"[rand(1,25)]",TURF_LAYER)
if(2) if(2)
//src << "Fire" //src << "Lava"
halimage = image('icons/effects/fire.dmi',target,"1",TURF_LAYER) halimage = image('icons/turf/floors/lava.dmi',target,"smooth",TURF_LAYER)
if(3) if(3)
//src << "Chasm"
halimage = image('icons/turf/floors/Chasms.dmi',target,"smooth",TURF_LAYER)
if(4)
//src << "C4" //src << "C4"
halimage = image('icons/obj/grenade.dmi',target,"plastic-explosive2",OBJ_LAYER+0.01) halimage = image('icons/obj/grenade.dmi',target,"plastic-explosive2",OBJ_LAYER+0.01)
if(client) client.images += halimage if(client) client.images += halimage
spawn(rand(10,50)) //Only seen for a brief moment. sleep(rand(40,60)) //Only seen for a brief moment.
if(client) client.images -= halimage if(client) client.images -= halimage
halimage = null halimage = null
if("death") if("death")
//Fake death //Fake death
hal_screwyhud = 1 hal_screwyhud = SCREWYHUD_DEAD
SetSleeping(20) SetSleeping(20, no_alert = TRUE)
spawn(rand(50,100)) var/area/area = get_area(src)
hal_screwyhud = 0 src << "<span class='deadsay'><b>[mind.name]</b> has died at <b>[area.name]</b>.</span>"
if(prob(50))
var/list/dead_people
for(var/mob/dead/observer/G in player_list)
dead_people += G
var/mob/dead/observer/fakemob = pick(dead_people)
if(fakemob)
sleep(rand(30, 60))
src << "<span class='deadsay'><b>DEAD: [fakemob.name]</b> says, \"[pick("rip","welcome [first_name()]","you too?","is the AI malf?",\
"i[prob(50)?" fucking":""] hate [pick("blood cult", "clock cult", "revenants", "abductors","double agents","viruses","badmins","you")]")]\"</span>"
sleep(rand(50,70))
hal_screwyhud = SCREWYHUD_NONE
SetSleeping(0) SetSleeping(0)
if("husks") if("husks")
if(!halbody) if(!halbody)
@@ -726,6 +1030,6 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/ballistic, /obj/item
halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER) halbody = image('icons/mob/alien.dmi',target,"alienother",TURF_LAYER)
if(client) client.images += halbody if(client) client.images += halbody
spawn(rand(50,80)) //Only seen for a brief moment. spawn(rand(30,50)) //Only seen for a brief moment.
if(client) client.images -= halbody if(client) client.images -= halbody
halbody = null halbody = null

View File

@@ -781,11 +781,11 @@
var/health_amount = health - staminaloss var/health_amount = health - staminaloss
if(..(health_amount)) //not dead if(..(health_amount)) //not dead
switch(hal_screwyhud) switch(hal_screwyhud)
if(1) if(SCREWYHUD_CRIT)
hud_used.healths.icon_state = "health6" hud_used.healths.icon_state = "health6"
if(2) if(SCREWYHUD_DEAD)
hud_used.healths.icon_state = "health7" hud_used.healths.icon_state = "health7"
if(5) if(SCREWYHUD_HEALTHY)
hud_used.healths.icon_state = "health0" hud_used.healths.icon_state = "health0"
if(hud_used.healthdoll) if(hud_used.healthdoll)
hud_used.healthdoll.cut_overlays() hud_used.healthdoll.cut_overlays()
@@ -806,7 +806,7 @@
icon_num = 4 icon_num = 4
if(damage > (comparison*4)) if(damage > (comparison*4))
icon_num = 5 icon_num = 5
if(hal_screwyhud == 5) if(hal_screwyhud == SCREWYHUD_HEALTHY)
icon_num = 0 icon_num = 0
if(icon_num) if(icon_num)
hud_used.healthdoll.add_overlay(image('icons/mob/screen_gen.dmi',"[BP.body_zone][icon_num]")) hud_used.healthdoll.add_overlay(image('icons/mob/screen_gen.dmi',"[BP.body_zone][icon_num]"))

View File

@@ -80,10 +80,11 @@
/////////////////////////////////// SLEEPING //////////////////////////////////// /////////////////////////////////// SLEEPING ////////////////////////////////////
/mob/proc/Sleeping(amount, updating = 1) /mob/proc/Sleeping(amount, updating = 1, no_alert = FALSE)
var/old_sleeping = sleeping var/old_sleeping = sleeping
sleeping = max(max(sleeping,amount),0) sleeping = max(max(sleeping,amount),0)
if(!old_sleeping && sleeping) if(!old_sleeping && sleeping)
if(!no_alert)
throw_alert("asleep", /obj/screen/alert/asleep) throw_alert("asleep", /obj/screen/alert/asleep)
if(updating) if(updating)
update_stat() update_stat()
@@ -92,10 +93,11 @@
if(updating) if(updating)
update_stat() update_stat()
/mob/proc/SetSleeping(amount, updating = 1) /mob/proc/SetSleeping(amount, updating = 1, no_alert = FALSE)
var/old_sleeping = sleeping var/old_sleeping = sleeping
sleeping = max(amount,0) sleeping = max(amount,0)
if(!old_sleeping && sleeping) if(!old_sleeping && sleeping)
if(!no_alert)
throw_alert("asleep", /obj/screen/alert/asleep) throw_alert("asleep", /obj/screen/alert/asleep)
if(updating) if(updating)
update_stat() update_stat()
@@ -104,10 +106,11 @@
if(updating) if(updating)
update_stat() update_stat()
/mob/proc/AdjustSleeping(amount, updating = 1) /mob/proc/AdjustSleeping(amount, updating = 1, no_alert = FALSE)
var/old_sleeping = sleeping var/old_sleeping = sleeping
sleeping = max(sleeping + amount,0) sleeping = max(sleeping + amount,0)
if(!old_sleeping && sleeping) if(!old_sleeping && sleeping)
if(!no_alert)
throw_alert("asleep", /obj/screen/alert/asleep) throw_alert("asleep", /obj/screen/alert/asleep)
if(updating) if(updating)
update_stat() update_stat()
@@ -166,6 +169,7 @@
var/old_eye_blind = eye_blind var/old_eye_blind = eye_blind
eye_blind = max(eye_blind, amount) eye_blind = max(eye_blind, amount)
if(!old_eye_blind) if(!old_eye_blind)
if(stat == CONSCIOUS)
throw_alert("blind", /obj/screen/alert/blind) throw_alert("blind", /obj/screen/alert/blind)
overlay_fullscreen("blind", /obj/screen/fullscreen/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
@@ -174,6 +178,7 @@
var/old_eye_blind = eye_blind var/old_eye_blind = eye_blind
eye_blind += amount eye_blind += amount
if(!old_eye_blind) if(!old_eye_blind)
if(stat == CONSCIOUS)
throw_alert("blind", /obj/screen/alert/blind) throw_alert("blind", /obj/screen/alert/blind)
overlay_fullscreen("blind", /obj/screen/fullscreen/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
else if(eye_blind) else if(eye_blind)
@@ -190,6 +195,7 @@
var/old_eye_blind = eye_blind var/old_eye_blind = eye_blind
eye_blind = amount eye_blind = amount
if(client && !old_eye_blind) if(client && !old_eye_blind)
if(stat == CONSCIOUS)
throw_alert("blind", /obj/screen/alert/blind) throw_alert("blind", /obj/screen/alert/blind)
overlay_fullscreen("blind", /obj/screen/fullscreen/blind) overlay_fullscreen("blind", /obj/screen/fullscreen/blind)
else if(eye_blind) else if(eye_blind)

View File

@@ -198,7 +198,7 @@
M.adjustToxLoss(1*REM) M.adjustToxLoss(1*REM)
if(iscarbon(M)) if(iscarbon(M))
var/mob/living/carbon/N = M var/mob/living/carbon/N = M
N.hal_screwyhud = 5 //fully healed, honest N.hal_screwyhud = SCREWYHUD_HEALTHY //fully healed, honest
..() ..()
/datum/reagent/blob/regenerative_materia/on_mob_delete(mob/living/M) /datum/reagent/blob/regenerative_materia/on_mob_delete(mob/living/M)

View File

@@ -302,7 +302,7 @@
/datum/reagent/medicine/mine_salve/on_mob_life(mob/living/M) /datum/reagent/medicine/mine_salve/on_mob_life(mob/living/M)
if(iscarbon(M)) if(iscarbon(M))
var/mob/living/carbon/N = M var/mob/living/carbon/N = M
N.hal_screwyhud = 5 N.hal_screwyhud = SCREWYHUD_HEALTHY
M.adjustBruteLoss(-0.25*REM, 0) M.adjustBruteLoss(-0.25*REM, 0)
M.adjustFireLoss(-0.25*REM, 0) M.adjustFireLoss(-0.25*REM, 0)
..() ..()
@@ -329,7 +329,7 @@
/datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M) /datum/reagent/medicine/mine_salve/on_mob_delete(mob/living/M)
if(iscarbon(M)) if(iscarbon(M))
var/mob/living/carbon/N = M var/mob/living/carbon/N = M
N.hal_screwyhud = 0 N.hal_screwyhud = SCREWYHUD_NONE
..() ..()
/datum/reagent/medicine/synthflesh /datum/reagent/medicine/synthflesh