dessert infestation

- added dessert infestation: a group of 4-7 chocolate slimes will spawn in a random place on station
- attempted to fix Snack ATtack shuttle loan
This commit is contained in:
evilew
2024-06-03 22:23:48 +02:00
parent c1f082982e
commit 5a7a9fa6ad
5 changed files with 134 additions and 42 deletions
+100
View File
@@ -0,0 +1,100 @@
/datum/round_event_control/dessert_infestation
name = "Dessert Infestation"
typepath = /datum/round_event/dessert_infestation
weight = 5
max_occurrences = 2
min_players = 8
/datum/round_event/dessert_infestation
announceWhen = 100
var/static/list/dessert_station_areas_blacklist = typecacheof(/area/space,
/area/shuttle,
/area/mine,
/area/holodeck,
/area/ruin,
/area/hallway,
/area/hallway/primary,
/area/hallway/secondary,
/area/hallway/secondary/entry,
/area/engine/supermatter,
/area/engine/atmospherics_engine,
/area/engine/engineering/reactor_core,
/area/engine/engineering/reactor_control,
/area/ai_monitored/turret_protected,
/area/layenia/cloudlayer,
/area/asteroid/nearstation,
/area/science/server,
/area/science/explab,
/area/science/xenobiology,
/area/security/processing)
var/spawncount = 1
fakeable = FALSE
/datum/round_event/dessert_infestation/setup()
announceWhen = rand(announceWhen, announceWhen + 50)
spawncount = rand(4, 7)
/datum/round_event/dessert_infestation/announce(fake)
priority_announce("Unidentified lifesigns detected aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert", 'sound/ai/aliens.ogg')
/datum/round_event/dessert_infestation/start()
var/list/area/stationAreas = list()
var/list/area/eligible_areas = list()
for(var/area/A in world) // Get the areas in the Z level
if(A.z == SSmapping.station_start)
stationAreas += A
for(var/area/place in stationAreas) // first we check if it's a valid area
if(place.outdoors)
continue
if(place.areasize < 16)
continue
if(is_type_in_typecache(place, dessert_station_areas_blacklist))
continue
eligible_areas += place
for(var/area/place in eligible_areas) // now we check if there are people in that area
var/numOfPeople
for(var/mob/living/carbon/H in place)
numOfPeople++
break
if(numOfPeople > 0)
eligible_areas -= place
var/validFound = FALSE
var/list/turf/validTurfs = list()
var/area/pickedArea
while(!validFound || !eligible_areas.len)
pickedArea = pick_n_take(eligible_areas)
var/list/turf/t = get_area_turfs(pickedArea, SSmapping.station_start)
for(var/turf/thisTurf in t) // now we check if it's a closed turf, cold turf or occupied turf and yeet it
if(isopenturf(thisTurf))
var/turf/open/tempGet = thisTurf
if(tempGet.air.temperature <= T0C)
t -= thisTurf
continue
if(isclosedturf(thisTurf))
t -= thisTurf
else
for(var/obj/O in thisTurf)
if(O.density && !(istype(O, /obj/structure/table)))
t -= thisTurf
break
if(t.len >= spawncount) //Is the number of available turfs equal or bigger than spawncount?
validFound = TRUE
validTurfs = t
if(!eligible_areas.len)
message_admins("No eligible areas for spawning dessert mobs.")
return WAITING_FOR_SOMETHING
notify_ghosts("A group of feeder mobs has spawned in [pickedArea]!", source=pickedArea, action=NOTIFY_ATTACK, flashwindow = FALSE)
while(spawncount > 0 && validTurfs.len)
spawncount--
var/turf/pickedTurf = pick_n_take(validTurfs)
if(spawncount != 0)
var/spawn_type = /mob/living/simple_animal/hostile/feed/chocolate_slime
spawn_atom_to_turf(spawn_type, pickedTurf, 1, FALSE)
else
var/spawn_type = /mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast
spawn_atom_to_turf(spawn_type, pickedTurf, 1, FALSE)
return SUCCESSFUL_SPAWN
+4 -12
View File
@@ -26,8 +26,8 @@
response_help = "pets"
response_disarm = "shoos"
response_harm = "hits"
maxHealth = 200
health = 200
maxHealth = 100
health = 100
obj_damage = 0
melee_damage_lower = 0.001
melee_damage_upper = 0.001
@@ -52,13 +52,11 @@
/mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast
name = "Creambeast"
desc = "A strange mass of thick, creamy ice cream given some sense of instinct."
icon = 'GainStation13/icons/mob/candymonster.dmi'
icon_state = "icecream_monster"
icon_living = "icecream_monster"
icon_dead = "icecream_monster_dead"
icon_gib = "icecream_monster_dead"
mob_biotypes = MOB_ORGANIC|MOB_BEAST
move_to_delay = 20
move_to_delay = 10
projectiletype = /obj/item/projectile/energy/fattening/icecream
projectilesound = 'sound/weapons/pierce.ogg'
ranged = 1
@@ -69,11 +67,6 @@
maxHealth = 100
health = 100
obj_damage = 0
melee_damage_lower = 0.001
melee_damage_upper = 0.001
speak_emote = list("schlorps")
attacktext = "stuffs itself into"
attack_sound = 'sound/items/eatfood.ogg'
vision_range = 2
aggro_vision_range = 9
turns_per_move = 5
@@ -91,10 +84,9 @@
hitsound_wall = 'sound/weapons/tap.ogg'
is_reflectable = FALSE
light_range = 0
///How much fat is added to the target mob?
var/food_per_feeding = 5
var/food_fed = /datum/reagent/consumable/nutriment
var/fullness_add = 10
var/fullness_add = 30
/obj/item/projectile/energy/fattening/icecream/on_hit(atom/target, blocked)
. = ..()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

+29 -30
View File
@@ -1,17 +1,17 @@
#define HIJACK_SYNDIE 1
#define RUSKY_PARTY 2
#define SPIDER_GIFT 3
#define DEPARTMENT_RESUPPLY 4
#define ANTIDOTE_NEEDED 5
#define PIZZA_DELIVERY 6
#define ITS_HIP_TO 7
#define MY_GOD_JC 8
#define SNACK_ATTACK 9 //GS13 - slime shuttle loan
#define SNACK_ATTACK 1 //GS13 - slime shuttle loan
#define HIJACK_SYNDIE 2
#define RUSKY_PARTY 3
#define SPIDER_GIFT 4
#define DEPARTMENT_RESUPPLY 5
#define ANTIDOTE_NEEDED 6
#define PIZZA_DELIVERY 7
#define ITS_HIP_TO 8
#define MY_GOD_JC 9
/datum/round_event_control/shuttle_loan
name = "Shuttle Loan"
typepath = /datum/round_event/shuttle_loan
max_occurrences = 1
max_occurrences = 4
earliest_start = 7 MINUTES
/datum/round_event/shuttle_loan
@@ -31,6 +31,9 @@
var/message = "Cargo: I just wanna tell you techs good luck, we are all counting on you."
var/title = "CentCom Free Real Estate"
switch(dispatch_type)
if(SNACK_ATTACK) //GS13 - basically just spawns some slimes and feeder mobs
message = "Cargo: Our science division took couple too many samples from one the local candy biohabitats. Would you care to dispose of the unneeded specimen?"
title = "CentCom Science Division"
if(HIJACK_SYNDIE)
message = "Cargo: The syndicate are trying to infiltrate your station. If you let them hijack your cargo shuttle, you'll save us a headache."
title = "CentCom Counter Intelligence"
@@ -57,9 +60,6 @@
message = "Cargo: We have discovered an active Syndicate bomb near our VIP shuttle's fuel lines. If you feel up to the task, we will pay you for defusing it."
title = "CentCom Security Division"
bonus_points = 45000 //If you mess up, people die and the shuttle gets turned into swiss cheese
if(SNACK_ATTACK) //GS13 - basically just spawns some slimes and feeder mobs
message = "Cargo: Our science division took couple too many samples from one the local candy biohabitats. Would you care to dispose of the unneeded specimen?"
title = "CentCom Science Division"
if(prob(50))
priority_announce(message, title)
else
@@ -77,6 +77,8 @@
SSshuttle.supply.setTimer(3000)
switch(dispatch_type)
if(SNACK_ATTACK)
SSshuttle.centcom_message += "Snack attack en route."
if(HIJACK_SYNDIE)
SSshuttle.centcom_message += "Syndicate hijack team incoming."
if(RUSKY_PARTY)
@@ -93,8 +95,6 @@
SSshuttle.centcom_message += "Biohazard cleanup incoming."
if(MY_GOD_JC)
SSshuttle.centcom_message += "Live explosive ordnance incoming. Exercise extreme caution."
if(SNACK_ATTACK)
SSshuttle.centcom_message += "Snack attack en route."
/datum/round_event/shuttle_loan/tick()
if(dispatched)
@@ -121,6 +121,19 @@
var/list/shuttle_spawns = list()
switch(dispatch_type)
if(SNACK_ATTACK) //GS13
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast)
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/chocoorange)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/chocoorange)
shuttle_spawns.Add(/obj/item/paper/fluff/chocoslime_research)
if(HIJACK_SYNDIE)
var/datum/supply_pack/pack = SSshuttle.supply_packs[/datum/supply_pack/emergency/specialops]
pack.generate(pick_n_take(empty_shuttle_turfs))
@@ -239,20 +252,6 @@
else
shuttle_spawns.Add(/obj/item/paper/fluff/cargo/bomb/allyourbase)
if(SNACK_ATTACK) //GS13
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime)
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast)
if(prob(50))
shuttle_spawns.Add(/mob/living/simple_animal/hostile/feed/chocolate_slime/creambeast)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/donut/choco)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/chocoorange)
shuttle_spawns.Add(/obj/item/reagent_containers/food/snacks/chocoorange)
shuttle_spawns.Add(/obj/item/paper/fluff/chocoslime_research)
var/false_positive = 0
while(shuttle_spawns.len && empty_shuttle_turfs.len)
var/turf/T = pick_n_take(empty_shuttle_turfs)
@@ -290,6 +289,7 @@
/obj/item/paper/fluff/cargo/bomb/allyourbase
info = "Somebody set us up the bomb!"
#undef SNACK_ATTACK
#undef HIJACK_SYNDIE
#undef RUSKY_PARTY
#undef SPIDER_GIFT
@@ -298,4 +298,3 @@
#undef PIZZA_DELIVERY
#undef ITS_HIP_TO
#undef MY_GOD_JC
#undef SNACK_ATTACK
+1
View File
@@ -3092,6 +3092,7 @@
#include "GainStation13\code\machinery\feeding_tube.dm"
#include "GainStation13\code\mechanics\fatness.dm"
#include "GainStation13\code\mechanics\fattening_trap.dm"
#include "GainStation13\code\mechanics\infestation.dm"
#include "GainStation13\code\mechanics\spells.dm"
#include "GainStation13\code\mechanics\wand.dm"
#include "GainStation13\code\mechanics\web_weaving.dm"