mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-26 06:07:03 +01:00
not 'lazy' enough; safer now
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
// Please tell me if there already is a macro for that
|
||||
#define LAZYFIRST(L) L[1]
|
||||
#define LAZYLAST(L) L[length(L)]
|
||||
#define LISTFIRST(L) (length(L) ? L[1] : null)
|
||||
#define LISTLAST(L) (length(L) ? L[length(L)] : null)
|
||||
|
||||
+4
-4
@@ -123,15 +123,15 @@
|
||||
/obj/item/chastity_hypno/proc/change_mode(genital, direction)
|
||||
switch(direction)
|
||||
if("left")
|
||||
if(choices[genital] == LAZYFIRST(available_modes))
|
||||
if(choices[genital] == LISTFIRST(available_modes))
|
||||
//choices[genital] = available_modes[length(available_modes)]
|
||||
choices[genital] = LAZYLAST(available_modes)
|
||||
choices[genital] = LISTLAST(available_modes)
|
||||
else
|
||||
choices[genital] = available_modes[LAZYFIND(available_modes, choices[genital]) - 1]
|
||||
if("right")
|
||||
if(choices[genital] == LAZYLAST(available_modes))
|
||||
if(choices[genital] == LISTLAST(available_modes))
|
||||
//choices[genital] = available_modes[1]
|
||||
choices[genital] = LAZYFIRST(available_modes)
|
||||
choices[genital] = LISTFIRST(available_modes)
|
||||
else
|
||||
choices[genital] = available_modes[LAZYFIND(available_modes, choices[genital]) + 1]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user