Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define isconstruct(A) (istype(A, /mob/living/simple_animal/hostile/construct))

#define isfauna(A) (istype(A, /mob/living/simple_animal/hostile/asteroid))

#define ismegafauna(A) (istype(A, /mob/living/simple_animal/hostile/megafauna))

#define isclown(A) (istype(A, /mob/living/simple_animal/hostile/retaliate/clown))
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define INVESTIGATE_ATMOS "atmos"
#define INVESTIGATE_BOTANY "botany"
#define INVESTIGATE_CARGO "cargo"
#define INVESTIGATE_DEATHS "deaths"
#define INVESTIGATE_EXPERIMENTOR "experimentor"
#define INVESTIGATE_GRAVITY "gravity"
#define INVESTIGATE_RECORDS "records"
Expand Down
27 changes: 27 additions & 0 deletions code/datums/elements/content_barfer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Content Barfer; which expels the contents of a mob when it dies, or is transformed
*
* Used for morphs!
*/
/datum/element/content_barfer
argument_hash_start_idx = 2

/datum/element/content_barfer/Attach(datum/target, tally_string)
. = ..()

if(!isliving(target))
return ELEMENT_INCOMPATIBLE

RegisterSignals(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED), PROC_REF(barf_contents))

/datum/element/content_barfer/Detach(datum/target)
UnregisterSignal(target, list(COMSIG_LIVING_DEATH, COMSIG_LIVING_ON_WABBAJACKED))
return ..()

/datum/element/content_barfer/proc/barf_contents(mob/living/target)
// SIGNAL_HANDLER

for(var/atom/movable/barfed_out in target)
barfed_out.forceMove(target.loc)
if(prob(90))
step(barfed_out, pick(GLOB.alldirs))
2 changes: 1 addition & 1 deletion code/modules/antagonists/nukeop/nukeop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
var/preview_outfit_behind = /datum/outfit/nuclear_operative

/datum/antagonist/nukeop/apply_innate_effects(mob/living/mob_override)
add_team_hud(mob_override || owner.current)
add_team_hud(mob_override || owner.current, /datum/antagonist/nukeop)
ADD_TRAIT(owner, TRAIT_DISK_VERIFIER, NUKEOP_TRAIT)

/datum/antagonist/nukeop/remove_innate_effects(mob/living/mob_override)
Expand Down
20 changes: 9 additions & 11 deletions code/modules/clothing/chameleon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@
..()
initialize_outfits()

/datum/action/chameleon_outfit/IsAvailable(feedback = FALSE)
/datum/action/chameleon_outfit/Grant(mob/user)
if(syndicate)
if(!is_syndicate(owner))
HideFrom(owner)
return is_syndicate(owner)
owner_has_control = is_syndicate(user)
return ..()

/datum/action/chameleon_outfit/proc/initialize_outfits()
Expand Down Expand Up @@ -157,18 +155,21 @@
if(!M.chameleon_item_actions)
M.chameleon_item_actions = list(src)
var/datum/action/chameleon_outfit/O = new /datum/action/chameleon_outfit()
O.syndicate = syndicate
O.Grant(M)
else
M.chameleon_item_actions |= src
..()
if(syndicate)
owner_has_control = is_syndicate(M)
return ..()

/datum/action/item_action/chameleon/change/Remove(mob/M)
if(M && (M == owner))
LAZYREMOVE(M.chameleon_item_actions, src)
if(!LAZYLEN(M.chameleon_item_actions))
var/datum/action/chameleon_outfit/O = locate(/datum/action/chameleon_outfit) in M.actions
qdel(O)
..()
return ..()

/datum/action/item_action/chameleon/change/proc/initialize_disguises()
name = "Change [chameleon_name] Appearance"
Expand All @@ -183,14 +184,11 @@
var/chameleon_item_name = "[initial(I.name)] ([initial(I.icon_state)])"
chameleon_list[chameleon_item_name] = I


/datum/action/item_action/chameleon/change/proc/select_look(mob/user)
var/obj/item/picked_item
var/picked_name
picked_name = input("Select [chameleon_name] to change into", "Chameleon [chameleon_name]", picked_name) as null|anything in chameleon_list
var/picked_name = tgui_input_list(user, "Select [chameleon_name] to change into", "Chameleon [chameleon_name]", chameleon_list)
if(!picked_name)
return
picked_item = chameleon_list[picked_name]
var/obj/item/picked_item = chameleon_list[picked_name]
if(!picked_item)
return
update_look(user, picked_item)
Expand Down
77 changes: 36 additions & 41 deletions code/modules/clothing/gloves/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@

/obj/item/clothing/gloves/bracer/cuffs/equipped(mob/living/user, slot)
. = ..()
if(ishuman(user) && slot == ITEM_SLOT_GLOVES)
swipe_ability = new(user)
if(ishuman(user) && (slot & ITEM_SLOT_GLOVES))
swipe_ability.Grant(user)

/obj/item/clothing/gloves/bracer/cuffs/dropped(mob/living/user)
Expand All @@ -149,65 +148,61 @@

/datum/action/cooldown/swipe //you stupid
name = "Swipe"
desc = "Swipe at a target area, dealing damage to heal yourself. Creatures take 60 damage while people and cyborgs take 20 damage. Living creatures hit with this ability will heal the user for 13 brute/burn/poison while dead ones heal for 20 and get butchered, while killing a creature with a swipe will heal the user for 33. People and cyborgs hit will heal for 5."
desc = "Swipe at a target area, dealing damage to heal yourself. \
Creatures take 60 damage while people and cyborgs take 20 damage. \
Living creatures hit with this ability will heal the user for 13 brute/burn/poison while dead ones heal for 20 and get butchered, \
while killing a creature with a swipe will heal the user for 33. \
People and cyborgs hit will heal for 5."
background_icon_state = "bg_demon"
button_icon = 'icons/mob/actions/actions_items.dmi'
button_icon_state = "cuff"
ranged_mousepointer = 'icons/effects/mouse_pointers/supplypod_target.dmi'
click_to_activate = TRUE
check_flags = AB_CHECK_HANDS_BLOCKED | AB_CHECK_CONSCIOUS

cooldown_time = 10 SECONDS

/datum/action/cooldown/swipe/Remove(mob/living/user)
unset_click_ability(user)
return ..()

/datum/action/cooldown/swipe/Trigger(mob/living/carbon/user)
if(!isliving(owner))
return FALSE
if(user.handcuffed)
to_chat(user, span_danger("You can't attack while handcuffed!"))
/datum/action/cooldown/swipe/IsAvailable(feedback = FALSE)
if(!iscarbon(owner))
return FALSE
return ..()

/datum/action/cooldown/swipe/InterceptClickOn(mob/living/caller, params, atom/target)
/datum/action/cooldown/swipe/Activate(mob/living/target)
. = ..()
var/turf/open/T = get_turf(target)
var/mob/living/L = target
if(!.)
return
if(owner.stat)
unset_click_ability(caller)
return
if(!COOLDOWN_FINISHED(src, next_use_time))
to_chat(owner, span_warning("Your cuffs aren't ready to do that yet. Give them some time to recharge!"))
return
if(!istype(T))
return
if(!(T in range(9, caller)))
to_chat(caller, warning("The target is too far!"))
return
new /obj/effect/temp_visual/bubblegum_hands/rightpaw(T)
new /obj/effect/temp_visual/bubblegum_hands/rightthumb(T)
to_chat(L, span_userdanger("Claws reach out from the floor and maul you!"))
to_chat(owner, "You summon claws at [L]'s location!")
L.visible_message(span_warning("[caller] rends [L]!"))
for(L in range(0,T))
playsound(T, 'sound/magic/demon_attack1.ogg', 80, 5, -1)
if(isanimal(L))
if(L.stat != DEAD)
L.adjustBruteLoss(60)
var/turf/open/target_turf = get_turf(target)
var/mob/living/carbon/caller = owner
if(!istype(target_turf))
return FALSE
if(!(target_turf in range(9, owner)))
to_chat(owner, warning("The target is too far!"))
return FALSE
new /obj/effect/temp_visual/bubblegum_hands/rightpaw(target_turf)
new /obj/effect/temp_visual/bubblegum_hands/rightthumb(target_turf)
to_chat(target, span_userdanger("Claws reach out from the floor and maul you!"))
to_chat(owner, "You summon claws at [target]'s location!")
target.visible_message(span_warning("[owner] rends [target]!"))
for(target in range(0, target_turf))
playsound(target_turf, 'sound/magic/demon_attack1.ogg', 80, TRUE, -1)
if(isanimal(target))
if(target.stat != DEAD)
target.adjustBruteLoss(60)
caller.adjustBruteLoss(-13)
caller.adjustFireLoss(-13)
caller.adjustToxLoss(-13)
if(L.stat == DEAD)
to_chat(caller, span_notice("You kill [L], healing yourself more!"))
if(L.stat == DEAD)
L.gib()
if(target.stat == DEAD)
to_chat(caller, span_notice("You kill [target], healing yourself more!"))
if(target.stat == DEAD)
target.gib()
to_chat(caller, span_notice("You're able to consume the body entirely!"))
caller.adjustBruteLoss(-20)
caller.adjustFireLoss(-20)
caller.adjustToxLoss(-20)
if(iscarbon(L))
L.adjustBruteLoss(20)
if(iscarbon(target))
target.adjustBruteLoss(20)
caller.adjustBruteLoss(-5)
caller.adjustFireLoss(-5)
caller.adjustToxLoss(-5)
Expand All @@ -216,7 +211,7 @@
return TRUE

/datum/action/cooldown/swipe/proc/cooldown_over()
to_chat(usr, (span_notice("You're ready to swipe again!")))
owner.balloon_alert(owner, "ready to swipe!")

/obj/item/clothing/gloves/gauntlets
name = "concussive gauntlets"
Expand Down
85 changes: 42 additions & 43 deletions code/modules/mining/lavaland/necropolis_chests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1288,10 +1288,10 @@ GLOBAL_LIST_EMPTY(aide_list)
log_combat(user, L, "took out a blood contract on", src)
qdel(src)

#define COOLDOWN 150
#define COOLDOWN_HUMAN 100
#define COOLDOWN_ANIMAL 60
#define COOLDOWN_SPLASH 100
#define COOLDOWN_ATTACK_HUMAN (10 SECONDS)
#define COOLDOWN_ATTACK_ANIMAL (6 SECONDS)
#define COOLDOWN_SPLASH (10 SECONDS)
#define COOLDOWN_REACH (15 SECONDS)

/datum/action/item_action/visegrip
name = "Vise Grip"
Expand All @@ -1316,76 +1316,75 @@ GLOBAL_LIST_EMPTY(aide_list)
item_state = "knuckles"
w_class = WEIGHT_CLASS_SMALL
force = 18
var/next_reach = 0
var/next_splash = 0
var/next_knuckle = 0
COOLDOWN_DECLARE(next_reach)
COOLDOWN_DECLARE(next_splash)
COOLDOWN_DECLARE(next_knuckle)
var/splash_range = 9
var/fauna_damage_bonus = 32
var/fauna_damage_type = BRUTE
attack_verb = list("thrashed", "pummeled", "walloped")
actions_types = list(/datum/action/item_action/reach, /datum/action/item_action/visegrip)

/obj/item/melee/knuckles/afterattack(mob/living/target, mob/living/user, proximity)
var/mob/living/L = target
if(ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid))
L.apply_damage(fauna_damage_bonus,fauna_damage_type)
if(!istype(target))
return
if(ismegafauna(target) || isfauna(target))
target.apply_damage(fauna_damage_bonus, fauna_damage_type)
if(proximity)
if(L.has_status_effect(STATUS_EFFECT_KNUCKLED))
L.apply_status_effect(/datum/status_effect/roots)
if(target.has_status_effect(STATUS_EFFECT_KNUCKLED))
target.apply_status_effect(/datum/status_effect/roots)
return
if(next_knuckle > world.time)
if(!COOLDOWN_FINISHED(src, next_knuckle))
to_chat(user, span_warning("The knuckles aren't ready to mark yet."))
return
else
L.apply_status_effect(STATUS_EFFECT_KNUCKLED)
if(ishuman(L))
next_knuckle = world.time + COOLDOWN_HUMAN
return
next_knuckle = world.time + COOLDOWN_ANIMAL
target.apply_status_effect(STATUS_EFFECT_KNUCKLED)
COOLDOWN_START(src, next_knuckle, (ishuman(target) ? COOLDOWN_ATTACK_HUMAN : COOLDOWN_ATTACK_ANIMAL))

/obj/item/melee/knuckles/attack_self(mob/user)
var/turf/T = get_turf(user)
if(next_splash > world.time)
var/turf/user_turf = get_turf(user)
if(!COOLDOWN_FINISHED(src, next_splash))
to_chat(user, span_warning("You can't do that yet!"))
return
user.visible_message(span_warning("[user] splashes blood from [user.p_their()] knuckles!"))
playsound(T, 'sound/effects/splat.ogg', 80, 5, -1)
playsound(user_turf, 'sound/effects/splat.ogg', 80, TRUE, -1)
for(var/i = 0 to splash_range)
if(T)
new /obj/effect/decal/cleanable/blood(T)
T = get_step(T,user.dir)
next_splash = world.time + COOLDOWN_SPLASH
if(user_turf)
new /obj/effect/decal/cleanable/blood(user_turf)
user_turf = get_step(user_turf, user.dir)
COOLDOWN_START(src, next_splash, COOLDOWN_SPLASH)

/obj/item/melee/knuckles/ui_action_click(mob/living/user, action)
var/mob/living/U = user
if(istype(action, /datum/action/item_action/reach))
if(next_reach > world.time)
to_chat(U, span_warning("You can't do that yet!"))
if(!COOLDOWN_FINISHED(src, next_reach))
to_chat(user, span_warning("You can't do that yet!"))
return
var/valid_reaching = FALSE
for(var/mob/living/L in view(7, U))
if(L == U)
for(var/mob/living/target in view(7, user))
if(target == user)
continue
for(var/obj/effect/decal/cleanable/B in range(0,L))
if(istype(B, /obj/effect/decal/cleanable/blood )|| istype(B, /obj/effect/decal/cleanable/trail_holder))
for(var/obj/effect/decal/cleanable/decal in range(0, target))
if(istype(decal, /obj/effect/decal/cleanable/blood )|| istype(decal, /obj/effect/decal/cleanable/trail_holder))
valid_reaching = TRUE
L.apply_status_effect(STATUS_EFFECT_KNUCKLED)
target.apply_status_effect(STATUS_EFFECT_KNUCKLED)
if(!valid_reaching)
to_chat(U, span_warning("There's nobody to use this on!"))
to_chat(user, span_warning("There's nobody to use this on!"))
return
next_reach = world.time + COOLDOWN
else if(istype(action, /datum/action/item_action/visegrip))
COOLDOWN_START(src, next_reach, COOLDOWN_REACH)
if(istype(action, /datum/action/item_action/visegrip))
var/valid_casting = FALSE
for(var/mob/living/L in view(8, U))
if(L.has_status_effect(STATUS_EFFECT_KNUCKLED))
for(var/mob/living/target in view(8, user))
if(target.has_status_effect(STATUS_EFFECT_KNUCKLED))
valid_casting = TRUE
L.apply_status_effect(/datum/status_effect/roots)
target.apply_status_effect(/datum/status_effect/roots)
if(!valid_casting)
to_chat(U, span_warning("There's nobody to use this on!"))
to_chat(user, span_warning("There's nobody to use this on!"))
return
#undef COOLDOWN
#undef COOLDOWN_HUMAN
#undef COOLDOWN_ANIMAL

#undef COOLDOWN_ATTACK_HUMAN
#undef COOLDOWN_ATTACK_ANIMAL
#undef COOLDOWN_SPLASH
#undef COOLDOWN_REACH
//Colossus
/obj/structure/closet/crate/necropolis/colossus
name = "colossus chest"
Expand Down
18 changes: 7 additions & 11 deletions code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,30 +269,26 @@ Doesn't work on other aliens/AI.*/
build_all_button_icons()
on_who.update_icons()

// We do this in InterceptClickOn() instead of Activate()
// because we use the click parameters for aiming the projectile
// (or something like that)
/datum/action/cooldown/alien/acid/neurotoxin/InterceptClickOn(mob/living/caller, params, atom/target)
. = ..()
if(!.)
unset_click_ability(caller, refund_cooldown = FALSE)
return FALSE

// We do this in InterceptClickOn() instead of Activate()
// because we use the click parameters for aiming the projectile
// (or something like that)
var/turf/user_turf = caller.loc
var/turf/target_turf = get_step(caller, target.dir) // Get the tile infront of the move, based on their direction
if(!isturf(target_turf))
return FALSE

var/modifiers = params2list(params)
// var/modifiers = params2list(params)
caller.visible_message(
span_danger("[caller] spits neurotoxin!"),
span_alertalien("You spit neurotoxin."),
)

var/obj/item/projectile/bullet/neurotoxin/neurotoxin = new /obj/item/projectile/bullet/neurotoxin(caller.loc)
neurotoxin.preparePixelProjectile(target, caller, modifiers)
neurotoxin.preparePixelProjectile(target, caller, params)
neurotoxin.firer = caller
neurotoxin.fire()
caller.newtonian_move(get_dir(target_turf, user_turf))
caller.newtonian_move(get_dir(target, caller))
return TRUE

// Has to return TRUE, otherwise is skipped.
Expand Down
Loading