Cleans up Modular_citadel

Yes I know it'll have merge conflicts later.
This commit is contained in:
Poojawa
2018-09-21 03:52:13 -05:00
parent 1cc0d14ec5
commit 4efdf4b0b3
12 changed files with 9 additions and 15 deletions
@@ -0,0 +1,62 @@
//we vlambeer now
/obj/proc/shake_camera(mob/M, duration, strength=1)//byond's wonky with this shit
if(!M || !M.client || duration <= 0)
return
var/client/C = M.client
if (C.prefs.screenshake==0)
return
var/oldx = C.pixel_x
var/oldy = C.pixel_y
var/clientscreenshake = (C.prefs.screenshake * 0.01)
var/max = (strength*clientscreenshake) * world.icon_size
var/min = -((strength*clientscreenshake) * world.icon_size)
for(var/i in 0 to duration-1)
if (i == 0)
animate(C, pixel_x=rand(min,max), pixel_y=rand(min,max), time=1)
else
animate(pixel_x=rand(min,max), pixel_y=rand(min,max), time=1)
animate(pixel_x=oldx, pixel_y=oldy, time=1)
/obj/item/gun/energy
recoil = 0.1
/obj/item/gun/energy/kinetic_accelerator
recoil = 0.5
/obj/item/gun/ballistic
recoil = 0.25
/obj/item/gun/ballistic/shotgun
recoil = 1
/obj/item/gun/ballistic/revolver
recoil = 0.5
/obj/item/gun/ballistic/revolver/doublebarrel
recoil = 1
/obj/item/gun/syringe
recoil = 0.1
/obj/item/pneumatic_cannon/fire_items(turf/target, mob/user)
. = ..()
shake_camera(user, (pressureSetting * 0.75 + 1), (pressureSetting * 0.75))
/obj/item/attack(mob/living/M, mob/living/user)
. = ..()
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.canmove)
shake_camera(M, ((force - 10) * 0.015 + 1), ((force - 10) * 0.015))
/obj/item/attack_obj(obj/O, mob/living/user)
. = ..()
if(force >= 20)
shake_camera(user, ((force - 15) * 0.01 + 1), ((force - 15) * 0.01))
@@ -0,0 +1,57 @@
/obj/item/melee/classic_baton
var/last_hit = 0
var/stun_stam_cost_coeff = 1.25
var/hardstun_ds = 1
var/softstun_ds = 0
var/stam_dmg = 30
cooldown = 20
total_mass = 3.75
/obj/item/melee/classic_baton/attack(mob/living/target, mob/living/user)
if(!on)
return ..()
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes batons unusuable in stamina softcrit
to_chat(user, "<span class='warning'>You're too exhausted for that.</span>")//CIT CHANGE - ditto
return //CIT CHANGE - ditto
add_fingerprint(user)
if((user.has_trait(TRAIT_CLUMSY)) && prob(50))
to_chat(user, "<span class ='danger'>You club yourself over the head.</span>")
user.Knockdown(60 * force)
if(ishuman(user))
var/mob/living/carbon/human/H = user
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
else
user.take_bodypart_damage(2*force)
return
if(iscyborg(target))
..()
return
if(!isliving(target))
return
if (user.a_intent == INTENT_HARM)
if(!..())
return
if(!iscyborg(target))
return
else
if(last_hit + cooldown < world.time)
if(ishuman(target))
var/mob/living/carbon/human/H = target
if (H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK))
return
if(check_martial_counter(H, user))
return
playsound(get_turf(src), 'sound/effects/woodhit.ogg', 75, 1, -1)
target.Knockdown(softstun_ds, TRUE, FALSE, hardstun_ds, stam_dmg)
add_logs(user, target, "stunned", src)
src.add_fingerprint(user)
target.visible_message("<span class ='danger'>[user] has knocked down [target] with [src]!</span>", \
"<span class ='userdanger'>[user] has knocked down [target] with [src]!</span>")
if(!iscarbon(user))
target.LAssailant = null
else
target.LAssailant = user
last_hit = world.time
user.adjustStaminaLossBuffered(getweight())//CIT CHANGE - makes swinging batons cost stamina
@@ -0,0 +1,127 @@
//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)
-4
View File
@@ -10,10 +10,6 @@
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
// init_sprite_accessory_subtypes(/datum/sprite_accessory/beaks/avian, GLOB.avian_beaks_list)
// init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, GLOB.avian_tails_list)
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_wings, GLOB.avian_wings_list)
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_open_wings, GLOB.avian_open_wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
@@ -0,0 +1,72 @@
/obj/effect/mob_spawn/human/lavaknight
name = "odd cryogenics pod"
desc = "A humming cryo pod. You can barely recognise a faint glow underneath the built up ice. The machine is attempting to wake up its occupant."
mob_name = "a displaced knight from another dimension"
icon = 'icons/obj/machines/sleeper.dmi'
icon_state = "sleeper"
roundstart = FALSE
death = FALSE
random = TRUE
outfit = /datum/outfit/lavaknight
mob_species = /datum/species/human
flavour_text = "<font size=3><b>Y</b></font><b>ou are a knight who conveniently has some form of retrograde amnesia. \
You cannot remember where you came from. However, a few things remain burnt into your mind, most prominently a vow to never harm another sapient being under any circumstances unless it is hellbent on ending your life. \
Remember: hostile creatures and such are fair game for attacking, but <span class='danger'>under no circumstances are you to attack anything capable of thought and/or speech</span> unless it has made it its life's calling to chase you to the ends of the earth."
assignedrole = "Cydonian Knight"
/obj/effect/mob_spawn/human/lavaknight/special(mob/living/new_spawn)
if(ishuman(new_spawn))
var/mob/living/carbon/human/H = new_spawn
H.dna.features["mam_ears"] = "Cat, Big" //cat people
H.dna.features["mcolor"] = H.hair_color
H.update_body()
/obj/effect/mob_spawn/human/lavaknight/Destroy()
new/obj/structure/showcase/machinery/oldpod/used(drop_location())
return ..()
/datum/outfit/lavaknight
name = "Cydonian Knight"
uniform = /obj/item/clothing/under/assistantformal
mask = /obj/item/clothing/mask/breath
shoes = /obj/item/clothing/shoes/sneakers/black
r_pocket = /obj/item/melee/transforming/energy/sword/cx
suit = /obj/item/clothing/suit/space/hardsuit/lavaknight
suit_store = /obj/item/tank/internals/oxygen
id = /obj/item/card/id/knight
/datum/outfit/lavaknight/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/card/id/knight/W = H.wear_id
W.assignment = "Knight"
W.registered_name = H.real_name
W.id_color = "#0000FF" //Regular knights get simple blue. Doesn't matter much because it's variable anyway
W.update_label(H.real_name)
W.update_icon()
/datum/outfit/lavaknight/captain
name ="Cydonian Knight Captain"
l_pocket = /obj/item/twohanded/hypereutactic
/datum/outfit/lavaknight/captain/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
if(visualsOnly)
return
var/obj/item/card/id/knight/W = H.wear_id
W.assignment = "Knight Captain"
W.registered_name = H.real_name
W.id_color = "#FFD700" //Captains get gold, duh. Doesn't matter because it's variable anyway
W.update_label(H.real_name)
W.update_icon()
/obj/effect/mob_spawn/human/lavaknight/captain
name = "odd gilded cryogenics pod"
desc = "A humming cryo pod that appears to be gilded. You can barely recognise a faint glow underneath the built up ice. The machine is attempting to wake up its occupant."
flavour_text = "<font size=3><b>Y</b></font><b>ou are a knight who conveniently has some form of retrograde amnesia. \
You cannot remember where you came from. However, a few things remain burnt into your mind, most prominently a vow to never harm another sapient being under any circumstances unless it is hellbent on ending your life. \
Remember: hostile creatures and such are fair game for attacking, but <span class='danger'>under no circumstances are you to attack anything capable of thought and/or speech</span> unless it has made it its life's calling to chase you to the ends of the earth. \
You feel a natural instict to lead, and as such, you should strive to lead your comrades to safety, and hopefully home. You also feel a burning determination to uphold your vow, as well as your fellow comrade's."
outfit = /datum/outfit/lavaknight/captain
@@ -0,0 +1,160 @@
/*
CYDONIAN ARMOR THAT IS RGB AND STUFF WOOOOOOOOOO
*/
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight
name = "cydonian helmet"
desc = "A helmet designed with both form and function in mind, it protects the user against physical trauma and hazardous conditions while also having polychromic light strips."
icon = 'modular_citadel/icons/lavaknight/item/head.dmi'
icon_state = "knight_cydonia"
item_state = "knight_yellow"
item_color = null
alternate_worn_icon = 'modular_citadel/icons/lavaknight/mob/head.dmi'
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF | LAVA_PROOF
heat_protection = HEAD
armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100)
brightness_on = 7
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/resonator, /obj/item/mining_scanner, /obj/item/t_scanner/adv_mining_scanner, /obj/item/gun/energy/kinetic_accelerator)
var/energy_color = "#35FFF0"
var/obj/item/clothing/suit/space/hardsuit/lavaknight/linkedsuit = null
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/New()
..()
if(istype(loc, /obj/item/clothing/suit/space/hardsuit/lavaknight))
linkedsuit = loc
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/attack_self(mob/user)
on = !on
if(on)
set_light(brightness_on)
else
set_light(0)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/update_icon()
var/mutable_appearance/helm_overlay = mutable_appearance('modular_citadel/icons/lavaknight/item/head.dmi', "knight_cydonia_overlay", LIGHTING_LAYER + 1)
if(energy_color)
helm_overlay.color = energy_color
helm_overlay.plane = LIGHTING_PLANE + 1 //Magic number is used here because we have no ABOVE_LIGHTING_PLANE plane defined. Lighting plane is 15, HUD is 18
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(helm_overlay)
emissivelights()
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/equipped(mob/user, slot)
..()
if(slot == SLOT_HEAD)
emissivelights()
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/dropped(mob/user)
..()
emissivelightsoff()
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/proc/emissivelights(mob/user = usr)
var/mutable_appearance/energy_overlay = mutable_appearance('modular_citadel/icons/lavaknight/mob/head.dmi', "knight_cydonia_overlay", LIGHTING_LAYER + 1)
energy_overlay.color = energy_color
energy_overlay.plane = LIGHTING_PLANE + 1
user.cut_overlay(energy_overlay) //honk
user.add_overlay(energy_overlay) //honk
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/proc/emissivelightsoff(mob/user = usr)
user.cut_overlay()
linkedsuit.emissivelights() //HONK HONK HONK MAXIMUM SPAGHETTI
user.regenerate_icons() //honk
/obj/item/clothing/suit/space/hardsuit/lavaknight
icon = 'modular_citadel/icons/lavaknight/item/suit.dmi'
icon_state = "knight_cydonia"
name = "cydonian armor"
desc = "A suit designed with both form and function in mind, it protects the user against physical trauma and hazardous conditions while also having polychromic light strips."
item_state = "swat_suit"
alternate_worn_icon = 'modular_citadel/icons/lavaknight/mob/suit.dmi'
max_heat_protection_temperature = FIRE_SUIT_MAX_TEMP_PROTECT
resistance_flags = FIRE_PROOF | LAVA_PROOF
armor = list(melee = 50, bullet = 10, laser = 10, energy = 10, bomb = 50, bio = 100, rad = 50, fire = 100, acid = 100)
allowed = list(/obj/item/flashlight, /obj/item/tank/internals, /obj/item/storage/bag/ore, /obj/item/pickaxe)
helmettype = /obj/item/clothing/head/helmet/space/hardsuit/lavaknight
heat_protection = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
actions_types = list(/datum/action/item_action/toggle_helmet)
var/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/linkedhelm
var/energy_color = "#35FFF0"
/obj/item/clothing/suit/space/hardsuit/lavaknight/New()
..()
if(helmet)
linkedhelm = helmet
light_color = energy_color
set_light(1)
/obj/item/clothing/suit/space/hardsuit/lavaknight/Initialize()
..()
update_icon()
/obj/item/clothing/suit/space/hardsuit/lavaknight/update_icon()
var/mutable_appearance/suit_overlay = mutable_appearance('modular_citadel/icons/lavaknight/item/suit.dmi', "knight_cydonia_overlay", LIGHTING_LAYER + 1)
if(energy_color)
suit_overlay.color = energy_color
suit_overlay.plane = LIGHTING_PLANE + 1 //Magic number is used here because we have no ABOVE_LIGHTING_PLANE plane defined. Lighting plane is 15.
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
add_overlay(suit_overlay)
/obj/item/clothing/suit/space/hardsuit/lavaknight/equipped(mob/user, slot)
..()
if(slot == SLOT_WEAR_SUIT)
emissivelights()
/obj/item/clothing/suit/space/hardsuit/lavaknight/dropped(mob/user)
..()
emissivelightsoff()
/obj/item/clothing/suit/space/hardsuit/lavaknight/proc/emissivelights(mob/user = usr)
var/mutable_appearance/energy_overlay = mutable_appearance('modular_citadel/icons/lavaknight/mob/suit.dmi', "knight_cydonia_overlay", LIGHTING_LAYER + 1)
energy_overlay.color = energy_color
energy_overlay.plane = LIGHTING_PLANE + 1
user.cut_overlay(energy_overlay) //honk
user.add_overlay(energy_overlay) //honk
/obj/item/clothing/suit/space/hardsuit/lavaknight/proc/emissivelightsoff(mob/user = usr)
user.cut_overlays()
user.regenerate_icons() //honk
/obj/item/clothing/suit/space/hardsuit/lavaknight/AltClick(mob/living/user)
if(user.incapacitated() || !istype(user))
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
if(!in_range(src, user))
return
if(user.incapacitated() || !istype(user) || !in_range(src, user))
return
if(alert("Are you sure you want to recolor your armor stripes?", "Confirm Repaint", "Yes", "No") == "Yes")
var/energy_color_input = input(usr,"","Choose Energy Color",energy_color) as color|null
if(energy_color_input)
energy_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
user.update_inv_wear_suit()
if(linkedhelm)
linkedhelm.energy_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1)
user.update_inv_head()
linkedhelm.update_icon()
update_icon()
user.update_inv_wear_suit()
light_color = energy_color
emissivelights()
update_light()
/obj/item/clothing/suit/space/hardsuit/lavaknight/examine(mob/user)
..()
to_chat(user, "<span class='notice'>Alt-click to recolor it.</span>")
@@ -0,0 +1,8 @@
//This file controls whether or not a job complies with dresscodes.
//If a job complies with dresscodes, loadout items will not be equipped instead of the job's outfit, instead placing the items into the player's backpack.
/datum/job
var/dresscodecompliant = TRUE
/datum/job/assistant
dresscodecompliant = FALSE
@@ -0,0 +1,85 @@
/mob/living/simple_animal/pet/cat
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/crab
devourable = TRUE
/mob/living/simple_animal/pet/dog
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/retaliate/goat
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/cow
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/chick
devourable = TRUE
/mob/living/simple_animal/chicken
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/pet/fox
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/lizard
devourable = TRUE
/mob/living/simple_animal/mouse
devourable = TRUE
/mob/living/simple_animal/pet/penguin
no_vore = TRUE
/mob/living/simple_animal/pet
devourable = TRUE
/mob/living/simple_animal/sloth
devourable = TRUE
/mob/living/simple_animal/hostile/alien
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/bear
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/poison/giant_spider
devourable = TRUE
/mob/living/simple_animal/hostile/retaliate/poison/snake
devourable = TRUE
no_vore = FALSE //oh yes my pretty.
/mob/living/simple_animal/hostile/gorilla
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal/hostile/megafauna/dragon
no_vore = FALSE
/mob/living/simple_animal/hostile/asteroid/goliath
no_vore = FALSE
/mob/living/simple_animal/parrot
devourable = TRUE
no_vore = FALSE
/mob/living/simple_animal
no_vore = TRUE
/mob/living/carbon/alien
devourable = TRUE
/mob/living/carbon/monkey
devourable = TRUE
/mob/living/simple_animal/hostile/carp
devourable = TRUE
@@ -0,0 +1,10 @@
/mob/living/Knockdown(amount, updating = TRUE, ignore_canknockdown = FALSE, override_hardstun, override_stamdmg) //Can't go below remaining duration
if(((status_flags & CANKNOCKDOWN) && !has_trait(TRAIT_STUNIMMUNE)) || ignore_canknockdown)
if(absorb_stun(isnull(override_hardstun)? amount : override_hardstun, ignore_canknockdown))
return
var/datum/status_effect/incapacitating/knockdown/K = IsKnockdown()
if(K)
K.duration = max(world.time + (isnull(override_hardstun)? amount : override_hardstun), K.duration)
else if((amount || override_hardstun) > 0)
K = apply_status_effect(STATUS_EFFECT_KNOCKDOWN, amount, updating, override_hardstun, override_stamdmg)
return K
@@ -0,0 +1,54 @@
/obj/vehicle/ridden/secway
var/chargemax = 150
var/chargerate = 0.35
var/charge = 150
var/chargespeed = 1
var/normalspeed = 2
var/last_tick = 0
var/list/progressbars_by_rider = list()
/obj/vehicle/ridden/secway/Initialize()
. = ..()
START_PROCESSING(SSfastprocess, src)
/obj/vehicle/ridden/secway/process()
var/diff = world.time - last_tick
var/regen = chargerate * diff
charge = CLAMP(charge + regen, 0, chargemax)
last_tick = world.time
/obj/vehicle/ridden/secway/relaymove(mob/user, direction)
var/new_speed = normalspeed
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.sprinting && charge)
charge--
new_speed = chargespeed
GET_COMPONENT(D, /datum/component/riding)
D.vehicle_move_delay = new_speed
for(var/i in progressbars_by_rider)
var/datum/progressbar/B = progressbars_by_rider[i]
B.update(charge)
return ..()
/obj/vehicle/ridden/secway/buckle_mob(mob/living/M, force, check_loc)
. = ..(M, force, check_loc)
if(.)
if(progressbars_by_rider[M])
qdel(progressbars_by_rider[M])
var/datum/progressbar/D = new(M, chargemax, src)
D.update(charge)
progressbars_by_rider[M] = D
/obj/vehicle/ridden/secway/unbuckle_mob(mob/living/M, force)
. = ..(M, force)
if(.)
qdel(progressbars_by_rider[M])
progressbars_by_rider -= M
/obj/vehicle/ridden/secway/Destroy()
for(var/i in progressbars_by_rider)
qdel(progressbars_by_rider[i])
progressbars_by_rider.Cut()
STOP_PROCESSING(SSfastprocess, src)
return ..()