diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index cbf701e1d3..e84f6eb50b 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -204,7 +204,7 @@ ///Compile all the overlays for an atom from the cache lists // |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway. #define COMPILE_OVERLAYS(A)\ - if (TRUE) {\ + do {\ var/list/ad = A.add_overlays;\ var/list/rm = A.remove_overlays;\ if(LAZYLEN(rm)){\ @@ -216,7 +216,7 @@ ad.Cut();\ }\ A.flags_1 &= ~OVERLAY_QUEUED_1;\ - } + } while(FALSE) /** diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index a59ee9fcb0..a554397c41 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -66,7 +66,7 @@ } while(FALSE) //Returns a list in plain english as a string -/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) +/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "") var/total = length(input) switch(total) if (0) @@ -87,6 +87,34 @@ return "[output][and_text][input[index]]" +/** + * English_list but associative supporting. Higher overhead. + */ +/proc/english_list_assoc(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "") + var/total = length(input) + switch(total) + if (0) + return "[nothing_text]" + if (1) + var/assoc = input[input[1]] == null? "" : " = [input[input[1]]]" + return "[input[1]][assoc]" + if (2) + var/assoc = input[input[1]] == null? "" : " = [input[input[1]]]" + var/assoc2 = input[input[2]] == null? "" : " = [input[input[2]]]" + return "[input[1]][assoc][and_text][input[2]][assoc2]" + else + var/output = "" + var/index = 1 + var/assoc + while (index < total) + if (index == total - 1) + comma_text = final_comma_text + assoc = input[input[index]] == null? "" : " = [input[input[index]]]" + output += "[input[index]][assoc][comma_text]" + ++index + assoc = input[input[index]] == null? "" : " = [input[input[index]]]" + return "[output][and_text][input[index]]" + //Returns list element or null. Should prevent "index out of bounds" error. /proc/listgetindex(list/L, index) if(LAZYLEN(L)) diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 04141becf2..841a3e8303 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -118,27 +118,7 @@ action_intent.hud = src static_inventory += action_intent - using = new /obj/screen/mov_intent - using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon - using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") - using.screen_loc = ui_movi - using.hud = src - static_inventory += using - - //CITADEL CHANGES - sprint button - using = new /obj/screen/sprintbutton - using.icon = tg_ui_icon_to_cit_ui(ui_style) - using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint") - using.screen_loc = ui_movi - using.hud = src - static_inventory += using - //END OF CITADEL CHANGES - - //same as above but buffer. - sprint_buffer = new /obj/screen/sprint_buffer - sprint_buffer.screen_loc = ui_sprintbufferloc - sprint_buffer.hud = src - static_inventory += sprint_buffer + assert_move_intent_ui(owner, TRUE) // clickdelay clickdelay = new @@ -393,6 +373,51 @@ update_locked_slots() +/datum/hud/human/proc/assert_move_intent_ui(mob/living/carbon/human/owner = mymob, on_new = FALSE) + var/obj/screen/using + // delete old ones + var/list/obj/screen/victims = list() + victims += locate(/obj/screen/mov_intent) in static_inventory + victims += locate(/obj/screen/sprintbutton) in static_inventory + victims += locate(/obj/screen/sprint_buffer) in static_inventory + if(victims) + static_inventory -= victims + if(mymob?.client) + mymob.client.screen -= victims + QDEL_LIST(victims) + + // make new ones + // walk/run + using = new /obj/screen/mov_intent + using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon + using.screen_loc = ui_movi + using.hud = src + using.update_icon() + static_inventory += using + if(!on_new) + owner?.client?.screen += using + + if(!CONFIG_GET(flag/sprint_enabled)) + return + + // sprint button + using = new /obj/screen/sprintbutton + using.icon = tg_ui_icon_to_cit_ui(ui_style) + using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint") + using.screen_loc = ui_movi + using.hud = src + static_inventory += using + if(!on_new) + owner?.client?.screen += using + + // same as above but buffer. + sprint_buffer = new /obj/screen/sprint_buffer + sprint_buffer.screen_loc = ui_sprintbufferloc + sprint_buffer.hud = src + static_inventory += sprint_buffer + if(!on_new) + owner?.client?.screen += using + /datum/hud/human/update_locked_slots() if(!mymob) return diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 53915ff42b..64515260ec 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -351,6 +351,10 @@ icon = 'icons/mob/screen_midnight.dmi' icon_state = "running" +/obj/screen/mov_intent/Initialize(mapload) + . = ..() + update_icon() + /obj/screen/mov_intent/Click() toggle(usr) @@ -359,7 +363,7 @@ if(MOVE_INTENT_WALK) icon_state = "walking" if(MOVE_INTENT_RUN) - icon_state = "running" + icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint" /obj/screen/mov_intent/proc/toggle(mob/user) if(isobserver(user)) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index e9f759fd42..4034722417 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -290,6 +290,17 @@ var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk) M.sync() +/datum/config_entry/flag/sprint_enabled + config_entry_value = TRUE + +/datum/config_entry/flag/sprint_enabled/ValidateAndSet(str_val) + . = ..() + for(var/datum/hud/human/H) + H.assert_move_intent_ui() + if(!config_entry_value) // disabled + for(var/mob/living/L in world) + L.disable_intentional_sprint_mode() + /datum/config_entry/number/movedelay/sprint_speed_increase config_entry_value = 1 diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 0157f4ca87..45bb9bd327 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -264,6 +264,8 @@ What a mess.*/ active1 = null if(!( GLOB.data_core.security.Find(active2) )) active2 = null + if(!authenticated && href_list["choice"] != "Log In") // logging in is the only action you can do if not logged in + return if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr)) usr.set_machine(src) switch(href_list["choice"]) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 24f65756c8..e186364cff 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -527,12 +527,13 @@ else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) if(!myseed) if(istype(O, /obj/item/seeds/kudzu)) - investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)]","kudzu") + investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)]", INVESTIGATE_BOTANY) if(!user.transferItemToLoc(O, src)) return to_chat(user, "You plant [O].") dead = FALSE myseed = O + investigate_log("planting: [user] planted [O] with traits [english_list(myseed)] and reagents [english_list_assoc(myseed.reagents_add)] and potency [myseed.potency]", INVESTIGATE_BOTANY) TRAY_NAME_UPDATE age = 1 plant_health = myseed.endurance diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index d8082e667d..577635cd1c 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -188,6 +188,8 @@ ///The Number of products produced by the plant, typically the yield. var/product_count = getYield() + parent.investigate_log("manual harvest by [key_name(user)] of [getYield()] of [src], with seed traits [english_list(genes)] and reagents_add [english_list_assoc(reagents_add)] and potency [potency].", INVESTIGATE_BOTANY) + while(t_amount < product_count) var/obj/item/reagent_containers/food/snacks/grown/t_prod if(instability >= 30 && (seed_flags & MUTATE_EARLY) && LAZYLEN(mutatelist) && prob(instability/3)) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 00c22ad96d..dbab6a558c 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -128,10 +128,58 @@ if(dbflags & DB_FLAG_AGE_CONFIRMATION_INCOMPLETE) //they have not completed age gate var/age_verification = age_gate() if(age_verification != 1) - client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process") + client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process.") //ban them and kick them - AddBan(client.ckey, client.computer_id, "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification.", "SYSTEM", FALSE, null, client.address) + + //parameters used by sql line, easier to read: + var/bantype_str = "ADMIN_PERMABAN" + var/reason = "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification." + var/duration = -1 + var/sql_ckey = sanitizeSQL(client.ckey) + var/computerid = client.computer_id + if(!computerid) + computerid = "0" + var/sql_computerid = sanitizeSQL(computerid) + var/ip = client.address + if(!ip) + ip = "0.0.0.0" + var/sql_ip = sanitizeSQL(ip) + + //parameter not used as there's no job but i want to fill out all parameters for the insert line + var/sql_job + + // these are typically the banning admin's, but it's the system so we leave them null, but they're still here for the sake of a full set of values + var/sql_a_ckey + var/sql_a_computerid + var/sql_a_ip + + // record all admins and non-admins online at the time + var/who + for(var/client/C in GLOB.clients) + if(!who) + who = "[C]" + else + who += ", [C]" + + var/adminwho + for(var/client/C in GLOB.admins) + if(!adminwho) + adminwho = "[C]" + else + adminwho += ", [C]" + + var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`round_id`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]', '[bantype_str]', '[reason]', '[sql_job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[sql_ckey]', '[sql_computerid]', INET_ATON('[sql_ip]'), '[sql_a_ckey]', '[sql_a_computerid]', INET_ATON('[sql_a_ip]'), '[who]', '[adminwho]')" + var/datum/DBQuery/query_add_ban = SSdbcore.NewQuery(sql) + qdel(query_add_ban) + + // announce this + message_admins("[html_encode(client.ckey)] has been banned for failing the automatic age gate.") + send2irc("[html_encode(client.ckey)] has been banned for failing the automatic age gate.") + + // removing the client disconnects them qdel(client) + + return FALSE else //they claim to be of age, so allow them to continue and update their flags diff --git a/code/modules/mob/living/living_sprint.dm b/code/modules/mob/living/living_sprint.dm index 3ef67c9edd..728645c3eb 100644 --- a/code/modules/mob/living/living_sprint.dm +++ b/code/modules/mob/living/living_sprint.dm @@ -26,6 +26,8 @@ update_sprint_icon() /mob/living/proc/enable_sprint_mode(update_icon = TRUE) + if(!CONFIG_GET(flag/sprint_enabled)) + return if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) return ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE) @@ -61,6 +63,8 @@ update_sprint_icon() /mob/living/proc/user_toggle_intentional_sprint_mode() + if(!CONFIG_GET(flag/sprint_enabled)) + return var/old = (combat_flags & COMBAT_FLAG_SPRINT_TOGGLED) if(old) if(combat_flags & COMBAT_FLAG_SPRINT_FORCED) diff --git a/code/modules/mob/living/silicon/robot/robot_sprint.dm b/code/modules/mob/living/silicon/robot/robot_sprint.dm index dff0d9dd0d..80adfe80fd 100644 --- a/code/modules/mob/living/silicon/robot/robot_sprint.dm +++ b/code/modules/mob/living/silicon/robot/robot_sprint.dm @@ -1,4 +1,7 @@ /mob/living/silicon/robot/default_toggle_sprint(shutdown = FALSE) + if(!CONFIG_GET(flag/sprint_enabled)) + disable_intentional_sprint_mode() + return var/current = (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) if(current || shutdown || !cell || (cell.charge < 25) || !cansprint) disable_intentional_sprint_mode() diff --git a/html/changelog.html b/html/changelog.html index ef0caf1317..2d2d7a2eae 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,40 @@ -->
+

16 February 2021

+

silicons updated:

+ + +

15 February 2021

+

Adelphon updated:

+ +

DeltaFire15 updated:

+ +

dzahlus updated:

+ +

silicons updated:

+ +

14 February 2021

DeltaFire15 updated:

-

09 February 2021

-

Chiirno updated:

- -

DeltaFire15 updated:

- -

Putnam3145 updated:

- -

dzahlus updated:

- -

keronshb updated:

- -

timothyteakettle updated:

- -

zeroisthebiggay updated:

- -

09 February 2021

Chiirno updated:

+

07 February 2021

+

Thalpy updated:

+ +

TyrianTyrell updated:

+ +

dzahlus updated:

+ +

silicons updated:

+ + +

05 February 2021

+

SmArtKar updated:

+ +

keronshb updated:

+ +

raspy-on-osu updated:

+ +

shellspeed1 updated:

+ +

timothyteakettle updated:

+ +

03 February 2021

Hatterhat updated: