Skip to content

Commit

Permalink
Distortions update (#1539)
Browse files Browse the repository at this point in the history
* Distortions update

* Update city_events.dm
  • Loading branch information
Kitsunemitsu authored Oct 17, 2023
1 parent 92b3032 commit 243884b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
10 changes: 9 additions & 1 deletion code/controllers/subsystem/city_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SUBSYSTEM_DEF(cityevents)
var/daystatus = TRUE //True to darken lights, false to lighten them
var/globalillumination = 1
var/list/total_events = list()
var/list/distortions_available = list()
var/helpful_events = list("chickens", "money", "tresmetal", "hppens", "sppens")
var/harmful_events = list("drones", "beaks", "shrimp")
var/ordeal_events = list("sweepers", "scouts", "bots")
Expand Down Expand Up @@ -58,6 +59,13 @@ SUBSYSTEM_DEF(cityevents)
total_events += pick(neutral_events)
total_events += pick("money") //Always get money

//Set available distortion
var/list/processing = subtypesof(/mob/living/simple_animal/hostile/distortion)
for(var/mob/living/simple_animal/hostile/distortion/A in processing)
if(A.can_spawn == 0)
return
distortions_available += A

//Events
/datum/controller/subsystem/cityevents/proc/Event()
addtimer(CALLBACK(src, .proc/Event), 5 MINUTES)
Expand Down Expand Up @@ -132,7 +140,7 @@ SUBSYSTEM_DEF(cityevents)
var/T = pick(distortion)
new /obj/effect/bloodpool(get_turf(T))
sleep(10)
var/spawning = pick(subtypesof(/mob/living/simple_animal/hostile/distortion))
var/spawning = pick(distortions_available)
new spawning (get_turf(T))
addtimer(CALLBACK(src, .proc/Distort), 20 MINUTES)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
blood_volume = BLOOD_VOLUME_NORMAL // THERE WILL BE BLOOD. SHED.
simple_mob_flags = SILENCE_RANGED_MESSAGE
can_patrol = TRUE
/// Can this thing spawn?
var/can_spawn = 1
/// Copy-pasted from megafauna.dm: This allows player controlled mobs to use abilities
var/chosen_attack = 1
/// Attack actions, sets chosen_attack to the number in the action
Expand Down
11 changes: 0 additions & 11 deletions code/modules/mob/living/simple_animal/distortion/plague/lantern.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
light_power = 7


//Proc that can be used for additional effects on unmanifest
/mob/living/simple_animal/hostile/distortion/lantern/PostUnmanifest(mob/living/carbon/human/egoist)
playsound(src, 'sound/effects/blobattack.ogg', 150, FALSE, 4)
for(var/turf/TF in orange(2, get_turf(src))) //spawns blood effects
Expand All @@ -44,16 +43,6 @@
B.bloodiness = 100
return

//Unmanifesting is not linked to any proc by default, if you want it to happen during gameplay, it must be called manually.
/mob/living/simple_animal/hostile/distortion/lantern/attacked_by(obj/item/I, mob/living/user)
. = ..()
if(istype(I, /obj/item/food/grown/carrot))
qdel(I)
say("That's all I ever wanted!")
can_act = FALSE
addtimer(CALLBACK(src,.proc/Unmanifest),3 SECONDS)


/mob/living/simple_animal/hostile/distortion/lantern/AttackingTarget()
..()
if(prob(70))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
egoist_attributes = 100
loot = list(/obj/item/gun/ego_gun/shrimp/minigun)
unmanifest_effect = /obj/effect/temp_visual/water_waves
can_spawn = 0

var/unmanifesting

Expand Down
1 change: 1 addition & 0 deletions lobotomy-corp13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2862,6 +2862,7 @@
#include "code\modules\mob\living\simple_animal\distortion\myth\another_day_work.dm"
#include "code\modules\mob\living\simple_animal\distortion\nightmare\_nightmare.dm"
#include "code\modules\mob\living\simple_animal\distortion\plague\bunnyman.dm"
#include "code\modules\mob\living\simple_animal\distortion\plague\lantern.dm"
#include "code\modules\mob\living\simple_animal\distortion\star\shrimp.dm"
#include "code\modules\mob\living\simple_animal\friendly\butterfly.dm"
#include "code\modules\mob\living\simple_animal\friendly\cat.dm"
Expand Down

0 comments on commit 243884b

Please sign in to comment.