From e39130ac615db5946dcfdc527e365ff3b6510c4a Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:01:43 +0500 Subject: [PATCH 1/9] uh oh --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 532f77d1bec2..34a8e59a1efa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -545,7 +545,7 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" - if(queen_age_timer_id != TIMER_ID_NULL) + if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) var/time_left = time2text(timeleft(queen_age_timer_id) + 1 MINUTES, "mm") // We add a minute so that it basically ceilings the value. . += "Maturity: [time_left == 1? "[time_left] minute" : "[time_left] minutes"] remaining" From 5b88dad1c8246527fbd4de3eb46abcafed59875b Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:03:35 +0500 Subject: [PATCH 2/9] seconds --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 34a8e59a1efa..67e816803189 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -546,7 +546,7 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) - var/time_left = time2text(timeleft(queen_age_timer_id) + 1 MINUTES, "mm") // We add a minute so that it basically ceilings the value. + var/time_left = time2text(timeleft(queen_age_timer_id), "mm:ss") . += "Maturity: [time_left == 1? "[time_left] minute" : "[time_left] minutes"] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders() From 8e8e67e179ac801fb2c2e4bde14b2f9d675ac37b Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:12:36 +0500 Subject: [PATCH 3/9] fix --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 67e816803189..fd8682386e03 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -545,7 +545,7 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" - if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) + if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) // Idk, bug or not, but when timer ends, it leave just "2", this is soft solution to polution var/time_left = time2text(timeleft(queen_age_timer_id), "mm:ss") . += "Maturity: [time_left == 1? "[time_left] minute" : "[time_left] minutes"] remaining" From 9db61dd88e6f03badd8f58fe0c71f5bce7146567 Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:14:01 +0500 Subject: [PATCH 4/9] text grammar --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index fd8682386e03..79eab2fb6bc2 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -547,7 +547,7 @@ . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) // Idk, bug or not, but when timer ends, it leave just "2", this is soft solution to polution var/time_left = time2text(timeleft(queen_age_timer_id), "mm:ss") - . += "Maturity: [time_left == 1? "[time_left] minute" : "[time_left] minutes"] remaining" + . += "Maturity: [time2text(timeleft(queen_age_timer_id), "mm:ss")] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders() set category = "Alien" From 6b532cea84f968945d00977c474b151bc58e2440 Mon Sep 17 00:00:00 2001 From: Crystalic <39885003+blackcrystall@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:14:26 +0500 Subject: [PATCH 5/9] skill issue --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 79eab2fb6bc2..ee35dffd5ff4 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -546,7 +546,6 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) // Idk, bug or not, but when timer ends, it leave just "2", this is soft solution to polution - var/time_left = time2text(timeleft(queen_age_timer_id), "mm:ss") . += "Maturity: [time2text(timeleft(queen_age_timer_id), "mm:ss")] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders() From 24db0f0e6afb6657d4a19d3c1468ab05de9b3dd3 Mon Sep 17 00:00:00 2001 From: Deleted user Date: Fri, 19 Jul 2024 15:10:33 +0500 Subject: [PATCH 6/9] f --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index c4679b2fc7f7..449e8334b05c 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -545,7 +545,7 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" - if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) // Idk, bug or not, but when timer ends, it leave just "2", this is soft solution to polution + if(!queen_aged) . += "Maturity: [time2text(timeleft(queen_age_timer_id), "mm:ss")] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders() From 8631da9f0bf639919d325ff292572160258880bf Mon Sep 17 00:00:00 2001 From: Deleted user Date: Sat, 20 Jul 2024 16:48:35 +0500 Subject: [PATCH 7/9] =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/datums/entities/admins.dm | 113 +++++++++++++++++++++++++++++++++ code/datums/entities/player.dm | 4 ++ colonialmarines.dme | 1 + 3 files changed, 118 insertions(+) create mode 100644 code/datums/entities/admins.dm diff --git a/code/datums/entities/admins.dm b/code/datums/entities/admins.dm new file mode 100644 index 000000000000..f3b147ef962f --- /dev/null +++ b/code/datums/entities/admins.dm @@ -0,0 +1,113 @@ +GLOBAL_LIST_EMPTY(admin_ranks) //list of all admin_rank datums +GLOBAL_PROTECT(admin_ranks) + +/datum/entity/admin_rank + var/rank = "NoRank" + var/rights = R_DEFAULT + +BSQL_PROTECT_DATUM(/datum/entity/admin_rank) + +/datum/entity_meta/admin_rank + entity_type = /datum/entity/admin_rank + table_name = "admin_ranks" + field_types = list( + "rank" = DB_FIELDTYPE_STRING_MEDIUM, + "rights" = DB_FIELDTYPE_STRING_MAX, + ) + +/datum/entity_meta/admin_rank/map(datum/entity/admin_rank/rank, list/values) + ..() + if(values["rights"]) + rank.rights = rights2flags(values["rights"]) + +/datum/entity_meta/admin_rank/unmap(datum/entity/admin_rank/rank) + . = ..() + if(length(rank.rights)) + .["rights"] = flags2rights(rank.rights) + +/proc/rights2flags(text_rights) + var/rights = NO_FLAGS + var/list/list_rights = splittext(text_rights, "|") + for(var/right in list_rights) + switch(right) + if("buildmode") + rights |= R_BUILDMODE + if("admin") + rights |= R_ADMIN + if("ban") + rights |= R_BAN + if("server") + rights |= R_SERVER + if("debug") + rights |= R_DEBUG + if("permissions") + rights |= R_PERMISSIONS + if("possess") + rights |= R_POSSESS + if("stealth") + rights |= R_STEALTH + if("color") + rights |= R_COLOR + if("varedit") + rights |= R_VAREDIT + if("event") + rights |= R_EVENT + if("sounds") + rights |= R_SOUNDS + if("nolock") + rights |= R_NOLOCK + if("spawn") + rights |= R_SPAWN + if("mod") + rights |= R_MOD + if("mentor") + rights |= R_MENTOR + if("profiler") + rights |= R_PROFILER + if("host") + rights |= RL_HOST + if("everything") + rights |= RL_EVERYTHING + return rights + +/proc/flags2rights(rights) + var/text_rights = "" + if(rights & R_BUILDMODE) + text_rights += "build|" + if(rights & R_ADMIN) + text_rights += "admin|" + if(rights & R_BAN) + text_rights += "ban|" + if(rights & R_SERVER) + text_rights += "server|" + if(rights & R_DEBUG) + text_rights += "debug|" + if(rights & R_PERMISSIONS) + text_rights += "permissions|" + if(rights & R_POSSESS) + text_rights += "possess|" + if(rights & R_STEALTH) + text_rights += "stealth|" + if(rights & R_COLOR) + text_rights += "color|" + if(rights & R_VAREDIT) + text_rights += "varedit|" + if(rights & R_EVENT) + text_rights += "event|" + if(rights & R_SOUNDS) + text_rights += "sounds|" + if(rights & R_NOLOCK) + text_rights += "nolock|" + if(rights & R_SPAWN) + text_rights += "spawn|" + if(rights & R_MOD) + text_rights += "mod|" + if(rights & R_MENTOR) + text_rights += "mentor|" + if(rights & R_PROFILER) + text_rights += "profiler|" + if(rights & RL_HOST) + text_rights += "host|" + if(rights & RL_EVERYTHING) + text_rights += "everything|" + return text_rights diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm index fbdcc11e1037..e4ddf92493bf 100644 --- a/code/datums/entities/player.dm +++ b/code/datums/entities/player.dm @@ -69,6 +69,7 @@ BSQL_PROTECT_DATUM(/datum/entity/player) "is_permabanned" = DB_FIELDTYPE_INT, "permaban_reason" = DB_FIELDTYPE_STRING_MAX, "permaban_date" = DB_FIELDTYPE_STRING_LARGE, + "admin_status" = DB_FIELDTYPE_STRING_MEDIUM "whitelist_status" = DB_FIELDTYPE_STRING_MAX, "discord_link_id" = DB_FIELDTYPE_BIGINT, "permaban_admin_id" = DB_FIELDTYPE_BIGINT, @@ -421,6 +422,9 @@ BSQL_PROTECT_DATUM(/datum/entity/player) if(discord_link_id) discord_link = DB_ENTITY(/datum/entity/discord_link, discord_link_id) + if(admin_status) + GLOB.admin_ranks["admin_status"] + if(whitelist_status) var/list/whitelists = splittext(whitelist_status, "|") diff --git a/colonialmarines.dme b/colonialmarines.dme index a3cf03cc79a3..e502f496f80a 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -543,6 +543,7 @@ #include "code\datums\emergency_calls\xeno_cultists.dm" #include "code\datums\emergency_calls\xenos.dm" #include "code\datums\emergency_calls\zombie.dm" +#include "code\datums\entities\admins.dm" #include "code\datums\entities\chemical_information.dm" #include "code\datums\entities\clans.dm" #include "code\datums\entities\discord_identifier.dm" From 1da79f422681a4cd549d340539aa2a21f2f4702f Mon Sep 17 00:00:00 2001 From: Deleted user Date: Sat, 20 Jul 2024 16:49:25 +0500 Subject: [PATCH 8/9] =?UTF-8?q?Revert=20"=D0=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 8631da9f0bf639919d325ff292572160258880bf. --- code/datums/entities/admins.dm | 113 --------------------------------- code/datums/entities/player.dm | 4 -- colonialmarines.dme | 1 - 3 files changed, 118 deletions(-) delete mode 100644 code/datums/entities/admins.dm diff --git a/code/datums/entities/admins.dm b/code/datums/entities/admins.dm deleted file mode 100644 index f3b147ef962f..000000000000 --- a/code/datums/entities/admins.dm +++ /dev/null @@ -1,113 +0,0 @@ -GLOBAL_LIST_EMPTY(admin_ranks) //list of all admin_rank datums -GLOBAL_PROTECT(admin_ranks) - -/datum/entity/admin_rank - var/rank = "NoRank" - var/rights = R_DEFAULT - -BSQL_PROTECT_DATUM(/datum/entity/admin_rank) - -/datum/entity_meta/admin_rank - entity_type = /datum/entity/admin_rank - table_name = "admin_ranks" - field_types = list( - "rank" = DB_FIELDTYPE_STRING_MEDIUM, - "rights" = DB_FIELDTYPE_STRING_MAX, - ) - -/datum/entity_meta/admin_rank/map(datum/entity/admin_rank/rank, list/values) - ..() - if(values["rights"]) - rank.rights = rights2flags(values["rights"]) - -/datum/entity_meta/admin_rank/unmap(datum/entity/admin_rank/rank) - . = ..() - if(length(rank.rights)) - .["rights"] = flags2rights(rank.rights) - -/proc/rights2flags(text_rights) - var/rights = NO_FLAGS - var/list/list_rights = splittext(text_rights, "|") - for(var/right in list_rights) - switch(right) - if("buildmode") - rights |= R_BUILDMODE - if("admin") - rights |= R_ADMIN - if("ban") - rights |= R_BAN - if("server") - rights |= R_SERVER - if("debug") - rights |= R_DEBUG - if("permissions") - rights |= R_PERMISSIONS - if("possess") - rights |= R_POSSESS - if("stealth") - rights |= R_STEALTH - if("color") - rights |= R_COLOR - if("varedit") - rights |= R_VAREDIT - if("event") - rights |= R_EVENT - if("sounds") - rights |= R_SOUNDS - if("nolock") - rights |= R_NOLOCK - if("spawn") - rights |= R_SPAWN - if("mod") - rights |= R_MOD - if("mentor") - rights |= R_MENTOR - if("profiler") - rights |= R_PROFILER - if("host") - rights |= RL_HOST - if("everything") - rights |= RL_EVERYTHING - return rights - -/proc/flags2rights(rights) - var/text_rights = "" - if(rights & R_BUILDMODE) - text_rights += "build|" - if(rights & R_ADMIN) - text_rights += "admin|" - if(rights & R_BAN) - text_rights += "ban|" - if(rights & R_SERVER) - text_rights += "server|" - if(rights & R_DEBUG) - text_rights += "debug|" - if(rights & R_PERMISSIONS) - text_rights += "permissions|" - if(rights & R_POSSESS) - text_rights += "possess|" - if(rights & R_STEALTH) - text_rights += "stealth|" - if(rights & R_COLOR) - text_rights += "color|" - if(rights & R_VAREDIT) - text_rights += "varedit|" - if(rights & R_EVENT) - text_rights += "event|" - if(rights & R_SOUNDS) - text_rights += "sounds|" - if(rights & R_NOLOCK) - text_rights += "nolock|" - if(rights & R_SPAWN) - text_rights += "spawn|" - if(rights & R_MOD) - text_rights += "mod|" - if(rights & R_MENTOR) - text_rights += "mentor|" - if(rights & R_PROFILER) - text_rights += "profiler|" - if(rights & RL_HOST) - text_rights += "host|" - if(rights & RL_EVERYTHING) - text_rights += "everything|" - return text_rights diff --git a/code/datums/entities/player.dm b/code/datums/entities/player.dm index e4ddf92493bf..fbdcc11e1037 100644 --- a/code/datums/entities/player.dm +++ b/code/datums/entities/player.dm @@ -69,7 +69,6 @@ BSQL_PROTECT_DATUM(/datum/entity/player) "is_permabanned" = DB_FIELDTYPE_INT, "permaban_reason" = DB_FIELDTYPE_STRING_MAX, "permaban_date" = DB_FIELDTYPE_STRING_LARGE, - "admin_status" = DB_FIELDTYPE_STRING_MEDIUM "whitelist_status" = DB_FIELDTYPE_STRING_MAX, "discord_link_id" = DB_FIELDTYPE_BIGINT, "permaban_admin_id" = DB_FIELDTYPE_BIGINT, @@ -422,9 +421,6 @@ BSQL_PROTECT_DATUM(/datum/entity/player) if(discord_link_id) discord_link = DB_ENTITY(/datum/entity/discord_link, discord_link_id) - if(admin_status) - GLOB.admin_ranks["admin_status"] - if(whitelist_status) var/list/whitelists = splittext(whitelist_status, "|") diff --git a/colonialmarines.dme b/colonialmarines.dme index e502f496f80a..a3cf03cc79a3 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -543,7 +543,6 @@ #include "code\datums\emergency_calls\xeno_cultists.dm" #include "code\datums\emergency_calls\xenos.dm" #include "code\datums\emergency_calls\zombie.dm" -#include "code\datums\entities\admins.dm" #include "code\datums\entities\chemical_information.dm" #include "code\datums\entities\clans.dm" #include "code\datums\entities\discord_identifier.dm" From a31fc8a60ed571aef0c3c50ac4e18cbf0d815f45 Mon Sep 17 00:00:00 2001 From: Deleted user Date: Sat, 20 Jul 2024 16:58:36 +0500 Subject: [PATCH 9/9] I have no idea what different here --- code/modules/mob/living/carbon/xenomorph/castes/Queen.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm index 449e8334b05c..5b9c410e235a 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Queen.dm @@ -468,6 +468,9 @@ /mob/living/carbon/xenomorph/queen/proc/make_combat_effective() queen_aged = TRUE + if(queen_age_timer_id != TIMER_ID_NULL) + deltimer(queen_age_timer_id) + queen_age_timer_id = TIMER_ID_NULL give_combat_abilities() recalculate_actions() @@ -545,7 +548,7 @@ . += "Pooled Larvae: [stored_larvae]" . += "Leaders: [xeno_leader_num] / [hive?.queen_leader_limit]" - if(!queen_aged) + if(!queen_aged && queen_age_timer_id != TIMER_ID_NULL) . += "Maturity: [time2text(timeleft(queen_age_timer_id), "mm:ss")] remaining" /mob/living/carbon/xenomorph/queen/proc/set_orders()