From 723c8e522754c9c044ae9a2ab8d487603ef03475 Mon Sep 17 00:00:00 2001 From: Tad Hardesty Date: Wed, 8 Aug 2018 09:47:24 -0700 Subject: [PATCH] Fix even more weird syntax (#39594) --- code/datums/position_point_vector.dm | 4 +-- .../objects/items/devices/taperecorder.dm | 4 +-- code/modules/admin/admin.dm | 6 ++-- .../carbon/alien/humanoid/caste/hunter.dm | 2 +- code/modules/mob/living/say.dm | 31 +++++++++---------- .../simple_animal/hostile/jungle/leaper.dm | 2 +- 6 files changed, 23 insertions(+), 26 deletions(-) diff --git a/code/datums/position_point_vector.dm b/code/datums/position_point_vector.dm index 33facca9a10..7d49db84296 100644 --- a/code/datums/position_point_vector.dm +++ b/code/datums/position_point_vector.dm @@ -6,8 +6,8 @@ #define RETURN_PRECISE_POSITION(A) new /datum/position(A) #define RETURN_PRECISE_POINT(A) new /datum/point(A) -#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)} -#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)} +#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)) +#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)) /proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below. var/datum/point/P = new diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 50cdbe9c484..d0282fdeeff 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -120,9 +120,7 @@ mytape.storedinfo += "\[[time2text(mytape.used_capacity * 10,"mm:ss")]\] Recording started." var/used = mytape.used_capacity //to stop runtimes when you eject the tape var/max = mytape.max_capacity - for(used, used < max) - if(recording == 0) - break + while(recording && used < max) mytape.used_capacity++ used++ sleep(10) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 9eb11844765..42740b32c86 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -243,7 +243,7 @@ if(CHANNEL.is_admin_channel) dat+="[CHANNEL.channel_name]
" else - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+="

Refresh" dat+="
Back" if(2) @@ -315,7 +315,7 @@ dat+="No feed channels found active...
" else for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+="
Cancel" if(11) dat+="Nanotrasen D-Notice Handler
" @@ -326,7 +326,7 @@ dat+="No feed channels found active...
" else for(var/datum/newscaster/feed_channel/CHANNEL in GLOB.news_network.network_channels) - dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ()]
" + dat+="[CHANNEL.channel_name] [(CHANNEL.censored) ? ("***") : ""]
" dat+="
Back" if(12) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index ada1d1f21c3..3e82641544d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -54,7 +54,7 @@ leaping = 1 weather_immunities += "lava" update_icons() - throw_at(A, MAX_ALIEN_LEAP_DIST, 1, src, FALSE, TRUE, callback = CALLBACK(src, .leap_end)) + throw_at(A, MAX_ALIEN_LEAP_DIST, 1, src, FALSE, TRUE, callback = CALLBACK(src, .proc/leap_end)) /mob/living/carbon/alien/humanoid/hunter/proc/leap_end() leaping = 0 diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 2f5e74e35d5..6db29381cd0 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -60,27 +60,26 @@ GLOBAL_LIST_INIT(department_radio_keys, list( )) /mob/living/proc/Ellipsis(original_msg, chance = 50, keep_words) - if(chance <= 0) - return "..." - if(chance >= 100) - return original_msg + if(chance <= 0) + return "..." + if(chance >= 100) + return original_msg - var/list - words = splittext(original_msg," ") - new_words = list() + var/list/words = splittext(original_msg," ") + var/list/new_words = list() - var/new_msg = "" + var/new_msg = "" - for(var/w in words) - if(prob(chance)) - new_words += "..." - if(!keep_words) - continue - new_words += w + for(var/w in words) + if(prob(chance)) + new_words += "..." + if(!keep_words) + continue + new_words += w - new_msg = jointext(new_words," ") + new_msg = jointext(new_words," ") - return new_msg + return new_msg /mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE) var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE) diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index bc716c148e9..ea5b7e5a1bb 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -203,7 +203,7 @@ if(AIStatus == AI_ON && ranged_cooldown <= world.time) projectile_ready = TRUE update_icons() - throw_at(new_turf, max(3,get_dist(src,new_turf)), 1, src, FALSE, callback = CALLBACK(src, .FinishHop)) + throw_at(new_turf, max(3,get_dist(src,new_turf)), 1, src, FALSE, callback = CALLBACK(src, .proc/FinishHop)) /mob/living/simple_animal/hostile/jungle/leaper/proc/FinishHop() density = TRUE