mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
BS12 port: Hallucinations and Dreaming
To take advantage of hallucinations, just have something that sets the "hallucination" var in a human mob to a positive number (The higher it is, the more crazy things are) LSD is currently the only thing that does that, ATM. (silicon, hydrogen, anti-toxin) git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3221 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -63,4 +63,9 @@
|
||||
if(prob(20))
|
||||
affected_mob.adjustToxLoss(1)
|
||||
affected_mob.updatehealth()
|
||||
if(prob(25))
|
||||
affected_mob << "\red The world around you feels surreal"
|
||||
if(prob(50))
|
||||
affected_mob.hallucination += 100
|
||||
shake_camera(affected_mob,20)
|
||||
return
|
||||
|
||||
@@ -225,6 +225,11 @@ About the new airlock wires panel:
|
||||
return
|
||||
else /*if(src.justzap)*/
|
||||
return
|
||||
else if(user.hallucination > 50 && prob(10) && src.operating == 0)
|
||||
user << "\red <B>You feel a powerful shock course through your body!</B>"
|
||||
user.halloss += 10
|
||||
user.stunned += 10
|
||||
return
|
||||
..(user)
|
||||
|
||||
|
||||
|
||||
@@ -1468,6 +1468,19 @@ datum
|
||||
..()
|
||||
return
|
||||
|
||||
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
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -410,6 +410,13 @@ 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
|
||||
|
||||
26
code/modules/flufftext/Dreaming.dm
Normal file
26
code/modules/flufftext/Dreaming.dm
Normal file
@@ -0,0 +1,26 @@
|
||||
mob/living/carbon/proc/dream()
|
||||
dreaming = 1
|
||||
var/list/dreams = list(
|
||||
"an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the captain",
|
||||
"voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness",
|
||||
"light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun",
|
||||
"a hat","the Luna","a ruined station","a planet","plasma","air","the medical bay","the bridge","blinking lights",
|
||||
"a blue light","an abandoned laboratory","Nanotrasen","The Syndicate","blood","healing","power","respect",
|
||||
"riches","space","a crash","happiness","pride","a fall","water","flames","ice","melons","flying"
|
||||
)
|
||||
spawn(0)
|
||||
for(var/i = rand(1,4),i > 0, i--)
|
||||
var/dream_image = pick(dreams)
|
||||
dreams -= dream_image
|
||||
src << "\blue <i>... [dream_image] ...</i>"
|
||||
sleep(rand(40,70))
|
||||
if(paralysis <= 0)
|
||||
dreaming = 0
|
||||
return 0
|
||||
dreaming = 0
|
||||
return 1
|
||||
|
||||
mob/living/carbon/proc/handle_dreams()
|
||||
if(prob(5) && !dreaming) dream()
|
||||
|
||||
mob/living/carbon/var/dreaming = 0
|
||||
403
code/modules/flufftext/Hallucination.dm
Normal file
403
code/modules/flufftext/Hallucination.dm
Normal file
@@ -0,0 +1,403 @@
|
||||
/*
|
||||
Ideas for the subtle effects of hallucination:
|
||||
|
||||
Light up oxygen/plasma indicators (done)
|
||||
Cause health to look critical/dead, even when standing (done)
|
||||
Characters silently watching you
|
||||
Brief flashes of fire/space/bombs/c4/dangerous shit (done)
|
||||
Items that are rare/traitorous/don't exist appearing in your inventory slots (done)
|
||||
Strange audio (should be rare) (done)
|
||||
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)/(hallucination/25))
|
||||
var/halpick = rand(1,100)
|
||||
switch(halpick)
|
||||
if(0 to 15)
|
||||
//Screwy HUD
|
||||
//src << "Screwy HUD"
|
||||
hal_screwyhud = pick(1,2,3,3,4,4)
|
||||
spawn(rand(100,250))
|
||||
hal_screwyhud = 0
|
||||
if(16 to 25)
|
||||
//Strange items
|
||||
//src << "Traitor Items"
|
||||
if(!halitem)
|
||||
halitem = new
|
||||
var/list/slots_free = list("1,1","3,1")
|
||||
if(l_hand) slots_free -= "1,1"
|
||||
if(r_hand) slots_free -= "3,1"
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(!H.belt) slots_free += "3,0"
|
||||
if(!H.l_store) slots_free += "4,0"
|
||||
if(!H.r_store) slots_free += "5,0"
|
||||
if(slots_free.len)
|
||||
halitem.screen_loc = pick(slots_free)
|
||||
halitem.layer = 50
|
||||
switch(rand(1,6))
|
||||
if(1) //revolver
|
||||
halitem.icon = 'gun.dmi'
|
||||
halitem.icon_state = "revolver"
|
||||
halitem.name = "Revolver"
|
||||
if(2) //c4
|
||||
halitem.icon = 'syndieweapons.dmi'
|
||||
halitem.icon_state = "c4small_0"
|
||||
halitem.name = "Mysterious Package"
|
||||
if(prob(25))
|
||||
halitem.icon_state = "c4small_1"
|
||||
if(3) //sword
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "sword1"
|
||||
halitem.name = "Sword"
|
||||
if(4) //stun baton
|
||||
halitem.icon = 'weapons.dmi'
|
||||
halitem.icon_state = "stunbaton"
|
||||
halitem.name = "Stun Baton"
|
||||
if(5) //emag
|
||||
halitem.icon = 'card.dmi'
|
||||
halitem.icon_state = "emag"
|
||||
halitem.name = "Cryptographic Sequencer"
|
||||
if(6) //flashbang
|
||||
halitem.icon = 'grenade.dmi'
|
||||
halitem.icon_state = "flashbang1"
|
||||
halitem.name = "Flashbang"
|
||||
if(client) client.screen += halitem
|
||||
spawn(rand(100,250))
|
||||
del halitem
|
||||
if(26 to 40)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
if(!halimage)
|
||||
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)
|
||||
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
//src << "Space"
|
||||
halimage = image('space.dmi',target,"[rand(1,25)]",TURF_LAYER)
|
||||
if(2)
|
||||
//src << "Fire"
|
||||
halimage = image('fire.dmi',target,"1",TURF_LAYER)
|
||||
if(3)
|
||||
//src << "C4"
|
||||
halimage = image('syndieweapons.dmi',target,"c4small_1",OBJ_LAYER+0.01)
|
||||
|
||||
|
||||
if(client) client.images += halimage
|
||||
spawn(rand(10,50)) //Only seen for a brief moment.
|
||||
if(client) client.images -= halimage
|
||||
halimage = null
|
||||
|
||||
|
||||
if(41 to 65)
|
||||
//Strange audio
|
||||
//src << "Strange Audio"
|
||||
switch(rand(1,12))
|
||||
if(1) src << 'airlock.ogg'
|
||||
if(2)
|
||||
if(prob(50))src << 'Explosion1.ogg'
|
||||
else src << 'Explosion2.ogg'
|
||||
if(3) src << 'explosionfar.ogg'
|
||||
if(4) src << 'Glassbr1.ogg'
|
||||
if(5) src << 'Glassbr2.ogg'
|
||||
if(6) src << 'Glassbr3.ogg'
|
||||
if(7) src << 'twobeep.ogg'
|
||||
if(8) src << 'windowdoor.ogg'
|
||||
if(9)
|
||||
//To make it more realistic, I added two gunshots (enough to kill)
|
||||
src << 'Gunshot.ogg'
|
||||
spawn(rand(10,30))
|
||||
src << 'Gunshot.ogg'
|
||||
if(10) src << 'smash.ogg'
|
||||
if(11)
|
||||
//Same as above, but with tasers.
|
||||
src << 'Taser.ogg'
|
||||
spawn(rand(10,30))
|
||||
src << 'Taser.ogg'
|
||||
//Rare audio
|
||||
if(12)
|
||||
//These sounds are (mostly) taken from Hidden: Source
|
||||
var/list/creepyasssounds = list('ghost.ogg', 'ghost2.ogg', 'Heart Beat.ogg', 'screech.ogg',\
|
||||
'behind_you1.ogg', 'behind_you2.ogg', 'far_noise.ogg', 'growl1.ogg', 'growl2.ogg',\
|
||||
'growl3.ogg', 'im_here1.ogg', 'im_here2.ogg', 'i_see_you1.ogg', 'i_see_you2.ogg',\
|
||||
'look_up1.ogg', 'look_up2.ogg', 'over_here1.ogg', 'over_here2.ogg', 'over_here3.ogg',\
|
||||
'turn_around1.ogg', 'turn_around2.ogg', 'veryfar_noise.ogg', 'wail.ogg')
|
||||
src << pick(creepyasssounds)
|
||||
if(66 to 70)
|
||||
//Flashes of danger
|
||||
//src << "Danger Flash"
|
||||
if(!halbody)
|
||||
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)
|
||||
switch(rand(1,4))
|
||||
if(1)
|
||||
halbody = image('human.dmi',target,"husk_l",TURF_LAYER)
|
||||
if(2,3)
|
||||
halbody = image('human.dmi',target,"husk_s",TURF_LAYER)
|
||||
if(4)
|
||||
halbody = image('alien.dmi',target,"alienother",TURF_LAYER)
|
||||
// if(5)
|
||||
// halbody = image('xcomalien.dmi',target,"chryssalid",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 75)
|
||||
//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
|
||||
|
||||
|
||||
|
||||
|
||||
/*obj/machinery/proc/mockpanel(list/buttons,start_txt,end_txt,list/mid_txts)
|
||||
|
||||
if(!mocktxt)
|
||||
|
||||
mocktxt = ""
|
||||
|
||||
var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\
|
||||
"Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\
|
||||
"OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Captain IQ","Retrieve Arms",\
|
||||
"Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry")
|
||||
|
||||
if(mid_txts)
|
||||
while(mid_txts.len)
|
||||
var/mid_txt = pick(mid_txts)
|
||||
mocktxt += mid_txt
|
||||
mid_txts -= mid_txt
|
||||
|
||||
while(buttons.len)
|
||||
|
||||
var/button = pick(buttons)
|
||||
|
||||
var/button_txt = pick(possible_txt)
|
||||
|
||||
mocktxt += "<a href='?src=\ref[src];[button]'>[button_txt]</a><br>"
|
||||
|
||||
buttons -= button
|
||||
possible_txt -= button_txt
|
||||
|
||||
return start_txt + mocktxt + end_txt + "</TT></BODY></HTML>"
|
||||
|
||||
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
|
||||
|
||||
/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()*/
|
||||
81
code/modules/flufftext/TextFilters.dm
Normal file
81
code/modules/flufftext/TextFilters.dm
Normal file
@@ -0,0 +1,81 @@
|
||||
proc/Intoxicated(phrase)
|
||||
phrase = html_decode(phrase)
|
||||
var
|
||||
leng=lentext(phrase)
|
||||
counter=lentext(phrase)
|
||||
newphrase="";newletter=""
|
||||
while(counter>=1)
|
||||
newletter=copytext(phrase,(leng-counter)+1,(leng-counter)+2)
|
||||
if(rand(1,3)==3)
|
||||
if(lowertext(newletter)=="o") newletter="u"
|
||||
if(lowertext(newletter)=="s") newletter="ch"
|
||||
if(lowertext(newletter)=="a") newletter="ah"
|
||||
if(lowertext(newletter)=="c") newletter="k"
|
||||
switch(rand(1,7))
|
||||
if(1,3,5,8) newletter="[lowertext(newletter)]"
|
||||
if(2,4,6,15) newletter="[uppertext(newletter)]"
|
||||
if(7) newletter+="'"
|
||||
//if(9,10) newletter="<b>[newletter]</b>"
|
||||
//if(11,12) newletter="<big>[newletter]</big>"
|
||||
//if(13) newletter="<small>[newletter]</small>"
|
||||
newphrase+="[newletter]";counter-=1
|
||||
return newphrase
|
||||
|
||||
proc/NewStutter(phrase,stunned)
|
||||
phrase = html_decode(phrase)
|
||||
|
||||
var/list/split_phrase = dd_text2list(phrase," ") //Split it up into words.
|
||||
|
||||
var/list/unstuttered_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
if(stunned) i = split_phrase.len
|
||||
for(,i > 0,i--) //Pick a few words to stutter on.
|
||||
|
||||
if (!unstuttered_words.len)
|
||||
break
|
||||
var/word = pick(unstuttered_words)
|
||||
unstuttered_words -= word //Remove from unstuttered words so we don't stutter it again.
|
||||
var/index = split_phrase.Find(word) //Find the word in the split phrase so we can replace it.
|
||||
|
||||
//Search for dipthongs (two letters that make one sound.)
|
||||
var/first_sound = copytext(word,1,3)
|
||||
var/first_letter = copytext(word,1,2)
|
||||
if(lowertext(first_sound) in list("ch","th","sh"))
|
||||
first_letter = first_sound
|
||||
|
||||
//Repeat the first letter to create a stutter.
|
||||
var/rnum = rand(1,3)
|
||||
switch(rnum)
|
||||
if(1)
|
||||
word = "[first_letter]-[word]"
|
||||
if(2)
|
||||
word = "[first_letter]-[first_letter]-[word]"
|
||||
if(3)
|
||||
word = "[first_letter]-[word]"
|
||||
|
||||
split_phrase[index] = word
|
||||
|
||||
return sanitize(dd_list2text(split_phrase," "))
|
||||
|
||||
proc/Stagger(mob/M,d) //Technically not a filter, but it relates to drunkenness.
|
||||
step(M, pick(d,turn(d,90),turn(d,-90)))
|
||||
|
||||
proc/Ellipsis(original_msg, chance = 50)
|
||||
if(chance <= 0) return "..."
|
||||
if(chance >= 100) return original_msg
|
||||
|
||||
var/list
|
||||
words = dd_text2list(original_msg," ")
|
||||
new_words = list()
|
||||
|
||||
var/new_msg = ""
|
||||
|
||||
for(var/w in words)
|
||||
if(prob(chance))
|
||||
new_words += "..."
|
||||
else
|
||||
new_words += w
|
||||
|
||||
new_msg = dd_list2text(new_words," ")
|
||||
|
||||
return new_msg
|
||||
@@ -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)
|
||||
|
||||
@@ -121,6 +121,22 @@
|
||||
|
||||
|
||||
handle_disabilities()
|
||||
if(hallucination > 0)
|
||||
//if(hallucinations.len == 0 && hallucination >= 20 && health > 0)
|
||||
// if(prob(2))
|
||||
// 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 -= 2
|
||||
//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!"
|
||||
@@ -712,6 +728,7 @@
|
||||
lying = 1
|
||||
stat = 0
|
||||
if (paralysis > 0)
|
||||
handle_dreams()
|
||||
AdjustParalysis(-1)
|
||||
blinded = 1
|
||||
lying = 1
|
||||
|
||||
@@ -238,6 +238,12 @@
|
||||
var/robot_talk_understand = 0
|
||||
var/alien_talk_understand = 0
|
||||
|
||||
|
||||
//You can guess what these are for. --SkyMarshal
|
||||
var/list/atom/hallucinations = list()
|
||||
var/halloss = 0
|
||||
var/hallucination = 0
|
||||
|
||||
/*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move
|
||||
through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that
|
||||
the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/
|
||||
|
||||
@@ -91,6 +91,15 @@ Stuff which is in development and not yet visible to players or just code relate
|
||||
should be listed in the changelog upon commit tho. Thanks. -->
|
||||
|
||||
<!-- To take advantage of the pretty new format (well it was new when I wrote this anyway), open the "add-to-changelog.html" file in any browser and add the stuff and then generate the html code and paste it here -->
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">29/04/2012</h2>
|
||||
<h3 class="author">SkyMarshal updated:</h3>
|
||||
<ul class="changes bgimages16">
|
||||
<li class="rscadd">BS12 Hallucination and Dreaming port</li>
|
||||
<ul class="changes bgimages16">
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="commit sansserif">
|
||||
<h2 class="date">29/2/2012</h2>
|
||||
|
||||
BIN
icons/obj/syndieweapons.dmi
Normal file
BIN
icons/obj/syndieweapons.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 892 B |
BIN
sound/effects/Heart Beat.ogg
Normal file
BIN
sound/effects/Heart Beat.ogg
Normal file
Binary file not shown.
BIN
sound/scary/behind_you1.ogg
Normal file
BIN
sound/scary/behind_you1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/behind_you2.ogg
Normal file
BIN
sound/scary/behind_you2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/far_noise.ogg
Normal file
BIN
sound/scary/far_noise.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl1.ogg
Normal file
BIN
sound/scary/growl1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl2.ogg
Normal file
BIN
sound/scary/growl2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/growl3.ogg
Normal file
BIN
sound/scary/growl3.ogg
Normal file
Binary file not shown.
BIN
sound/scary/i_see_you1.ogg
Normal file
BIN
sound/scary/i_see_you1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/i_see_you2.ogg
Normal file
BIN
sound/scary/i_see_you2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/im_here1.ogg
Normal file
BIN
sound/scary/im_here1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/im_here2.ogg
Normal file
BIN
sound/scary/im_here2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/look_up1.ogg
Normal file
BIN
sound/scary/look_up1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/look_up2.ogg
Normal file
BIN
sound/scary/look_up2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here1.ogg
Normal file
BIN
sound/scary/over_here1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here2.ogg
Normal file
BIN
sound/scary/over_here2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/over_here3.ogg
Normal file
BIN
sound/scary/over_here3.ogg
Normal file
Binary file not shown.
BIN
sound/scary/turn_around1.ogg
Normal file
BIN
sound/scary/turn_around1.ogg
Normal file
Binary file not shown.
BIN
sound/scary/turn_around2.ogg
Normal file
BIN
sound/scary/turn_around2.ogg
Normal file
Binary file not shown.
BIN
sound/scary/veryfar_noise.ogg
Normal file
BIN
sound/scary/veryfar_noise.ogg
Normal file
Binary file not shown.
BIN
sound/scary/wail.ogg
Normal file
BIN
sound/scary/wail.ogg
Normal file
Binary file not shown.
@@ -90,6 +90,7 @@
|
||||
#define FILE_DIR "code/modules/clothing/uniforms"
|
||||
#define FILE_DIR "code/modules/critters"
|
||||
#define FILE_DIR "code/modules/critters/hivebots"
|
||||
#define FILE_DIR "code/modules/flufftext"
|
||||
#define FILE_DIR "code/modules/food"
|
||||
#define FILE_DIR "code/modules/mining"
|
||||
#define FILE_DIR "code/modules/mob"
|
||||
@@ -147,7 +148,6 @@
|
||||
#define FILE_DIR "code/unused/spacecraft"
|
||||
#define FILE_DIR "code/WorkInProgress"
|
||||
#define FILE_DIR "code/WorkInProgress/BS12"
|
||||
#define FILE_DIR "code/WorkInProgress/computer3"
|
||||
#define FILE_DIR "code/WorkInProgress/mapload"
|
||||
#define FILE_DIR "code/WorkInProgress/organs"
|
||||
#define FILE_DIR "code/WorkInProgress/virus2"
|
||||
@@ -181,6 +181,7 @@
|
||||
#define FILE_DIR "sound/mecha"
|
||||
#define FILE_DIR "sound/misc"
|
||||
#define FILE_DIR "sound/piano"
|
||||
#define FILE_DIR "sound/scary"
|
||||
#define FILE_DIR "sound/voice"
|
||||
#define FILE_DIR "sound/weapons"
|
||||
// END_FILE_DIR
|
||||
@@ -787,6 +788,9 @@
|
||||
#include "code\modules\critters\critter_defenses.dm"
|
||||
#include "code\modules\critters\critters.dm"
|
||||
#include "code\modules\critters\hivebots\hivebot.dm"
|
||||
#include "code\modules\flufftext\Dreaming.dm"
|
||||
#include "code\modules\flufftext\Hallucination.dm"
|
||||
#include "code\modules\flufftext\TextFilters.dm"
|
||||
#include "code\modules\food\food.dm"
|
||||
#include "code\modules\food\meat.dm"
|
||||
#include "code\modules\food\recipes_microwave.dm"
|
||||
@@ -1027,8 +1031,6 @@
|
||||
#include "code\WorkInProgress\explosion_particles.dm"
|
||||
#include "code\WorkInProgress\BS12\uplink_kits.dm"
|
||||
#include "code\WorkInProgress\BS12\uplinks.dm"
|
||||
#include "code\WorkInProgress\computer3\datastore.dm"
|
||||
#include "code\WorkInProgress\computer3\file.dm"
|
||||
#include "code\WorkInProgress\mapload\dmm_suite.dm"
|
||||
#include "code\WorkInProgress\mapload\reader.dm"
|
||||
#include "code\WorkInProgress\organs\implants.dm"
|
||||
|
||||
Reference in New Issue
Block a user