mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Finished up the last parts of my fingerprints work. Added a rag which lets you smudge away prints, and sinks do the same.
Added hallucinations properly. Added LSD (with hallucinations.) Remapped slightly.
This commit is contained in:
@@ -1531,6 +1531,19 @@ datum
|
||||
for(var/mob/living/carbon/metroid/M in T)
|
||||
M.adjustToxLoss(rand(15,30))
|
||||
|
||||
LSD
|
||||
name = "LSD"
|
||||
id = "LSD"
|
||||
description = "A hallucinogen"
|
||||
reagent_state = LIQUID
|
||||
color = "#B31008" // rgb: 139, 166, 233
|
||||
|
||||
on_mob_life(var/mob/M)
|
||||
if(!M) M = holder.my_atom
|
||||
M:hallucination += 5
|
||||
..()
|
||||
return
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nanites
|
||||
|
||||
@@ -417,6 +417,12 @@ datum
|
||||
required_reagents = list("carpotoxin" = 5, "stoxin" = 5, "copper" = 5)
|
||||
result_amount = 2
|
||||
|
||||
LSD
|
||||
name = "LSD"
|
||||
id = "LSD"
|
||||
result = "LSD"
|
||||
required_reagents = list("silicon" = 1, "hydrogen" = 1, "anti_toxin" = 1)
|
||||
result_amount = 5
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// foam and foam precursor
|
||||
|
||||
@@ -13,15 +13,17 @@ Gunshots/explosions/opening doors/less rare audio (done)
|
||||
|
||||
mob/living/carbon/var
|
||||
image/halimage
|
||||
image/halbody
|
||||
obj/halitem
|
||||
hal_screwyhud = 0 //1 - critical, 2 - dead, 3 - oxygen indicator, 4 - toxin indicator
|
||||
handling_hal = 0
|
||||
hal_crit = 0
|
||||
|
||||
mob/living/carbon/proc/handle_hallucinations()
|
||||
if(handling_hal) return
|
||||
handling_hal = 1
|
||||
while(hallucination > 20)
|
||||
sleep(rand(200,500))
|
||||
sleep(rand(200,500)/(hallucination/10))
|
||||
var/halpick = rand(1,100)
|
||||
switch(halpick)
|
||||
if(0 to 15)
|
||||
@@ -103,7 +105,7 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
|
||||
if(41 to 65)
|
||||
//Strange audio
|
||||
src << "Strange Audio"
|
||||
//src << "Strange Audio"
|
||||
switch(rand(1,12))
|
||||
if(1) src << 'airlock.ogg'
|
||||
if(2)
|
||||
@@ -133,6 +135,30 @@ mob/living/carbon/proc/handle_hallucinations()
|
||||
if(2) src << 'ghost2.ogg'
|
||||
if(3) src << 'Heart Beat.ogg'
|
||||
if(4) src << 'screech.ogg'
|
||||
if(66 to 70)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
var/possible_points = list()
|
||||
for(var/turf/simulated/floor/F in view(src,world.view))
|
||||
possible_points += F
|
||||
var/turf/simulated/floor/target = pick(possible_points)
|
||||
halbody = image('human.dmi',target,"husk_l",TURF_LAYER)
|
||||
|
||||
if(client) client.images += halbody
|
||||
spawn(rand(50,80)) //Only seen for a brief moment.
|
||||
if(client) client.images -= halbody
|
||||
halbody = null
|
||||
if(71 to 80)
|
||||
//Fake death
|
||||
src.sleeping_willingly = 1
|
||||
src.sleeping = 1
|
||||
hal_crit = 1
|
||||
hal_screwyhud = 1
|
||||
spawn(rand(50,100))
|
||||
src.sleeping_willingly = 0
|
||||
src.sleeping = 0
|
||||
hal_crit = 0
|
||||
hal_screwyhud = 0
|
||||
handling_hal = 0
|
||||
|
||||
|
||||
@@ -172,4 +198,193 @@ proc/check_panel(mob/M)
|
||||
if (istype(M, /mob/living/carbon/human) || istype(M, /mob/living/silicon/ai))
|
||||
if(M.hallucination < 15)
|
||||
return 1
|
||||
return 0*/
|
||||
return 0 */
|
||||
|
||||
/obj/fake_attacker
|
||||
icon = null
|
||||
icon_state = null
|
||||
name = ""
|
||||
desc = ""
|
||||
density = 0
|
||||
anchored = 1
|
||||
opacity = 0
|
||||
var/mob/living/carbon/human/my_target = null
|
||||
var/weapon_name = null
|
||||
var/obj/item/weap = null
|
||||
var/image/stand_icon = null
|
||||
var/image/currentimage = null
|
||||
var/icon/base = null
|
||||
var/s_tone
|
||||
var/mob/living/clone = null
|
||||
var/image/left
|
||||
var/image/right
|
||||
var/image/up
|
||||
var/collapse
|
||||
var/image/down
|
||||
|
||||
var/health = 100
|
||||
|
||||
attackby(var/obj/item/weapon/P as obj, mob/user as mob)
|
||||
step_away(src,my_target,2)
|
||||
for(var/mob/M in oviewers(world.view,my_target))
|
||||
M << "\red <B>[my_target] flails around wildly.</B>"
|
||||
my_target.show_message("\red <B>[src] has been attacked by [my_target] </B>", 1) //Lazy.
|
||||
|
||||
//src.health -= P.power
|
||||
|
||||
|
||||
return
|
||||
|
||||
HasEntered(var/mob/M, somenumber)
|
||||
if(M == my_target)
|
||||
step_away(src,my_target,2)
|
||||
if(prob(30))
|
||||
for(var/mob/O in oviewers(world.view , my_target))
|
||||
O << "\red <B>[my_target] stumbles around.</B>"
|
||||
|
||||
New()
|
||||
spawn(300)
|
||||
if(my_target)
|
||||
my_target.hallucinations -= src
|
||||
del(src)
|
||||
step_away(src,my_target,2)
|
||||
proccess()
|
||||
|
||||
|
||||
proc/updateimage()
|
||||
// del src.currentimage
|
||||
|
||||
|
||||
if(src.dir == NORTH)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(up,src)
|
||||
else if(src.dir == SOUTH)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(down,src)
|
||||
else if(src.dir == EAST)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(right,src)
|
||||
else if(src.dir == WEST)
|
||||
del src.currentimage
|
||||
src.currentimage = new /image(left,src)
|
||||
my_target << currentimage
|
||||
|
||||
|
||||
proc/proccess()
|
||||
if(!my_target) spawn(5) .()
|
||||
if(src.health < 0)
|
||||
collapse()
|
||||
return
|
||||
if(get_dist(src,my_target) > 1)
|
||||
src.dir = get_dir(src,my_target)
|
||||
step_towards(src,my_target)
|
||||
updateimage()
|
||||
else
|
||||
if(prob(15))
|
||||
if(weapon_name)
|
||||
my_target << sound(pick('genhit1.ogg', 'genhit2.ogg', 'genhit3.ogg'))
|
||||
my_target.show_message("\red <B>[my_target] has been attacked with [weapon_name] by [src.name] </B>", 1)
|
||||
my_target.halloss += 8
|
||||
if(prob(20)) my_target.eye_blurry += 3
|
||||
if(prob(33))
|
||||
if(!locate(/obj/effect/overlay) in my_target.loc)
|
||||
fake_blood(my_target)
|
||||
else
|
||||
my_target << sound(pick('punch1.ogg','punch2.ogg','punch3.ogg','punch4.ogg'))
|
||||
my_target.show_message("\red <B>[src.name] has punched [my_target]!</B>", 1)
|
||||
my_target.halloss += 4
|
||||
if(prob(33))
|
||||
if(!locate(/obj/effect/overlay) in my_target.loc)
|
||||
fake_blood(my_target)
|
||||
|
||||
if(prob(15))
|
||||
step_away(src,my_target,2)
|
||||
spawn(5) .()
|
||||
|
||||
proc/collapse()
|
||||
collapse = 1
|
||||
updateimage()
|
||||
|
||||
/proc/fake_blood(var/mob/target)
|
||||
var/obj/effect/overlay/O = new/obj/effect/overlay(target.loc)
|
||||
O.name = "blood"
|
||||
var/image/I = image('blood.dmi',O,"floor[rand(1,7)]",O.dir,1)
|
||||
target << I
|
||||
spawn(300)
|
||||
del(O)
|
||||
return
|
||||
|
||||
var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/item/ammo_magazine/a357,\
|
||||
/obj/item/weapon/gun/energy/crossbow, /obj/item/weapon/melee/energy/sword,\
|
||||
/obj/item/weapon/storage/box/syndicate, /obj/item/weapon/storage/emp_kit,\
|
||||
/obj/item/weapon/cartridge/syndicate, /obj/item/clothing/under/chameleon,\
|
||||
/obj/item/clothing/shoes/syndigaloshes, /obj/item/weapon/card/id/syndicate,\
|
||||
/obj/item/clothing/mask/gas/voice, /obj/item/clothing/glasses/thermal,\
|
||||
/obj/item/device/chameleon, /obj/item/weapon/card/emag, /obj/item/device/hacktool,\
|
||||
/obj/item/weapon/storage/toolbox/syndicate, /obj/item/weapon/aiModule,\
|
||||
/obj/item/device/radio/headset/traitor, /obj/item/weapon/plastique,\
|
||||
/obj/item/weapon/syndie/c4explosive, /obj/item/device/powersink,\
|
||||
/obj/machinery/singularity_beacon/syndicate, /obj/item/weapon/storage/syndie_kit,\
|
||||
/obj/item/toy/syndicateballoon, /obj/item/weapon/gun/energy/laser/captain,\
|
||||
/obj/item/weapon/hand_tele, /obj/item/weapon/rcd, /obj/item/weapon/tank/jetpack,\
|
||||
/obj/item/clothing/under/rank/captain, /obj/item/device/aicard,\
|
||||
/obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\
|
||||
/obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank)
|
||||
|
||||
/proc/fake_attack(var/mob/target)
|
||||
var/list/possible_clones = new/list()
|
||||
var/mob/living/carbon/human/clone = null
|
||||
var/clone_weapon = null
|
||||
|
||||
for(var/mob/living/carbon/human/H in world)
|
||||
if(H.stat || H.lying) continue
|
||||
possible_clones += H
|
||||
|
||||
if(!possible_clones.len) return
|
||||
clone = pick(possible_clones)
|
||||
//var/obj/fake_attacker/F = new/obj/fake_attacker(outside_range(target))
|
||||
var/obj/fake_attacker/F = new/obj/fake_attacker(target.loc)
|
||||
if(clone.l_hand)
|
||||
if(!(locate(clone.l_hand) in non_fakeattack_weapons))
|
||||
clone_weapon = clone.l_hand.name
|
||||
F.weap = clone.l_hand
|
||||
else if (clone.r_hand)
|
||||
if(!(locate(clone.r_hand) in non_fakeattack_weapons))
|
||||
clone_weapon = clone.r_hand.name
|
||||
F.weap = clone.r_hand
|
||||
|
||||
F.name = clone.name
|
||||
F.my_target = target
|
||||
F.weapon_name = clone_weapon
|
||||
target.hallucinations += F
|
||||
|
||||
|
||||
F.left = image(clone,dir = WEST)
|
||||
F.right = image(clone,dir = EAST)
|
||||
F.up = image(clone,dir = NORTH)
|
||||
F.down = image(clone,dir = SOUTH)
|
||||
|
||||
// F.base = new /icon(clone.stand_icon)
|
||||
// F.currentimage = new /image(clone)
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
F.left = new /icon(clone.stand_icon,dir=WEST)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.left.Blend(i)
|
||||
F.up = new /icon(clone.stand_icon,dir=NORTH)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.up.Blend(i)
|
||||
F.down = new /icon(clone.stand_icon,dir=SOUTH)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.down.Blend(i)
|
||||
F.right = new /icon(clone.stand_icon,dir=EAST)
|
||||
for(var/icon/i in clone.overlays)
|
||||
F.right.Blend(i)
|
||||
|
||||
target << F.up
|
||||
*/
|
||||
|
||||
F.updateimage()
|
||||
@@ -1,4 +1,10 @@
|
||||
/mob/living/carbon/human/death(gibbed)
|
||||
if(halloss > 0 && (!gibbed))
|
||||
//hallucination = 0
|
||||
halloss = 0
|
||||
// And the suffocation was a hallucination (lazy)
|
||||
//oxyloss = 0
|
||||
return
|
||||
if(src.stat == 2)
|
||||
return
|
||||
if(src.healths)
|
||||
|
||||
@@ -150,6 +150,24 @@
|
||||
|
||||
|
||||
handle_disabilities()
|
||||
if(hallucination > 0)
|
||||
|
||||
if(hallucinations.len == 0 && hallucination >= 20 && health > 0)
|
||||
if(prob(5))
|
||||
fake_attack(src)
|
||||
//for(var/atom/a in hallucinations)
|
||||
// a.hallucinate(src)
|
||||
if(!handling_hal && hallucination > 20)
|
||||
spawn handle_hallucinations() //The not boring kind!
|
||||
hallucination -= 1
|
||||
//if(health < 0)
|
||||
// for(var/obj/a in hallucinations)
|
||||
// del a
|
||||
else
|
||||
halloss = 0
|
||||
for(var/atom/a in hallucinations)
|
||||
del a
|
||||
|
||||
if (disabilities & 2)
|
||||
if ((prob(1) && paralysis < 1 && r_epil < 1))
|
||||
src << "\red You have a seizure!"
|
||||
@@ -724,7 +742,7 @@
|
||||
|
||||
if(sleeping)
|
||||
Paralyse(3)
|
||||
if (prob(10) && health) spawn(0) emote("snore")
|
||||
if (prob(10) && health && !hal_crit) spawn(0) emote("snore")
|
||||
if(!src.sleeping_willingly)
|
||||
src.sleeping--
|
||||
|
||||
@@ -953,7 +971,7 @@
|
||||
|
||||
|
||||
|
||||
if (src.sleep)
|
||||
if (src.sleep && !hal_crit)
|
||||
src.sleep.icon_state = text("sleep[]", src.sleeping > 0 ? 1 : 0)
|
||||
src.sleep.overlays = null
|
||||
if(src.sleeping_willingly)
|
||||
@@ -979,6 +997,10 @@
|
||||
healths.icon_state = "health6"
|
||||
else
|
||||
healths.icon_state = "health7"
|
||||
if(hal_screwyhud == 1)
|
||||
healths.icon_state = "health6"
|
||||
if(hal_screwyhud == 2)
|
||||
healths.icon_state = "health7"
|
||||
|
||||
if (nutrition_icon)
|
||||
switch(nutrition)
|
||||
@@ -998,8 +1020,8 @@
|
||||
if(resting || lying || sleeping) rest.icon_state = "rest[(resting || lying || sleeping) ? 1 : 0]"
|
||||
|
||||
|
||||
if (toxin) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (toxin || hal_screwyhud == 4) toxin.icon_state = "tox[toxins_alert ? 1 : 0]"
|
||||
if (oxygen || hal_screwyhud == 3) oxygen.icon_state = "oxy[oxygen_alert ? 1 : 0]"
|
||||
if (fire) fire.icon_state = "fire[fire_alert ? 1 : 0]"
|
||||
//NOTE: the alerts dont reset when youre out of danger. dont blame me,
|
||||
//blame the person who coded them. Temporary fix added.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(!src.nodamage)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss - src.halloss
|
||||
else
|
||||
src.health = 100
|
||||
src.stat = 0
|
||||
|
||||
Reference in New Issue
Block a user