Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Erikafox committed Dec 28, 2024
1 parent 8433c32 commit 9561fa7
Show file tree
Hide file tree
Showing 44 changed files with 131 additions and 596 deletions.
8 changes: 4 additions & 4 deletions code/datums/brain_damage/phobia.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,21 @@
if(1)
to_chat(owner, "<span class='warning'>You are paralyzed with fear!</span>")
owner.Stun(70)
owner.Jitter(8)
owner.set_jitter(8)
if(2)
owner.emote("scream")
owner.Jitter(5)
owner.set_jitter(5)
owner.say("AAAAH!!", forced = "phobia")
if(reason)
owner.pointed(reason)
if(3)
to_chat(owner, "<span class='warning'>You shut your eyes in terror!</span>")
owner.Jitter(5)
owner.set_jitter(5)
owner.blind_eyes(10)
if(4)
owner.dizziness += 10
owner.confused += 10
owner.Jitter(10)
owner.set_jitter(10)
owner.stuttering += 10

// Defined phobia types for badminry, not included in the RNG trauma pool to avoid diluting.
Expand Down
4 changes: 2 additions & 2 deletions code/datums/brain_damage/severe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@
to_chat(owner, "<span class='warning'>You can't stop shaking...</span>")
owner.dizziness += 20
owner.confused += 20
owner.Jitter(20)
owner.set_jitter(20)
else
to_chat(owner, "<span class='warning'>You feel weak and scared! If only you weren't alone...</span>")
owner.dizziness += 20
owner.confused += 20
owner.Jitter(20)
owner.set_jitter(20)
owner.adjustStaminaLoss(50)

if(3, 4)
Expand Down
6 changes: 3 additions & 3 deletions code/datums/components/spooky.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var/mob/living/carbon/human/U = user
if(!istype(U.dna.species, /datum/species/skeleton))
U.adjustStaminaLoss(35) //Extra Damage
U.Jitter(35)
U.set_jitter(35)
U.stuttering = 20
if(U.getStaminaLoss() > 95)
to_chat(U, "<font color ='red', size ='4'><B>Your ears weren't meant for this spectral sound.</B></font>")
Expand All @@ -29,15 +29,15 @@
if(istype(H.dna.species, /datum/species/zombie))
H.adjustStaminaLoss(25)
H.Paralyze(15) //zombies can't resist the doot
C.Jitter(35)
C.set_jitter(35)
C.stuttering = 20
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
C.adjustStaminaLoss(25) //boneless humanoids don't lose the will to live
to_chat(C, "<font color='red' size='4'><B>DOOT</B></font>")
spectral_change(H)

else //the sound will spook monkeys.
C.Jitter(15)
C.set_jitter(15)
C.stuttering = 20

/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/anxiety.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
affected_mob.visible_message("<span class='danger'>[affected_mob] stumbles around in a panic.</span>", \
"<span class='userdanger'>You have a panic attack!</span>")
affected_mob.confused += (rand(6,8))
affected_mob.jitteriness += (rand(6,8))
affected_mob.adjust_jitter(rand(6,8))
if(prob(2))
affected_mob.visible_message("<span class='danger'>[affected_mob] coughs up butterflies!</span>", \
"<span class='userdanger'>You cough up butterflies!</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/martial/cqc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1)
if(I && D.temporarilyRemoveItemFromInventory(I))
A.put_in_hands(I)
D.Jitter(2)
D.adjust_jitter(2)
D.apply_damage(5, A.dna.species.attack_type)
else
D.visible_message("<span class='danger'>[A] fails to disarm [D]!</span>", \
Expand Down
2 changes: 1 addition & 1 deletion code/datums/mutations/body.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
owner.visible_message("<span class='danger'>[owner] starts having a seizure!</span>", "<span class='userdanger'>You have a seizure!</span>")
owner.Unconscious(200 * GET_MUTATION_POWER(src))
owner.Jitter(1000 * GET_MUTATION_POWER(src))
owner.adjust_jitter(1000 * GET_MUTATION_POWER(src), 0, 1500)
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy)
addtimer(CALLBACK(src, PROC_REF(jitter_less)), 90)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
/datum/status_effect/good_music/tick()
if(owner.can_hear())
owner.dizziness = max(0, owner.dizziness - 2)
owner.jitteriness = max(0, owner.jitteriness - 2)
owner.adjust_jitter(owner.jitteriness - 2, max = 0)
owner.confused = max(0, owner.confused - 1)
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "goodmusic", /datum/mood_event/goodmusic)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
var/obj/item/I = H.get_active_held_item()
if(I && H.dropItemToGround(I))
H.visible_message("<span class='notice'>[H]'s hand convulses, and they drop their [I.name]!</span>","<span class='userdanger'>Your hand convulses violently, and you drop what you were holding!</span>")
H.jitteriness += 5
H.adjust_jitter(5)

/atom/movable/screen/alert/status_effect/convulsing
name = "Shaky Hands"
Expand Down
2 changes: 1 addition & 1 deletion code/datums/traits/negative.dm
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@

switch(rand(1,3))
if(1)
quirk_holder.Jitter(10)
quirk_holder.set_jitter(10)
msg += "causing you to start fidgeting!"
if(2)
quirk_holder.stuttering = max(3, quirk_holder.stuttering)
Expand Down
6 changes: 3 additions & 3 deletions code/game/objects/items/defib.dm
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
"<span class='userdanger'>[user] touches [M] with [src]!</span>")
M.adjustStaminaLoss(60)
M.Knockdown(75)
M.Jitter(50)
M.adjust_jitter(50)
M.apply_status_effect(STATUS_EFFECT_CONVULSING)
playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1)
if(HAS_TRAIT(M,MOB_ORGANIC))
Expand Down Expand Up @@ -511,7 +511,7 @@
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
log_combat(user, H, "overloaded the heart of", defib)
H.Paralyze(100)
H.Jitter(100)
H.adjust_jitter(100)
if(req_defib)
defib.deductcharge(revivecost)
cooldown = TRUE
Expand Down Expand Up @@ -590,7 +590,7 @@
H.grab_ghost()
H.revive(full_heal = FALSE, admin_revive = FALSE)
H.emote("gasp")
H.Jitter(100)
H.adjust_jitter(100)
SEND_SIGNAL(H, COMSIG_LIVING_MINOR_SHOCK)
log_combat(user, H, "revived", defib)
if(req_defib)
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/melee/stunbaton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
return FALSE
/// After a target is hit, we do a chunk of stamina damage, along with other effects.
/// After a period of time, we then check to see what stun duration we give.
L.Jitter(20)
L.set_jitter(20)
L.confused = max(confusion_amt, L.confused)
L.stuttering = max(8, L.stuttering)
L.apply_damage(stamina_loss_amt, STAMINA, BODY_ZONE_CHEST)
Expand Down Expand Up @@ -561,5 +561,5 @@
return span_danger("The baton is still charging!")

/obj/item/melee/classic_baton/telescopic/contractor_baton/additional_effects_carbon(mob/living/target, mob/living/user)
target.Jitter(20)
target.adjust_jitter(20)
target.stuttering += 20
4 changes: 2 additions & 2 deletions code/game/objects/items/robot/robot_items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,12 @@
if(1)
C.confused += 5
C.stuttering += 10
C.Jitter(10)
C.set_jitter(10)
if(2)
C.Paralyze(40)
C.confused += 10
C.stuttering += 15
C.Jitter(25)
C.set_jitter(25)
playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3)
cooldown = world.time + 600
user.log_message("used an emagged Cyborg Harm Alarm in [AREACOORD(user)]", LOG_ATTACK)
Expand Down
7 changes: 0 additions & 7 deletions code/game/objects/items/stacks/sheets/sheet_types.dm
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,6 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
amount = 50

/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stamp/clown) && !istype(loc, /obj/item/storage))
var/atom/droploc = drop_location()
if(use(1))
playsound(I, 'sound/items/bikehorn.ogg', 50, TRUE, -1)
to_chat(user, "<span class='notice'>You stamp the cardboard! It's a clown box! Honk!</span>")
if (amount >= 0)
new/obj/item/storage/box/clown(droploc) //bugfix
if(istype(I, /obj/item/stamp/chameleon) && !istype(loc, /obj/item/storage))
var/atom/droploc = drop_location()
if(use(1))
Expand Down
21 changes: 0 additions & 21 deletions code/game/objects/items/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -803,27 +803,6 @@
playsound(loc, "rustle", 50, TRUE, -5)
user.visible_message("<span class='notice'>[user] hugs \the [src].</span>","<span class='notice'>You hug \the [src].</span>")

/////clown box & honkbot assembly
/obj/item/storage/box/clown
name = "clown box"
desc = "A colorful cardboard box for the clown"
illustration = "clown"

/obj/item/storage/box/clown/attackby(obj/item/I, mob/user, params)
if((istype(I, /obj/item/bodypart/l_arm/robot)) || (istype(I, /obj/item/bodypart/r_arm/robot)))
if(contents.len) //prevent accidently deleting contents
to_chat(user, "<span class='warning'>You need to empty [src] out first!</span>")
return
if(!user.temporarilyRemoveItemFromInventory(I))
return
qdel(I)
to_chat(user, "<span class='notice'>You add some wheels to the [src]! You've got a honkbot assembly now! Honk!</span>")
var/obj/item/bot_assembly/honkbot/A = new
qdel(src)
user.put_in_hands(A)
else
return ..()

//////
/obj/item/storage/box/hug/medical/PopulateContents()
new /obj/item/stack/medical/bruise_pack(src)
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/flora.dm
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@
else if (isliving(user))
var/mob/living/L = user
L.Immobilize(100, TRUE)
L.jitteriness += 50
L.adjust_jitter(50)
L.adjustToxLoss(66)
return 1
else ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/borer/borer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ GLOBAL_VAR_INIT(total_borer_hosts_needed, 3)
to_chat(src, "<span class='notice'>You send a jolt of energy to your host, reviving them!</span>")
victim.grab_ghost(force = TRUE) //brings the host back, no eggscape
C.emote("gasp")
C.Jitter(100)
C.set_jitter(100)

/mob/living/simple_animal/borer/verb/bond_brain()
set category = "Borer"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/antagonists/changeling/powers/shriek.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
if(!C.mind || !C.mind.has_antag_datum(/datum/antagonist/changeling))
C.adjustEarDamage(0, 30)
C.confused += 25
C.Jitter(50)
C.set_jitter(50)
else
SEND_SOUND(C, sound('sound/effects/screech.ogg'))

Expand Down
6 changes: 0 additions & 6 deletions code/modules/cargo/bounties/assistant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@
reward = 2000
wanted_types = list(/obj/structure/statue)

/datum/bounty/item/assistant/clown_box
name = "Clown Box"
description = "The universe needs laughter. Stamp cardboard with a clown stamp and ship it out."
reward = 1500
wanted_types = list(/obj/item/storage/box/clown)

/datum/bounty/item/assistant/cheesiehonkers
name = "Cheesie Honkers"
description = "Apparently the company that makes Cheesie Honkers is going out of business soon. CentCom wants to stock up before it happens!"
Expand Down
2 changes: 1 addition & 1 deletion code/modules/flufftext/Hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
target.playsound_local(get_turf(src), "sparks", 100, 1)
target.staminaloss += 50
target.Stun(40)
target.jitteriness += 1000
target.adjust_jitter(1000, max = 1500)
target.do_jitter_animation(target.jitteriness)
addtimer(CALLBACK(src, PROC_REF(shock_drop)), 20)

Expand Down
2 changes: 0 additions & 2 deletions code/modules/mining/abandoned_crates.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@
new /obj/item/clothing/mask/cigarette/rollie(src)
if(6 to 10)
new /obj/item/skateboard/pro(src)
if(11 to 15)
new /mob/living/simple_animal/bot/honkbot(src)
if(16 to 20)
new /obj/item/stack/ore/diamond(src, 10)
if(21 to 25)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/alien/organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
owner.force_scream()
owner.Paralyze(100)

owner.jitteriness += 30
owner.adjust_jitter(30)
owner.confused += 30
owner.stuttering += 30

Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@
var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
if(should_stun)
Paralyze(40)
//Jitter and other fluff.
jitteriness += 1000
//jitter and other fluff.
adjust_jitter(1000, max = 1500)
do_jitter_animation(jitteriness)
stuttering += 2
addtimer(CALLBACK(src, PROC_REF(secondary_shock), should_stun), 20)
Expand Down
10 changes: 6 additions & 4 deletions code/modules/mob/living/carbon/human/examine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,16 @@
if (length(status_examines))
. += status_examines

//Jitters
//jitters
switch(jitteriness)
if(300 to INFINITY)
. += "<span class='warning'><B>[t_He] [t_is] convulsing violently!</B></span>"
. += span_boldwarning("[t_He] [t_is] convulsing violently!")
if(200 to 300)
. += "<span class='warning'>[t_He] [t_is] extremely jittery.</span>"
. += span_warning("[t_He] [t_is] extremely jittery.")
if(100 to 200)
. += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>"
. += span_warning("[t_He] [t_is] twitching ever so slightly.")
if(50 to 100)
. += span_warning("[t_He] [t_is] flinching lightly")

var/appears_dead = FALSE
var/just_sleeping = FALSE
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else if(H.satiety < 0)
H.satiety++
if(prob(round(-H.satiety/40)))
H.Jitter(5)
H.adjust_jitter(5, max = 100)
hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod
H.adjust_nutrition(-hunger_rate)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(prob(5))
AdjustSleeping(100)

//Jitteriness
//jitteriness
if(jitteriness)
do_jitter_animation(jitteriness)
jitteriness = max(jitteriness - restingpwr, 0)
Expand Down Expand Up @@ -474,7 +474,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
drunkenness = max(drunkenness - (drunkenness * 0.04) - 0.01, 0)
if(drunkenness >= 11)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "drunk", /datum/mood_event/drunk)
jitteriness = max(jitteriness - 3, 0)
adjust_jitter(max(jitteriness -3,0), max = 200)
throw_alert("drunk", /atom/movable/screen/alert/drunk)
sound_environment_override = SOUND_ENVIRONMENT_PSYCHOTIC
else
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ GLOBAL_VAR_INIT(ssd_indicator_overlay, mutable_appearance('icons/mob/ssd_indicat
var/howfuck = rand(8,16)
AdjustParalyzed(howfuck)
AdjustKnockdown(howfuck)
Jitter(rand(150,200))
set_jitter(rand(150,200))

/**
* Sets the mob's speed variable and then calls update_living_varspeed().
Expand Down
35 changes: 0 additions & 35 deletions code/modules/mob/living/simple_animal/bot/construction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -260,41 +260,6 @@
S.healthanalyzer = healthanalyzer
qdel(src)


//Honkbot Assembly
/obj/item/bot_assembly/honkbot
name = "incomplete honkbot assembly"
desc = "The clown's up to no good once more"
icon_state = "honkbot_arm"
created_name = "Honkbot"

/obj/item/bot_assembly/honkbot/attackby(obj/item/I, mob/user, params)
..()
switch(build_step)
if(ASSEMBLY_FIRST_STEP)
if(isprox(I))
if(!user.temporarilyRemoveItemFromInventory(I))
return
to_chat(user, "<span class='notice'>You add the [I] to [src]!</span>")
icon_state = "honkbot_proxy"
name = "incomplete Honkbot assembly"
qdel(I)
build_step++

if(ASSEMBLY_SECOND_STEP)
if(istype(I, /obj/item/bikehorn))
if(!can_finish_build(I, user))
return
to_chat(user, "<span class='notice'>You add the [I] to [src]! Honk!</span>")
var/mob/living/simple_animal/bot/honkbot/S = new(drop_location())
S.name = created_name
S.spam_flag = TRUE // only long enough to hear the first ping.
addtimer(CALLBACK (S, .mob/living/simple_animal/bot/honkbot/proc/react_ping), 5)
S.bikehorn = I.type
qdel(I)
qdel(src)


//Secbot Assembly
/obj/item/bot_assembly/secbot
name = "incomplete securitron assembly"
Expand Down
Loading

0 comments on commit 9561fa7

Please sign in to comment.