[MIRROR] Refactors smiting, adds smite build mode (#2126)

* Refactors smiting, adds smite build mode (#55327)

Refactors smiting out from being a large switch/case into datums.

Adds a new smite option to build mode. This lets you choose a smite and rapidly apply it to a lot of people, presumably for EORG. Requested for by...one of the admins, I forget which.

* Refactors smiting, adds smite build mode

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-12-11 01:39:56 +01:00
committed by GitHub
parent 217058ceca
commit 36e89191df
29 changed files with 480 additions and 274 deletions
+17
View File
@@ -0,0 +1,17 @@
/// Gives the target bad luck, optionally permanently
/datum/smite/bad_luck
name = "Bad Luck"
/// Should the target know they've received bad luck?
var/silent
/// Is this permanent?
var/permanent
/datum/smite/bad_luck/configure(client/user)
silent = alert(user, "Do you want to apply the omen with a player notification?", "Notify Player?", "Notify", "Silent") == "Silent"
permanent = alert(user, "Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", "Permanent", "Temporary") == "Permanent"
/datum/smite/bad_luck/effect(client/user, mob/living/target)
. = ..()
target.AddComponent(/datum/component/omen, silent, null, permanent)
+53
View File
@@ -0,0 +1,53 @@
/// Fires an absurd amount of bullets at the target
/datum/smite/berforate
name = ":B:erforate"
/// Determines how fucked the target is
var/hatred
/datum/smite/berforate/configure(client/user)
var/static/list/how_fucked_is_this_dude = list("A little", "A lot", "So fucking much", "FUCK THIS DUDE")
hatred = input(user, "How much do you hate this guy?") in how_fucked_is_this_dude
/datum/smite/berforate/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/repetitions
var/shots_per_limb_per_rep = 2
var/damage
switch (hatred)
if ("A little")
repetitions = 1
damage = 5
if ("A lot")
repetitions = 2
damage = 8
if ("So fucking much")
repetitions = 3
damage = 10
if ("FUCK THIS DUDE")
repetitions = 4
damage = 10
var/mob/living/carbon/dude = target
var/list/open_adj_turfs = get_adjacent_open_turfs(dude)
var/list/wound_bonuses = list(15, 70, 110, 250)
var/delay_per_shot = 1
var/delay_counter = 1
dude.Immobilize(5 SECONDS)
for (var/wound_bonus_rep in 1 to repetitions)
for (var/_limb in dude.bodyparts)
var/obj/item/bodypart/limb = _limb
var/shots_this_limb = 0
for (var/_iter_turf in shuffle(open_adj_turfs))
var/turf/iter_turf = _iter_turf
addtimer(CALLBACK(GLOBAL_PROC, .proc/firing_squad, dude, iter_turf, limb.body_zone, wound_bonuses[wound_bonus_rep], damage), delay_counter)
delay_counter += delay_per_shot
shots_this_limb += 1
if (shots_this_limb > shots_per_limb_per_rep)
break
+18
View File
@@ -0,0 +1,18 @@
/// Slashes up the target
/datum/smite/bloodless
name = ":B:loodless"
/datum/smite/bloodless/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/carbon_target = target
for(var/_limb in carbon_target.bodyparts)
var/obj/item/bodypart/limb = _limb
var/type_wound = pick(list(/datum/wound/slash/severe, /datum/wound/slash/moderate))
limb.force_wound_upwards(type_wound, smited = TRUE)
type_wound = pick(list(/datum/wound/slash/critical, /datum/wound/slash/severe, /datum/wound/slash/moderate))
limb.force_wound_upwards(type_wound, smited = TRUE)
type_wound = pick(list(/datum/wound/slash/critical, /datum/wound/slash/severe))
limb.force_wound_upwards(type_wound, smited = TRUE)
+16
View File
@@ -0,0 +1,16 @@
/// Gives the target critically bad wounds
/datum/smite/boneless
name = ":B:oneless"
/datum/smite/boneless/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/carbon_target = target
for(var/_limb in carbon_target.bodyparts)
var/obj/item/bodypart/limb = _limb
var/type_wound = pick(list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate))
limb.force_wound_upwards(type_wound, smited = TRUE)
@@ -0,0 +1,7 @@
/// Inflicts crippling brain damage on the target
/datum/smite/brain_damage
name = "Brain damage"
/datum/smite/brain_damage/effect(client/user, mob/living/target)
. = ..()
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, BRAIN_DAMAGE_DEATH - 1, BRAIN_DAMAGE_DEATH - 1)
+14
View File
@@ -0,0 +1,14 @@
#define BREADIFY_TIME (5 SECONDS)
/// Turns the target into bread
/datum/smite/bread
name = "Bread"
/datum/smite/bread/effect(client/user, mob/living/target)
. = ..()
var/mutable_appearance/bread_appearance = mutable_appearance('icons/obj/food/burgerbread.dmi', "bread")
var/mutable_appearance/transform_scanline = mutable_appearance('icons/effects/effects.dmi', "transform_effect")
target.transformation_animation(bread_appearance,time = BREADIFY_TIME, transform_overlay=transform_scanline, reset_after=TRUE)
addtimer(CALLBACK(GLOBAL_PROC, .proc/breadify, target), BREADIFY_TIME)
#undef BREADIFY_TIME
+35
View File
@@ -0,0 +1,35 @@
#define BSA_CHANCE_TO_BREAK_TILE_TO_PLATING 80
#define BSA_MAX_DAMAGE 99
#define BSA_PARALYZE_TIME (40 SECONDS)
#define BSA_STUTTER_TIME 20
/// Fires the BSA at the target
/datum/smite/bsa
name = "Bluespace Artillery Device"
/datum/smite/bsa/effect(client/user, mob/living/target)
. = ..()
explosion(target.loc, 0, 0, 0, 0)
var/turf/open/floor/target_turf = get_turf(target)
if (istype(target_turf))
if (prob(BSA_CHANCE_TO_BREAK_TILE_TO_PLATING))
target_turf.break_tile_to_plating()
else
target_turf.break_tile()
if (target.health <= 1)
target.gib(
/* no_brain = */ TRUE,
/* no_organs = */ TRUE,
)
else
target.adjustBruteLoss(min(BSA_MAX_DAMAGE, target.health - 1))
target.Paralyze(BSA_PARALYZE_TIME)
target.stuttering = BSA_STUTTER_TIME
#undef BSA_CHANCE_TO_BREAK_TILE_TO_PLATING
#undef BSA_MAX_DAMAGE
#undef BSA_PARALYZE_TIME
#undef BSA_STUTTER_TIME
+31
View File
@@ -0,0 +1,31 @@
/// Docks the target's pay
/datum/smite/dock_pay
name = "Dock Pay"
/datum/smite/dock_pay/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
var/obj/item/card/id/card = dude.get_idcard(TRUE)
if (!card)
to_chat(user, "<span class='warning'>[dude] does not have an ID card on!</span>", confidential = TRUE)
return
if (!card.registered_account)
to_chat(user, "<span class='warning'>[dude] does not have an ID card with an account!</span>", confidential = TRUE)
return
if (card.registered_account.account_balance == 0)
to_chat(user, "<span class='warning'>ID Card lacks any funds. No pay to dock.</span>")
return
var/new_cost = input("How much pay are we docking? Current balance: [card.registered_account.account_balance] credits.", "BUDGET CUTS") as num|null
if (!new_cost)
return
if (!(card.registered_account.has_money(new_cost)))
to_chat(user, "<span class='warning'>ID Card lacked funds. Emptying account.</span>")
card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.")
card.registered_account.account_balance = 0
else
card.registered_account.account_balance = card.registered_account.account_balance - new_cost
card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.")
SEND_SOUND(target, 'sound/machines/buzz-sigh.ogg')
+7
View File
@@ -0,0 +1,7 @@
/// Sends the target a fake adminhelp sound
/datum/smite/fake_bwoink
name = "Fake bwoink"
/datum/smite/fake_bwoink/effect(client/user, mob/living/target)
. = ..()
SEND_SOUND(target, 'sound/effects/adminhelp.ogg')
+7
View File
@@ -0,0 +1,7 @@
/// Fattens the target
/datum/smite/fat
name = "Fatten up"
/datum/smite/fat/effect(client/user, mob/living/target)
. = ..()
target.set_nutrition(NUTRITION_LEVEL_FAT * 2)
+7
View File
@@ -0,0 +1,7 @@
/// Throws a fireball down at the target
/datum/smite/fireball
name = "Fireball"
/datum/smite/fireball/effect(client/user, mob/living/target)
. = ..()
new /obj/effect/temp_visual/target(get_turf(target))
+7
View File
@@ -0,0 +1,7 @@
/// Gibs the target
/datum/smite/gib
name = "Gib"
/datum/smite/gib/effect(client/user, mob/living/target)
. = ..()
target.gib(/* no_brain = */ FALSE)
+7
View File
@@ -0,0 +1,7 @@
/// "Fully immerses" the player, making them manually breathe and blink
/datum/smite/immerse
name = "Fully Immerse"
/datum/smite/immerse/effect(client/user, mob/living/target)
. = ..()
immerse_player(target)
+15
View File
@@ -0,0 +1,15 @@
/// Ties the target's shoes
/datum/smite/knot_shoes
name = "Knot Shoes"
/datum/smite/knot_shoes/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
var/obj/item/clothing/shoes/sick_kicks = dude.shoes
if (!sick_kicks?.can_be_tied)
to_chat(user, "<span class='warning'>[dude] does not have knottable shoes!</span>", confidential = TRUE)
return
sick_kicks.adjust_laces(SHOES_KNOTTED)
+19
View File
@@ -0,0 +1,19 @@
#define LIGHTNING_BOLT_DAMAGE 75
#define LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH 40
/// Strikes the target with a lightning bolt
/datum/smite/lightning
name = "Lightning bolt"
/datum/smite/lightning/effect(client/user, mob/living/target)
. = ..()
var/turf/lightning_source = get_step(get_step(target, NORTH), NORTH)
lightning_source.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
target.adjustFireLoss(LIGHTNING_BOLT_DAMAGE)
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
human_target.electrocution_animation(LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH)
to_chat(target, "<span class='userdanger'>The gods have punished you for your sins!</span>", confidential = TRUE)
#undef LIGHTNING_BOLT_DAMAGE
#undef LIGHTNING_BOLT_ELECTROCUTION_ANIMATION_LENGTH
+21
View File
@@ -0,0 +1,21 @@
/// Rips off all the limbs of the target
/datum/smite/nugget
name = "Nugget"
/datum/smite/nugget/effect(client/user, mob/living/target)
. = ..()
if (!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/carbon_target = target
var/timer = 2 SECONDS
for (var/_limb in carbon_target.bodyparts)
var/obj/item/bodypart/limb = _limb
if (limb.body_part == HEAD || limb.body_part == CHEST)
continue
addtimer(CALLBACK(limb, /obj/item/bodypart/.proc/dismember), timer)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, carbon_target, 'sound/effects/cartoon_pop.ogg', 70), timer)
addtimer(CALLBACK(carbon_target, /mob/living/.proc/spin, 4, 1), timer - 0.4 SECONDS)
timer += 2 SECONDS
+8
View File
@@ -0,0 +1,8 @@
/// Turns the user into a sliding puzzle
/datum/smite/puzzle
name = "Puzzle"
/datum/smite/puzzle/effect(client/user, mob/living/target)
. = ..()
if(!puzzle_imprison(target))
to_chat(user, "<span class='warning'>Imprisonment failed!</span>", confidential = TRUE)
+11
View File
@@ -0,0 +1,11 @@
/// Throw an immovable rod at the target
/datum/smite/rod
name = "Immovable Rod"
/datum/smite/rod/effect(client/user, mob/living/target)
. = ..()
var/turf/target_turf = get_turf(target)
var/startside = pick(GLOB.cardinals)
var/turf/start_turf = spaceDebrisStartLoc(startside, target_turf.z)
var/turf/end_turf = spaceDebrisFinishLoc(startside, target_turf.z)
new /obj/effect/immovablerod(start_turf, end_turf, target)
+12
View File
@@ -0,0 +1,12 @@
/// Gives the target fake scars
/datum/smite/scarify
name = "Scarify"
/datum/smite/scarify/effect(client/user, mob/living/target)
. = ..()
if(!iscarbon(target))
to_chat(user, "<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
dude.generate_fake_scars(rand(1, 4))
to_chat(dude, "<span class='warning'>You feel your body grow jaded and torn...</span>")
+17
View File
@@ -0,0 +1,17 @@
/// A smite, used by admins to punish players, or for their own amusement
/datum/smite
/// The name of the smite, shown in the menu
var/name
/// Should this smite write to logs?
var/should_log = TRUE
/// Called once after either choosing the option to smite a player, or when selected in smite build mode.
/// Use this to prompt the user configuration options.
/// Return FALSE if the smite should not be used.
/datum/smite/proc/configure(client/user)
/// The effect of the smite, make sure to call this in your own smites
/datum/smite/proc/effect(client/user, mob/living/target)
if (should_log)
user.punish_log(target, name)
+21
View File
@@ -0,0 +1,21 @@
#define SUPPLY_POD_FIRE_RANGE
/// Throws a supply pod at the target, with no item inside
/datum/smite/supply_pod
name = "Supply Pod"
// punish_log() is handled by the centcom_podlauncher datum
should_log = FALSE
/datum/smite/supply_pod/effect(client/user, mob/living/target)
. = ..()
var/datum/centcom_podlauncher/plaunch = new(user)
plaunch.specificTarget = target
plaunch.launchChoice = 0
plaunch.damageChoice = 1
plaunch.explosionChoice = 1
plaunch.temp_pod.damage = 40 // bring the mother fuckin ruckus
plaunch.temp_pod.explosionSize = list(0, 0, 0, SUPPLY_POD_FIRE_RANGE)
plaunch.temp_pod.effectStun = TRUE
#undef SUPPLY_POD_FIRE_RANGE
@@ -0,0 +1,49 @@
#define SUPPLY_POD_QUICK_DAMAGE 40
#define SUPPLY_POD_QUICK_FIRE_RANGE 2
/// Quickly throws a supply pod at the target, optionally with an item
/datum/smite/supply_pod_quick
name = "Supply Pod (Quick)"
/// What is sent down with the pod
var/target_path
/datum/smite/supply_pod_quick/configure(client/user)
var/attempted_target_path = input(
user,
"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):",
"Typepath",
"/obj/item/food/grown/harebell",
) as null|text
if (isnull(attempted_target_path)) //The user pressed "Cancel"
return FALSE
if (attempted_target_path == "empty")
target_path = null
return
// if you didn't type empty, we want to load the pod with a delivery
var/delivery = text2path(attempted_target_path)
if(!ispath(delivery))
delivery = pick_closest_path(attempted_target_path)
if(!delivery)
alert(user, "ERROR: Incorrect / improper path given.")
return FALSE
target_path = delivery
/datum/smite/supply_pod_quick/effect(client/user, mob/living/target)
. = ..()
var/obj/structure/closet/supplypod/centcompod/pod = new
pod.damage = SUPPLY_POD_QUICK_DAMAGE
pod.explosionSize = list(0, 0, 0, SUPPLY_POD_QUICK_FIRE_RANGE)
pod.effectStun = TRUE
if (!isnull(target_path))
new target_path(pod)
new /obj/effect/pod_landingzone(get_turf(target), pod)
#undef SUPPLY_POD_QUICK_DAMAGE
#undef SUPPLY_POD_QUICK_FIRE_RANGE
-26
View File
@@ -1,26 +0,0 @@
/client/proc/bluespace_artillery(mob/M in GLOB.mob_list)
if(!holder || !check_rights(R_FUN))
return
var/mob/living/target = M
if(!isliving(target))
to_chat(usr, "This can only be used on instances of type /mob/living", confidential = TRUE)
return
explosion(target.loc, 0, 0, 0, 0)
var/turf/open/floor/T = get_turf(target)
if(istype(T))
if(prob(80))
T.break_tile_to_plating()
else
T.break_tile()
if(target.health <= 1)
target.gib(1, 1)
else
target.adjustBruteLoss(min(99,(target.health - 1)))
target.Paralyze(400)
target.stuttering = 20
+9 -223
View File
@@ -1117,232 +1117,18 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING,
ADMIN_PUNISHMENT_BRAINDAMAGE,
ADMIN_PUNISHMENT_GIB,
ADMIN_PUNISHMENT_BSA,
ADMIN_PUNISHMENT_FIREBALL,
ADMIN_PUNISHMENT_ROD,
ADMIN_PUNISHMENT_SUPPLYPOD_QUICK,
ADMIN_PUNISHMENT_SUPPLYPOD,
ADMIN_PUNISHMENT_MAZING,
ADMIN_PUNISHMENT_IMMERSE,
ADMIN_PUNISHMENT_FAT,
ADMIN_PUNISHMENT_FAKEBWOINK,
ADMIN_PUNISHMENT_NUGGET,
ADMIN_PUNISHMENT_CRACK,
ADMIN_PUNISHMENT_BLEED,
ADMIN_PUNISHMENT_PERFORATE,
ADMIN_PUNISHMENT_SCARIFY,
ADMIN_PUNISHMENT_SHOES,
ADMIN_PUNISHMENT_DOCK,
ADMIN_PUNISHMENT_BREAD,
ADMIN_PUNISHMENT_BADLUCK
)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in sortList(punishment_list)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in GLOB.smites
if(QDELETED(target) || !punishment)
return
switch(punishment)
if(ADMIN_PUNISHMENT_LIGHTNING)
var/turf/T = get_step(get_step(target, NORTH), NORTH)
T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
target.adjustFireLoss(75)
if(ishuman(target))
var/mob/living/carbon/human/H = target
H.electrocution_animation(40)
to_chat(target, "<span class='userdanger'>The gods have punished you for your sins!</span>", confidential = TRUE)
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
target.adjustOrganLoss(ORGAN_SLOT_BRAIN, 199, 199)
if(ADMIN_PUNISHMENT_GIB)
target.gib(FALSE)
if(ADMIN_PUNISHMENT_BSA)
bluespace_artillery(target)
if(ADMIN_PUNISHMENT_FIREBALL)
new /obj/effect/temp_visual/target(get_turf(target))
if(ADMIN_PUNISHMENT_ROD)
var/turf/T = get_turf(target)
var/startside = pick(GLOB.cardinals)
var/turf/startT = spaceDebrisStartLoc(startside, T.z)
var/turf/endT = spaceDebrisFinishLoc(startside, T.z)
new /obj/effect/immovablerod(startT, endT,target)
if(ADMIN_PUNISHMENT_SUPPLYPOD_QUICK)
var/target_path = input(usr,"Enter typepath of an atom you'd like to send with the pod (type \"empty\" to send an empty pod):" ,"Typepath","/obj/item/food/grown/harebell") as null|text
var/obj/structure/closet/supplypod/centcompod/pod = new()
pod.damage = 40
pod.explosionSize = list(0,0,0,2)
pod.effectStun = TRUE
if (isnull(target_path)) //The user pressed "Cancel"
return
if (target_path != "empty")//if you didn't type empty, we want to load the pod with a delivery
var/delivery = text2path(target_path)
if(!ispath(delivery))
delivery = pick_closest_path(target_path)
if(!delivery)
alert("ERROR: Incorrect / improper path given.")
return
new delivery(pod)
new /obj/effect/pod_landingzone(get_turf(target), pod)
if(ADMIN_PUNISHMENT_SUPPLYPOD)
var/datum/centcom_podlauncher/plaunch = new(usr)
if(!holder)
return
plaunch.specificTarget = target
plaunch.launchChoice = 0
plaunch.damageChoice = 1
plaunch.explosionChoice = 1
plaunch.temp_pod.damage = 40//bring the mother fuckin ruckus
plaunch.temp_pod.explosionSize = list(0,0,0,2)
plaunch.temp_pod.effectStun = TRUE
return //We return here because punish_log() is handled by the centcom_podlauncher datum
if(ADMIN_PUNISHMENT_MAZING)
if(!puzzle_imprison(target))
to_chat(usr,"<span class='warning'>Imprisonment failed!</span>", confidential = TRUE)
return
if(ADMIN_PUNISHMENT_IMMERSE)
immerse_player(target)
if(ADMIN_PUNISHMENT_FAT)
target.set_nutrition(NUTRITION_LEVEL_FAT*2)
if(ADMIN_PUNISHMENT_FAKEBWOINK)
SEND_SOUND(target, 'sound/effects/adminhelp.ogg')
if(ADMIN_PUNISHMENT_NUGGET)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/C = target
var/timer = 2 SECONDS
for(var/obj/item/bodypart/thing in C.bodyparts)
if(thing.body_part == HEAD || thing.body_part == CHEST)
continue
addtimer(CALLBACK(thing, /obj/item/bodypart/.proc/dismember), timer)
addtimer(CALLBACK(GLOBAL_PROC, .proc/playsound, C, 'sound/effects/cartoon_pop.ogg', 70), timer)
addtimer(CALLBACK(C, /mob/living/.proc/spin, 4, 1), timer - 0.4 SECONDS)
timer += 2 SECONDS
if(ADMIN_PUNISHMENT_CRACK)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/C = target
for(var/i in C.bodyparts)
var/obj/item/bodypart/squish_part = i
var/type_wound = pick(list(/datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/critical, /datum/wound/blunt/severe, /datum/wound/blunt/moderate))
squish_part.force_wound_upwards(type_wound, smited=TRUE)
if(ADMIN_PUNISHMENT_BLEED)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/C = target
for(var/i in C.bodyparts)
var/obj/item/bodypart/slice_part = i
var/type_wound = pick(list(/datum/wound/slash/severe, /datum/wound/slash/moderate))
slice_part.force_wound_upwards(type_wound, smited=TRUE)
type_wound = pick(list(/datum/wound/slash/critical, /datum/wound/slash/severe, /datum/wound/slash/moderate))
slice_part.force_wound_upwards(type_wound, smited=TRUE)
type_wound = pick(list(/datum/wound/slash/critical, /datum/wound/slash/severe))
slice_part.force_wound_upwards(type_wound, smited=TRUE)
if(ADMIN_PUNISHMENT_PERFORATE)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/list/how_fucked_is_this_dude = list("A little", "A lot", "So fucking much", "FUCK THIS DUDE")
var/hatred = input("How much do you hate this guy?") in how_fucked_is_this_dude
var/repetitions
var/shots_per_limb_per_rep = 2
var/damage
switch(hatred)
if("A little")
repetitions = 1
damage = 5
if("A lot")
repetitions = 2
damage = 8
if("So fucking much")
repetitions = 3
damage = 10
if("FUCK THIS DUDE")
repetitions = 4
damage = 10
var/mob/living/carbon/dude = target
var/list/open_adj_turfs = get_adjacent_open_turfs(dude)
var/list/wound_bonuses = list(15, 70, 110, 250)
var/delay_per_shot = 1
var/delay_counter = 1
dude.Immobilize(5 SECONDS)
for(var/wound_bonus_rep in 1 to repetitions)
for(var/i in dude.bodyparts)
var/obj/item/bodypart/slice_part = i
var/shots_this_limb = 0
for(var/t in shuffle(open_adj_turfs))
var/turf/iter_turf = t
addtimer(CALLBACK(GLOBAL_PROC, .proc/firing_squad, dude, iter_turf, slice_part.body_zone, wound_bonuses[wound_bonus_rep], damage), delay_counter)
delay_counter += delay_per_shot
shots_this_limb++
if(shots_this_limb > shots_per_limb_per_rep)
break
if(ADMIN_PUNISHMENT_SCARIFY)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
dude.generate_fake_scars(rand(1, 4))
to_chat(dude, "<span class='warning'>You feel your body grow jaded and torn...</span>")
if(ADMIN_PUNISHMENT_SHOES)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
var/obj/item/clothing/shoes/sick_kicks = dude.shoes
if(!sick_kicks?.can_be_tied)
to_chat(usr,"<span class='warning'>[dude] does not have knottable shoes!</span>", confidential = TRUE)
return
sick_kicks.adjust_laces(SHOES_KNOTTED)
if(ADMIN_PUNISHMENT_DOCK)
if(!iscarbon(target))
to_chat(usr,"<span class='warning'>This must be used on a carbon mob.</span>", confidential = TRUE)
return
var/mob/living/carbon/dude = target
var/obj/item/card/id/card = dude.get_idcard(TRUE)
if(!card)
to_chat(usr,"<span class='warning'>[dude] does not have an ID card on!</span>", confidential = TRUE)
return
if(!card.registered_account)
to_chat(usr,"<span class='warning'>[dude] does not have an ID card with an account!</span>", confidential = TRUE)
return
if(card.registered_account.account_balance == 0)
to_chat(usr, "<span class='warning'>ID Card lacks any funds. No pay to dock.</span>")
return
var/new_cost = input("How much pay are we docking? Current balance: [card.registered_account.account_balance] credits.","BUDGET CUTS") as num|null
if(!new_cost)
return
if(!(card.registered_account.has_money(new_cost)))
to_chat(usr, "<span class='warning'>ID Card lacked funds. Emptying account.</span>")
card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.")
card.registered_account.account_balance = 0
else
card.registered_account.account_balance = card.registered_account.account_balance - new_cost
card.registered_account.bank_card_talk("[new_cost] credits deducted from your account based on performance review.")
SEND_SOUND(target, 'sound/machines/buzz-sigh.ogg')
if(ADMIN_PUNISHMENT_BREAD)
var/mutable_appearance/bread_appearance = mutable_appearance('icons/obj/food/burgerbread.dmi',"bread")
var/mutable_appearance/transform_scanline = mutable_appearance('icons/effects/effects.dmi',"transform_effect")
target.transformation_animation(bread_appearance,time= 5 SECONDS,transform_overlay=transform_scanline,reset_after=TRUE)
addtimer(CALLBACK(GLOBAL_PROC, .proc/breadify, target), 5 SECONDS)
if(ADMIN_PUNISHMENT_BADLUCK)
if(!isliving(target))
to_chat(usr, "<span class='warning'>This must be used on a /mob/living type of mob.</span>", confidential = TRUE)
return
var/silent = alert("Do you want to apply the omen with a player notification?", "Notify Player?", "Notify", "Silent") == "Silent"
var/permanent = alert("Would you like this to be permanent or removed automatically after the first accident?", "Permanent?", "Permanent", "Temporary") == "Permanent"
target.AddComponent(/datum/component/omen, silent, null, permanent)
punish_log(target, punishment)
var/smite_path = GLOB.smites[punishment]
var/datum/smite/smite = new smite_path
var/configuration_success = smite.configure(usr)
if (configuration_success == FALSE)
return
smite.effect(src, target)
/proc/breadify(atom/movable/target)
var/obj/item/food/bread/plain/bread = new(get_turf(target))
@@ -1374,10 +1160,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
divine_wrath.fire()
/client/proc/punish_log(whom, punishment)
var/msg = "[key_name_admin(usr)] punished [key_name_admin(whom)] with [punishment]."
var/msg = "[key_name_admin(src)] punished [key_name_admin(whom)] with [punishment]."
message_admins(msg)
admin_ticket_log(whom, msg)
log_admin("[key_name(usr)] punished [key_name(whom)] with [punishment].")
log_admin("[key_name(src)] punished [key_name(whom)] with [punishment].")
/client/proc/trigger_centcom_recall()
if(!check_rights(R_ADMIN))