Skip to content

Commit

Permalink
Merge pull request #83 from Nerev4r/rockandstone
Browse files Browse the repository at this point in the history
Some Golem Tweaks
  • Loading branch information
carpotoxin authored Sep 23, 2024
2 parents f10d5c1 + 2dfad23 commit 1cc0254
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 6 deletions.
3 changes: 3 additions & 0 deletions code/__DEFINES/~doppler_defines/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@

// Green blood traits
#define TRAIT_GREEN_BLOOD "green_blood"

// Trait that lets golems put stone limbs back on
#define TRAIT_GOLEM_LIMBATTACHMENT "golem_limbattachment"
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_DETECTIVE" = TRAIT_DETECTIVE,
"TRAIT_EXCITABLE" = TRAIT_EXCITABLE,
"TRAIT_TWITCH_ADAPTED" = TRAIT_TWITCH_ADAPTED,
"TRAIT_GOLEM_LIMBATTACHMENT" = TRAIT_GOLEM_LIMBATTACHMENT,
),
// DOPPLER EDIT ADDITION END
))
Expand Down
19 changes: 17 additions & 2 deletions code/game/objects/items/stacks/golem_food/golem_status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,34 @@
/datum/status_effect/golem/plasteel
overlay_state_prefix = "iron"
mineral_name = "plasteel"
applied_fluff = "Plasteel plates seal you tight. You feel insulated!"
applied_fluff = "Plasteel plates seal you tight. You feel tough!" // Doppler Edit, old code: applied_fluff = "Plasteel plates seal you tight. You feel insulated!"
alert_icon_state = "sheet-plasteel"
alert_desc = "You are sealed against the cold, and against low pressure environments."
alert_desc = "You are sealed against the cold, low pressure environments, and are armored!" // Doppler Edit, old code: alert_desc = "You are sealed against the cold, and against low pressure environments."

// DOPPLER ADDITION START
/datum/movespeed_modifier/status_effect/golem_plasteel
multiplicative_slowdown = 0.5 // Tank build?
// DOPPLER ADDITION END

/datum/status_effect/golem/plasteel/on_apply()
. = ..()
if (!.)
return FALSE
owner.add_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD), TRAIT_STATUS_EFFECT(id))
// DOPPLER ADDITION START
owner.add_movespeed_modifier(/datum/movespeed_modifier/status_effect/golem_plasteel, update=TRUE)
var/mob/living/carbon/human/golem_owner = owner
golem_owner.physiology.damage_resistance += 15 // Gives them 15 extra damage resist. This basically means they soak 6 damage. In exchange, some more slowdown.
// DOPPLER ADDITION END
return TRUE

/datum/status_effect/golem/plasteel/on_remove()
owner.remove_traits(list(TRAIT_RESISTLOWPRESSURE, TRAIT_RESISTCOLD), TRAIT_STATUS_EFFECT(id))
// DOPPLER ADDITION START
owner.remove_movespeed_modifier(/datum/movespeed_modifier/status_effect/golem_plasteel, update=TRUE)
var/mob/living/carbon/human/golem_owner = owner
golem_owner.physiology.damage_resistance -= 15 // And God taketh away.
// DOPPLER ADDITION END
return ..()

/// Makes you reflect energy projectiles
Expand Down
6 changes: 5 additions & 1 deletion code/modules/surgery/bodyparts/_bodyparts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,11 @@

if(ishuman(victim))
var/mob/living/carbon/human/human_victim = victim
if(HAS_TRAIT(victim, TRAIT_LIMBATTACHMENT) || HAS_TRAIT(src, TRAIT_EASY_ATTACH))
if(HAS_TRAIT(victim, TRAIT_LIMBATTACHMENT) || HAS_TRAIT(src, TRAIT_EASY_ATTACH) || HAS_TRAIT(victim, TRAIT_GOLEM_LIMBATTACHMENT)) // DOPPLER EDIT CHANGE - ORIGINAL: if(HAS_TRAIT(victim, TRAIT_LIMBATTACHMENT) || HAS_TRAIT(src, TRAIT_EASY_ATTACH))
// DOPPLER EDIT ADDITION START - golems lol
if(HAS_TRAIT(victim, TRAIT_GOLEM_LIMBATTACHMENT) && !(bodytype & BODYTYPE_GOLEM)) //if we're trying to attach something that isn't a fuggin rock, end out
return
// DOPPLER EDIT ADDITION END
if(!human_victim.get_bodypart(body_zone))
user.temporarilyRemoveItemFromInventory(src, TRUE)
if(!try_attach_limb(victim))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
color = COLOR_GOLEM_GRAY
organ_flags = ORGAN_MINERAL
organ_traits = list(TRAIT_ROCK_EATER)
hunger_modifier = 10 // golems burn fuel quickly
hunger_modifier = 5 // golems burn fuel quickly //but on doppler, not so quickly !! original: 10
/// How slow are you when the "hungry" icon appears?
var/min_hunger_slowdown = 0.5
/// How slow are you if you have absolutely nothing in the tank?
Expand Down
145 changes: 143 additions & 2 deletions modular_doppler/modular_species/species_types/golem/golem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@
TRAIT_BOULDER_BREAKER,
//deviating from TG here <--
TRAIT_RESISTLOWPRESSURE,
TRAIT_RESISTCOLD,
TRAIT_RESISTHEAT,
TRAIT_GOLEM_LIMBATTACHMENT,
)
no_equip_flags = ITEM_SLOT_MASK | ITEM_SLOT_OCLOTHING | ITEM_SLOT_FEET | ITEM_SLOT_ICLOTHING | ITEM_SLOT_SUITSTORE
changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN //golem ERT

var/golem_speed_mod = 1

/datum/species/golem/on_species_gain(mob/living/carbon/new_golem, datum/species/old_species, pref_load)
. = ..()
new_golem.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/snail, multiplicative_slowdown = golem_speed_mod)

/datum/outfit/golem_preview
name = "Golem (Species Preview)"
head = /obj/item/food/grown/poppy/geranium/fraxinella
Expand All @@ -35,3 +40,139 @@
return list(
"@Lobster",
)

/datum/crafting_recipe/golem_stomach
name = "Silicate Grinder"
result = /obj/item/organ/internal/stomach/golem
time = 120
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 10, /obj/item/stack/sheet/plasteel = 10)
category = CAT_MISC

/datum/crafting_recipe/golem_liver
name = "Porous Rock"
result = /obj/item/organ/internal/liver/golem
time = 120
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 10, )
category = CAT_MISC

/datum/crafting_recipe/golem_tongue
name = "Golem Tongue"
result = /obj/item/organ/internal/tongue/golem
time = 120
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 10)
category = CAT_MISC

/datum/crafting_recipe/golem_eyes
name = "Resonating Crystal"
result = /obj/item/organ/internal/eyes/golem
time = 120
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 10, /obj/item/stack/sheet/glass = 15)
category = CAT_MISC

/datum/crafting_recipe/golem_appendix
name = "Internal Forge"
result = /obj/item/organ/internal/appendix/golem
time = 120
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 10, /obj/item/stack/sheet/mineral/plasma = 15)
category = CAT_MISC

/datum/crafting_recipe/golem_arm
name = "Right Golem Arm"
result = /obj/item/bodypart/arm/right/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 6)
category = CAT_MISC

/datum/crafting_recipe/golem_arm/left
name = "Left Golem Arm"
result = /obj/item/bodypart/arm/left/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 6)
category = CAT_MISC

/datum/crafting_recipe/golem_leg
name = "Right Golem Leg"
result = /obj/item/bodypart/leg/right/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 6)
category = CAT_MISC

/datum/crafting_recipe/golem_leg/left
name = "Left Golem Leg"
result = /obj/item/bodypart/leg/left/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 6)
category = CAT_MISC

/datum/crafting_recipe/golem_head
name = "Golem Head"
result = /obj/item/bodypart/head/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 12)
category = CAT_MISC

/datum/crafting_recipe/golem_torso
name = "Golem Torso"
result = /obj/item/bodypart/chest/golem
time = 60
tool_behaviors = list(TOOL_MINING)
reqs = list(/obj/item/stack/stone = 12)
category = CAT_MISC

/obj/item/bodypart/arm/left/golem/drop_limb(special, dismembered, move_to_floor = FALSE)
if(special)
return ..()

to_chat(owner, span_warning("Your [name] crumbles into loose stone!"))
playsound(owner, 'sound/effects/rock_break.ogg', 60, TRUE)
new /obj/item/stack/stone(drop_location(), 4)
. = ..()
drop_organs(src, TRUE)
qdel(src)
return .

/obj/item/bodypart/arm/right/golem/drop_limb(special, dismembered, move_to_floor = FALSE)
if(special)
return ..()

to_chat(owner, span_warning("Your [name] crumbles into loose stone!"))
playsound(owner, 'sound/effects/rock_break.ogg', 60, TRUE)
new /obj/item/stack/stone(drop_location(), 4)
. = ..()
drop_organs(src, TRUE)
qdel(src)
return .

/obj/item/bodypart/leg/left/golem/drop_limb(special, dismembered, move_to_floor = FALSE)
if(special)
return ..()

to_chat(owner, span_warning("Your [name] crumbles into loose stone!"))
playsound(owner, 'sound/effects/rock_break.ogg', 60, TRUE)
new /obj/item/stack/stone(drop_location(), 4)
. = ..()
drop_organs(src, TRUE)
qdel(src)
return .

/obj/item/bodypart/leg/right/golem/drop_limb(special, dismembered, move_to_floor = FALSE)
if(special)
return ..()

to_chat(owner, span_warning("Your [name] crumbles into loose stone!"))
playsound(owner, 'sound/effects/rock_break.ogg', 60, TRUE)
new /obj/item/stack/stone(drop_location(), 4)
. = ..()
drop_organs(src, TRUE)
qdel(src)
return .

0 comments on commit 1cc0254

Please sign in to comment.