mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
CI now bans the use of weird spacing in conditionals (#22777)
* no more spaces * Matthew 10:22 * fixes * dgamerl review * Update code/modules/hydroponics/plant_genes.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/bot/ed209bot.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/pda/PDA.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * fuck * bah * Update tools/ci/check_grep2.py Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * oops * guh --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
@@ -44,14 +44,14 @@
|
||||
return new /datum/tgs_version("3.2.1.3")
|
||||
|
||||
/datum/tgs_api/v3210/proc/trim_left(text)
|
||||
for (var/i = 1 to length(text))
|
||||
if (text2ascii(text, i) > 32)
|
||||
for(var/i = 1 to length(text))
|
||||
if(text2ascii(text, i) > 32)
|
||||
return copytext(text, i)
|
||||
return ""
|
||||
|
||||
/datum/tgs_api/v3210/proc/trim_right(text)
|
||||
for (var/i = length(text), i > 0, i--)
|
||||
if (text2ascii(text, i) > 32)
|
||||
for(var/i = length(text), i > 0, i--)
|
||||
if(text2ascii(text, i) > 32)
|
||||
return copytext(text, 1, i + 1)
|
||||
return ""
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/list/logs = TGS_FILE2LIST(".git/logs/HEAD")
|
||||
if(logs.len)
|
||||
logs = splittext(logs[logs.len], " ")
|
||||
if (logs.len >= 2)
|
||||
if(logs.len >= 2)
|
||||
commit = logs[2]
|
||||
else
|
||||
TGS_ERROR_LOG("Error parsing commit logs")
|
||||
@@ -74,7 +74,7 @@
|
||||
logs = TGS_FILE2LIST(".git/logs/refs/remotes/origin/master")
|
||||
if(logs.len)
|
||||
logs = splittext(logs[logs.len], " ")
|
||||
if (logs.len >= 2)
|
||||
if(logs.len >= 2)
|
||||
originmastercommit = logs[2]
|
||||
else
|
||||
TGS_ERROR_LOG("Error parsing origin commmit logs")
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
return
|
||||
if(TGS4_TOPIC_CHANGE_PORT)
|
||||
var/new_port = text2num(params[TGS4_PARAMETER_DATA])
|
||||
if (!(new_port > 0))
|
||||
if(!(new_port > 0))
|
||||
return "Invalid port: [new_port]"
|
||||
|
||||
//the topic still completes, miraculously
|
||||
@@ -266,7 +266,7 @@
|
||||
|
||||
message = UpgradeDeprecatedChatMessage(message)
|
||||
|
||||
if (!length(channels))
|
||||
if(!length(channels))
|
||||
return
|
||||
|
||||
message = list("message" = message.text, "channelIds" = ids)
|
||||
@@ -279,12 +279,12 @@
|
||||
var/list/channels = list()
|
||||
for(var/I in ChatChannelInfo())
|
||||
var/datum/tgs_chat_channel/channel = I
|
||||
if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
|
||||
if(!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
|
||||
channels += channel.id
|
||||
|
||||
message = UpgradeDeprecatedChatMessage(message)
|
||||
|
||||
if (!length(channels))
|
||||
if(!length(channels))
|
||||
return
|
||||
|
||||
message = list("message" = message.text, "channelIds" = channels)
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
message = UpgradeDeprecatedChatMessage(message)
|
||||
|
||||
if (!length(channels))
|
||||
if(!length(channels))
|
||||
return
|
||||
|
||||
message = message._interop_serialize()
|
||||
@@ -181,12 +181,12 @@
|
||||
var/list/channels = list()
|
||||
for(var/I in ChatChannelInfo())
|
||||
var/datum/tgs_chat_channel/channel = I
|
||||
if (!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
|
||||
if(!channel.is_private_channel && ((channel.is_admin_channel && admin_only) || (!channel.is_admin_channel && !admin_only)))
|
||||
channels += channel.id
|
||||
|
||||
message = UpgradeDeprecatedChatMessage(message)
|
||||
|
||||
if (!length(channels))
|
||||
if(!length(channels))
|
||||
return
|
||||
|
||||
message = message._interop_serialize()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
chunk_requests = list()
|
||||
for(var/i in 1 to chunk_count)
|
||||
var/start_index = 1 + ((i - 1) * max_chunk_size)
|
||||
if (start_index > data_length)
|
||||
if(start_index > data_length)
|
||||
break
|
||||
|
||||
var/end_index = min(1 + (i * max_chunk_size), data_length + 1)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
return TopicResponse("Invalid or missing [DMAPI5_EVENT_NOTIFICATION_PARAMETERS]!")
|
||||
|
||||
var/list/event_call = list(event_type)
|
||||
if (event_type == TGS_EVENT_WATCHDOG_DETACH)
|
||||
if(event_type == TGS_EVENT_WATCHDOG_DETACH)
|
||||
detached = TRUE
|
||||
chat_channels.Cut() // https://github.com/tgstation/tgstation-server/issues/1490
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
if(DMAPI5_TOPIC_COMMAND_CHANGE_PORT)
|
||||
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
|
||||
if (!isnum(new_port) || !(new_port > 0))
|
||||
if(!isnum(new_port) || !(new_port > 0))
|
||||
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]")
|
||||
|
||||
if(event_handler != null)
|
||||
@@ -131,7 +131,7 @@
|
||||
|
||||
if(DMAPI5_TOPIC_COMMAND_SERVER_PORT_UPDATE)
|
||||
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
|
||||
if (!isnum(new_port) || !(new_port > 0))
|
||||
if(!isnum(new_port) || !(new_port > 0))
|
||||
return TopicResponse("Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]")
|
||||
|
||||
server_port = new_port
|
||||
@@ -146,20 +146,20 @@
|
||||
detached = FALSE
|
||||
var/new_port = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_PORT]
|
||||
var/error_message = null
|
||||
if (new_port != null)
|
||||
if (!isnum(new_port) || !(new_port > 0))
|
||||
if(new_port != null)
|
||||
if(!isnum(new_port) || !(new_port > 0))
|
||||
error_message = "Invalid [DMAPI5_TOPIC_PARAMETER_NEW_PORT]]"
|
||||
else
|
||||
server_port = new_port
|
||||
|
||||
var/new_version_string = topic_parameters[DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]
|
||||
if (!istext(new_version_string))
|
||||
if(!istext(new_version_string))
|
||||
if(error_message != null)
|
||||
error_message += ", "
|
||||
error_message += "Invalid or missing [DMAPI5_TOPIC_PARAMETER_NEW_SERVER_VERSION]]"
|
||||
else
|
||||
var/datum/tgs_version/new_version = new(new_version_string)
|
||||
if (event_handler)
|
||||
if(event_handler)
|
||||
event_handler.HandleEvent(TGS_EVENT_WATCHDOG_REATTACH, new_version)
|
||||
|
||||
version = new_version
|
||||
|
||||
Reference in New Issue
Block a user