Weather Warnings (#19934)

* Atmospheric probes will now relay changes in weather when deployed.
Analog radios can be tuned into the weather broadcast and receive it,
provided they're in the same sector / connected z-levels.
* Fixed weather transitions to rainy / icy weather not working.
* Changed rainy / icy weather to have a blue color, reducing eye strain.


![image](https://github.com/user-attachments/assets/b8439595-25ff-4df0-8f5d-b2d27d147b70)

![image-1](https://github.com/user-attachments/assets/cf0018c2-c6c7-4cf6-8069-543ad98cd597)

![image](https://github.com/user-attachments/assets/5e4d87e2-33c8-494a-9b8f-8a62f12c496a)
This commit is contained in:
Geeves
2024-12-24 16:04:51 +00:00
committed by GitHub
parent 5c2c77a4b3
commit 67360a9bea
20 changed files with 225 additions and 49 deletions
+7 -4
View File
@@ -79,16 +79,19 @@ var/global/list/state_machines = list()
var/list/options = current_state.get_open_transitions(holder_instance)
if(LAZYLEN(options))
var/singleton/state_transition/choice = choose_transition(options)
current_state.exited_state(holder_instance)
current_state = choice.target
current_state.entered_state(holder_instance)
return current_state
handle_next_transition(holder_instance, choice)
// Decides which transition to walk into, to the next state.
// By default it chooses the first one on the list.
/datum/state_machine/proc/choose_transition(list/valid_transitions)
return valid_transitions[1]
/// Handles changing the state, based on the state_transition chosen in `evaluate()`.
/datum/state_machine/proc/handle_next_transition(var/datum/holder_instance, var/singleton/state_transition/chosen_transition)
current_state.exited_state(holder_instance)
current_state = chosen_transition.target
current_state.entered_state(holder_instance)
// Forces the FSM to switch to a specific state, no matter what.
// Use responsibly.
/datum/state_machine/proc/set_state(new_state_type)