mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-16 10:35:41 +01:00
Expunges if(TRUE) switch cases from the codebase (#94920)
## About The Pull Request Its a boolean, switch case only makes sense if it can be a null (which its not in any of these cases) ## Changelog Not player facing
This commit is contained in:
@@ -221,11 +221,10 @@
|
||||
. = ..()
|
||||
|
||||
if(selector_switch_icon)
|
||||
switch(burst_fire_selection)
|
||||
if(FALSE)
|
||||
. += "[initial(icon_state)]_semi"
|
||||
if(TRUE)
|
||||
. += "[initial(icon_state)]_burst"
|
||||
if(burst_fire_selection)
|
||||
. += "[initial(icon_state)]_burst"
|
||||
else
|
||||
. += "[initial(icon_state)]_semi"
|
||||
|
||||
if(show_bolt_icon)
|
||||
if (bolt_type == BOLT_TYPE_LOCKING)
|
||||
|
||||
@@ -519,15 +519,11 @@
|
||||
/datum/transport_controller/linear/tram/proc/set_status_code(code, value)
|
||||
if(code != DOORS_READY)
|
||||
log_transport("TC: [specific_transport_id] status change [value ? "+" : "-"][english_list(bitfield_to_list(code, TRANSPORT_FLAGS))].")
|
||||
switch(value)
|
||||
if(TRUE)
|
||||
controller_status |= code
|
||||
if(FALSE)
|
||||
controller_status &= ~code
|
||||
else
|
||||
stack_trace("Transport controller received invalid status code request [code]/[value]")
|
||||
return
|
||||
|
||||
if(value)
|
||||
controller_status |= code
|
||||
else
|
||||
controller_status &= ~code
|
||||
send_transport_active_signal()
|
||||
|
||||
/datum/transport_controller/linear/tram/proc/send_transport_active_signal()
|
||||
|
||||
@@ -275,13 +275,11 @@
|
||||
if(updated_controller.specific_transport_id != configured_transport_id)
|
||||
return
|
||||
|
||||
switch(new_status)
|
||||
if(TRUE)
|
||||
if(operating_status == TRANSPORT_REMOTE_FAULT)
|
||||
operating_status = TRANSPORT_SYSTEM_NORMAL
|
||||
if(FALSE)
|
||||
if(operating_status == TRANSPORT_SYSTEM_NORMAL)
|
||||
operating_status = TRANSPORT_REMOTE_FAULT
|
||||
if(new_status)
|
||||
if(operating_status == TRANSPORT_REMOTE_FAULT)
|
||||
operating_status = TRANSPORT_SYSTEM_NORMAL
|
||||
else if(operating_status == TRANSPORT_SYSTEM_NORMAL)
|
||||
operating_status = TRANSPORT_REMOTE_FAULT
|
||||
|
||||
/**
|
||||
* Update processing state.
|
||||
|
||||
Reference in New Issue
Block a user