diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index 8ca837944a4..6ad707b32f9 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -25,6 +25,7 @@ var/enable_authentication = 0 // goon authentication var/del_new_on_log = 1 // del's new players if they log before they spawn in var/feature_object_spell_system = 0 //spawns a spellbook which gives object-type spells instead of verb-type spells for the wizard + var/traitor_scaling = 0 //if amount of traitors scales based on amount of players var/list/mode_names = list() var/list/modes = list() // allowed modes @@ -183,6 +184,9 @@ if ("feature_object_spell_system") config.feature_object_spell_system = 1 + if ("traitor_scaling") + config.traitor_scaling = 1 + if ("probability") var/prob_pos = findtext(value, " ") var/prob_name = null diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 81373e2d7e3..20cd7a54e93 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -130,6 +130,11 @@ t = copytext(t, 1, index) + "#" + copytext(t, index+1) index = findtext(t, "\t") + index = findtext(t, "ÿ") + while(index) + t = copytext(t, 1, index) + "ß" + copytext(t, index+1) + index = findtext(t, "ÿ") + return html_encode(t) /proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN) diff --git a/code/game/dna.dm b/code/game/dna.dm index 13f49bddbc8..bfa6967ffbf 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -715,6 +715,8 @@ /obj/machinery/scan_consolenew/Topic(href, href_list) if(..()) return + if(!istype(usr.loc, /turf)) + return if ((usr.contents.Find(src) || in_range(src, usr) && istype(src.loc, /turf)) || (istype(usr, /mob/living/silicon))) usr.machine = src if (href_list["locked"]) diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 63f5bc33ed4..5bec324c71c 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -38,7 +38,8 @@ var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds) var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds) - var/const/traitors_possible = 4 + var/const/traitors_possible = 4 //hard limit on traitors if scaling is turned off + var/const/traitor_scaling_coeff = 5.0 //how much does the amount of players get divided by to determine traitors /datum/game_mode/traitor/announce() world << "The current game mode is - Traitor!" @@ -58,9 +59,10 @@ if(!possible_traitors.len) return 0 - if(traitor_scaling) - //num_traitors = max(1, min(round((num_players + i) / 10), traitors_possible)) - num_traitors = max(1, min(round(num_players) + 1), traitors_possible) // -- TLE + if(config.traitor_scaling) + num_traitors = max(1, round((num_players)/(traitor_scaling_coeff))) + else + num_traitors = max(1, min(num_players, traitors_possible)) // log_game("Number of traitors: [num_traitors]") // message_admins("Players counted: [num_players] Number of traitors chosen: [num_traitors]") diff --git a/code/game/objects/devices/flash.dm b/code/game/objects/devices/flash.dm index 0807c597c55..aace3d5359c 100644 --- a/code/game/objects/devices/flash.dm +++ b/code/game/objects/devices/flash.dm @@ -75,7 +75,7 @@ else if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey") usr << "\red You don't have the dexterity to do this!" return - if ( (world.time + 600) > src.l_time) + if ( world.time > (src.l_time + 600)) src.shots = 5 if (src.shots < 1) user.show_message("\red *click* *click*", 2) diff --git a/code/game/objects/storage/backpack.dm b/code/game/objects/storage/backpack.dm index 15b369c0f8d..b5ddfe6cfc4 100644 --- a/code/game/objects/storage/backpack.dm +++ b/code/game/objects/storage/backpack.dm @@ -8,7 +8,8 @@ // if (src.loc != usr) // return - if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey"))) +// if ((istype(usr, /mob/living/carbon/human) || (ticker && ticker.mode.name == "monkey"))) + if (ishuman(usr) || ismonkey(usr)) //so monkies can take off their backpacks -- Urist var/mob/M = usr if (!( istype(over_object, /obj/screen) )) return ..() diff --git a/code/game/objects/tank.dm b/code/game/objects/tank.dm index 9ba48bc3266..6376e9412d5 100644 --- a/code/game/objects/tank.dm +++ b/code/game/objects/tank.dm @@ -45,7 +45,9 @@ if(istype(loc,/mob/living/carbon)) var/mob/living/carbon/location = loc if(location.internal == src) - usr << "\blue You close \the [src] release valve." + location.internal = null + location.internals.icon_state = "internal0" + usr << "\blue You close the tank release valve." if (location.internals) location.internals.icon_state = "internal0" else diff --git a/config/config.txt b/config/config.txt index 2224d6bf9c1..f290dfd7fc4 100644 --- a/config/config.txt +++ b/config/config.txt @@ -44,6 +44,9 @@ PROBABILITY CHANGELING 2 PROBABILITY CULT 0 PROBABILITY MONKEY 0 +# if amount of traitors scales or not +#TRAITOR_SCALING + # allow players to initiate a restart vote ALLOW_VOTE_RESTART