This commit is contained in:
SandPoot
2021-10-15 15:03:21 -03:00
24 changed files with 8365 additions and 7802 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -96,3 +96,6 @@
#define STICKYBAN_DB_CACHE_TIME 10 SECONDS
#define STICKYBAN_ROGUE_CHECK_TIME 5
/// for asay pings, this is the index in the return list for [/proc/check_admin_pings] that contains the message modified with underlines for the spotted names
#define ADMINSAY_PING_UNDERLINE_NAME_INDEX "!underlined_names"

View File

@@ -88,3 +88,6 @@
/datum/config_entry/number/rounds_until_hard_restart
config_entry_value = -1
min_val = 0
/datum/config_entry/string/force_gamemode
config_entry_value = null

View File

@@ -71,6 +71,9 @@ SUBSYSTEM_DEF(ticker)
var/station_integrity = 100 // stored at roundend for use in some antag goals
var/emergency_reason
/// If the gamemode fails to be run too many times, we swap to a preset gamemode, this should give admins time to set their preferred one
var/emergency_swap = 0
/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()
@@ -179,10 +182,11 @@ SUBSYSTEM_DEF(ticker)
timeLeft = 0
if(!modevoted)
if(!CONFIG_GET(string/force_gamemode))
var/forcemode = CONFIG_GET(string/force_gamemode)
if(forcemode)
force_gamemode(forcemode)
if(!forcemode || (GLOB.master_mode == "dynamic" && CONFIG_GET(flag/dynamic_voting)))
send_gamemode_vote()
else
force_gamemode(CONFIG_GET(string/force_gamemode))
//countdown
if(timeLeft < 0)
return
@@ -230,14 +234,15 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/setup()
to_chat(world, "<span class='boldannounce'>Starting game...</span>")
var/init_start = world.timeofday
// GLOB.master_mode = "dynamic" // NEVER LET THIS RUN, IT WILL ALWAYS FORCE DYNAMIC
if(emergency_swap >= 10)
force_gamemode("extended") // If everything fails extended does not have hard requirements for starting, could be changed if needed.
mode = config.pick_mode(GLOB.master_mode)
if(!mode.can_start())
to_chat(world, "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby.")
qdel(mode)
mode = null
SSjob.ResetOccupations()
force_gamemode("extended")
emergency_swap++
return 0
CHECK_TICK
@@ -256,7 +261,7 @@ SUBSYSTEM_DEF(ticker)
QDEL_NULL(mode)
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
SSjob.ResetOccupations()
force_gamemode("extended")
emergency_swap++
return 0
else
message_admins("<span class='notice'>DEBUG: Bypassing prestart checks...</span>")
@@ -310,6 +315,19 @@ SUBSYSTEM_DEF(ticker)
return TRUE
/datum/controller/subsystem/ticker/proc/force_gamemode(gamemode)
if(gamemode)
if(!modevoted)
modevoted = TRUE
if(gamemode in config.modes)
GLOB.master_mode = gamemode
SSticker.save_mode(gamemode)
message_admins("The gamemode has been set to [gamemode].")
else
GLOB.master_mode = "extended"
SSticker.save_mode("extended")
message_admins("force_gamemode proc received an invalid gamemode, defaulting to extended.")
/datum/controller/subsystem/ticker/proc/PostSetup()
set waitfor = FALSE
mode.post_setup()
@@ -629,7 +647,7 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/load_mode()
var/mode = trim(file2text("data/mode.txt"))
if(mode)
GLOB.master_mode = "dynamic"
GLOB.master_mode = mode
else
GLOB.master_mode = GLOB.dynamic_forced_extended
log_game("Saved mode is '[GLOB.master_mode]'")

View File

@@ -300,6 +300,17 @@ CIGARETTE PACKETS ARE IN FANCY.DM
desc = "A Xeno Filtered brand cigarette."
list_reagents = list (/datum/reagent/drug/nicotine = 20, /datum/reagent/medicine/regen_jelly = 15, /datum/reagent/drug/krokodil = 4)
/obj/item/clothing/mask/cigarette/dart
name = "fat dart"
desc = "Chuff back this fat dart"
icon_state = "bigoff"
icon_on = "bigon"
icon_off = "bigoff"
w_class = WEIGHT_CLASS_BULKY
smoketime = 10000
chem_volume = 50
list_reagents = list(/datum/reagent/drug/nicotine = 15)
// Rollies.
/obj/item/clothing/mask/cigarette/rollie

View File

@@ -732,3 +732,34 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
return founds
return msg
/**
* Checks a given message to see if any of the words contain an active admin's ckey with an @ before it
*
* Returns nothing if no pings are found, otherwise returns an associative list with ckey -> client
* Also modifies msg to underline the pings, then stores them in the key [ADMINSAY_PING_UNDERLINE_NAME_INDEX] for returning
*
* Arguments:
* * msg - the message being scanned
*/
/proc/check_admin_pings(msg)
//explode the input msg into a list
var/list/msglist = splittext(msg, " ")
var/list/admins_to_ping = list()
var/i = 0
for(var/word in msglist)
i++
if(!length(word))
continue
if(word[1] != "@")
continue
var/ckey_check = lowertext(copytext(word, 2))
var/client/client_check = GLOB.directory[ckey_check]
if(client_check?.holder)
msglist[i] = "<u>[word]</u>"
admins_to_ping[ckey_check] = client_check
if(length(admins_to_ping))
admins_to_ping[ADMINSAY_PING_UNDERLINE_NAME_INDEX] = jointext(msglist, " ") // without tuples, we must make do!
return admins_to_ping

View File

@@ -8,6 +8,19 @@
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg)
return
var/list/pinged_admin_clients = check_admin_pings(msg)
if(length(pinged_admin_clients) && pinged_admin_clients[ADMINSAY_PING_UNDERLINE_NAME_INDEX])
msg = pinged_admin_clients[ADMINSAY_PING_UNDERLINE_NAME_INDEX]
pinged_admin_clients -= ADMINSAY_PING_UNDERLINE_NAME_INDEX
for(var/iter_ckey in pinged_admin_clients)
var/client/iter_admin_client = pinged_admin_clients[iter_ckey]
if(!iter_admin_client?.holder)
continue
window_flash(iter_admin_client)
SEND_SOUND(iter_admin_client.mob, sound('sound/misc/bloop.ogg'))
msg = emoji_parse(msg)
mob.log_talk(msg, LOG_ASAY)

View File

@@ -27,9 +27,12 @@
. = ..()
if(!ishuman(user))
return
if(slot == ITEM_SLOT_GLOVES)
switch(slot) // I didn't like how it looked
if(SLOT_GLOVES)
var/mob/living/carbon/human/H = user
tackler = H.AddComponent(/datum/component/tackler, stamina_cost=tackle_stam_cost, base_knockdown = base_knockdown, range = tackle_range, speed = tackle_speed, skill_mod = skill_mod, min_distance = min_distance)
else
qdel(tackler) // Only wearing it!
/obj/item/clothing/gloves/tackler/dropped(mob/user)
. = ..()

View File

@@ -1,11 +1,8 @@
#define MINER_DASH_RANGE 4
/*
BLOOD-DRUNK MINER
Effectively a highly aggressive miner, the blood-drunk miner has very few attacks but compensates by being highly aggressive.
The blood-drunk miner's attacks are as follows
- If not in KA range, it will rapidly dash at its target
- If in KA range, it will fire its kinetic accelerator
@@ -13,11 +10,8 @@ The blood-drunk miner's attacks are as follows
- After any of these attacks, may transform its cleaving saw:
Untransformed, it attacks very rapidly for smaller amounts of damage
Transformed, it attacks at normal speed for higher damage and cleaves enemies hit
When the blood-drunk miner dies, it leaves behind the cleaving saw it was using and its kinetic accelerator.
Difficulty: Medium
*/
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner
@@ -37,7 +31,7 @@ Difficulty: Medium
move_to_delay = 2
projectiletype = /obj/item/projectile/kinetic/miner
projectilesound = 'sound/weapons/kenetic_accel.ogg'
ranged = 1
ranged = TRUE
ranged_cooldown_time = 16
pixel_x = -16
crusher_loot = list(/obj/item/melee/transforming/cleaving_saw, /obj/item/gun/energy/kinetic_accelerator/premiumka, /obj/item/crusher_trophy/miner_eye, /obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe,
@@ -55,18 +49,56 @@ Difficulty: Medium
var/dashing = FALSE
var/dash_cooldown = 15
var/guidance = FALSE
var/transform_stop_attack = FALSE // stops the blood drunk miner from attacking after transforming his weapon until the next attack chain
deathmessage = "falls to the ground, decaying into glowing particles."
death_sound = "bodyfall"
deathsound = "bodyfall"
footstep_type = FOOTSTEP_MOB_HEAVY
attack_action_types = list(/datum/action/innate/megafauna_attack/dash,
/datum/action/innate/megafauna_attack/kinetic_accelerator,
/datum/action/innate/megafauna_attack/transform_weapon)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/guidance
guidance = TRUE
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/hunter/AttackingTarget()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/Initialize()
. = ..()
if(. && prob(12))
INVOKE_ASYNC(src, .proc/dash)
miner_saw = new(src)
/datum/action/innate/megafauna_attack/dash
name = "Dash To Target"
icon_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now dashing to your target.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/kinetic_accelerator
name = "Fire Kinetic Accelerator"
icon_icon = 'icons/obj/guns/energy.dmi'
button_icon_state = "kineticgun"
chosen_message = "<span class='colossus'>You are now shooting your kinetic accelerator.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/transform_weapon
name = "Transform Weapon"
icon_icon = 'icons/obj/lavaland/artefacts.dmi'
button_icon_state = "cleaving_saw"
chosen_message = "<span class='colossus'>You are now transforming your weapon.</span>"
chosen_attack_num = 3
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/OpenFire()
if(client)
switch(chosen_attack)
if(1)
dash(target)
if(2)
shoot_ka()
if(3)
transform_weapon()
return
Goto(target, move_to_delay, minimum_distance)
if(get_dist(src, target) > MINER_DASH_RANGE && dash_cooldown <= world.time)
dash_attack()
else
shoot_ka()
transform_weapon()
/obj/item/melee/transforming/cleaving_saw/miner //nerfed saw because it is very murdery
force = 6
@@ -74,7 +106,7 @@ Difficulty: Medium
/obj/item/melee/transforming/cleaving_saw/miner/attack(mob/living/target, mob/living/carbon/human/user)
target.add_stun_absorption("miner", 10, INFINITY)
. = ..()
..()
target.stun_absorption -= "miner"
/obj/item/projectile/kinetic/miner
@@ -83,22 +115,16 @@ Difficulty: Medium
icon_state = "ka_tracer"
range = MINER_DASH_RANGE
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/Initialize()
. = ..()
internal = new/obj/item/gps/internal/miner(src)
miner_saw = new(src)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
var/adjustment_amount = amount * 0.1
if(world.time + adjustment_amount > next_action)
DelayNextAction(adjustment_amount, considered_action = FALSE, flush = TRUE) //attacking it interrupts it attacking, but only briefly
DelayNextAction(adjustment_amount) //attacking it interrupts it attacking, but only briefly
. = ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/death()
if(health > 0)
return
. = ..()
if(.)
new /obj/effect/temp_visual/dir_setting/miner_death(loc, dir)
return ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/Move(atom/newloc)
if(dashing || (newloc && newloc.z == z && (islava(newloc) || ischasm(newloc)))) //we're not stupid!
@@ -110,11 +136,14 @@ Difficulty: Medium
return
return ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/MeleeAction(patience = TRUE)
transform_stop_attack = FALSE
return ..()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/AttackingTarget()
if(QDELETED(target))
return
if(!CheckActionCooldown() || !Adjacent(target)) //some cheating
INVOKE_ASYNC(src, .proc/quick_attack_loop)
if(client)
transform_stop_attack = FALSE
if(QDELETED(target) || transform_stop_attack)
return
face_atom(target)
if(isliving(target))
@@ -129,12 +158,10 @@ Difficulty: Medium
adjustHealth(-(L.maxHealth * 0.5))
L.gib()
return TRUE
miner_saw.melee_attack_chain(src, target, null, ATTACK_IGNORE_CLICKDELAY)
FlushCurrentAction()
DelayNextAction(CLICK_CD_MELEE)
miner_saw.melee_attack_chain(src, target)
if(guidance)
adjustHealth(-2)
transform_weapon()
INVOKE_ASYNC(src, .proc/quick_attack_loop)
return TRUE
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect)
@@ -147,16 +174,10 @@ Difficulty: Medium
. = ..()
if(. && target && !targets_the_same)
wander = TRUE
transform_weapon()
INVOKE_ASYNC(src, .proc/quick_attack_loop)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/OpenFire()
Goto(target, move_to_delay, minimum_distance)
if(get_dist(src, target) > MINER_DASH_RANGE && dash_cooldown <= world.time)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/dash_attack()
INVOKE_ASYNC(src, .proc/dash, target)
else
shoot_ka()
transform_weapon()
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/shoot_ka()
if(ranged_cooldown <= world.time && get_dist(src, target) <= MINER_DASH_RANGE && !Adjacent(target))
@@ -165,22 +186,7 @@ Difficulty: Medium
face_atom(target)
new /obj/effect/temp_visual/dir_setting/firing_effect(loc, dir)
Shoot(target)
DelayNextAction(CLICK_CD_RANGE, flush = TRUE)
//I'm still of the belief that this entire proc needs to be wiped from existence.
// do not take my touching of it to be endorsement of it. ~mso
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/quick_attack_loop()
while(!QDELETED(target) && !CheckActionCooldown()) //this is done this way because next_move can change to be sooner while we sleep.
stoplag(1)
sleep((next_action - world.time) * 1.5) //but don't ask me what the fuck this is about
if(QDELETED(target))
return
if(dashing || !CheckActionCooldown() || !Adjacent(target))
if(dashing && next_action <= world.time)
SetNextAction(1, considered_action = FALSE, immediate = FALSE, flush = TRUE)
INVOKE_ASYNC(src, .proc/quick_attack_loop) //lets try that again.
return
AttackingTarget()
DelayNextAction(CLICK_CD_RANGE)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/dash(atom/dash_target)
if(world.time < dash_cooldown)
@@ -225,19 +231,23 @@ Difficulty: Medium
dashing = TRUE
alpha = 0
animate(src, alpha = 255, time = 5)
sleep(2)
SLEEP_CHECK_DEATH(2)
D.forceMove(step_forward_turf)
forceMove(target_turf)
playsound(target_turf, 'sound/weapons/punchmiss.ogg', 40, 1, -1)
sleep(1)
SLEEP_CHECK_DEATH(1)
dashing = FALSE
shoot_ka()
return TRUE
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/proc/transform_weapon()
if(time_until_next_transform <= world.time)
miner_saw.transform_cooldown = 0
miner_saw.transform_weapon(src, TRUE)
if(!miner_saw.active)
rapid_melee = 5 // 4 deci cooldown before changes, npcpool subsystem wait is 20, 20/4 = 5
else
rapid_melee = 3 // same thing but halved (slightly rounded up)
transform_stop_attack = TRUE
icon_state = "miner[miner_saw.active ? "_transformed":""]"
icon_living = "miner[miner_saw.active ? "_transformed":""]"
time_until_next_transform = world.time + rand(50, 100)
@@ -269,6 +279,14 @@ Difficulty: Medium
desc = "The sweet blood, oh, it sings to me."
invisibility = 100
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/guidance
guidance = TRUE
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/hunter/AttackingTarget()
. = ..()
if(. && prob(12))
INVOKE_ASYNC(src, .proc/dash)
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/doom
name = "hostile-environment miner"
desc = "A miner destined to hop across dimensions for all eternity, hunting anomalous creatures."
@@ -277,4 +295,5 @@ Difficulty: Medium
ranged_cooldown_time = 8
dash_cooldown = 8
#undef MINER_DASH_RANGE

View File

@@ -14,7 +14,8 @@
/obj/item/storage/fancy/rollingpapers = 5)
contraband = list(/obj/item/lighter = 3,
/obj/item/clothing/mask/vape = 5,
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims = 1)
/obj/item/storage/fancy/cigarettes/cigpack_shadyjims = 1,
/obj/item/clothing/mask/cigarette/dart = 3)
premium = list(/obj/item/storage/fancy/cigarettes/cigpack_robustgold = 3,
/obj/item/storage/fancy/cigarettes/cigars = 1,
/obj/item/storage/fancy/cigarettes/cigars/havana = 1,

View File

@@ -66,3 +66,9 @@ DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
## Uncomment to set the number of /world/Reboot()s before the DreamDaemon restarts itself. 0 means restart every round. Requires tgstation server tools.
#ROUNDS_UNTIL_HARD_RESTART 10
## Force Gamemode ##
## Disallows roundstart gamemode voting if not null or uncommented
## Just input the gamemode lowercase in there, the thing will take a simple string for it
## Invalid gamemodes will default extended, have fun.
#FORCE_GAMEMODE

View File

@@ -31,9 +31,3 @@ MAX_STUPOR_HYPNO_DURATION 12000
## Maxmimum amount of languages someone can pick
## -1 means infinite and 0 disables it
#MAX_LANGUAGES
## Force Gamemode ##
## Disallows roundstart gamemode voting if not null or commented
## Just input the gamemode lowercase in there, the thing will take a simple string for it
## Invalid gamemodes will default extended, have fun.
#FORCE_GAMEMODE

View File

@@ -0,0 +1,4 @@
author: "SandPoot"
delete-after: True
changes:
- bugfix: "That also means no spam when moving it in your hands."

View File

@@ -0,0 +1,5 @@
author: "keronshb"
delete-after: True
changes:
- rscadd: "Adds the fat dart cigarette and to vendors"
- imageadd: "Adds the sprites for the fat dart"

View File

@@ -0,0 +1,5 @@
author: "dapnee"
delete-after: True
changes:
- rscadd: "BEPIS to science
tweak: moved the courtroom"

View File

@@ -0,0 +1,4 @@
author: "Ryll/Shaps"
delete-after: True
changes:
- rscadd: "Asay now supports pings (via using @[adminckey])"

View File

@@ -0,0 +1,5 @@
author: "SandPoot"
delete-after: True
changes:
- bugfix: "Equip delays are a bit less weird now, only relevant for coders/people who use straight jackets... on themself, since that's the only thing that uses it right now."
- bugfix: "Toggling arousal will properly update your sprite."

View File

@@ -0,0 +1,5 @@
author: "SandPoot"
delete-after: True
changes:
- bugfix: "If a gamemode fails to load too many times, a safe gamemode will be loaded instead."
- code_imp: "Dynamic is no longer hardcoded, and you can now set a gamemode to be forced in the configs."

View File

@@ -0,0 +1,4 @@
author: "WanderingFox95"
delete-after: True
changes:
- bugfix: "Removes the quick attack loop (like TG did it)"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -13,9 +13,6 @@
config_entry_value = 1
min_val = -1
/datum/config_entry/string/force_gamemode
config_entry_value = null
/datum/config_entry/flag/enable_dogborg_sleepers // enable normal dogborg sleepers (otherwise recreational)
/datum/config_entry/flag/limit_stupor_trances // enable limits to hypnotic stupor

BIN
sound/misc/bloop.ogg Normal file

Binary file not shown.