Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. mob
  2. Move()
  3. if(!CanMove()) return
  4. . = ..()
  5. frozen = 1
  6. sleep(move_delay / 20)
  7. frozen = 0
  8. refresh()
  9. afk_time = 0
  10. if(!flying) icon_state = ""
  11. var/tag/teleport/teleport = locate() in loc
  12. if(teleport) teleport.Access(src)
  13. if(ShopOpen) winshow(src,"new_shop",0)
  14. GrabStruggle()
  15. SetPlanetGravity()
  16. TryBuild()
  17.  
  18. //is this like a separate building system or something? i left it here since i dont know
  19. //but otherwise i would have integrated it into TryBuild somehow if it had the same rules for when you
  20. //need to build something, for example if(. && build_type) are not issues that would stop you from using Build_Lay(),
  21. //but here they are, so i dont know really
  22. if(. && build_type) Build()
  23.  
  24. proc
  25. CanMove()
  26. if(frozen || doing || resting) return
  27. return 1
  28.  
  29. GrabStruggle()
  30. if(grabberSTR && prob(5))
  31. for(var/mob/a in view(1,src))
  32. if(a.grabbee == src)
  33. var escapechance = strength * power.full * 5 / grabberSTR //parenthesis werent necessary due to the order of operations in this particular math because multiplication and division are all done left to right anyway and you only have multiplication and division in this math
  34. if(prob(escapechance))
  35. a.grabbee = null
  36. attacking = 0
  37. a.attacking = 0
  38. grabberSTR = null
  39. view(src) << output("<font color=7#FFFF00>[src] breaks free of [a]'s hold!","ic")
  40. else view(src) << output("<font color=#FFFFFF>[src] struggles ast [a]'s hold!","ic")
  41.  
  42. TryBuild()
  43. if(CanBuild()) Build_Lay(Target,src)
  44.  
  45. CanBuild()
  46. if(block || !Target || !istype(Target,/obj/Build)) return
  47. return 1
  48.  
  49. SetPlanetGravity()
  50. gravitylvl = GetPlanetGravity()
  51.  
  52. GetPlanetGravity()
  53. switch(z)
  54. if(1) return 1
  55. if(2) return 2
  56. if(4) return 2
  57. if(5) return 5
  58. if(6) return 20
  59. if(7) return 10
  60. if(8) return 10
  61. if(9) return 10
  62. if(10) return 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement