diff --git a/code/__DEFINES/citadel_defines.dm b/code/__DEFINES/citadel_defines.dm
index 97bcd1ff11..99b15362c8 100644
--- a/code/__DEFINES/citadel_defines.dm
+++ b/code/__DEFINES/citadel_defines.dm
@@ -2,8 +2,16 @@
//Be sure to update the min/max of these if you do change them.
//Measurements are in imperial units. Inches, feet, yards, miles. Tsp, tbsp, cups, quarts, gallons, etc
-//arousal HUD location
+//HUD stuff
#define ui_arousal "EAST-1:28,CENTER-4:8"//Below the health doll
+#define ui_stamina "EAST-1:28,CENTER:17" // replacing internals button
+#define ui_overridden_resist "EAST-3:24,SOUTH+1:7"
+#define ui_combat_toggle "EAST-4:22,SOUTH:5"
+
+//1:1 HUD layout stuff
+#define ui_boxcraft "EAST-4:22,SOUTH+1:6"
+#define ui_boxarea "EAST-4:6,SOUTH+1:6"
+#define ui_boxlang "EAST-5:22,SOUTH+1:6"
//organ defines
@@ -100,4 +108,10 @@
//Brainslugs
#define isborer(A) (istype(A, /mob/living/simple_animal/borer))
-#define CITADEL_MENTOR_OOC_COLOUR "#ad396e"
\ No newline at end of file
+#define CITADEL_MENTOR_OOC_COLOUR "#ad396e"
+
+//stamina stuff
+#define STAMINA_SOFTCRIT 100 //softcrit for stamina damage. prevents standing up, prevents performing actions that cost stamina, etc, but doesn't force a rest or stop movement
+#define STAMINA_CRIT 140 //crit for stamina damage. forces a rest, and stops movement until stamina goes back to stamina softcrit
+#define STAMINA_SOFTCRIT_TRADITIONAL 0 //same as STAMINA_SOFTCRIT except for the more traditional health calculations
+#define STAMINA_CRIT_TRADITIONAL -40 //ditto, but for STAMINA_CRIT
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index ce9e1ead82..4c588c96fe 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -75,7 +75,7 @@
if(modifiers["middle"])
MiddleClickOn(A)
return
- if(modifiers["shift"])
+ if(modifiers["shift"] && (client && client.show_popup_menus || modifiers["right"])) //CIT CHANGE - makes shift-click examine use right click instead of left click in combat mode
ShiftClickOn(A)
return
if(modifiers["alt"]) // alt and alt-gr (rightalt)
@@ -85,6 +85,10 @@
CtrlClickOn(A)
return
+ if(modifiers["right"]) //CIT CHANGE - allows right clicking to perform actions
+ RightClickOn(A,params) //CIT CHANGE - ditto
+ return //CIT CHANGE - ditto
+
if(incapacitated(ignore_restraints = 1))
return
diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm
index 9a325dfa1a..3225252520 100644
--- a/code/_onclick/hud/_defines.dm
+++ b/code/_onclick/hud/_defines.dm
@@ -82,9 +82,9 @@
#define ui_acti "EAST-3:24,SOUTH:5"
#define ui_zonesel "EAST-1:28,SOUTH:5"
#define ui_acti_alt "EAST-1:28,SOUTH:5" //alternative intent switcher for when the interface is hidden (F12)
-#define ui_crafting "EAST-4:22,SOUTH:5"
-#define ui_building "EAST-4:22,SOUTH:21"
-#define ui_language_menu "EAST-4:6,SOUTH:21"
+#define ui_crafting "EAST-5:20,SOUTH:5"//CIT CHANGE - moves this over one tile to accommodate for combat mode toggle
+#define ui_building "EAST-5:20,SOUTH:21"//CIT CHANGE - ditto
+#define ui_language_menu "EAST-5:4,SOUTH:21"//CIT CHANGE - ditto
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
@@ -102,7 +102,7 @@
//Middle right (status indicators)
#define ui_healthdoll "EAST-1:28,CENTER-2:13"
#define ui_health "EAST-1:28,CENTER-1:15"
-#define ui_internal "EAST-1:28,CENTER:17"
+#define ui_internal "EAST-1:28,CENTER+1:19"//CIT CHANGE - moves internal icon up a little bit to accommodate for the stamina meter
#define ui_mood "EAST-1:28,CENTER-3:10"
//borgs
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 455a0f20e1..c3288e61fc 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -89,19 +89,29 @@
..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
+ var/widescreenlayout = FALSE //CIT CHANGE - adds support for different hud layouts depending on widescreen pref
+ if(owner.client && owner.client.prefs && owner.client.prefs.widescreenpref) //CIT CHANGE - ditto
+ widescreenlayout = TRUE // CIT CHANGE - ditto
+
var/obj/screen/using
var/obj/screen/inventory/inv_box
using = new /obj/screen/craft
using.icon = ui_style
+ if(!widescreenlayout) // CIT CHANGE
+ using.screen_loc = ui_boxcraft // CIT CHANGE
static_inventory += using
using = new/obj/screen/language_menu
using.icon = ui_style
+ if(!widescreenlayout) // CIT CHANGE
+ using.screen_loc = ui_boxlang // CIT CHANGE
static_inventory += using
using = new /obj/screen/area_creator
using.icon = ui_style
+ if(!widescreenlayout) // CIT CHANGE
+ using.screen_loc = ui_boxarea // CIT CHANGE
static_inventory += using
action_intent = new /obj/screen/act_intent/segmented
@@ -109,11 +119,19 @@
static_inventory += action_intent
using = new /obj/screen/mov_intent
- using.icon = ui_style
+ using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon
using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking")
using.screen_loc = ui_movi
static_inventory += using
+ //CITADEL CHANGES - sprint button
+ using = new /obj/screen/sprintbutton
+ using.icon = tg_ui_icon_to_cit_ui(ui_style)
+ using.icon_state = (owner.sprinting ? "act_sprint_on" : "act_sprint")
+ using.screen_loc = ui_movi
+ static_inventory += using
+ //END OF CITADEL CHANGES
+
using = new /obj/screen/drop()
using.icon = ui_style
using.screen_loc = ui_drop_throw
@@ -207,9 +225,21 @@
using = new /obj/screen/resist()
using.icon = ui_style
- using.screen_loc = ui_pull_resist
+ using.screen_loc = ui_overridden_resist // CIT CHANGE - changes this to overridden resist
hotkeybuttons += using
+ //CIT CHANGES - rest and combat mode buttons
+ using = new /obj/screen/restbutton()
+ using.icon = tg_ui_icon_to_cit_ui(ui_style)
+ using.screen_loc = ui_pull_resist
+ static_inventory += using
+
+ using = new /obj/screen/combattoggle()
+ using.icon = tg_ui_icon_to_cit_ui(ui_style)
+ using.screen_loc = ui_combat_toggle
+ static_inventory += using
+ //END OF CIT CHANGES
+
using = new /obj/screen/human/toggle()
using.icon = ui_style
using.screen_loc = ui_inventory
@@ -280,10 +310,16 @@
healths = new /obj/screen/healths()
infodisplay += healths
- //CIT CHANGE - adds arousal to hud
+ //CIT CHANGE - adds arousal and stamina to hud
arousal = new /obj/screen/arousal()
arousal.icon_state = (owner.canbearoused == 1 ? "arousal0" : "")
infodisplay += arousal
+
+ staminas = new /obj/screen/staminas()
+ infodisplay += staminas
+
+ staminabuffer = new /obj/screen/staminabuffer()
+ infodisplay += staminabuffer
//END OF CIT CHANGES
healthdoll = new /obj/screen/healthdoll()
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 1fc40d3007..8fc30e95e6 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -54,6 +54,10 @@
if(flags_1 & NOBLUDGEON_1)
return
+ if(user.staminaloss >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
+ to_chat(user, "You're too exhausted.") // CIT CHANGE - ditto
+ return // CIT CHANGE - ditto
+
if(force && user.has_trait(TRAIT_PACIFISM))
to_chat(user, "You don't want to harm other living beings!")
return
@@ -72,12 +76,17 @@
add_logs(user, M, "attacked", src.name, "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
add_fingerprint(user)
+ user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes attacking things cause stamina loss
//the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user)
if(flags_1 & NOBLUDGEON_1)
return
+ if(user.staminaloss >= STAMINA_SOFTCRIT) // CIT CHANGE - makes it impossible to attack in stamina softcrit
+ to_chat(user, "You're too exhausted.") // CIT CHANGE - ditto
+ return // CIT CHANGE - ditto
+ user.adjustStaminaLossBuffered(getweight()*1.2)//CIT CHANGE - makes attacking things cause stamina loss
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(O)
O.attacked_by(src, user)
@@ -94,7 +103,16 @@
/mob/living/attacked_by(obj/item/I, mob/living/user)
send_item_attack_message(I, user)
if(I.force)
- apply_damage(I.force, I.damtype)
+ //CIT CHANGES START HERE - combatmode and resting checks
+ var/totitemdamage = I.force
+ if(iscarbon(user))
+ var/mob/living/carbon/tempcarb = user
+ if(!tempcarb.combatmode)
+ totitemdamage *= 0.5
+ if(user.resting)
+ totitemdamage *= 0.5
+ //CIT CHANGES END HERE
+ apply_damage(totitemdamage, I.damtype) //CIT CHANGE - replaces I.force with totitemdamage
if(I.damtype == BRUTE)
if(prob(33))
I.add_mob_blood(src)
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index 4457ff3ebd..f968f860b0 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -295,7 +295,7 @@
owner.toxloss *= 10
owner.oxyloss *= 10
owner.cloneloss *= 10
- owner.staminaloss *= 10
+ owner.staminaloss += -10 // CIT CHANGE - makes blooddrunk status effect not exhaust you
owner.updatehealth()
last_health = owner.health
last_bruteloss = owner.getBruteLoss()
@@ -353,7 +353,7 @@
var/new_staminaloss = owner.getStaminaLoss()
if(new_staminaloss < last_staminaloss)
- var/heal_amount = (new_staminaloss - last_staminaloss) * 10
+ var/heal_amount = -5 // CIT CHANGE - makes blood drunk status effect not exhaust you
owner.adjustStaminaLoss(heal_amount, updating_health = FALSE)
new_staminaloss = owner.getStaminaLoss()
needs_health_update = TRUE
diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm
index ea9eae906a..bd41e3aa3a 100644
--- a/code/game/machinery/dance_machine.dm
+++ b/code/game/machinery/dance_machine.dm
@@ -400,15 +400,16 @@
/obj/machinery/disco/proc/dance4(var/mob/living/M)
- var/speed = rand(1,3)
+ //var/speed = rand(1,3) // CIT CHANGE
set waitfor = 0
- var/time = 30
+ /*var/time = 30 CIT CHANGE -- replaces dance4 with rapid spinning so that disco balls dont make weird shit happen
while(time)
sleep(speed)
for(var/i in 1 to speed)
M.setDir(pick(GLOB.cardinals))
M.lay_down(TRUE)
- time--
+ time--*/
+ M.SpinAnimation(1,30)
/obj/machinery/disco/proc/dance5(var/mob/living/M)
animate(M, transform = matrix(180, MATRIX_ROTATE), time = 1, loop = 0)
diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm
index dffb4650e8..3fb8110c9f 100644
--- a/code/game/machinery/porta_turret/portable_turret.dm
+++ b/code/game/machinery/porta_turret/portable_turret.dm
@@ -389,7 +389,7 @@
if(iscarbon(A))
var/mob/living/carbon/C = A
//If not emagged, only target non downed carbons
- if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || C.lying))
+ if(mode != TURRET_LETHAL && (C.stat || C.handcuffed || C.recoveringstam))//CIT CHANGE - replaces check for lying with check for recoveringstam
continue
//If emagged, target all but dead carbons
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index aeb7acb651..b5c4e5bfb8 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -510,12 +510,18 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
to_chat(user, "You cannot locate any organic eyes on this brain!")
return
+ if(user.staminaloss >= STAMINA_SOFTCRIT)//CIT CHANGE - makes eyestabbing impossible if you're in stamina softcrit
+ to_chat(user, "You're too exhausted for that.")//CIT CHANGE - ditto
+ return //CIT CHANGE - ditto
+
src.add_fingerprint(user)
playsound(loc, src.hitsound, 30, 1, -1)
user.do_attack_animation(M)
+ user.adjustStaminaLossBuffered(10)//CIT CHANGE - makes eyestabbing cost stamina
+
if(M != user)
M.visible_message("[user] has stabbed [M] in the eye with [src]!", \
"[user] stabs you in the eye with [src]!")
diff --git a/code/game/objects/items/devices/dogborg_sleeper.dm b/code/game/objects/items/devices/dogborg_sleeper.dm
index 217786f142..1d9c669fc9 100644
--- a/code/game/objects/items/devices/dogborg_sleeper.dm
+++ b/code/game/objects/items/devices/dogborg_sleeper.dm
@@ -497,4 +497,4 @@
user.visible_message("[hound.name]'s garbage processor groans lightly as [trashman] slips inside.", "Your garbage compactor groans lightly as [trashman] slips inside.")
playsound(hound, 'sound/effects/bin_close.ogg', 80, 1)
return
- return
\ No newline at end of file
+ return
diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm
index 670715dcd5..7d74a00ce6 100644
--- a/code/game/objects/items/melee/misc.dm
+++ b/code/game/objects/items/melee/misc.dm
@@ -106,6 +106,10 @@
if(!on)
return ..()
+ if(user.staminaloss >= STAMINA_SOFTCRIT)//CIT CHANGE - makes batons unusuable in stamina softcrit
+ to_chat(user, "You're too exhausted for that.")//CIT CHANGE - ditto
+ return //CIT CHANGE - ditto
+
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "You club yourself over the head.")
@@ -145,6 +149,7 @@
else
target.LAssailant = user
cooldown = world.time + 40
+ user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
/obj/item/melee/classic_baton/telescopic
name = "telescopic baton"
diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm
index 9f42a7c370..6e88a61349 100644
--- a/code/game/objects/items/stunbaton.dm
+++ b/code/game/objects/items/stunbaton.dm
@@ -115,6 +115,10 @@
deductcharge(hitcost)
return
+ if(user.staminaloss >= STAMINA_SOFTCRIT)//CIT CHANGE - makes it impossible to baton in stamina softcrit
+ to_chat(user, "You're too exhausted for that.")//CIT CHANGE - ditto
+ return //CIT CHANGE - ditto
+
if(iscyborg(M))
..()
return
@@ -129,6 +133,7 @@
if(status)
if(baton_stun(M, user))
user.do_attack_animation(M)
+ user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes stunbatonning others cost stamina
return
else
M.visible_message("[user] has prodded [M] with [src]. Luckily it was off.", \
@@ -154,6 +159,7 @@
return 0
L.Knockdown(stunforce)
+ L.adjustStaminaLoss(stunforce*0.1)//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
L.apply_effect(STUTTER, stunforce)
if(user)
L.lastattacker = user.real_name
diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm
index 2d82c3829b..713f5761c0 100644
--- a/code/game/objects/items/weaponry.dm
+++ b/code/game/objects/items/weaponry.dm
@@ -101,6 +101,7 @@
var/mob/living/carbon/human/H = loc
loc.layer = LARGE_MOB_LAYER //NO HIDING BEHIND PLANTS FOR YOU, DICKWEED (HA GET IT, BECAUSE WEEDS ARE PLANTS)
H.bleedsuppress = TRUE //AND WE WON'T BLEED OUT LIKE COWARDS
+ H.adjustStaminaLoss(-5) //CIT CHANGE - AND MAY HE NEVER SUCCUMB TO EXHAUSTION
else
if(!admin_spawned)
qdel(src)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index c565847c18..dfc39a9f28 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -400,6 +400,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "Widescreen: [widescreenpref ? "Enabled ([CONFIG_GET(string/default_view)])" : "Disabled (15x15)"]
"
+ dat += "Auto stand: [autostand ? "Enabled" : "Disabled"]
"
+
dat += "Screen Shake: [(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]
"
if (!user.client.prefs.screenshake==0)
@@ -1699,6 +1701,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("widescreenpref")
widescreenpref = !widescreenpref
user.client.change_view(CONFIG_GET(string/default_view))
+ if("autostand")
+ autostand = !autostand
if ("screenshake")
var/desiredshake = input(user, "Set the amount of screenshake you want. \n(0 = disabled, 100 = full, 200 = maximum.)", "Character Preference", screenshake) as null|num
if (!isnull(desiredshake))
diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm
index 9b776c48b2..8bebf460e6 100644
--- a/code/modules/client/preferences_savefile.dm
+++ b/code/modules/client/preferences_savefile.dm
@@ -141,6 +141,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["screenshake"] >> screenshake
S["damagescreenshake"] >> damagescreenshake
S["widescreenpref"] >> widescreenpref
+ S["autostand"] >> autostand
//try to fix any outdated data if necessary
if(needs_update >= 0)
@@ -171,6 +172,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
screenshake = sanitize_integer(screenshake, 0, 800, initial(screenshake))
damagescreenshake = sanitize_integer(damagescreenshake, 0, 2, initial(damagescreenshake))
widescreenpref = sanitize_integer(widescreenpref, 0, 1, initial(widescreenpref))
+ autostand = sanitize_integer(autostand, 0, 1, initial(autostand))
return 1
@@ -219,6 +221,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["damagescreenshake"], damagescreenshake)
WRITE_FILE(S["arousable"], arousable)
WRITE_FILE(S["widescreenpref"], widescreenpref)
+ WRITE_FILE(S["autostand"], autostand)
return 1
diff --git a/code/modules/mining/equipment/kinetic_crusher.dm b/code/modules/mining/equipment/kinetic_crusher.dm
index 2843c22038..5b86a2d340 100644
--- a/code/modules/mining/equipment/kinetic_crusher.dm
+++ b/code/modules/mining/equipment/kinetic_crusher.dm
@@ -115,6 +115,9 @@
C.total_damage += detonation_damage
L.apply_damage(detonation_damage, BRUTE, blocked = def_check)
+ if(user && lavaland_equipment_pressure_check(get_turf(user))) //CIT CHANGE - makes sure below only happens in low pressure environments
+ user.adjustStaminaLoss(-13)//CIT CHANGE - makes crushers heal stamina
+
/obj/item/twohanded/required/kinetic_crusher/proc/Recharge()
if(!charged)
charged = TRUE
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index acef80b8ba..1e7f2210cf 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -197,7 +197,7 @@
/mob/proc/put_in_hand_check(obj/item/I)
- if(lying && !(I.flags_1&ABSTRACT_1))
+ if(incapacitated() && !(I.flags_1&ABSTRACT_1)) //Cit change - Changes lying to incapacitated so that it's plausible to pick things up while on the ground
return FALSE
if(!istype(I))
return FALSE
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index 8a73f8812e..ac905ff827 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -148,6 +148,12 @@
if(istype(target, /obj/screen))
return
+//CIT CHANGES - makes it impossible to throw while in stamina softcrit
+ if(staminaloss >= STAMINA_SOFTCRIT)
+ to_chat(src, "You're too exhausted.")
+ return
+//END OF CIT CHANGES
+
var/atom/movable/thrown_thing
var/obj/item/I = src.get_active_held_item()
@@ -159,6 +165,7 @@
stop_pulling()
if(has_trait(TRAIT_PACIFISM))
to_chat(src, "You gently let go of [throwable_mob].")
+ adjustStaminaLossBuffered(25)//CIT CHANGE - throwing an entire person shall be very tiring
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
if(start_T && end_T)
@@ -174,6 +181,8 @@
to_chat(src, "You set [I] down gently on the ground.")
return
+ adjustStaminaLossBuffered(I.getweight()*2)//CIT CHANGE - throwing items shall be more tiring than swinging em. Doubly so.
+
if(thrown_thing)
visible_message("[src] has thrown [thrown_thing].")
add_logs(src, thrown_thing, "has thrown")
@@ -399,12 +408,20 @@
if(!I || (I.flags_1 & (NODROP_1|ABSTRACT_1)))
return
- dropItemToGround(I)
+ //dropItemToGround(I) CIT CHANGE - makes it so the item doesn't drop if the modifier rolls above 100
var/modifier = 0
if(has_trait(TRAIT_CLUMSY))
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
+ //CIT CHANGES START HERE
+ else if(combatmode)
+ modifier += 50
+
+ if(modifier < 100)
+ dropItemToGround(I)
+ //END OF CIT CHANGES
+
switch(rand(1,100)+modifier) //91-100=Nothing special happens
if(-INFINITY to 0) //attack yourself
I.attack(src,src)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index 6192d9ad44..9b23204d98 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -77,7 +77,18 @@
affecting = bodyparts[1]
send_item_attack_message(I, user, affecting.name)
if(I.force)
- apply_damage(I.force, I.damtype, affecting)
+ //CIT CHANGES START HERE - combatmode and resting checks
+ var/totitemdamage = I.force
+ if(iscarbon(user))
+ var/mob/living/carbon/tempcarb = user
+ if(!tempcarb.combatmode)
+ totitemdamage *= 0.5
+ if(user.resting)
+ totitemdamage *= 0.5
+ if(!combatmode)
+ totitemdamage *= 1.5
+ //CIT CHANGES END HERE
+ apply_damage(totitemdamage, I.damtype, affecting) //CIT CHANGE - replaces I.force with totitemdamage
if(I.damtype == BRUTE && affecting.status == BODYPART_ORGANIC)
if(prob(33))
I.add_mob_blood(src)
diff --git a/code/modules/mob/living/carbon/damage_procs.dm b/code/modules/mob/living/carbon/damage_procs.dm
index b437b6a4f2..715b4a2ed9 100644
--- a/code/modules/mob/living/carbon/damage_procs.dm
+++ b/code/modules/mob/living/carbon/damage_procs.dm
@@ -186,16 +186,16 @@
if(status_flags & GODMODE)
return 0
staminaloss = CLAMP(staminaloss + amount, 0, maxHealth*2)
- if(updating_stamina)
- update_stamina()
+ //if(updating_stamina) CIT CHANGE - makes staminaloss changes always call update_stamina
+ update_stamina()
/mob/living/carbon/setStaminaLoss(amount, updating_stamina = 1)
if(status_flags & GODMODE)
return 0
staminaloss = amount
- if(updating_stamina)
- update_stamina()
+ //if(updating_stamina) CIT CHANGE - makes staminaloss changes always call update_stamina
+ update_stamina()
/mob/living/carbon/getBrainLoss()
. = 0
@@ -237,4 +237,3 @@
if(B)
var/adjusted_amount = amount - B.get_brain_damage()
B.adjust_brain_damage(adjusted_amount, null)
-
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 8d8eead442..2bcb1d5189 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -778,7 +778,7 @@
return
else
if(hud_used.healths)
- var/health_amount = health - staminaloss
+ var/health_amount = health - CLAMP(staminaloss-50, 0, 80)//CIT CHANGE - makes staminaloss have less of an impact on the health hud
if(..(health_amount)) //not dead
switch(hal_screwyhud)
if(SCREWYHUD_CRIT)
diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm
index 8fdaa0a4f3..c60eafbad2 100644
--- a/code/modules/mob/living/carbon/human/species.dm
+++ b/code/modules/mob/living/carbon/human/species.dm
@@ -1290,12 +1290,13 @@ GLOBAL_LIST_EMPTY(roundstart_races)
for(var/obj/item/I in H.held_items)
if(I.flags_2 & SLOWS_WHILE_IN_HAND_2)
. += I.slowdown
- var/health_deficiency = (100 - H.health + H.staminaloss)
+ var/stambufferinfluence = (H.bufferedstam*(100/H.stambuffer))*0.2 //CIT CHANGE - makes stamina buffer influence movedelay
+ var/health_deficiency = ((100 + stambufferinfluence) - H.health + (H.staminaloss*0.75))//CIT CHANGE - reduces the impact of staminaloss on movement speed and makes stamina buffer influence movedelay
if(health_deficiency >= 40)
if(flight)
- . += (health_deficiency / 75)
+ . += ((health_deficiency-39) / 75) // CIT CHANGE - adds -39 to health deficiency penalty to make the transition to low health movement a little less jarring
else
- . += (health_deficiency / 25)
+ . += ((health_deficiency-39) / 25) // CIT CHANGE - ditto
GET_COMPONENT_FROM(mood, /datum/component/mood, H)
if(mood && !flight) //How can depression slow you down if you can just fly away from your problems?
@@ -1356,6 +1357,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(user.has_trait(TRAIT_PACIFISM))
to_chat(user, "You don't want to harm [target]!")
return FALSE
+ if(user.staminaloss >= STAMINA_SOFTCRIT) //CITADEL CHANGE - makes it impossible to punch while in stamina softcrit
+ to_chat(user, "You're too exhausted.") //CITADEL CHANGE - ditto
+ return FALSE //CITADEL CHANGE - ditto
if(target.check_block())
target.visible_message("[target] blocks [user]'s attack!")
return FALSE
@@ -1377,8 +1381,19 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else
user.do_attack_animation(target, ATTACK_EFFECT_PUNCH)
+ user.adjustStaminaLossBuffered(5) //CITADEL CHANGE - makes punching cause staminaloss
+
var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
+ //CITADEL CHANGES - makes resting and disabled combat mode reduce punch damage, makes being out of combat mode result in you taking more damage
+ if(!target.combatmode && damage < user.dna.species.punchstunthreshold)
+ damage = user.dna.species.punchstunthreshold - 1
+ if(user.resting)
+ damage *= 0.5
+ if(!user.combatmode)
+ damage *= 0.25
+ //END OF CITADEL CHANGES
+
var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(user.zone_selected))
if(!damage || !affecting)
@@ -1420,6 +1435,9 @@ GLOBAL_LIST_EMPTY(roundstart_races)
"You hear a slap.")
target.endTailWag()
return FALSE
+ else if(user.staminaloss >= STAMINA_SOFTCRIT)
+ to_chat(user, "You're too exhausted.")
+ return FALSE
else if(target.check_block()) //END EDIT
target.visible_message("[target] blocks [user]'s disarm attempt!")
return 0
@@ -1428,22 +1446,31 @@ GLOBAL_LIST_EMPTY(roundstart_races)
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
+ user.adjustStaminaLossBuffered(3) //CITADEL CHANGE - makes disarmspam cause staminaloss
+
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
- var/randomized_zone = ran_zone(user.zone_selected)
+ //var/randomized_zone = ran_zone(user.zone_selected) CIT CHANGE - comments out to prevent compiling errors
target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
- var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
+ //var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone) CIT CHANGE - comments this out to prevent compile errors due to the below commented out bit
var/randn = rand(1, 100)
- if(randn <= 25)
+ /*if(randn <= 25) CITADEL CHANGE - moves disarm push attempts to right click
playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
target.visible_message("[user] has pushed [target]!",
"[user] has pushed [target]!", null, COMBAT_MESSAGE_RANGE)
target.apply_effect(40, KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
target.forcesay(GLOB.hit_appends)
add_logs(user, target, "disarmed", " pushing them to the ground")
- return
+ return*/
- if(randn <= 60)
+ if(!target.combatmode) // CITADEL CHANGE
+ randn += -10 //CITADEL CHANGE - being out of combat mode makes it easier for you to get disarmed
+ if(user.resting) //CITADEL CHANGE
+ randn += 60 //CITADEL CHANGE - No kosher disarming if you're resting
+ if(!user.combatmode) //CITADEL CHANGE
+ randn += 25 //CITADEL CHANGE - Makes it harder to disarm outside of combat mode
+
+ if(randn <= 35)//CIT CHANGE - changes this back to a 35% chance to accomodate for the above being commented out in favor of right-click pushing
var/obj/item/I = null
if(target.pulling)
target.visible_message("[user] has broken [target]'s grip on [target.pulling]!")
@@ -1516,8 +1543,21 @@ GLOBAL_LIST_EMPTY(roundstart_races)
armor_block = min(90,armor_block) //cap damage reduction at 90%
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
+ //CIT CHANGES START HERE - combatmode and resting checks
+ var/totitemdamage = I.force
+ if(iscarbon(user))
+ var/mob/living/carbon/tempcarb = user
+ if(!tempcarb.combatmode)
+ totitemdamage *= 0.5
+ if(user.resting)
+ totitemdamage *= 0.5
+ if(istype(H))
+ if(!H.combatmode)
+ totitemdamage *= 1.5
+ //CIT CHANGES END HERE
+
var/weakness = H.check_weakness(I, user)
- apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H)
+ apply_damage(totitemdamage * weakness, I.damtype, def_zone, armor_block, H) //CIT CHANGE - replaces I.force with totitemdamage
H.send_item_attack_message(I, user, hit_area)
diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm
index fec5ae0e63..dc939f8fc1 100644
--- a/code/modules/mob/living/carbon/life.dm
+++ b/code/modules/mob/living/carbon/life.dm
@@ -331,8 +331,17 @@
//this updates all special effects: stun, sleeping, knockdown, druggy, stuttering, etc..
/mob/living/carbon/handle_status_effects()
..()
- if(staminaloss)
- adjustStaminaLoss(-3)
+ if(staminaloss && !combatmode && !aimingdownsights)//CIT CHANGE - prevents stamina regen while combat mode is active
+ adjustStaminaLoss(resting ? (recoveringstam ? -7.5 : -3) : -1.5)//CIT CHANGE - decreases adjuststaminaloss to stop stamina damage from being such a joke
+ else if(aimingdownsights)//CIT CHANGE - makes aiming down sights drain stamina
+ adjustStaminaLoss(resting ? 0.2 : 0.5)//CIT CHANGE - ditto. Raw spaghetti
+
+ //CIT CHANGES START HERE. STAMINA BUFFER STUFF
+ if(bufferedstam && world.time > stambufferregentime)
+ var/drainrate = max((bufferedstam*(bufferedstam/(5)))*0.1,1)
+ bufferedstam = max(bufferedstam - drainrate, 0)
+ adjustStaminaLoss(drainrate*0.5)
+ //END OF CIT CHANGES
var/restingpwr = 1 + 4 * resting
diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm
index 79c9613906..ec419ef94c 100644
--- a/code/modules/mob/living/carbon/monkey/combat.dm
+++ b/code/modules/mob/living/carbon/monkey/combat.dm
@@ -141,7 +141,7 @@
// Really no idea what needs to be returned but everything else is TRUE
return TRUE
- if(on_fire || buckled || restrained())
+ if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - adds (resting && canmove) to make monkey ai attempt to resist out of resting
if(!resisting && prob(MONKEY_RESIST_PROB))
resisting = TRUE
walk_to(src,0)
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 63f5be8ec8..ad9d76b6f4 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -320,7 +320,7 @@
death()
/mob/living/incapacitated(ignore_restraints, ignore_grab)
- if(stat || IsUnconscious() || IsStun() || IsKnockdown() || (!ignore_restraints && restrained(ignore_grab)))
+ if(stat || IsUnconscious() || IsStun() || IsKnockdown() || recoveringstam || (!ignore_restraints && restrained(ignore_grab))) // CIT CHANGE - adds recoveringstam check here
return 1
/mob/living/proc/InCritical()
@@ -377,6 +377,7 @@
/mob/proc/get_contents()
+/*CIT CHANGE - comments out lay_down proc to be modified in modular_citadel
/mob/living/proc/lay_down()
set name = "Rest"
set category = "IC"
@@ -384,6 +385,7 @@
resting = !resting
to_chat(src, "You are now [resting ? "resting" : "getting up"].")
update_canmove()
+*/
//Recursive function to find everything a mob is holding.
/mob/living/get_contents(obj/item/storage/Storage = null)
@@ -643,9 +645,9 @@
if(buckled && last_special <= world.time)
resist_buckle()
- // climbing out of a gut
+ // CIT CHANGE - climbing out of a gut
if(attempt_vr(src,"vore_process_resist",args)) return TRUE
-
+
//Breaking out of a container (Locker, sleeper, cryo...)
else if(isobj(loc))
var/obj/C = loc
@@ -662,6 +664,8 @@
else if(canmove)
if(on_fire)
resist_fire() //stop, drop, and roll
+ else if(resting) //cit change - allows resisting out of resting
+ resist_a_rest() // ditto
else if(last_special <= world.time)
resist_restraints() //trying to remove cuffs.
@@ -865,6 +869,7 @@
return FALSE
return TRUE
+/*CIT CHANGE - comments out update_stamina to be modified in modular_citadel
/mob/living/carbon/proc/update_stamina()
if(staminaloss)
var/total_health = (health - staminaloss)
@@ -873,6 +878,7 @@
Knockdown(100)
setStaminaLoss(health - 2)
update_health_hud()
+*/
/mob/living/carbon/alien/update_stamina()
return
@@ -1027,25 +1033,32 @@
var/ko = IsKnockdown() || IsUnconscious() || (stat && (stat != SOFT_CRIT || pulledby)) || (has_trait(TRAIT_FAKEDEATH))
var/move_and_fall = stat == SOFT_CRIT && !pulledby
var/chokehold = pulledby && pulledby.grab_state >= GRAB_NECK
+ var/pinned = resting && pulledby && pulledby.grab_state >= GRAB_AGGRESSIVE // Cit change - adds pinning for aggressive-grabbing people on the ground
var/buckle_lying = !(buckled && !buckled.buckle_lying)
var/has_legs = get_num_legs()
var/has_arms = get_num_arms()
var/ignore_legs = get_leg_ignore()
- if(ko || resting || move_and_fall || IsStun() || chokehold)
+ if(ko || move_and_fall || IsStun() || chokehold) // Cit change - makes resting not force you to drop everything
drop_all_held_items()
unset_machine()
if(pulling)
stop_pulling()
+ else if(resting) //CIT CHANGE - makes resting make you stop pulling and interacting with machines
+ unset_machine() //CIT CHANGE - Ditto!
+ if(pulling) //CIT CHANGE - Ditto.
+ stop_pulling() //CIT CHANGE - Ditto...
else if(has_legs || ignore_legs)
lying = 0
if(buckled)
lying = 90*buckle_lying
else if(!lying)
if(resting)
- fall()
+ lying = pick(90, 270) // Cit change - makes resting not force you to drop your held items
+ if(has_gravity()) // Cit change - Ditto
+ playsound(src, "bodyfall", 50, 1) // Cit change - Ditto!
else if(ko || move_and_fall || (!has_legs && !ignore_legs) || chokehold)
fall(forced = 1)
- canmove = !(ko || resting || IsStun() || IsFrozen() || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms))
+ canmove = !(ko || recoveringstam || pinned || IsStun() || IsFrozen() || chokehold || buckled || (!has_legs && !ignore_legs && !has_arms)) //Cit change - makes it plausible to move while resting, adds pinning and stamina crit
density = !lying
if(lying)
if(layer == initial(layer)) //to avoid special cases like hiding larvas.
@@ -1058,6 +1071,8 @@
if(client)
client.move_delay = world.time + movement_delay()
lying_prev = lying
+ if(canmove && !intentionalresting && iscarbon(src) && client && client.prefs && client.prefs.autostand)//CIT CHANGE - adds autostanding as a preference
+ resist_a_rest(TRUE)//CIT CHANGE - ditto
return canmove
/mob/living/proc/AddAbility(obj/effect/proc_holder/A)
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index d265d19cb2..9b4386c727 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -274,7 +274,7 @@ Auto Patrol[]"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if(!Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
+ if(!Adjacent(target) || !isturf(target.loc) || !target.recoveringstam || target.staminaloss <= 120) // CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
back_to_hunt()
return
@@ -301,7 +301,7 @@ Auto Patrol[]"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !target.recoveringstam && target.staminaloss <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss checks
back_to_hunt()
return
else
@@ -523,7 +523,7 @@ Auto Patrol[]"},
return
if(iscarbon(A))
var/mob/living/carbon/C = A
- if(!C.IsStun() || arrest_type)
+ if(C.canmove || arrest_type) // CIT CHANGE - makes sentient ed209s check for canmove rather than !isstun.
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 68b82abb0e..1754a20b94 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -203,7 +203,7 @@ Auto Patrol: []"},
return
if(iscarbon(A))
var/mob/living/carbon/C = A
- if(!C.IsStun() || arrest_type)
+ if(C.canmove || arrest_type) // CIT CHANGE - makes sentient secbots check for canmove rather than !isstun.
stun_attack(A)
else if(C.canBeHandcuffed() && !C.handcuffed)
cuff(A)
@@ -305,7 +305,7 @@ Auto Patrol: []"},
if(BOT_PREP_ARREST) // preparing to arrest target
// see if he got away. If he's no no longer adjacent or inside a closet or about to get up, we hunt again.
- if( !Adjacent(target) || !isturf(target.loc) || target.AmountKnockdown() < 40)
+ if( !Adjacent(target) || !isturf(target.loc) || target.staminaloss <= 120 || !target.recoveringstam) //CIT CHANGE - replaces amountknockdown with checks for stamina so secbots dont run into an infinite loop
back_to_hunt()
return
@@ -332,7 +332,7 @@ Auto Patrol: []"},
back_to_idle()
return
- if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && target.AmountKnockdown() < 40)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again.
+ if(!Adjacent(target) || !isturf(target.loc) || (target.loc != target_lastloc && !target.recoveringstam && target.staminaloss <= 120)) //if he's changed loc and about to get up or not adjacent or got into a closet, we prep arrest again. CIT CHANGE - replaces amountknockdown with recoveringstam and staminaloss check
back_to_hunt()
return
else //Try arresting again if the target escapes.
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 7deed01390..f5e5d32428 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -365,6 +365,10 @@
I.attack_self(src)
update_inv_hands()
+ if(!I)//CIT CHANGE - allows "using" empty hands
+ use_that_empty_hand() //CIT CHANGE - ditto
+ update_inv_hands() // CIT CHANGE - ditto.
+
/mob/verb/memory()
set name = "Notes"
set category = "IC"
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 240c4edd9f..9178a2341b 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -76,6 +76,7 @@
O.setCloneLoss(getCloneLoss(), 0)
O.adjustFireLoss(getFireLoss(), 0)
O.setBrainLoss(getBrainLoss(), 0)
+ O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina
O.updatehealth()
O.radiation = radiation
@@ -233,6 +234,7 @@
O.setCloneLoss(getCloneLoss(), 0)
O.adjustFireLoss(getFireLoss(), 0)
O.setBrainLoss(getBrainLoss(), 0)
+ O.adjustStaminaLoss(getStaminaLoss(), 0)//CIT CHANGE - makes monkey transformations inherit stamina
O.updatehealth()
O.radiation = radiation
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index afd14e5dcf..7b7daadc18 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -112,6 +112,9 @@
if(recoil)
shake_camera(user, recoil + 1, recoil)
+ if(iscarbon(user)) //CIT CHANGE - makes gun recoil cause staminaloss
+ user.adjustStaminaLossBuffered(getstamcost(user)*(firing_burst && burst_size >= 2 ? 1/burst_size : 1)) //CIT CHANGE - ditto
+
if(suppressed)
playsound(user, fire_sound, 10, 1)
else
@@ -170,6 +173,9 @@
//DUAL (or more!) WIELDING
var/bonus_spread = 0
var/loop_counter = 0
+
+ bonus_spread += getinaccuracy(user) //CIT CHANGE - adds bonus spread while not aiming
+
if(ishuman(user) && user.a_intent == INTENT_HARM)
var/mob/living/carbon/human/H = user
for(var/obj/item/gun/G in H.held_items)
diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm
index 315178368d..723e1b910c 100644
--- a/code/modules/projectiles/guns/ballistic/shotgun.dm
+++ b/code/modules/projectiles/guns/ballistic/shotgun.dm
@@ -37,8 +37,13 @@
/obj/item/gun/ballistic/shotgun/attack_self(mob/living/user)
if(recentpump > world.time)
return
+ if(istype(user) && user.staminaloss >= STAMINA_SOFTCRIT)//CIT CHANGE - makes pumping shotguns impossible in stamina softcrit
+ to_chat(user, "You're too exhausted for that.")//CIT CHANGE - ditto
+ return//CIT CHANGE - ditto
pump(user)
recentpump = world.time + 10
+ if(istype(user))//CIT CHANGE - makes pumping shotguns cost a lil bit of stamina.
+ user.adjustStaminaLossBuffered(5) //CIT CHANGE - DITTO. make this scale inversely to the strength stat when stats/skills are added
return
/obj/item/gun/ballistic/shotgun/blow_up(mob/user)
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index e7a87e0132..db43917d6c 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -462,6 +462,13 @@
xo = targloc.x - curloc.x
setAngle(Get_Angle(src, targloc))
+ //CIT CHANGES START HERE - makes it so laying down makes you unable to shoot through most objects
+ if(iscarbon(source))
+ var/mob/living/carbon/checklad = source
+ if(istype(checklad) && checklad.resting)
+ pass_flags = 0
+ //END OF CIT CHANGES
+
if(isliving(source) && params)
var/list/calculated = calculate_projectile_angle_and_pixel_offsets(source, params)
p_x = calculated[2]
diff --git a/modular_citadel/cit_screenshake.dm b/modular_citadel/cit_screenshake.dm
index 818f363902..5bb1f82c10 100644
--- a/modular_citadel/cit_screenshake.dm
+++ b/modular_citadel/cit_screenshake.dm
@@ -46,17 +46,17 @@
/obj/item/attack(mob/living/M, mob/living/user)
. = ..()
- if(force && force >=15)
+ if(force >= 15)
shake_camera(user, ((force - 10) * 0.01 + 1), ((force - 10) * 0.01))
if(M.client)
switch (M.client.prefs.damagescreenshake)
if (1)
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
if (2)
- if (M.IsKnockdown())
+ if (!M.canmove)
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
/obj/item/attack_obj(obj/O, mob/living/user)
. = ..()
- if(force && force >= 20)
+ if(force >= 20)
shake_camera(user, ((force - 15) * 0.01 + 1), ((force - 15) * 0.01))
diff --git a/modular_citadel/cit_turfs.dm b/modular_citadel/cit_turfs.dm
index 76b9a8f178..582552b83b 100644
--- a/modular_citadel/cit_turfs.dm
+++ b/modular_citadel/cit_turfs.dm
@@ -72,11 +72,6 @@ GLOBAL_LIST_INIT(turf_footstep_sounds, list(
. = ..()
CitDirtify(obj, oldloc)*/
-/mob/living/Move(atom/newloc, direct)
- . = ..()
- if(. && makesfootstepsounds)
- CitFootstep(newloc)
-
//Baystation-styled tile dirtification.
/turf/open/floor/proc/CitDirtify(atom/obj, atom/oldloc)
if(prob(50))
diff --git a/modular_citadel/code/__HELPERS/list2list.dm b/modular_citadel/code/__HELPERS/list2list.dm
new file mode 100644
index 0000000000..e812b3a1e9
--- /dev/null
+++ b/modular_citadel/code/__HELPERS/list2list.dm
@@ -0,0 +1,12 @@
+/proc/tg_ui_icon_to_cit_ui(ui_style)
+ switch(ui_style)
+ if('icons/mob/screen_plasmafire.dmi')
+ return 'modular_citadel/icons/ui/screen_plasmafire.dmi'
+ if('icons/mob/screen_slimecore.dmi')
+ return 'modular_citadel/icons/ui/screen_slimecore.dmi'
+ if('icons/mob/screen_operative.dmi')
+ return 'modular_citadel/icons/ui/screen_operative.dmi'
+ if('icons/mob/screen_clockwork.dmi')
+ return 'modular_citadel/icons/ui/screen_clockwork.dmi'
+ else
+ return 'modular_citadel/icons/ui/screen_midnight.dmi'
diff --git a/modular_citadel/code/_onclick/click.dm b/modular_citadel/code/_onclick/click.dm
new file mode 100644
index 0000000000..4746231c59
--- /dev/null
+++ b/modular_citadel/code/_onclick/click.dm
@@ -0,0 +1,74 @@
+/mob/proc/RightClickOn(atom/A, params) //mostly a copy-paste from ClickOn()
+ var/list/modifiers = params2list(params)
+ if(incapacitated(ignore_restraints = 1))
+ return
+
+ face_atom(A)
+
+ if(next_move > world.time) // in the year 2000...
+ return
+
+ if(!modifiers["catcher"] && A.IsObscured())
+ return
+
+ if(ismecha(loc))
+ var/obj/mecha/M = loc
+ return M.click_action(A,src,params)
+
+ if(restrained())
+ changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
+ RestrainedClickOn(A)
+ return
+
+ if(in_throw_mode)
+ throw_item(A)//todo: make it plausible to lightly toss items via right-click
+ return
+
+ var/obj/item/W = get_active_held_item()
+
+ if(W == A)
+ if(!W.rightclick_attack_self(src))
+ W.attack_self(src)
+ update_inv_hands()
+ return
+
+ //These are always reachable.
+ //User itself, current loc, and user inventory
+ if(DirectAccess(A))
+ if(W)
+ W.rightclick_melee_attack_chain(src, A, params)
+ else
+ if(ismob(A))
+ changeNext_move(CLICK_CD_MELEE)
+ if(!AltUnarmedAttack(A))
+ UnarmedAttack(A)
+ return
+
+ //Can't reach anything else in lockers or other weirdness
+ if(!loc.AllowClick())
+ return
+
+ //Standard reach turf to turf or reaching inside storage
+ if(CanReach(A,W))
+ if(W)
+ W.rightclick_melee_attack_chain(src, A, params)
+ else
+ if(ismob(A))
+ changeNext_move(CLICK_CD_MELEE)
+ if(!AltUnarmedAttack(A,1))
+ UnarmedAttack(A,1)
+ else
+ if(W)
+ if(!W.altafterattack(A, src, FALSE, params))
+ W.afterattack(A, src, FALSE, params)
+ else
+ if(!AltRangedAttack(A,params))
+ RangedAttack(A,params)
+
+/mob/proc/AltUnarmedAttack(atom/A, proximity_flag)
+ if(ismob(A))
+ changeNext_move(CLICK_CD_MELEE)
+ return FALSE
+
+/mob/proc/AltRangedAttack(atom/A, params)
+ return FALSE
diff --git a/modular_citadel/code/_onclick/hud/screen_objects.dm b/modular_citadel/code/_onclick/hud/screen_objects.dm
new file mode 100644
index 0000000000..5a193335f3
--- /dev/null
+++ b/modular_citadel/code/_onclick/hud/screen_objects.dm
@@ -0,0 +1,49 @@
+/obj/screen/mov_intent
+ icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
+
+/obj/screen/sprintbutton
+ name = "toggle sprint"
+ icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
+ icon_state = "act_sprint"
+ layer = ABOVE_HUD_LAYER - 0.1
+
+/obj/screen/sprintbutton/Click()
+ if(ishuman(usr))
+ var/mob/living/carbon/human/H = usr
+ H.togglesprint()
+
+/obj/screen/sprintbutton/proc/insert_witty_toggle_joke_here(mob/living/carbon/human/H)
+ if(!H)
+ return
+ if(H.sprinting)
+ icon_state = "act_sprint_on"
+ else
+ icon_state = "act_sprint"
+
+/obj/screen/restbutton
+ name = "rest"
+ icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
+ icon_state = "rest"
+
+/obj/screen/restbutton/Click()
+ if(isliving(usr))
+ var/mob/living/theuser = usr
+ theuser.lay_down()
+
+/obj/screen/combattoggle
+ name = "toggle combat mode"
+ icon = 'modular_citadel/icons/ui/screen_midnight.dmi'
+ icon_state = "combat_off"
+
+/obj/screen/combattoggle/Click()
+ if(iscarbon(usr))
+ var/mob/living/carbon/C = usr
+ C.toggle_combat_mode()
+
+/obj/screen/combattoggle/proc/rebasetointerbay(mob/living/carbon/C)
+ if(!C)
+ return
+ if(C.combatmode)
+ icon_state = "combat"
+ else
+ icon_state = "combat_off"
diff --git a/modular_citadel/code/_onclick/hud/stamina.dm b/modular_citadel/code/_onclick/hud/stamina.dm
new file mode 100644
index 0000000000..72cd260f8a
--- /dev/null
+++ b/modular_citadel/code/_onclick/hud/stamina.dm
@@ -0,0 +1,73 @@
+/datum/hud/var/obj/screen/staminas/staminas
+/datum/hud/var/obj/screen/staminabuffer/staminabuffer
+
+/obj/screen/staminas
+ icon = 'modular_citadel/icons/ui/screen_gen.dmi'
+ name = "stamina"
+ icon_state = "stamina0"
+ screen_loc = ui_stamina
+ mouse_opacity = 0
+
+/mob/living/carbon/human/proc/staminahudamount()
+ if(stat == DEAD || recoveringstam)
+ return "staminacrit"
+ else
+ switch(hal_screwyhud)
+ if(1 to 2)
+ return "staminacrit"
+ if(5)
+ return "stamina0"
+ else
+ switch(100 - staminaloss)
+ if(100 to INFINITY)
+ return "stamina0"
+ if(80 to 100)
+ return "stamina1"
+ if(60 to 80)
+ return "stamina2"
+ if(40 to 60)
+ return "stamina3"
+ if(20 to 40)
+ return "stamina4"
+ if(0 to 20)
+ return "stamina5"
+ else
+ return "stamina6"
+
+//stam buffer
+/obj/screen/staminabuffer
+ icon = 'modular_citadel/icons/ui/screen_gen.dmi'
+ name = "stamina buffer"
+ icon_state = "stambuffer0"
+ screen_loc = ui_stamina
+ layer = ABOVE_HUD_LAYER + 0.1
+ mouse_opacity = 0
+
+/mob/living/carbon/human/proc/staminabufferhudamount()
+ if(stat == DEAD || recoveringstam)
+ return "stambuffer7"
+ else
+ switch(hal_screwyhud)
+ if(1 to 2)
+ return "stambuffer7"
+ if(5)
+ return "stambuffer0"
+ else
+ var/percentmult = 100/stambuffer
+ switch(stambuffer*percentmult - bufferedstam*percentmult)
+ if(95 to INFINITY)
+ return "stambuffer0"
+ if(90 to 95)
+ return "stambuffer1"
+ if(80 to 90)
+ return "stambuffer2"
+ if(60 to 80)
+ return "stambuffer3"
+ if(40 to 60)
+ return "stambuffer4"
+ if(20 to 40)
+ return "stambuffer5"
+ if(5 to 20)
+ return "stambuffer6"
+ else
+ return "stambuffer7"
diff --git a/modular_citadel/code/_onclick/item_attack.dm b/modular_citadel/code/_onclick/item_attack.dm
new file mode 100644
index 0000000000..b86ddc51be
--- /dev/null
+++ b/modular_citadel/code/_onclick/item_attack.dm
@@ -0,0 +1,25 @@
+/obj/item/proc/rightclick_melee_attack_chain(mob/user, atom/target, params)
+ if(!pre_altattackby(target, user, params)) //Hey, does this item have special behavior that should override all normal right-click functionality?
+ if(!target.altattackby(src, user, params)) //Does the target do anything special when we right-click on it?
+ melee_attack_chain(user, target, params) //Ugh. Lame! I'm filing a legal complaint about the discrimination against the right mouse button!
+ else
+ altafterattack(target, user, TRUE, params)
+ return
+
+/obj/item/proc/pre_altattackby(atom/A, mob/living/user, params)
+ return FALSE //return something other than false if you wanna override attacking completely
+
+/atom/proc/altattackby(obj/item/W, mob/user, params)
+ return FALSE //return something other than false if you wanna add special right-click behavior to objects.
+
+/obj/item/proc/rightclick_attack_self(mob/user)
+ return FALSE
+
+/obj/item/proc/altafterattack(atom/target, mob/user, proximity_flag, click_parameters)
+ return FALSE
+
+/obj/item/proc/getweight()
+ if(total_mass)
+ return total_mass
+ else
+ return w_class*1.25
diff --git a/modular_citadel/code/_onclick/other_mobs.dm b/modular_citadel/code/_onclick/other_mobs.dm
new file mode 100644
index 0000000000..51a5c6c5c3
--- /dev/null
+++ b/modular_citadel/code/_onclick/other_mobs.dm
@@ -0,0 +1,29 @@
+/mob/living/carbon/human/AltUnarmedAttack(atom/A, proximity)
+ if(!has_active_hand())
+ to_chat(src, "You look at the state of the universe and sigh.") //lets face it, people rarely ever see this message in its intended condition.
+ return TRUE
+
+ if(!A.alt_attack_hand(src))
+ A.attack_hand(src)
+ return TRUE
+ return TRUE
+
+/mob/living/carbon/human/AltRangedAttack(atom/A, params)
+ if(!has_active_hand())
+ to_chat(src, "You ponder your life choices and sigh.")
+ return TRUE
+
+ if(!incapacitated())
+ switch(a_intent)
+ if(INTENT_HELP)
+ visible_message("[src] waves to [A].", "You wave to [A].")
+ if(INTENT_DISARM)
+ visible_message("[src] shoos away [A].", "You shoo away [A].")
+ if(INTENT_GRAB)
+ visible_message("[src] beckons [A] to come.", "You beckon [A] to come.") //This sounds lewder than it actually is. Fuck.
+ if(INTENT_HARM)
+ visible_message("[src] shakes [p_their()] fist at [A].", "You shake your fist at [A].")
+ return TRUE
+
+/atom/proc/alt_attack_hand(mob/user)
+ return FALSE
diff --git a/modular_citadel/code/datums/status_effects/debuffs.dm b/modular_citadel/code/datums/status_effects/debuffs.dm
new file mode 100644
index 0000000000..37669fe94c
--- /dev/null
+++ b/modular_citadel/code/datums/status_effects/debuffs.dm
@@ -0,0 +1,13 @@
+/datum/status_effect/incapacitating/knockdown/on_creation(mob/living/new_owner, set_duration, updating_canmove)
+ if(iscarbon(new_owner) && isnum(set_duration))
+ new_owner.resting = TRUE
+ new_owner.adjustStaminaLoss(set_duration*0.25)
+ if(set_duration > 80)
+ set_duration = set_duration*0.15
+ . = ..()
+ return
+ else if(updating_canmove)
+ new_owner.update_canmove()
+ qdel(src)
+ else
+ . = ..()
diff --git a/modular_citadel/code/game/machinery/firealarm.dm b/modular_citadel/code/game/machinery/firealarm.dm
new file mode 100644
index 0000000000..f4da844706
--- /dev/null
+++ b/modular_citadel/code/game/machinery/firealarm.dm
@@ -0,0 +1,10 @@
+/obj/machinery/firealarm/alt_attack_hand(mob/user)
+ if(is_interactable() && !user.stat)
+ var/area/A = get_area(src)
+ if(istype(A))
+ if(A.fire)
+ reset()
+ else
+ alarm()
+ return TRUE
+ return FALSE
diff --git a/modular_citadel/code/game/objects/items.dm b/modular_citadel/code/game/objects/items.dm
new file mode 100644
index 0000000000..6f44d4b005
--- /dev/null
+++ b/modular_citadel/code/game/objects/items.dm
@@ -0,0 +1,2 @@
+/obj/item
+ var/total_mass
diff --git a/modular_citadel/code/game/objects/structures/beds_chairs/chair.dm b/modular_citadel/code/game/objects/structures/beds_chairs/chair.dm
new file mode 100644
index 0000000000..2023c6f326
--- /dev/null
+++ b/modular_citadel/code/game/objects/structures/beds_chairs/chair.dm
@@ -0,0 +1,21 @@
+/obj/structure/chair/alt_attack_hand(mob/living/user)
+ if(Adjacent(user) && istype(user))
+ if(!item_chair || !user.can_hold_items() || !has_buckled_mobs() || buckled_mobs.len > 1 || dir != user.dir || flags_1 & NODECONSTRUCT_1)
+ return TRUE
+ if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
+ to_chat(user, "You can't do that right now!")
+ return TRUE
+ if(user.staminaloss >= STAMINA_SOFTCRIT)
+ to_chat(user, "You're too exhausted for that.")
+ return TRUE
+ var/mob/living/poordude = buckled_mobs[1]
+ if(!istype(poordude))
+ return TRUE
+ user.visible_message("[user] pulls [src] out from under [poordude].", "You pull [src] out from under [poordude].")
+ var/C = new item_chair(loc)
+ user.put_in_hands(C)
+ poordude.Knockdown(20)//rip in peace
+ user.adjustStaminaLoss(5)
+ unbuckle_all_mobs(TRUE)
+ qdel(src)
+ return TRUE
diff --git a/modular_citadel/code/modules/client/client_procs.dm b/modular_citadel/code/modules/client/client_procs.dm
index 5bb53ee0f2..511aac0738 100644
--- a/modular_citadel/code/modules/client/client_procs.dm
+++ b/modular_citadel/code/modules/client/client_procs.dm
@@ -12,3 +12,11 @@
/client/proc/is_mentor() // admins are mentors too.
if(mentor_datum || check_rights_for(src, R_ADMIN,0))
return TRUE
+
+/client/verb/togglerightclickstuff()
+ set category = "OOC"
+ set name = "Toggle Rightclick"
+ set desc = "Did the context menu get stuck on or off? Press this button."
+
+ show_popup_menus = !show_popup_menus
+ to_chat(src, "The right-click context menu is now [show_popup_menus ? "enabled" : "disabled"].")
diff --git a/modular_citadel/code/modules/client/preferences.dm b/modular_citadel/code/modules/client/preferences.dm
index 1e12ae5c86..4d1fc880d7 100644
--- a/modular_citadel/code/modules/client/preferences.dm
+++ b/modular_citadel/code/modules/client/preferences.dm
@@ -11,6 +11,7 @@
var/damagescreenshake = 2
var/arousable = TRUE
var/widescreenpref = TRUE
+ var/autostand = TRUE
/datum/preferences/New(client/C)
..()
diff --git a/modular_citadel/code/modules/keybindings/bindings_carbon.dm b/modular_citadel/code/modules/keybindings/bindings_carbon.dm
new file mode 100644
index 0000000000..d49cbcf452
--- /dev/null
+++ b/modular_citadel/code/modules/keybindings/bindings_carbon.dm
@@ -0,0 +1,6 @@
+/mob/living/carbon/key_down(_key, client/user)
+ switch(_key)
+ if("C")
+ toggle_combat_mode()
+ return
+ return ..()
diff --git a/modular_citadel/code/modules/keybindings/bindings_human.dm b/modular_citadel/code/modules/keybindings/bindings_human.dm
new file mode 100644
index 0000000000..963e71d709
--- /dev/null
+++ b/modular_citadel/code/modules/keybindings/bindings_human.dm
@@ -0,0 +1,13 @@
+/mob/living/carbon/human/key_down(_key, client/user)
+ switch(_key)
+ if("Shift")
+ togglesprint()
+ return
+ return ..()
+
+/mob/living/carbon/human/key_up(_key, client/user)
+ switch(_key)
+ if("Shift")
+ togglesprint()
+ return
+ return ..()
diff --git a/modular_citadel/code/modules/mob/living/carbon/carbon.dm b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
new file mode 100644
index 0000000000..87a496b48b
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/carbon/carbon.dm
@@ -0,0 +1,17 @@
+/mob/living/carbon
+ var/combatmode = FALSE //literally lifeweb
+
+/mob/living/carbon/proc/toggle_combat_mode()
+ if(recoveringstam)
+ return TRUE
+ combatmode = !combatmode
+ if(combatmode)
+ playsound_local(src, 'modular_citadel/sound/misc/ui_toggle.ogg', 50, FALSE, pressure_affected = FALSE) //Sound from interbay!
+ else
+ playsound_local(src, 'modular_citadel/sound/misc/ui_toggleoff.ogg', 50, FALSE, pressure_affected = FALSE) //Slightly modified version of the above!
+ if(client)
+ client.show_popup_menus = !combatmode // So we can right-click for alternate actions and all that other good shit. Also moves examine to shift+rightclick to make it possible to attack while sprinting
+ if(hud_used && hud_used.static_inventory)
+ for(var/obj/screen/combattoggle/selector in hud_used.static_inventory)
+ selector.rebasetointerbay(src)
+ return TRUE
diff --git a/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm b/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm
new file mode 100644
index 0000000000..208d4769bb
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/carbon/damage_procs.dm
@@ -0,0 +1,10 @@
+/mob/living/carbon/adjustStaminaLossBuffered(amount, updating_stamina = 1)
+ if(status_flags & GODMODE)
+ return 0
+ var/directstamloss = (bufferedstam + amount) - stambuffer
+ if(directstamloss > 0)
+ adjustStaminaLoss(directstamloss)
+ bufferedstam = CLAMP(bufferedstam + amount, 0, stambuffer)
+ stambufferregentime = world.time + 2 SECONDS
+ if(updating_stamina)
+ update_health_hud()
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human.dm b/modular_citadel/code/modules/mob/living/carbon/human/human.dm
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_defense.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_defense.dm
index 1952b3a3b8..c1fc6623de 100644
--- a/modular_citadel/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/human/human_defense.dm
@@ -2,4 +2,13 @@
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && isliving(pulling))
vore_attack(user, pulling)
else
- ..()
\ No newline at end of file
+ ..()
+
+/mob/living/carbon/human/alt_attack_hand(mob/user)
+ if(..())
+ return
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ if(!dna.species.alt_spec_attack_hand(H, src))
+ dna.species.spec_attack_hand(H, src)
+ return TRUE
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm
new file mode 100644
index 0000000000..8463abe66d
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/carbon/human/human_movement.dm
@@ -0,0 +1,31 @@
+/mob/living/carbon/human
+ var/sprinting = FALSE
+
+/mob/living/carbon/human/Move(NewLoc, direct)
+ var/oldpseudoheight = pseudo_z_axis
+ . = ..()
+ if(. && sprinting && !resting && m_intent == MOVE_INTENT_RUN)
+ adjustStaminaLossBuffered(0.3)
+ if((oldpseudoheight - pseudo_z_axis) >= 8)
+ to_chat(src, "You trip off of the elevated surface!")
+ for(var/obj/item/I in held_items)
+ accident(I)
+ Knockdown(80)
+
+/mob/living/carbon/human/movement_delay()
+ . = 0
+ if(!resting && m_intent == MOVE_INTENT_RUN && !sprinting)
+ . += 1
+ . += ..()
+
+/mob/living/carbon/human/proc/togglesprint() // If you call this proc outside of hotkeys or clicking the HUD button, I'll be disappointed in you.
+ sprinting = !sprinting
+ if(!resting && m_intent == MOVE_INTENT_RUN && canmove)
+ if(sprinting)
+ playsound_local(src, 'modular_citadel/sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
+ else
+ playsound_local(src, 'modular_citadel/sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
+ if(hud_used && hud_used.static_inventory)
+ for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
+ selector.insert_witty_toggle_joke_here(src)
+ return TRUE
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/life.dm b/modular_citadel/code/modules/mob/living/carbon/human/life.dm
index 1f7c39a5ff..a3730a312f 100644
--- a/modular_citadel/code/modules/mob/living/carbon/human/life.dm
+++ b/modular_citadel/code/modules/mob/living/carbon/human/life.dm
@@ -3,10 +3,19 @@
if(stat != DEAD)
handle_arousal()
. = ..()
-
+
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
if(ismob(loc))
return ONE_ATMOSPHERE
if(istype(loc, /obj/item/device/dogborg/sleeper))
return ONE_ATMOSPHERE
- . = ..()
\ No newline at end of file
+ . = ..()
+
+/mob/living/carbon/human/update_health_hud(shown_health_amount)
+ . = ..()
+ if(!client || !hud_used)
+ return
+ if(hud_used.staminas)
+ hud_used.staminas.icon_state = staminahudamount()
+ if(hud_used.staminabuffer)
+ hud_used.staminabuffer.icon_state = staminabufferhudamount()
diff --git a/modular_citadel/code/modules/mob/living/carbon/human/species.dm b/modular_citadel/code/modules/mob/living/carbon/human/species.dm
new file mode 100644
index 0000000000..007194e9f1
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/carbon/human/species.dm
@@ -0,0 +1,57 @@
+/datum/species/proc/alt_spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style)
+ if(!istype(M))
+ return TRUE
+ CHECK_DNA_AND_SPECIES(M)
+ CHECK_DNA_AND_SPECIES(H)
+
+ if(!istype(M)) //sanity check for drones.
+ return TRUE
+ if(M.mind)
+ attacker_style = M.mind.martial_art
+ if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
+ add_logs(M, H, "attempted to touch")
+ H.visible_message("[M] attempted to touch [H]!")
+ return TRUE
+ switch(M.a_intent)
+ if("disarm")
+ altdisarm(M, H, attacker_style)
+ return TRUE
+ return FALSE
+
+/datum/species/proc/altdisarm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
+ if(user.staminaloss >= STAMINA_SOFTCRIT)
+ to_chat(user, "You're too exhausted.")
+ return FALSE
+ else if(target.check_block())
+ target.visible_message("[target] blocks [user]'s disarm attempt!")
+ return 0
+ if(attacker_style && attacker_style.disarm_act(user,target))
+ return 1
+ else
+ user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
+
+ user.adjustStaminaLossBuffered(4) //CITADEL CHANGE - makes disarmspam cause staminaloss
+
+ if(target.w_uniform)
+ target.w_uniform.add_fingerprint(user)
+ var/randomized_zone = ran_zone(user.zone_selected)
+ target.SendSignal(COMSIG_HUMAN_DISARM_HIT, user, user.zone_selected)
+ var/obj/item/bodypart/affecting = target.get_bodypart(randomized_zone)
+ var/randn = rand(1, 100)
+ if(user.resting)
+ randn += 20 //Makes it plausible, but unlikely, to push someone over while resting
+ if(!user.combatmode)
+ randn += 25 //Makes it impossible to push actually push someone outside of combat mode
+
+ if(randn <= 25)
+ playsound(target, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ target.visible_message("[user] has pushed [target]!",
+ "[user] has pushed [target]!", null, COMBAT_MESSAGE_RANGE)
+ target.apply_effect(40, KNOCKDOWN, target.run_armor_check(affecting, "melee", "Your armor prevents your fall!", "Your armor softens your fall!"))
+ target.forcesay(GLOB.hit_appends)
+ add_logs(user, target, "disarmed", " pushing them to the ground")
+ return
+
+ playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ target.visible_message("[user] attempted to push [target]!", \
+ "[user] attemped to push [target]!", null, COMBAT_MESSAGE_RANGE)
diff --git a/modular_citadel/code/modules/mob/living/damage_procs.dm b/modular_citadel/code/modules/mob/living/damage_procs.dm
new file mode 100644
index 0000000000..8323386eff
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/damage_procs.dm
@@ -0,0 +1,2 @@
+/mob/living/proc/adjustStaminaLossBuffered(amount, updating_stamina = TRUE, forced = FALSE)
+ return
diff --git a/modular_citadel/code/modules/mob/living/living.dm b/modular_citadel/code/modules/mob/living/living.dm
new file mode 100644
index 0000000000..16376a4a58
--- /dev/null
+++ b/modular_citadel/code/modules/mob/living/living.dm
@@ -0,0 +1,122 @@
+/mob/living
+ var/recoveringstam = FALSE
+ var/bufferedstam = 0
+ var/stambuffer = 20
+ var/stambufferregentime
+ var/aimingdownsights = FALSE
+ var/attemptingstandup = FALSE
+ var/intentionalresting = FALSE
+
+/mob/living/movement_delay(ignorewalk = 0)
+ . = ..()
+ if(resting)
+ . += 6
+
+/atom
+ var/pseudo_z_axis
+
+/atom/proc/get_fake_z()
+ return pseudo_z_axis
+
+/obj/structure/table
+ pseudo_z_axis = 8
+
+/turf/open/get_fake_z()
+ var/objschecked
+ for(var/obj/structure/structurestocheck in contents)
+ objschecked++
+ if(structurestocheck.pseudo_z_axis)
+ return structurestocheck.pseudo_z_axis
+ if(objschecked >= 25)
+ break
+ return pseudo_z_axis
+
+/mob/living/Move(atom/newloc, direct)
+ . = ..()
+ if(.)
+ if(makesfootstepsounds)
+ CitFootstep(newloc)
+ pseudo_z_axis = newloc.get_fake_z()
+ pixel_z = pseudo_z_axis
+ if(aimingdownsights)
+ aimingdownsights = FALSE
+ to_chat(src, "You are no longer aiming down your weapon's sights.")
+
+/mob/living/proc/lay_down()
+ set name = "Rest"
+ set category = "IC"
+
+ if(client && client.prefs && client.prefs.autostand)
+ intentionalresting = !intentionalresting
+ to_chat(src, "You are now attempting to [intentionalresting ? "[!resting ? "lay down and ": ""]stay down" : "[resting ? "get up and ": ""]stay up"].")
+ if(intentionalresting && !resting)
+ resting = TRUE
+ update_canmove()
+ else
+ resist_a_rest()
+ else
+ if(!resting)
+ resting = TRUE
+ to_chat(src, "You are now laying down.")
+ update_canmove()
+ else
+ resist_a_rest()
+
+/mob/living/proc/resist_a_rest(automatic = FALSE, ignoretimer = FALSE) //Lets mobs resist out of resting. Major QOL change with combat reworks.
+ if(!resting || stat || attemptingstandup)
+ return FALSE
+ if(ignoretimer)
+ resting = FALSE
+ update_canmove()
+ return TRUE
+ else
+ var/totaldelay = 3 //A little bit less than half of a second as a baseline for getting up from a rest
+ if(staminaloss >= STAMINA_SOFTCRIT)
+ to_chat(src, "You're too exhausted to get up!")
+ return FALSE
+ attemptingstandup = TRUE
+ var/health_deficiency = max((maxHealth - (health - staminaloss))*0.5, 0)
+ if(!has_gravity())
+ health_deficiency = health_deficiency*0.2
+ totaldelay += health_deficiency
+ var/standupwarning = "[src] and everyone around them should probably yell at the dev team"
+ switch(health_deficiency)
+ if(-INFINITY to 10)
+ standupwarning = "[src] stands right up!"
+ if(10 to 35)
+ standupwarning = "[src] tries to stand up."
+ if(35 to 60)
+ standupwarning = "[src] slowly pushes [p_them()]self upright."
+ if(60 to 80)
+ standupwarning = "[src] weakly attempts to stand up."
+ if(80 to INFINITY)
+ standupwarning = "[src] struggles to stand up."
+ var/usernotice = automatic ? "You are now getting up. (Auto)" : "You are now getting up."
+ visible_message("[standupwarning]", usernotice, vision_distance = 5)
+ if(do_after(src, totaldelay, target = src))
+ resting = FALSE
+ attemptingstandup = FALSE
+ update_canmove()
+ return TRUE
+ else
+ visible_message("[src] falls right back down.", "You fall right back down.")
+ attemptingstandup = FALSE
+ if(has_gravity())
+ playsound(src, "bodyfall", 20, 1)
+ return FALSE
+
+/mob/living/carbon/proc/update_stamina()
+ var/total_health = (min(health*2,100) - staminaloss)
+ if(staminaloss)
+ if(!recoveringstam && total_health <= STAMINA_CRIT_TRADITIONAL && !stat)
+ to_chat(src, "You're too exhausted to keep going...")
+ resting = TRUE
+ if(combatmode)
+ toggle_combat_mode()
+ recoveringstam = TRUE
+ update_canmove()
+ if(recoveringstam && total_health >= STAMINA_SOFTCRIT_TRADITIONAL)
+ to_chat(src, "You don't feel nearly as exhausted anymore.")
+ recoveringstam = FALSE
+ update_canmove()
+ update_health_hud()
diff --git a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
index dceaf9d1c5..b15dac4a15 100644
--- a/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
+++ b/modular_citadel/code/modules/mob/living/silicon/robot/dogborg_equipment.dm
@@ -379,7 +379,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
blocked = 1
if(!blocked)
L.visible_message("[src] pounces on [L]!", "[src] pounces on you!")
- L.Knockdown(45)
+ L.Knockdown(iscarbon(L) ? 450 : 45) // Temporary. If someone could rework how dogborg pounces work to accomodate for combat changes, that'd be nice.
playsound(src, 'sound/weapons/Egloves.ogg', 50, 1)
sleep(2)//Runtime prevention (infinite bump() calls on hulks)
step_towards(src,L)
diff --git a/modular_citadel/code/modules/mob/mob.dm b/modular_citadel/code/modules/mob/mob.dm
new file mode 100644
index 0000000000..bb48e5103f
--- /dev/null
+++ b/modular_citadel/code/modules/mob/mob.dm
@@ -0,0 +1,2 @@
+/mob/proc/use_that_empty_hand() //currently unused proc so i can implement 2-handing any item a lot easier in the future.
+ return
diff --git a/modular_citadel/code/modules/projectiles/gun.dm b/modular_citadel/code/modules/projectiles/gun.dm
new file mode 100644
index 0000000000..27411c7e0a
--- /dev/null
+++ b/modular_citadel/code/modules/projectiles/gun.dm
@@ -0,0 +1,36 @@
+/obj/item/gun/pre_altattackby(atom/A, mob/living/user, params)
+ altafterattack(A, user, TRUE, params)
+ return TRUE
+
+/obj/item/gun/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters)
+ if(istype(user))
+ if(!user.aimingdownsights)
+ user.visible_message("[user] brings [src]'s sights up to [user.p_their()] eyes, aiming directly at [target].", "You bring [src]'s sights up to your eyes, aiming directly at [target].")
+ user.adjustStaminaLossBuffered(1)
+ else
+ user.visible_message("[user] lowers [src].", "You lower [src].")
+ user.aimingdownsights = !user.aimingdownsights
+ return TRUE
+
+/obj/item/gun/dropped(mob/living/user)
+ . = ..()
+ if(istype(user))
+ user.aimingdownsights = FALSE
+
+/obj/item/gun/proc/getstamcost(mob/living/carbon/user)
+ if(user && user.has_gravity())
+ return recoil
+ else
+ return recoil*5
+
+/obj/item/gun/energy/kinetic_accelerator/getstamcost(mob/living/carbon/user)
+ if(user && !lavaland_equipment_pressure_check(get_turf(user)))
+ return 0
+ else
+ return ..()
+
+/obj/item/gun/proc/getinaccuracy(mob/living/user)
+ if(!iscarbon(user) || user.aimingdownsights)
+ return 0
+ else
+ return weapon_weight * 25
diff --git a/modular_citadel/code/modules/projectiles/projectile/energy.dm b/modular_citadel/code/modules/projectiles/projectile/energy.dm
new file mode 100644
index 0000000000..8c5725a8a3
--- /dev/null
+++ b/modular_citadel/code/modules/projectiles/projectile/energy.dm
@@ -0,0 +1,2 @@
+/obj/item/projectile/energy/electrode
+ stamina = 30
diff --git a/modular_citadel/code/modules/recycling/disposal/bin.dm b/modular_citadel/code/modules/recycling/disposal/bin.dm
new file mode 100644
index 0000000000..226c56d226
--- /dev/null
+++ b/modular_citadel/code/modules/recycling/disposal/bin.dm
@@ -0,0 +1,6 @@
+/obj/machinery/disposal/bin/alt_attack_hand(mob/user)
+ if(is_interactable() && !user.stat)
+ flush = !flush
+ update_icon()
+ return TRUE
+ return FALSE
diff --git a/modular_citadel/icons/ui/screen_clockwork.dmi b/modular_citadel/icons/ui/screen_clockwork.dmi
new file mode 100644
index 0000000000..499d2663b6
Binary files /dev/null and b/modular_citadel/icons/ui/screen_clockwork.dmi differ
diff --git a/modular_citadel/icons/ui/screen_gen.dmi b/modular_citadel/icons/ui/screen_gen.dmi
new file mode 100644
index 0000000000..d006185a3c
Binary files /dev/null and b/modular_citadel/icons/ui/screen_gen.dmi differ
diff --git a/modular_citadel/icons/ui/screen_midnight.dmi b/modular_citadel/icons/ui/screen_midnight.dmi
new file mode 100644
index 0000000000..38d96b86d1
Binary files /dev/null and b/modular_citadel/icons/ui/screen_midnight.dmi differ
diff --git a/modular_citadel/icons/ui/screen_operative.dmi b/modular_citadel/icons/ui/screen_operative.dmi
new file mode 100644
index 0000000000..7296db1f9c
Binary files /dev/null and b/modular_citadel/icons/ui/screen_operative.dmi differ
diff --git a/modular_citadel/icons/ui/screen_plasmafire.dmi b/modular_citadel/icons/ui/screen_plasmafire.dmi
new file mode 100644
index 0000000000..2829b22d59
Binary files /dev/null and b/modular_citadel/icons/ui/screen_plasmafire.dmi differ
diff --git a/modular_citadel/icons/ui/screen_slimecore.dmi b/modular_citadel/icons/ui/screen_slimecore.dmi
new file mode 100644
index 0000000000..0f24033da6
Binary files /dev/null and b/modular_citadel/icons/ui/screen_slimecore.dmi differ
diff --git a/modular_citadel/sound/misc/sprintactivate.ogg b/modular_citadel/sound/misc/sprintactivate.ogg
new file mode 100644
index 0000000000..f499765dc2
Binary files /dev/null and b/modular_citadel/sound/misc/sprintactivate.ogg differ
diff --git a/modular_citadel/sound/misc/sprintdeactivate.ogg b/modular_citadel/sound/misc/sprintdeactivate.ogg
new file mode 100644
index 0000000000..c22587ace0
Binary files /dev/null and b/modular_citadel/sound/misc/sprintdeactivate.ogg differ
diff --git a/modular_citadel/sound/misc/ui_toggle.ogg b/modular_citadel/sound/misc/ui_toggle.ogg
new file mode 100644
index 0000000000..7336b9cf0e
Binary files /dev/null and b/modular_citadel/sound/misc/ui_toggle.ogg differ
diff --git a/modular_citadel/sound/misc/ui_toggleoff.ogg b/modular_citadel/sound/misc/ui_toggleoff.ogg
new file mode 100644
index 0000000000..98df1726e9
Binary files /dev/null and b/modular_citadel/sound/misc/ui_toggleoff.ogg differ
diff --git a/tgstation.dme b/tgstation.dme
index ec4b134561..b544735fbe 100755
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -2582,15 +2582,22 @@
#include "modular_citadel\hopefully_temporary_patches.dm"
#include "modular_citadel\simplemob_vore_values.dm"
#include "modular_citadel\code\init.dm"
+#include "modular_citadel\code\__HELPERS\list2list.dm"
#include "modular_citadel\code\__HELPERS\lists.dm"
#include "modular_citadel\code\__HELPERS\mobs.dm"
#include "modular_citadel\code\_globalvars\lists\mobs.dm"
+#include "modular_citadel\code\_onclick\click.dm"
+#include "modular_citadel\code\_onclick\item_attack.dm"
+#include "modular_citadel\code\_onclick\other_mobs.dm"
+#include "modular_citadel\code\_onclick\hud\screen_objects.dm"
+#include "modular_citadel\code\_onclick\hud\stamina.dm"
#include "modular_citadel\code\controllers\configuration\entries\general.dm"
#include "modular_citadel\code\controllers\subsystem\job.dm"
#include "modular_citadel\code\controllers\subsystem\research.dm"
#include "modular_citadel\code\controllers\subsystem\shuttle.dm"
#include "modular_citadel\code\datums\uplink_items_cit.dm"
#include "modular_citadel\code\datums\mutations\hulk.dm"
+#include "modular_citadel\code\datums\status_effects\debuffs.dm"
#include "modular_citadel\code\datums\traits\neutral.dm"
#include "modular_citadel\code\datums\wires\airlock.dm"
#include "modular_citadel\code\datums\wires\autoylathe.dm"
@@ -2599,11 +2606,13 @@
#include "modular_citadel\code\game\gamemodes\revolution\revolution.dm"
#include "modular_citadel\code\game\machinery\cryopod.dm"
#include "modular_citadel\code\game\machinery\displaycases.dm"
+#include "modular_citadel\code\game\machinery\firealarm.dm"
#include "modular_citadel\code\game\machinery\Sleeper.dm"
#include "modular_citadel\code\game\machinery\toylathe.dm"
#include "modular_citadel\code\game\machinery\vending.dm"
#include "modular_citadel\code\game\machinery\computer\card.dm"
#include "modular_citadel\code\game\objects\ids.dm"
+#include "modular_citadel\code\game\objects\items.dm"
#include "modular_citadel\code\game\objects\tools.dm"
#include "modular_citadel\code\game\objects\effects\spawner\spawners.dm"
#include "modular_citadel\code\game\objects\effects\temporary_visuals\projectiles\impact.dm"
@@ -2620,6 +2629,7 @@
#include "modular_citadel\code\game\objects\items\devices\radio\headset.dm"
#include "modular_citadel\code\game\objects\items\devices\radio\shockcollar.dm"
#include "modular_citadel\code\game\objects\items\melee\eutactic_blades.dm"
+#include "modular_citadel\code\game\objects\structures\beds_chairs\chair.dm"
#include "modular_citadel\code\game\objects\structures\beds_chairs\sofa.dm"
#include "modular_citadel\code\game\objects\structures\crates_lockers\closets\fitness.dm"
#include "modular_citadel\code\game\objects\structures\crates_lockers\closets\wardrobe.dm"
@@ -2689,6 +2699,8 @@
#include "modular_citadel\code\modules\jobs\job_types\cargo_service.dm"
#include "modular_citadel\code\modules\jobs\job_types\engineering.dm"
#include "modular_citadel\code\modules\jobs\job_types\security.dm"
+#include "modular_citadel\code\modules\keybindings\bindings_carbon.dm"
+#include "modular_citadel\code\modules\keybindings\bindings_human.dm"
#include "modular_citadel\code\modules\mentor\follow.dm"
#include "modular_citadel\code\modules\mentor\mentor.dm"
#include "modular_citadel\code\modules\mentor\mentor_memo.dm"
@@ -2698,8 +2710,16 @@
#include "modular_citadel\code\modules\mentor\mentorsay.dm"
#include "modular_citadel\code\modules\mining\mine_items.dm"
#include "modular_citadel\code\modules\mob\cit_emotes.dm"
+#include "modular_citadel\code\modules\mob\mob.dm"
+#include "modular_citadel\code\modules\mob\living\damage_procs.dm"
+#include "modular_citadel\code\modules\mob\living\living.dm"
+#include "modular_citadel\code\modules\mob\living\carbon\carbon.dm"
+#include "modular_citadel\code\modules\mob\living\carbon\damage_procs.dm"
+#include "modular_citadel\code\modules\mob\living\carbon\human\human.dm"
#include "modular_citadel\code\modules\mob\living\carbon\human\human_defense.dm"
+#include "modular_citadel\code\modules\mob\living\carbon\human\human_movement.dm"
#include "modular_citadel\code\modules\mob\living\carbon\human\life.dm"
+#include "modular_citadel\code\modules\mob\living\carbon\human\species.dm"
#include "modular_citadel\code\modules\mob\living\carbon\human\species_types\jellypeople.dm"
#include "modular_citadel\code\modules\mob\living\silicon\robot\dogborg_equipment.dm"
#include "modular_citadel\code\modules\mob\living\silicon\robot\robot.dm"
@@ -2707,6 +2727,7 @@
#include "modular_citadel\code\modules\mob\living\simple_animal\banana_spider.dm"
#include "modular_citadel\code\modules\mob\living\simple_animal\kiwi.dm"
#include "modular_citadel\code\modules\power\lighting.dm"
+#include "modular_citadel\code\modules\projectiles\gun.dm"
#include "modular_citadel\code\modules\projectiles\guns\pumpenergy.dm"
#include "modular_citadel\code\modules\projectiles\guns\toys.dm"
#include "modular_citadel\code\modules\projectiles\guns\ballistic\flechette.dm"
@@ -2717,11 +2738,13 @@
#include "modular_citadel\code\modules\projectiles\guns\ballistic\spinfusor.dm"
#include "modular_citadel\code\modules\projectiles\guns\energy\energy_gun.dm"
#include "modular_citadel\code\modules\projectiles\guns\energy\laser.dm"
+#include "modular_citadel\code\modules\projectiles\projectile\energy.dm"
#include "modular_citadel\code\modules\reagents\chemistry\reagents\other_reagents.dm"
#include "modular_citadel\code\modules\reagents\reagent container\cit_kegs.dm"
#include "modular_citadel\code\modules\reagents\reagent container\hypospraymkii.dm"
#include "modular_citadel\code\modules\reagents\reagent container\hypovial.dm"
#include "modular_citadel\code\modules\reagents\reagents\cit_reagents.dm"
+#include "modular_citadel\code\modules\recycling\disposal\bin.dm"
#include "modular_citadel\code\modules\research\designs\autoylathe_designs.dm"
#include "modular_citadel\code\modules\research\designs\machine_designs.dm"
#include "modular_citadel\code\modules\research\techweb\_techweb.dm"