mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
[MIRROR] Implements usage of the REVERSE_DIR macro throughout the code. [MDB IGNORE] (#22743)
* Implements usage of the REVERSE_DIR macro throughout the code. (#77122) ## About The Pull Request Replaces a ton of `turn(dir, 180)` calls with the aforementioned macro. ## Why It's Good For The Game Afaik, `REVERSE_DIR` was coded to be faster than the classic `turn(dir, 180)` call, being a simple set of binary operations. To sum it up, micro optimization. ## Changelog N/A * Implements usage of the REVERSE_DIR macro throughout the code. --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -404,7 +404,7 @@
|
||||
if((machine_stat & NOPOWER))
|
||||
return
|
||||
var/image/ore_input = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_[input_dir]")
|
||||
var/image/ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_[turn(input_dir, 180)]")
|
||||
var/image/ore_output = image(icon='icons/obj/doors/airlocks/station/overlays.dmi', icon_state="unres_[REVERSE_DIR(input_dir)]")
|
||||
|
||||
switch(input_dir)
|
||||
if(NORTH)
|
||||
|
||||
Reference in New Issue
Block a user