Ports Cloth Golems

This commit is contained in:
Fox McCloud
2021-09-24 19:48:15 -04:00
parent 8fc35630a9
commit 1c40951338
8 changed files with 142 additions and 19 deletions
@@ -16,25 +16,28 @@
/obj/item/golem_shell/attackby(obj/item/I, mob/user, params)
..()
var/static/list/golem_shell_species_types = list(
/obj/item/stack/sheet/metal = /datum/species/golem,
/obj/item/stack/sheet/glass = /datum/species/golem/glass,
/obj/item/stack/sheet/plasteel = /datum/species/golem/plasteel,
/obj/item/stack/ore/glass = /datum/species/golem/sand,
/obj/item/stack/sheet/mineral/sandstone = /datum/species/golem/sand,
/obj/item/stack/sheet/mineral/plasma = /datum/species/golem/plasma,
/obj/item/stack/sheet/mineral/diamond = /datum/species/golem/diamond,
/obj/item/stack/sheet/mineral/gold = /datum/species/golem/gold,
/obj/item/stack/sheet/mineral/silver = /datum/species/golem/silver,
/obj/item/stack/sheet/mineral/uranium = /datum/species/golem/uranium,
/obj/item/stack/sheet/mineral/bananium = /datum/species/golem/bananium,
/obj/item/stack/sheet/mineral/tranquillite = /datum/species/golem/tranquillite,
/obj/item/stack/sheet/mineral/titanium = /datum/species/golem/titanium,
/obj/item/stack/sheet/mineral/plastitanium = /datum/species/golem/plastitanium,
/obj/item/stack/sheet/mineral/abductor = /datum/species/golem/alloy,
/obj/item/stack/sheet/wood = /datum/species/golem/wood,
/obj/item/stack/sheet/bluespace_crystal = /datum/species/golem/bluespace,
/obj/item/stack/sheet/mineral/adamantine = /datum/species/golem/adamantine,
/obj/item/stack/sheet/plastic = /datum/species/golem/plastic)
/obj/item/stack/sheet/metal = /datum/species/golem,
/obj/item/stack/sheet/glass = /datum/species/golem/glass,
/obj/item/stack/sheet/plasteel = /datum/species/golem/plasteel,
/obj/item/stack/ore/glass = /datum/species/golem/sand,
/obj/item/stack/sheet/mineral/sandstone = /datum/species/golem/sand,
/obj/item/stack/sheet/mineral/plasma = /datum/species/golem/plasma,
/obj/item/stack/sheet/mineral/diamond = /datum/species/golem/diamond,
/obj/item/stack/sheet/mineral/gold = /datum/species/golem/gold,
/obj/item/stack/sheet/mineral/silver = /datum/species/golem/silver,
/obj/item/stack/sheet/mineral/uranium = /datum/species/golem/uranium,
/obj/item/stack/sheet/mineral/bananium = /datum/species/golem/bananium,
/obj/item/stack/sheet/mineral/tranquillite = /datum/species/golem/tranquillite,
/obj/item/stack/sheet/mineral/titanium = /datum/species/golem/titanium,
/obj/item/stack/sheet/mineral/plastitanium = /datum/species/golem/plastitanium,
/obj/item/stack/sheet/mineral/abductor = /datum/species/golem/alloy,
/obj/item/stack/sheet/wood = /datum/species/golem/wood,
/obj/item/stack/sheet/bluespace_crystal = /datum/species/golem/bluespace,
/obj/item/stack/medical/bruise_pack = /datum/species/golem/cloth,
/obj/item/stack/medical/bruise_pack/improvised = /datum/species/golem/cloth,
/obj/item/stack/sheet/cloth = /datum/species/golem/cloth,
/obj/item/stack/sheet/mineral/adamantine = /datum/species/golem/adamantine,
/obj/item/stack/sheet/plastic = /datum/species/golem/plastic)
if(istype(I, /obj/item/stack))
var/obj/item/stack/O = I
+8
View File
@@ -207,6 +207,14 @@
items += s_store
return items
/mob/living/proc/unequip_everything()
var/list/items = list()
items |= get_equipped_items(TRUE)
for(var/I in items)
unEquip(I)
drop_l_hand()
drop_r_hand()
/obj/item/proc/equip_to_best_slot(mob/M)
if(src != M.get_active_hand())
to_chat(M, "<span class='warning'>You are not holding anything to equip!</span>")
@@ -674,3 +674,107 @@
/datum/unarmed_attack/golem/tranquillite
attack_sound = null
/datum/species/golem/cloth
name = "Cloth Golem"
icobase = 'icons/mob/human_races/r_cloth_golem.dmi'
flesh_color = "#E9E9E9"
blood_color = "#E9E9E9"
info_text = "As a <span class='danger'>Cloth Golem</span>, you are able to reform yourself after death, provided your remains aren't burned or destroyed. You are, of course, very flammable. \
Being made of cloth, your body is magic resistant and faster than that of other golems, but weaker and less resilient."
inherent_traits = list(TRAIT_RESISTCOLD, TRAIT_NOBREATH, TRAIT_RESISTHIGHPRESSURE, TRAIT_RESISTLOWPRESSURE, TRAIT_RADIMMUNE, TRAIT_PIERCEIMMUNE, TRAIT_CHUNKYFINGERS, TRAIT_NOPAIN)
inherent_biotypes = MOB_UNDEAD | MOB_HUMANOID
brute_mod = 0.85 //15% damage reduction
burn_mod = 1.7 // don't get burned
tox_mod = 0.85
clone_mod = 0.85
brain_mod = 0.85
stamina_mod = 0.85
speed_mod = 1 // not as heavy as stone
punchdamagelow = 4
punchstunthreshold = 7
punchdamagehigh = 8 // not as heavy as stone
prefix = "Cloth"
golem_colour = null
special_names = null
/datum/species/golem/cloth/get_random_name()
var/pharaoh_name = pick("Neferkare", "Hudjefa", "Khufu", "Mentuhotep", "Ahmose", "Amenhotep", "Thutmose", "Hatshepsut", "Tutankhamun", "Ramses", "Seti", \
"Merenptah", "Djer", "Semerkhet", "Nynetjer", "Khafre", "Pepi", "Intef", "Ay") //yes, Ay was an actual pharaoh
var/golem_name = "[pharaoh_name] \Roman[rand(1,99)]"
return golem_name
/datum/species/golem/cloth/handle_life(mob/living/carbon/human/H)
if(H.fire_stacks < 1)
H.adjust_fire_stacks(1) //always prone to burning
..()
/datum/species/golem/cloth/handle_death(gibbed, mob/living/carbon/human/H)
if(gibbed)
return
if(H.on_fire)
H.visible_message("<span class='danger'>[H] burns into ash!</span>")
H.dust()
return
H.visible_message("<span class='danger'>[H] falls apart into a pile of bandages!</span>")
new /obj/structure/cloth_pile(get_turf(H), H)
..()
/obj/structure/cloth_pile
name = "pile of bandages"
desc = "It emits a strange aura, as if there was still life within it..."
max_integrity = 50
armor = list(MELEE = 90, BULLET = 90, LASER = 25, ENERGY = 80, BOMB = 50, BIO = 100, FIRE = -50, ACID = -50)
icon = 'icons/obj/items.dmi'
icon_state = "pile_bandages"
resistance_flags = FLAMMABLE
var/revive_time = 900
var/mob/living/carbon/human/cloth_golem
/obj/structure/cloth_pile/Initialize(mapload, mob/living/carbon/human/H)
. = ..()
if(!QDELETED(H) && is_species(H, /datum/species/golem/cloth))
H.unequip_everything()
H.forceMove(src)
cloth_golem = H
to_chat(cloth_golem, "<span class='notice'>You start gathering your life energy, preparing to rise again...</span>")
addtimer(CALLBACK(src, .proc/revive), revive_time)
else
return INITIALIZE_HINT_QDEL
/obj/structure/cloth_pile/Destroy()
QDEL_NULL(cloth_golem)
return ..()
/obj/structure/cloth_pile/burn()
visible_message("<span class='danger'>[src] burns into ash!</span>")
new /obj/effect/decal/cleanable/ash(get_turf(src))
..()
/obj/structure/cloth_pile/proc/revive()
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
return
if(cloth_golem.suiciding)
QDEL_NULL(cloth_golem)
return
invisibility = INVISIBILITY_MAXIMUM //disappear before the animation
new /obj/effect/temp_visual/mummy_animation(get_turf(src))
cloth_golem.revive()
cloth_golem.grab_ghost() //won't pull if it's a suicide
sleep(20)
cloth_golem.forceMove(get_turf(src))
cloth_golem.visible_message("<span class='danger'>[src] rises and reforms into [cloth_golem]!</span>", "<span class='userdanger'>You reform into yourself!</span>")
cloth_golem = null
qdel(src)
/obj/structure/cloth_pile/attackby(obj/item/P, mob/living/carbon/human/user, params)
. = ..()
if(resistance_flags & ON_FIRE)
return
if(is_hot(P))
visible_message("<span class='danger'>[src] bursts into flames!</span>")
fire_act()