Merge pull request #49421 from ShizCalev/define-cleanup

Cleans up redundant math defines
This commit is contained in:
spookydonut
2020-02-20 19:32:36 +08:00
committed by GitHub
160 changed files with 331 additions and 335 deletions
@@ -856,13 +856,13 @@
force = 0
var/ghost_counter = ghost_check()
force = CLAMP((ghost_counter * 4), 0, 75)
force = clamp((ghost_counter * 4), 0, 75)
user.visible_message("<span class='danger'>[user] strikes with the force of [ghost_counter] vengeful spirits!</span>")
..()
/obj/item/melee/ghost_sword/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
var/ghost_counter = ghost_check()
final_block_chance += CLAMP((ghost_counter * 5), 0, 75)
final_block_chance += clamp((ghost_counter * 5), 0, 75)
owner.visible_message("<span class='danger'>[owner] is protected by a ring of [ghost_counter] ghosts!</span>")
return ..()
+1 -1
View File
@@ -116,7 +116,7 @@ GLOBAL_LIST_EMPTY(silo_access_logs)
var/list/logs = GLOB.silo_access_logs[REF(src)]
var/len = LAZYLEN(logs)
var/num_pages = 1 + round((len - 1) / 30)
var/page = CLAMP(log_page, 1, num_pages)
var/page = clamp(log_page, 1, num_pages)
if(num_pages > 1)
for(var/i in 1 to num_pages)
if(i == page)