Skip to content

Commit

Permalink
Merge branch 'master' into MODULE-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Zattarra authored Oct 29, 2024
2 parents cdfba43 + 1895a6f commit 72b4107
Show file tree
Hide file tree
Showing 31 changed files with 518 additions and 125 deletions.
8 changes: 4 additions & 4 deletions code/datums/brain_damage/creepy_trauma.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@
to_chat(owner, span_userdanger("You gag and swallow a bit of bile..."))

// if the creep examines first, then the obsession examines them, have a 50% chance to possibly blow their cover. wearing a mask avoids this risk
/datum/brain_trauma/special/obsessed/proc/stare(datum/source, mob/living/examining_mob, triggering_examiner)
/datum/brain_trauma/special/obsessed/proc/stare(datum/source, mob/living/examining_mob)
SIGNAL_HANDLER

if(examining_mob != owner || !triggering_examiner || prob(50))
return
if(prob(50))
return NONE

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), obsession, span_warning("You catch [examining_mob] staring at you..."), 3))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), obsession, span_warning("You notice [examining_mob] staring at you oddly..."), 0.6 SECONDS))
return COMSIG_BLOCK_EYECONTACT

/datum/brain_trauma/special/obsessed/proc/find_obsession()
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/sticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
var/atom/parent_atom = parent

sticker_overlay = mutable_appearance(icon = our_sticker.icon, icon_state = our_sticker.icon_state, layer = parent_atom.layer + 0.01, appearance_flags = RESET_COLOR)
sticker_overlay.color = our_sticker.color
sticker_overlay.pixel_w = px - world.icon_size / 2
sticker_overlay.pixel_z = py - world.icon_size / 2

Expand Down
14 changes: 5 additions & 9 deletions code/datums/quirks/negative_quirks/social_anxiety.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,14 @@
if(prob(85) || (istype(mind_check) && mind_check.mind))
return

addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_smallnotice("You make eye contact with [A].")), 3)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_smallnotice("You make eye contact with [A].")), 0.2 SECONDS)

/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob, triggering_examiner)
/datum/quirk/social_anxiety/proc/eye_contact(datum/source, mob/living/other_mob)
SIGNAL_HANDLER

if(prob(75))
return
var/msg
if(triggering_examiner)
msg = "You make eye contact with [other_mob], "
else
msg = "[other_mob] makes eye contact with you, "
return NONE
var/msg = "You make eye contact with [other_mob], "

switch(rand(1,3))
if(1)
Expand All @@ -109,7 +105,7 @@
msg += "causing you to freeze up!"

quirk_holder.add_mood_event("anxiety_eyecontact", /datum/mood_event/anxiety_eyecontact)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_userdanger("[msg]")), 3) // so the examine signal has time to fire and this will print after
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(to_chat), quirk_holder, span_userdanger("[msg]")), 0.2 SECONDS) // so the examine signal has time to fire and this will print after
return COMSIG_BLOCK_EYECONTACT

/datum/mood_event/anxiety_eyecontact
Expand Down
6 changes: 6 additions & 0 deletions code/datums/status_effects/debuffs/blindness.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,17 @@
owner.overlay_fullscreen(id, /atom/movable/screen/fullscreen/blind)
// You are blind - at most, able to make out shapes near you
owner.add_client_colour(/datum/client_colour/monochrome/blind)
// But to represent the fact that you can feel your way around, you are unaffected by darkness
ADD_TRAIT(owner, TRAIT_TRUE_NIGHT_VISION, id)
// but your eyes will start to wander, you may end up staring unintentionally
ADD_TRAIT(owner, TRAIT_SHIFTY_EYES, id)
return ..()

/datum/status_effect/grouped/blindness/on_remove()
owner.clear_fullscreen(id)
owner.remove_client_colour(/datum/client_colour/monochrome/blind)
REMOVE_TRAIT(owner, TRAIT_TRUE_NIGHT_VISION, id)
REMOVE_TRAIT(owner, TRAIT_SHIFTY_EYES, id)
return ..()

/atom/movable/screen/alert/status_effect/blind
Expand Down
42 changes: 40 additions & 2 deletions code/datums/status_effects/debuffs/grabbed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@

RegisterSignal(grabbing_us, COMSIG_MOVABLE_SET_GRAB_STATE, PROC_REF(update_state))
RegisterSignal(grabbing_us, COMSIG_QDELETING, PROC_REF(grabber_gone))
RegisterSignal(grabbing_us, COMSIG_MOB_EMOTED("flip"), PROC_REF(grabber_flip))

RegisterSignal(owner, COMSIG_MOB_STATCHANGE, PROC_REF(owner_stat))
RegisterSignal(owner, COMSIG_LIVING_TRYING_TO_PULL, PROC_REF(try_upgrade))
Expand All @@ -155,6 +156,7 @@
QDEL_NULL(paired_effect)
if(grabbing_us)
UnregisterSignal(grabbing_us, list(
COMSIG_MOB_EMOTED("flip"),
COMSIG_MOVABLE_PRE_MOVE,
COMSIG_MOVABLE_SET_GRAB_STATE,
COMSIG_QDELETING,
Expand Down Expand Up @@ -455,6 +457,42 @@
SIGNAL_HANDLER
qdel(src)

/datum/status_effect/grabbed/proc/grabber_flip(datum/source)
SIGNAL_HANDLER
if(grabbing_us.grab_state <= GRAB_AGGRESSIVE || pin)
return
if(!grabbing_us.has_gravity())
to_chat(grabbing_us, span_warning("You can't suplex someone without gravity!"))
return

var/mob/living/grabber = grabbing_us

owner.SpinAnimation(7, 1, parallel = TRUE)
owner.Immobilize(2.5 SECONDS)
grabber.Immobilize(0.5 SECONDS)
grabber.apply_damage(30, STAMINA)

addtimer(CALLBACK(src, PROC_REF(finish_flip)), 0.5 SECONDS, TIMER_DELETE_ME)

/datum/status_effect/grabbed/proc/finish_flip()
var/mob/living/grabber = grabbing_us

owner.visible_message(
span_danger("[grabbing_us] suplexes [owner]!"),
span_danger("[grabbing_us] suplexes you!"),
span_hear("You hear a loud thud!"),
null,
grabber,
)
to_chat(grabber, span_danger("You suplex [owner]!"))

owner.Knockdown(5 SECONDS)
owner.apply_damage(10, BRUTE, BODY_ZONE_CHEST, owner.run_armor_check(BODY_ZONE_CHEST, MELEE))

unlink_mobs(get_step(grabber.loc, REVERSE_DIR(grabber.dir)))
grabber.Knockdown(2 SECONDS)
//grabber.stop_pulling()

/datum/status_effect/grabbed/proc/link_mobs()
if(linked)
return
Expand All @@ -469,7 +507,7 @@
RegisterSignal(grabbing_us, COMSIG_ATOM_PRE_BULLET_ACT, PROC_REF(bullet_shield))
RegisterSignal(grabbing_us, COMSIG_ATOM_POST_DIR_CHANGE, PROC_REF(dir_changed))

/datum/status_effect/grabbed/proc/unlink_mobs()
/datum/status_effect/grabbed/proc/unlink_mobs(atom/unlink_loc)
if(!linked)
return

Expand All @@ -478,7 +516,7 @@
REMOVE_TRAIT(owner, TRAIT_FORCED_STANDING, "[id]_link")
REMOVE_TRAIT(owner, TRAIT_NO_MOVE_PULL, "[id]_link")
if(!QDELING(owner) && !QDELING(grabbing_us))
owner.Move(get_step(grabbing_us.loc, grabbing_us.dir))
owner.Move(unlink_loc || get_step(grabbing_us.loc, grabbing_us.dir))
UnregisterSignal(grabbing_us, list(
COMSIG_MOVABLE_MOVED,
COMSIG_ATOM_PRE_BULLET_ACT,
Expand Down
12 changes: 8 additions & 4 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@
/obj/machinery/door/airlock/Exited(atom/movable/gone, direction)
. = ..()
if(gone == note)
note.flags_1 &= ~IS_ONTOP_1
note = null
update_appearance()
if(gone == seal)
Expand Down Expand Up @@ -565,13 +566,16 @@
. += get_airlock_overlay("sparks_open", overlays_file, src, em_block = FALSE)

if(note)
. += get_airlock_overlay(get_note_state(frame_state), note_overlay_file, src, em_block = TRUE)
var/list/mutable_appearance/note_overlays = get_airlock_overlay(get_note_state(frame_state), note_overlay_file, src, em_block = TRUE)
if(islist(note_overlays))
note_overlays[1].color = note.color
. += note_overlays

if(frame_state == AIRLOCK_FRAME_CLOSED && seal)
. += get_airlock_overlay("sealed", overlays_file, src, em_block = TRUE)

if(hasPower() && unres_sides)
for(var/heading in list(NORTH,SOUTH,EAST,WEST))
for(var/heading in GLOB.cardinals)
if(!(unres_sides & heading))
continue
var/mutable_appearance/floorlight = mutable_appearance('icons/obj/doors/airlocks/station/overlays.dmi', "unres_[heading]", FLOAT_LAYER, src, ABOVE_LIGHTING_PLANE)
Expand Down Expand Up @@ -857,7 +861,6 @@
visible_message(span_notice("[tool] cuts down [note] from [src]."))
tool.play_tool_sound(src)
note.forceMove(tool.drop_location())
note = null
update_appearance()
return ITEM_INTERACT_SUCCESS

Expand Down Expand Up @@ -1042,11 +1045,12 @@
if(note)
to_chat(user, span_warning("There's already something pinned to this airlock! Use wirecutters to remove it."))
return
if(!user.transferItemToLoc(C, src))
if(!user.transferItemToLoc(C, src, silent = FALSE))
to_chat(user, span_warning("For some reason, you can't attach [C]!"))
return
user.visible_message(span_notice("[user] pins [C] to [src]."), span_notice("You pin [C] to [src]."))
note = C
note.flags_1 |= IS_ONTOP_1
update_appearance()
else
return ..()
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/laserpointer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,12 @@
else if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
//Intensity of the laser dot to pass to flash_act
var/severity = pick(0, 1, 2)
var/always_fail = FALSE
if(istype(target_humanoid.glasses, /obj/item/clothing/glasses/eyepatch) && prob(50))
always_fail = TRUE

//chance to actually hit the eyes depends on internal component
if(prob(effectchance * diode.rating) && target_humanoid.flash_act(severity))
if(prob(effectchance * diode.rating) && !always_fail && target_humanoid.flash_act(severity))
outmsg = span_notice("You blind [target_humanoid] by shining [src] in [target_humanoid.p_their()] eyes.")
log_combat(user, target_humanoid, "blinded with a laser pointer", src)
else
Expand Down
Loading

0 comments on commit 72b4107

Please sign in to comment.