Merge pull request #783 from lyricalpaws/master

Adding new smites
This commit is contained in:
QuoteFox
2020-12-29 21:25:45 +00:00
committed by GitHub
5 changed files with 102 additions and 2 deletions
+3
View File
@@ -74,6 +74,9 @@
#define ADMIN_PUNISHMENT_MAZING "Puzzle"
#define ADMIN_PUNISHMENT_PIE "Cream Pie"
#define ADMIN_PUNISHMENT_TABLETIDESTATIONWIDE "Tabletide Stationwide"
#define ADMIN_PUNISHMENT_FAKEBWOINK "Fake Bwoink"
#define ADMIN_PUNISHMENT_NUGGET "Nugget"
#define ADMIN_PUNISHMENT_BREADIFY ":b:read"
#define AHELP_ACTIVE 1
#define AHELP_CLOSED 2
+58
View File
@@ -1201,3 +1201,61 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
var/icon/I = getFlatIcon(thing)
return icon2html(I, target)
GLOBAL_LIST_EMPTY(transformation_animation_objects)
/*
* Creates animation that turns current icon into result appearance from top down.
*
* result_appearance - End result appearance/atom/image
* time - Animation duration
* transform_overlay - Appearance/atom/image of effect that moves along the animation - should be horizonatally centered
* reset_after - If FALSE, filters won't be reset and helper vis_objects will not be removed after animation duration expires. Cleanup must be handled by the caller!
*/
/atom/movable/proc/transformation_animation(result_appearance,time = 3 SECONDS,transform_overlay,reset_after=TRUE)
var/list/transformation_objects = GLOB.transformation_animation_objects[src] || list()
//Disappearing part
var/top_part_filter = filter(type="alpha",icon=icon('icons/effects/alphacolors.dmi',"white"),y=0)
filters += top_part_filter
var/filter_index = length(filters)
animate(filters[filter_index],y=-32,time=time)
//Appearing part
var/obj/effect/overlay/appearing_part = new
appearing_part.appearance = result_appearance
appearing_part.appearance_flags |= KEEP_TOGETHER | KEEP_APART
appearing_part.vis_flags = VIS_INHERIT_ID
appearing_part.filters = filter(type="alpha",icon=icon('icons/effects/alphacolors.dmi',"white"),y=0,flags=MASK_INVERSE)
animate(appearing_part.filters[1],y=-32,time=time)
transformation_objects += appearing_part
//Transform effect thing - todo make appearance passed in
if(transform_overlay)
var/obj/transform_effect = new
transform_effect.appearance = transform_overlay
transform_effect.vis_flags = VIS_INHERIT_ID
transform_effect.pixel_y = 16
transform_effect.alpha = 255
transformation_objects += transform_effect
animate(transform_effect,pixel_y=-16,time=time)
animate(alpha=0)
GLOB.transformation_animation_objects[src] = transformation_objects
for(var/A in transformation_objects)
vis_contents += A
if(reset_after)
addtimer(CALLBACK(src,.proc/_reset_transformation_animation,filter_index),time)
/*
* Resets filters and removes transformation animations helper objects from vis contents.
*/
/atom/movable/proc/_reset_transformation_animation(filter_index)
var/list/transformation_objects = GLOB.transformation_animation_objects[src]
for(var/A in transformation_objects)
vis_contents -= A
qdel(A)
transformation_objects.Cut()
GLOB.transformation_animation_objects -= src
if(filters && length(filters) >= filter_index)
filters -= filters[filter_index]
//else
// filters = null
+41 -2
View File
@@ -1243,13 +1243,30 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/breadify(atom/movable/target)
var/obj/item/reagent_containers/food/snacks/store/bread/plain/funnyBread = new(get_turf(target))
target.forceMove(funnyBread)
/client/proc/smite(mob/living/carbon/human/target as mob)
set name = "Smite"
set category = "Fun"
if(!check_rights(R_ADMIN) || !check_rights(R_FUN))
return
var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE, ADMIN_PUNISHMENT_FIREBALL, ADMIN_PUNISHMENT_CLUWNE, ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_BSA, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_SUPPLYPOD, ADMIN_PUNISHMENT_MAZING, ADMIN_PUNISHMENT_ROD, ADMIN_PUNISHMENT_TABLETIDESTATIONWIDE)
var/list/punishment_list = list(ADMIN_PUNISHMENT_PIE,
ADMIN_PUNISHMENT_FIREBALL,
ADMIN_PUNISHMENT_CLUWNE,
ADMIN_PUNISHMENT_LIGHTNING,
ADMIN_PUNISHMENT_BRAINDAMAGE,
ADMIN_PUNISHMENT_BSA,
ADMIN_PUNISHMENT_GIB,
ADMIN_PUNISHMENT_SUPPLYPOD,
ADMIN_PUNISHMENT_MAZING,
ADMIN_PUNISHMENT_ROD,
ADMIN_PUNISHMENT_TABLETIDESTATIONWIDE,
ADMIN_PUNISHMENT_FAKEBWOINK,
ADMIN_PUNISHMENT_NUGGET,
ADMIN_PUNISHMENT_BREADIFY)
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
@@ -1299,7 +1316,6 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
plaunch.temp_pod.explosionSize = list(0,0,0,2)
plaunch.temp_pod.effectStun = TRUE
plaunch.ui_interact(usr)
if(ADMIN_PUNISHMENT_MAZING)
if(!puzzle_imprison(target))
to_chat(usr,"<span class='warning'>Imprisonment failed!</span>")
@@ -1317,6 +1333,29 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
for(var/obj/structure/table/T in A)
T.tablepush(target, target)
sleep(1)
if(ADMIN_PUNISHMENT_FAKEBWOINK)
SEND_SOUND(target, 'sound/effects/adminhelp.ogg')
if(ADMIN_PUNISHMENT_NUGGET)
if (!iscarbon(target))
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
if(ADMIN_PUNISHMENT_BREADIFY)
#define BREADIFY_TIME (5 SECONDS)
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
var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]."
message_admins(msg)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 865 KiB

After

Width:  |  Height:  |  Size: 886 KiB

Binary file not shown.