diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 6f1ea32d2a3..14399b340a2 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -61,7 +61,25 @@ /matrix/proc/get_y_shift() . = f -// Color matrices: +/matrix/proc/get_x_skew() + . = b + +/matrix/proc/get_y_skew() + . = d + +//Skews a matrix in a particular direction +//Missing arguments are treated as no skew in that direction + +//As Rotation is defined as a scale+skew, these procs will break any existing rotation +//Unless the result is multiplied against the current matrix +/matrix/proc/set_skew(x = 0, y = 0) + b = x + d = y + + +///////////////////// +// COLOUR MATRICES // +///////////////////// /* Documenting a couple of potentially useful color matrices here to inspire ideas // Greyscale - indentical to saturation @ 0 diff --git a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm index 48d07e64179..8d12c8b27e8 100644 --- a/code/modules/reagents/chemistry/reagents/toxin_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/toxin_reagents.dm @@ -684,6 +684,41 @@ animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING) ..() +/datum/reagent/toxin/skewium + name = "Skewium" + id = "skewium" + description = "A strange, dull coloured liquid that appears to warp back and forth inside its container. Causes any consumer to experience a visual phenomena similar to said warping." + reagent_state = LIQUID + color = "#ADBDCD" + metabolization_rate = 0.8 * REAGENTS_METABOLISM + toxpwr = 0.25 + +/datum/reagent/toxin/skewium/on_mob_life(mob/living/M) + if(M.hud_used) + if(current_cycle >= 5 && current_cycle % 3 == 0) + var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) + var/matrix/skew = matrix() + var/intensity = 8 + skew.set_skew(rand(-intensity,intensity), rand(-intensity,intensity)) + var/matrix/newmatrix = skew + + if(prob(33)) // 1/3rd of the time, let's make it stack with the previous matrix! Mwhahahaha! + var/obj/screen/plane_master/PM = M.hud_used.plane_masters["[GAME_PLANE]"] + newmatrix = skew * PM.transform + + for(var/whole_screen in screens) + animate(whole_screen, transform = newmatrix, time = 5, easing = QUAD_EASING, loop = -1) + animate(transform = -newmatrix, time = 5, easing = QUAD_EASING) + return ..() + +/datum/reagent/toxin/skewium/on_mob_delete(mob/living/M) + if(M && M.hud_used) + var/list/screens = list(M.hud_used.plane_masters["[GAME_PLANE]"], M.hud_used.plane_masters["[LIGHTING_PLANE]"]) + for(var/whole_screen in screens) + animate(whole_screen, transform = matrix(), time = 5, easing = QUAD_EASING) + ..() + + /datum/reagent/toxin/anacea name = "Anacea" id = "anacea" diff --git a/code/modules/reagents/chemistry/recipes/toxins.dm b/code/modules/reagents/chemistry/recipes/toxins.dm index 233e6fd1bcf..6246d3adb2f 100644 --- a/code/modules/reagents/chemistry/recipes/toxins.dm +++ b/code/modules/reagents/chemistry/recipes/toxins.dm @@ -94,7 +94,14 @@ results = list("rotatium" = 3) required_reagents = list("mindbreaker" = 1, "teslium" = 1, "neurotoxin2" = 1) mix_message = "After sparks, fire, and the smell of mindbreaker, the mix is constantly spinning with no stop in sight." - + +/datum/chemical_reaction/skewium + name = "Skewium" + id = "Skewium" + results = list("skewium" = 5) + required_reagents = list("rotatium" = 2, "plasma" = 2, "sacid" = 1) + mix_message = "Wow! it turns out if you mix rotatium with some plasma and sulphuric acid, it gets even worse!" + /datum/chemical_reaction/anacea name = "Anacea" id = "anacea"