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,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 ..()