Files
GS13NG/modular_citadel/cit_turfs.dm
T
deathride58andkevinz000 1c0b13ecfb [READY FOR MERGE] The Giant Combat Reworks - Part 1: Goodbye stuns, hello staminacrit (#5463)
* part 1 - resist out of resting, move and interact with the world while resting, and stamina regen nerf

* makes beepsky check for stuns instead of knockdowns, adds message for getting up, makes gravity reduce standup time, and more

* sprinting, staminacrit, balance changes, and more

* adds stamina modifier to clickdelay, makes items deal stamina damage to the user when attacking, buffs resting stamina regen

* combat mode, ability to toggle right-click context menu on/off, basic combat mode QOL, lays groundwork for 2-handing any item

combat mode toggle sound is from Interbay.

* commits dme changes

* unarmed combat stamina, ability to right click in combat mode, balance changes

* tosses in the HUD icons for later-ish

* rolls back admin.txt

* lotsa UI stuff

* stamina checks, some balance stuff

* adds support for best ui, adds right click to flush disposals, removes aggressive grab pinning in favor of neckgrab chokeholding

* quick dogborg patch while i figure out what do do with them

* oops - fixes prefbreaking for screenshake

* trying to sprint from an elevated surface onto lower ground will now knock you down

* right click to pull fire alarm, lets you bully people by pulling chairs out form under them, makes attacking objects cost stamina

* makes accidents during slipping less likely to occur while combat mode is active, makes tripping off elevated surfaces cause accidents

* makes pumping shotguns cost a tiiiny bit of stamina

* makes eyestabbing and batoning cost stamina

* makes failing stamina checks error out properly, adds stamina check to shotgun pumping

* adds stamina check for chair pulling

* readds aggressive grab pinning

* fixes bug with being buckled preventing interaction

* adds recoveringstam check to incapacitated

* reduces stamina cost for attacking

* oh this too

* fixes bug where you can get stuck in recoveringstam if your stamina suddenly becomes 0 while you're in staminacrit

* makes monkey transformation inherit staminaloss

* adds the ability to wave or shake your fist at someone via right click

* grammar and span closing

* 99 annoying little bugs on the wall, 99 annoying little bugs. take one down, pass it around, 864 gamebreaking bugs on the wall

* more distant right-click emotes.

* buffs standing stamina regen a tiiiiiiny bit

* adds aiming down sights for guns, makes firing guns cause trace amounts of staminaloss

* crusher powercreep - gives crushers the ability to heal staminaloss

* item throwing buff

* adds 1:1 HUD layout

* hopefully fixes issue with recoveringstamcrit not updating

* giant hipfire nerf

* halves the effect of staminaloss on movement speed

* makes stamina recover faster in staminacrit, makes it easier to get disarmed out of combat mode

* get_weight(), movedelay health_deficiency tweaking, combat and resting checks for item attacking

* makes staminacrit automatically disable combat mode, it's now impossible to enter combat mode while in stamcrit

* adds stamina buffer, halves the time needed to stand up after resting, increases stam penalty for firing weapons, and more

* tweaks stamina buffer drain rate a little

* makes buffered staminaloss redirect stamina to the actual stamloss proc when empty, makes stamina buffer stat() more precise

* removes stamina modifier for clickdelays, makes stunbatons deal extra staminaloss

* makes electrodes deal a lil extra staminaloss

* drones cannot resist a rest, so now only carbons are forced to rest

* restricts aiming down sights to carbon mobs, adds stamina display to stat()

* makes gun accuracy and stamcosts more flexible, decreases base inaccuracy penalty, makes borgs immune to inaccuracy penalties

* nerfs inaccuracy penalties just a lil more, fixes blooddrunk miner eye depleting all your stamina

* getting used to tortoisegit

* readds temp dogborg buff

* stamina and stamina buffer HUD displays. Stamina sprite from hippiestation

* makes afterattack call properly again

* decreases stamina buffer regen time to 3 seconds

* Yknow what? decreases it to 2 seconds. That's 3 entire attacks worth of waiting

* makes stamina buffer influence movespeed a lil

* nerfs compiling errors

* tweaks the icons a little

* adds autostanding, adds delimiters to attempts to stand

* makes automatic standup attempts a little clearer

* rest button now toggles intent to rest, fixes perma rest

* oop - quick fixes

* Makes crushers ignore recoil stamina on lavaland, makes burstfiring weapons deal less staminaloss

* buffs highlander sword

* makes stamina have less of an impact on the health display

* fixes dogborgs shoving other borgs into infinite stuns

* You can no longer shoot over tables or shoot through windows while resting. Also buffs turrets
2018-03-11 13:32:44 -07:00

128 lines
5.6 KiB
Plaintext

//Yes, hi. This is the file that handles Citadel's turf modifications.
//But before we touch turfs, we'll take some time to define a couple of things for footstep sounds.
/mob/living
var/makesfootstepsounds
var/footstepcount
/mob/living/carbon/human
makesfootstepsounds = TRUE
/atom
var/footstepsoundoverride
//All of these sounds are from CEV Eris as of 11/25/2017, the time when the original PR adding footstep sounds was made.
GLOBAL_LIST_INIT(turf_footstep_sounds, list(
"floor" = list('modular_citadel/sound/footstep/floor1.ogg','modular_citadel/sound/footstep/floor2.ogg','modular_citadel/sound/footstep/floor3.ogg','modular_citadel/sound/footstep/floor4.ogg','modular_citadel/sound/footstep/floor5.ogg'),
"plating" = list('modular_citadel/sound/footstep/plating1.ogg','modular_citadel/sound/footstep/plating2.ogg','modular_citadel/sound/footstep/plating3.ogg','modular_citadel/sound/footstep/plating4.ogg','modular_citadel/sound/footstep/plating5.ogg'),
"wood" = list('modular_citadel/sound/footstep/wood1.ogg','modular_citadel/sound/footstep/wood2.ogg','modular_citadel/sound/footstep/wood3.ogg','modular_citadel/sound/footstep/wood4.ogg','modular_citadel/sound/footstep/wood5.ogg'),
"carpet" = list('modular_citadel/sound/footstep/carpet1.ogg','modular_citadel/sound/footstep/carpet2.ogg','modular_citadel/sound/footstep/carpet3.ogg','modular_citadel/sound/footstep/carpet4.ogg','modular_citadel/sound/footstep/carpet5.ogg'),
"hull" = list('modular_citadel/sound/footstep/hull1.ogg','modular_citadel/sound/footstep/hull2.ogg','modular_citadel/sound/footstep/hull3.ogg','modular_citadel/sound/footstep/hull4.ogg','modular_citadel/sound/footstep/hull5.ogg'),
"catwalk" = list('modular_citadel/sound/footstep/catwalk1.ogg','modular_citadel/sound/footstep/catwalk2.ogg','modular_citadel/sound/footstep/catwalk3.ogg','modular_citadel/sound/footstep/catwalk4.ogg','modular_citadel/sound/footstep/catwalk5.ogg'),
"asteroid" = list('modular_citadel/sound/footstep/asteroid1.ogg','modular_citadel/sound/footstep/asteroid2.ogg','modular_citadel/sound/footstep/asteroid3.ogg','modular_citadel/sound/footstep/asteroid4.ogg','modular_citadel/sound/footstep/asteroid5.ogg')
))
/turf/open
var/footstepsounds
/turf/open/floor
footstepsounds = "floor"
/turf/open/floor/plating
footstepsounds = "plating"
/turf/open/floor/wood
footstepsounds = "wood"
/turf/open/floor/plating/asteroid
footstepsounds = "asteroid"
/turf/open/floor/plating/dirt
footstepsounds = "asteroid"
/turf/open/floor/grass
footstepsounds = "asteroid"
/turf/open/floor/carpet
footstepsounds = "carpet"
/turf/open/floor/plasteel/grimy
footstepsounds = "carpet"
/obj/machinery/atmospherics/components/unary/vent_pump
footstepsoundoverride = "catwalk"
/obj/machinery/atmospherics/components/unary/vent_scrubber
footstepsoundoverride = "catwalk"
/obj/structure/disposalpipe
footstepsoundoverride = "catwalk"
/obj/machinery/holopad
footstepsoundoverride = "catwalk"
/obj/structure/table
footstepsoundoverride = "hull"
/obj/structure/table/wood
footstepsoundoverride = "wood"
/*
/turf/open/floor/Entered(atom/obj, atom/oldloc)
. = ..()
CitDirtify(obj, oldloc)*/
//Baystation-styled tile dirtification.
/turf/open/floor/proc/CitDirtify(atom/obj, atom/oldloc)
if(prob(50))
if(has_gravity(src) && !isobserver(obj))
var/dirtamount
var/obj/effect/decal/cleanable/dirt/dirt = locate(/obj/effect/decal/cleanable/dirt, src)
if(!dirt)
dirt = new/obj/effect/decal/cleanable/dirt(src)
dirt.alpha = 0
dirtamount = 0
dirtamount = dirt.alpha + 1
if(oldloc && istype(oldloc, /turf/open/floor))
var/obj/effect/decal/cleanable/dirt/spreadindirt = locate(/obj/effect/decal/cleanable/dirt, oldloc)
if(spreadindirt && spreadindirt.alpha)
dirtamount += round(spreadindirt.alpha * 0.05)
dirt.alpha = min(dirtamount,255)
return TRUE
//The proc that handles footsteps! It's pure, unfiltered spaghetti code.
/mob/living/proc/CitFootstep(turf/open/floor)
if(floor && istype(floor,/turf/open) && floor.footstepsounds)
if(has_gravity(floor) || prob(25))
footstepcount++
if(canmove && !lying && !buckled && makesfootstepsounds && m_intent == MOVE_INTENT_RUN && footstepcount >= 3)
footstepcount = 0
var/overriddenfootstepsound
if(footstepsoundoverride)
if(isfile(footstepsoundoverride))
overriddenfootstepsound = list(footstepsoundoverride)
else
overriddenfootstepsound = footstepsoundoverride
if(!overriddenfootstepsound && istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(H && H.shoes)
var/obj/item/clothing/shoes/S = H.shoes
if(S && S.footstepsoundoverride)
if(isfile(S.footstepsoundoverride))
overriddenfootstepsound = list(S.footstepsoundoverride)
else
overriddenfootstepsound = S.footstepsoundoverride
if(!overriddenfootstepsound && floor.contents)
var/objschecked
for(var/atom/childobj in floor.contents)
if(childobj.footstepsoundoverride && childobj.invisibility < INVISIBILITY_MAXIMUM)
if(isfile(childobj.footstepsoundoverride))
overriddenfootstepsound = list(childobj.footstepsoundoverride)
else
overriddenfootstepsound = childobj.footstepsoundoverride
break
objschecked++
if(objschecked >= 25)
break //walking on 50k foam darts didn't crash the server during my testing, but its better to be safe than sorry
playsound(src,(overriddenfootstepsound ? (islist(overriddenfootstepsound) ? pick(overriddenfootstepsound) : pick(GLOB.turf_footstep_sounds[overriddenfootstepsound])) : (islist(floor.footstepsounds) ? pick(floor.footstepsounds) : pick(GLOB.turf_footstep_sounds[floor.footstepsounds]))),50, 1)