diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index c7df1e53819..f7c638be9b3 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -104,7 +104,7 @@ var/list/sacrificed = list() if(!iscultist(M) && M.stat < DEAD && !(M in converting)) target = M break - + if(!target) //didn't find any new targets if(!converting.len) fizzle() @@ -113,7 +113,7 @@ var/list/sacrificed = list() return usr.say("Mah[pick("'","`")]weyh pleggh at e'ntrath!") - + converting |= target var/list/waiting_for_input = list(target = 0) //need to box this up in order to be able to reset it again from inside spawn, apparently var/initial_message = 0 @@ -123,7 +123,7 @@ var/list/sacrificed = list() if(target.getFireLoss() < 100) target.hallucination = min(target.hallucination, 500) return 0 - + target.take_overall_damage(0, rand(5, 20)) // You dirty resister cannot handle the damage to your mind. Easily. - even cultists who accept right away should experience some effects // Resist messages go! if(initial_message) //don't do this stuff right away, only if they resist or hesitate. @@ -139,7 +139,7 @@ var/list/sacrificed = list() target << "Your mind turns to ash as the burning flames engulf your very soul and images of an unspeakable horror begin to bombard the last remnants of mental resistance." //broken mind - 5000 may seem like a lot I wanted the effect to really stand out for maxiumum losing-your-mind-spooky //hallucination is reduced when the step off as well, provided they haven't hit the last stage... - target.hallucination += 5000 + target.hallucination += 5000 target.apply_effect(10, STUTTER) target.adjustBrainLoss(1) if(100 to INFINITY) @@ -160,8 +160,8 @@ var/list/sacrificed = list() if(!is_convertable_to_cult(target.mind) || jobban_isbanned(target, "cultist"))//putting jobban check here because is_convertable uses mind as argument //waiting_for_input ensures this is only shown once, so they basically auto-resist from here on out. They still need to find a way to get off the freaking rune if they don't want to burn to death, though. target << "Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible truth. The veil of reality has been ripped away and in the festering wound left behind something sinister takes root." - target << "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs." - + target << "And you were able to force it out of your mind. You now know the truth, there's something horrible out there, stop it and its minions at all costs." + else spawn() var/choice = alert(target,"Do you want to join the cult?","Submit to Nar'Sie","Resist","Submit") waiting_for_input[target] = 0 @@ -172,7 +172,7 @@ var/list/sacrificed = list() target << "Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back." converting -= target target.hallucination = 0 //sudden clarity - + sleep(100) //proc once every 10 seconds return 1 @@ -415,6 +415,7 @@ var/list/sacrificed = list() var/mob/dead/observer/ghost for(var/mob/dead/observer/O in this_rune.loc) if(!O.client) continue + if(!O.MayRespawn()) continue if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue ghost = O break diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 6d6e5ad4cbc..f5b127b5fe7 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -32,9 +32,7 @@ for (var/mob/O in viewers(M, null)) O.show_message("\red [M] has been implanted by [user].", 1) - M.attack_log += text("\[[time_stamp()]\] Implanted with [src.name] ([src.imp.name]) by [user.name] ([user.ckey])") - user.attack_log += text("\[[time_stamp()]\] Used the [src.name] ([src.imp.name]) to implant [M.name] ([M.ckey])") - msg_admin_attack("[user.name] ([user.ckey]) implanted [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)]) (JMP)") + admin_attack_log(user, M, "Implanted using \the [src.name] ([src.imp.name])", "Implanted with \the [src.name] ([src.imp.name])", "used an implanter, [src.name] ([src.imp.name]), on") user.show_message("\red You implanted the implant into [M].") if(src.imp.implanted(M)) diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index fa1cd02b7ba..a46f52c726a 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -1,5 +1,5 @@ -#define SHOWER_OPEN_LAYER MOB_LAYER + 0.1 -#define SHOWER_CLOSED_LAYER OBJ_LAYER + 0.4 +#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4 +#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1 /obj/structure/curtain name = "curtain" diff --git a/code/game/response_team.dm b/code/game/response_team.dm index dafd8190162..416edf78ca1 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -38,10 +38,12 @@ var/can_call_ert log_admin("[key_name(usr)] used Dispatch Response Team.") trigger_armed_response_team(1) - client/verb/JoinResponseTeam() set category = "IC" + if(!MayRespawn(1)) + return + if(istype(usr,/mob/dead/observer) || istype(usr,/mob/new_player)) if(!send_emergency_team) usr << "No emergency response team is currently being sent." diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index a8efe68418e..d68356792cb 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -302,3 +302,14 @@ 'html/images/ntlogo.png', 'html/images/talisman.png' ) + + +mob/proc/MayRespawn() + return 0 + +client/proc/MayRespawn() + if(mob) + return mob.MayRespawn() + + // Something went wrong, client is usually kicked or transfered to a new mob at this point + return 0 diff --git a/code/modules/hydroponics/seed_mobs.dm b/code/modules/hydroponics/seed_mobs.dm index d31f1843804..6fcd7b22aed 100644 --- a/code/modules/hydroponics/seed_mobs.dm +++ b/code/modules/hydroponics/seed_mobs.dm @@ -13,7 +13,7 @@ spawn(75) if(!host.ckey && !host.client) host.death() // This seems redundant, but a lot of mobs don't - host.stat = 2 // handle death() properly. Better safe than etc. + host.stat = DEAD // handle death() properly. Better safe than etc. host.visible_message("[host] is malformed and unable to survive. It expires pitifully, leaving behind some seeds.") var/total_yield = rand(1,3) @@ -27,7 +27,7 @@ for(var/mob/dead/observer/O in player_list) if(jobban_isbanned(O, "Dionaea")) continue - if(O.client) + if(O.client && O.MayRespawn()) if(O.client.prefs.be_special & BE_PLANT && !(O.client in currently_querying)) currently_querying |= O.client question(O.client,host) diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm index 4f52b82ceea..d333d5c794a 100644 --- a/code/modules/hydroponics/spreading/spreading.dm +++ b/code/modules/hydroponics/spreading/spreading.dm @@ -1,7 +1,7 @@ #define DEFAULT_SEED "glowshroom" #define VINE_GROWTH_STAGES 5 -/proc/spacevine_infestation() +/proc/spacevine_infestation(var/potency_min=70, var/potency_max=100, var/maturation_min=5, var/maturation_max=15) spawn() //to stop the secrets panel hanging var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas for(var/areapath in typesof(/area/hallway)) @@ -15,8 +15,15 @@ var/turf/simulated/floor/T = pick(turfs) var/datum/seed/seed = plant_controller.create_random_seed(1) seed.set_trait(TRAIT_SPREAD,2) // So it will function properly as vines. - seed.set_trait(TRAIT_POTENCY,rand(70,100)) // Guarantee a wide spread and powerful effects. - new /obj/effect/plant(T,seed) + seed.set_trait(TRAIT_POTENCY,rand(potency_min, potency_max)) // 70-100 potency will help guarantee a wide spread and powerful effects. + seed.set_trait(TRAIT_MATURATION,rand(maturation_min, maturation_max)) + + //make vine zero start off fully matured + var/obj/effect/plant/vine = new(T,seed) + vine.health = vine.max_health + vine.mature_time = 0 + vine.process() + message_admins("Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])") /obj/effect/dead_plant @@ -57,6 +64,7 @@ var/spread_chance = 40 var/spread_distance = 3 var/evolve_chance = 2 + var/mature_time //minimum maturation time var/last_tick = 0 var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant @@ -112,6 +120,7 @@ if(max_growth > 2 && prob(50)) max_growth-- //Ensure some variation in final sprite, makes the carpet of crap look less wonky. + mature_time = world.time + seed.get_trait(TRAIT_MATURATION) + 15 //prevent vines from maturing until at least a few seconds after they've been created. spread_chance = seed.get_trait(TRAIT_POTENCY) spread_distance = ((growth_type>0) ? round(spread_chance*0.6) : round(spread_chance*0.3)) update_icon() @@ -256,4 +265,4 @@ die_off() /obj/effect/plant/proc/is_mature() - return (health >= (max_health/3)) \ No newline at end of file + return (health >= (max_health/3) && world.time > mature_time) diff --git a/code/modules/hydroponics/spreading/spreading_growth.dm b/code/modules/hydroponics/spreading/spreading_growth.dm index 7b1eae4f218..716d58c645f 100644 --- a/code/modules/hydroponics/spreading/spreading_growth.dm +++ b/code/modules/hydroponics/spreading/spreading_growth.dm @@ -70,7 +70,10 @@ update_neighbors() if(is_mature() && neighbors.len && prob(spread_chance)) - for(var/i=1,i<=seed.get_trait(TRAIT_YIELD),i++) + //spread to 1-3 adjacent turfs depending on yield trait. + var/max_spread = between(1, round(seed.get_trait(TRAIT_YIELD)*3/14), 3) + + for(var/i in 1 to max_spread) if(prob(spread_chance)) sleep(rand(3,5)) if(!neighbors.len) diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm index d175fdda221..6a93ecaeea1 100644 --- a/code/modules/hydroponics/spreading/spreading_response.dm +++ b/code/modules/hydroponics/spreading/spreading_response.dm @@ -7,8 +7,11 @@ if(!istype(M)) return - if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/2)))) - entangle(M) + if(!buckled_mob && !M.buckled && !M.anchored && (M.small || prob(round(seed.get_trait(TRAIT_POTENCY)/6)))) + //wait a tick for the Entered() proc that called HasProximity() to finish (and thus the moving animation), + //so we don't appear to teleport from two tiles away when moving into a turf adjacent to vines. + spawn(1) + entangle(M) /obj/effect/plant/attack_hand(mob/user as mob) // Todo, cause damage. @@ -60,13 +63,11 @@ if(buckled_mob) return - if(!Adjacent(victim)) + if(victim.buckled) return - victim.buckled = src - victim.update_canmove() - buckled_mob = victim - if(!victim.anchored && !victim.buckled && victim.loc != get_turf(src)) + //grabbing people + if(!victim.anchored && Adjacent(victim) && victim.loc != get_turf(src)) var/can_grab = 1 if(istype(victim, /mob/living/carbon/human)) var/mob/living/carbon/human/H = victim @@ -75,4 +76,9 @@ if(can_grab) src.visible_message("Tendrils lash out from \the [src] and drag \the [victim] in!") victim.loc = src.loc - victim << "Tendrils [pick("wind", "tangle", "tighten")] around you!" + + //entangling people + if(victim.loc == src.loc) + buckle_mob(victim) + victim.set_dir(pick(cardinal)) + victim << "Tendrils [pick("wind", "tangle", "tighten")] around you!" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 058f5d6044f..5f1c1cb7b77 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -427,9 +427,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp src << "Spawning as a mouse is currently disabled." return - var/mob/dead/observer/M = usr - if(config.antag_hud_restricted && M.has_enabled_antagHUD == 1) - src << "antagHUD restrictions prevent you from spawning in as a mouse." + if(!MayRespawn(1)) return var/timedifference = world.time - client.time_died_as_mouse @@ -620,3 +618,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/canface() return 1 + +mob/dead/observer/MayRespawn(var/feedback = 0) + if(config.antag_hud_restricted && has_enabled_antagHUD == 1) + if(feedback) + src << "antagHUD restrictions prevent you from respawning." + return 0 + return 1 diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index 5faeadbdcc3..981e2507494 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -31,4 +31,4 @@ /mob/living/carbon/alien/diona/put_in_hands(var/obj/item/W) // No hands. W.loc = get_turf(src) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 08f2e34243b..4f4543b3b98 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -26,7 +26,7 @@ /obj/item/device/mmi/digital/posibrain/proc/request_player() for(var/mob/dead/observer/O in player_list) - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(!O.MayRespawn()) continue if(jobban_isbanned(O, "AI") && jobban_isbanned(O, "Cyborg")) continue diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 650b20cf7cc..8a7328ed354 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -235,7 +235,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates if(c.ready) var/found = 0 for(var/mob/dead/observer/o in player_list) - if(o.key == c.key) + if(o.key == c.key && o.MayRespawn()) found = 1 if(found) available.Add(c) @@ -348,7 +348,7 @@ var/datum/paiController/paiController // Global handler for pAI candidates /datum/paiController/proc/requestRecruits(var/mob/user) inquirer = user for(var/mob/dead/observer/O in player_list) - if(O.has_enabled_antagHUD == 1 && config.antag_hud_restricted) + if(!O.MayRespawn()) continue if(jobban_isbanned(O, "pAI")) continue diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index d8009e6161c..44714ffd44c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -102,6 +102,9 @@ if(jobban_isbanned(src,"Cyborg")) usr << "\red You are banned from playing synthetics and cannot spawn as a drone." return + + if(!MayRespawn(1)) + return var/deathtime = world.time - src.timeofdeath if(istype(src,/mob/dead/observer)) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index 662715ca21e..4222fc96517 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -527,3 +527,6 @@ /mob/new_player/hear_radio(var/message, var/verb="says", var/datum/language/language=null, var/part_a, var/part_b, var/mob/speaker = null, var/hard_to_hear = 0) return + +mob/new_player/MayRespawn() + return 1 diff --git a/html/changelogs/PsiOmegaDelta-AntagHUDRestrictions.yml b/html/changelogs/PsiOmegaDelta-AntagHUDRestrictions.yml new file mode 100644 index 00000000000..d4e90bd1ac8 --- /dev/null +++ b/html/changelogs/PsiOmegaDelta-AntagHUDRestrictions.yml @@ -0,0 +1,5 @@ +author: PsiOmegaDelta +delete-after: True + +changes: + - bugfix: "As an observer, using antagHUD should now always restrict you from respawning without admin intervention."