mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 08:39:12 +01:00
Putting teshari loneliness in a spawn
This commit is contained in:
@@ -128,50 +128,51 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes)
|
||||
|
||||
/datum/species/teshari/handle_environment_special(var/mob/living/carbon/human/H)
|
||||
// If they're dead or unconcious they're a bit beyond this kind of thing.
|
||||
if(H.stat)
|
||||
return
|
||||
// No point processing if we're already stressing the hell out.
|
||||
if(H.hallucination >= hallucination_cap && H.loneliness_stage >= warning_cap)
|
||||
return
|
||||
// Check for company.
|
||||
for(var/mob/living/carbon/M in viewers(H))
|
||||
if(M == H || M.stat == DEAD || M.invisibility > H.see_invisible)
|
||||
continue
|
||||
if(M.faction == "neutral" || M.faction == H.faction)
|
||||
spawn(0)
|
||||
// If they're dead or unconcious they're a bit beyond this kind of thing.
|
||||
if(H.stat)
|
||||
return
|
||||
// No point processing if we're already stressing the hell out.
|
||||
if(H.hallucination >= hallucination_cap && H.loneliness_stage >= warning_cap)
|
||||
return
|
||||
// Check for company.
|
||||
for(var/mob/living/carbon/M in viewers(H))
|
||||
if(M == H || M.stat == DEAD || M.invisibility > H.see_invisible)
|
||||
continue
|
||||
if(M.faction == "neutral" || M.faction == H.faction)
|
||||
if(H.loneliness_stage > 0)
|
||||
H.loneliness_stage -= 4
|
||||
if(H.loneliness_stage < 0)
|
||||
H.loneliness_stage = 0
|
||||
if(world.time >= H.next_loneliness_time)
|
||||
H << "The nearby company calms you down..."
|
||||
H.next_loneliness_time = world.time+500
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/holder/micro/M in range(1, H))
|
||||
if(H.loneliness_stage > 0)
|
||||
H.loneliness_stage -= 4
|
||||
if(H.loneliness_stage < 0)
|
||||
H.loneliness_stage = 0
|
||||
if(world.time >= H.next_loneliness_time)
|
||||
H << "The nearby company calms you down..."
|
||||
H << "[M] calms you down..."
|
||||
H.next_loneliness_time = world.time+500
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/holder/micro/M in range(1, H))
|
||||
if(H.loneliness_stage > 0)
|
||||
H.loneliness_stage -= 4
|
||||
if(H.loneliness_stage < 0)
|
||||
H.loneliness_stage = 0
|
||||
if(world.time >= H.next_loneliness_time)
|
||||
H << "[M] calms you down..."
|
||||
H.next_loneliness_time = world.time+500
|
||||
for(var/obj/item/toy/plushie/P in range(5, H))
|
||||
if(H.loneliness_stage > 0)
|
||||
H.loneliness_stage -= 4
|
||||
if(H.loneliness_stage < 0)
|
||||
H.loneliness_stage = 0
|
||||
if(world.time >= H.next_loneliness_time)
|
||||
H << "The [P] calms you down, reminding you of people..."
|
||||
H.next_loneliness_time = world.time+500
|
||||
|
||||
for(var/obj/item/toy/plushie/P in range(5, H))
|
||||
if(H.loneliness_stage > 0)
|
||||
H.loneliness_stage -= 4
|
||||
if(H.loneliness_stage < 0)
|
||||
H.loneliness_stage = 0
|
||||
if(world.time >= H.next_loneliness_time)
|
||||
H << "The [P] calms you down, reminding you of people..."
|
||||
H.next_loneliness_time = world.time+500
|
||||
|
||||
// No company? Suffer :(
|
||||
if(H.loneliness_stage < warning_cap)
|
||||
H.loneliness_stage += 1
|
||||
handle_loneliness(H)
|
||||
if(H.loneliness_stage >= warning_cap && H.hallucination < hallucination_cap)
|
||||
H.hallucination += 2.5
|
||||
// No company? Suffer :(
|
||||
if(H.loneliness_stage < warning_cap)
|
||||
H.loneliness_stage += 1
|
||||
handle_loneliness(H)
|
||||
if(H.loneliness_stage >= warning_cap && H.hallucination < hallucination_cap)
|
||||
H.hallucination += 2.5
|
||||
|
||||
/datum/species/teshari/proc/handle_loneliness(var/mob/living/carbon/human/H)
|
||||
var/ms = ""
|
||||
|
||||
Reference in New Issue
Block a user