mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 19:17:50 +01:00
Now look what you've done. Hope I did this right.
This commit is contained in:
@@ -448,12 +448,12 @@
|
||||
if("spin", "spins")
|
||||
if(!restrained() && !lying)
|
||||
if(prob(5))
|
||||
INVOKE_ASYNC(src, .proc/spin, 30, 1)
|
||||
spin(30, 1, spin_direction = 2)
|
||||
message = "<B>[src]</B> spins too much!"
|
||||
Dizzy(12)
|
||||
Confused(12)
|
||||
else
|
||||
INVOKE_ASYNC(src, .proc/spin, 20, 1)
|
||||
spin(20, 1, spin_direction = 2)
|
||||
message = "<B>[src]</B> spins!"
|
||||
|
||||
if("aflap", "aflaps")
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
src.SpinAnimation(5,1)
|
||||
|
||||
if("spin","spins")
|
||||
INVOKE_ASYNC(src, .proc/spin, 20, 1)
|
||||
spin(20, 1, spin_direction = 2)
|
||||
message = "<B>[src]</B> spins!"
|
||||
|
||||
if("help")
|
||||
|
||||
+42
-14
@@ -1343,24 +1343,52 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
/mob/proc/can_resist()
|
||||
return FALSE //overridden in living.dm
|
||||
|
||||
/mob/proc/spin(spintime, speed)
|
||||
#define SPIN_DIRECTION_CLOCKWISE 0
|
||||
#define SPIN_DIRECTION_COUNTERCLOCKWISE 1
|
||||
#define SPIN_DIRECTION_RANDOM 2
|
||||
|
||||
/mob/proc/spin(spintime, speed, spin_direction = SPIN_DIRECTION_CLOCKWISE)
|
||||
set waitfor = 0
|
||||
if(!spintime || !speed || spintime > 100)
|
||||
CRASH("Aborted attempted call of /mob/proc/spin with invalid args ([spintime],[speed]) which could have frozen the server.")
|
||||
var/D = dir
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
setDir(D)
|
||||
spintime -= speed
|
||||
var/S
|
||||
if(spin_direction == SPIN_DIRECTION_CLOCKWISE || spin_direction == SPIN_DIRECTION_COUNTERCLOCKWISE)
|
||||
S = spin_direction
|
||||
else
|
||||
S = pick(SPIN_DIRECTION_CLOCKWISE,SPIN_DIRECTION_COUNTERCLOCKWISE)
|
||||
if(S == SPIN_DIRECTION_CLOCKWISE)
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = EAST
|
||||
if(SOUTH)
|
||||
D = WEST
|
||||
if(EAST)
|
||||
D = SOUTH
|
||||
if(WEST)
|
||||
D = NORTH
|
||||
setDir(D)
|
||||
spintime -= speed
|
||||
else
|
||||
while(spintime >= speed)
|
||||
sleep(speed)
|
||||
switch(D)
|
||||
if(NORTH)
|
||||
D = WEST
|
||||
if(SOUTH)
|
||||
D = EAST
|
||||
if(EAST)
|
||||
D = NORTH
|
||||
if(WEST)
|
||||
D = SOUTH
|
||||
setDir(D)
|
||||
spintime -= speed
|
||||
|
||||
#undef SPIN_DIRECTION_CLOCKWISE
|
||||
#undef SPIN_DIRECTION_COUNTERCLOCKWISE
|
||||
#undef SPIN_DIRECTION_RANDOM
|
||||
|
||||
/mob/proc/is_literate()
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user