mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 22:18:27 +01:00
Merge pull request #6219 from Mechoid/Event_Retweakening
Tweaks the NewTM event system further
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
var/gas_type // Chosen gas to release
|
||||
// Exclude these types and sub-types from targeting eligibilty
|
||||
var/list/area/excluded = list(
|
||||
/area/submap,
|
||||
/area/shuttle,
|
||||
/area/crew_quarters,
|
||||
/area/holodeck,
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
departments = list(ROLE_ENGINEERING, ROLE_MEDICAL)
|
||||
chaotic = 10
|
||||
var/obj/machinery/door/airlock/chosen_door
|
||||
var/area/target_area
|
||||
var/list/area/excluded = list(
|
||||
/area/submap,
|
||||
/area/shuttle,
|
||||
/area/crew_quarters
|
||||
)
|
||||
@@ -19,9 +21,9 @@
|
||||
|
||||
//try 10 times
|
||||
for(var/i in 1 to 10)
|
||||
var/area/A = pick(grand_list_of_areas)
|
||||
target_area = pick(grand_list_of_areas)
|
||||
var/list/obj/machinery/door/airlock/target_doors = list()
|
||||
for(var/obj/machinery/door/airlock/target_door in A.contents)
|
||||
for(var/obj/machinery/door/airlock/target_door in target_area.contents)
|
||||
target_doors += target_door
|
||||
target_doors = shuffle(target_doors)
|
||||
|
||||
@@ -34,11 +36,15 @@
|
||||
..()
|
||||
if(!chosen_door)
|
||||
return
|
||||
if(prob(33))
|
||||
chosen_door.visible_message("<span class='danger'>\The [chosen_door]'s panel sparks!</span>")
|
||||
command_announcement.Announce("An electrical issue has been detected in your area, please repair potential electronic overloads.", "Electrical Alert")
|
||||
chosen_door.visible_message("<span class='danger'>\The [chosen_door]'s panel sparks!</span>")
|
||||
chosen_door.set_safeties(0)
|
||||
playsound(get_turf(chosen_door), 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
if(severity >= EVENT_LEVEL_MODERATE)
|
||||
chosen_door.electrify(-1)
|
||||
spawn(rand(10 SECONDS, 2 MINUTES))
|
||||
if(chosen_door && chosen_door.arePowerSystemsOn() && prob(25 + 25 * severity))
|
||||
command_announcement.Announce("Overload has been localized to \the [target_area].", "Electrical Alert")
|
||||
|
||||
if(severity >= EVENT_LEVEL_MAJOR) // New Major effect. Hydraulic boom.
|
||||
spawn()
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/datum/gm_action/planet_weather_shift
|
||||
name = "sudden weather shift"
|
||||
enabled = TRUE
|
||||
departments = list(ROLE_EVERYONE)
|
||||
reusable = TRUE
|
||||
var/datum/planet/target_planet
|
||||
|
||||
var/list/banned_weathers = list(
|
||||
/datum/weather/sif/ash_storm,
|
||||
/datum/weather/sif/emberfall,
|
||||
/datum/weather/sif/blood_moon,
|
||||
/datum/weather/sif/fallout)
|
||||
var/list/possible_weathers = list()
|
||||
|
||||
/datum/gm_action/planet_weather_shift/set_up()
|
||||
if(!target_planet || isnull(target_planet))
|
||||
target_planet = pick(SSplanets.planets)
|
||||
possible_weathers |= target_planet.weather_holder.allowed_weather_types
|
||||
possible_weathers -= banned_weathers
|
||||
return
|
||||
|
||||
/datum/gm_action/planet_weather_shift/get_weight()
|
||||
return max(0, -15 + (metric.count_all_outdoor_mobs() * 20))
|
||||
|
||||
/datum/gm_action/planet_weather_shift/start()
|
||||
..()
|
||||
var/new_weather = pick(possible_weathers)
|
||||
target_planet.weather_holder.change_weather(new_weather)
|
||||
|
||||
/datum/gm_action/planet_weather_shift/announce()
|
||||
spawn(rand(3 SECONDS, 2 MINUTES))
|
||||
command_announcement.Announce("Local weather patterns on [target_planet.name] suggest that a sudden atmospheric fluctuation has occurred. All groundside personnel should be wary of rapidly deteriorating conditions.", "Weather Alert")
|
||||
return
|
||||
@@ -10,4 +10,4 @@
|
||||
break
|
||||
|
||||
/datum/gm_action/spontaneous_appendicitis/get_weight()
|
||||
return 5 + (metric.count_people_in_department(ROLE_MEDICAL) * 10)
|
||||
return max(0, -5 + (metric.count_people_in_department(ROLE_MEDICAL) * 10))
|
||||
|
||||
Reference in New Issue
Block a user