mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
rebalance lost (#8443)
This commit is contained in:
@@ -26,3 +26,16 @@
|
|||||||
laws = new /datum/ai_laws/gravekeeper()
|
laws = new /datum/ai_laws/gravekeeper()
|
||||||
|
|
||||||
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
|
playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
|
||||||
|
|
||||||
|
//CHOMPAdd Start
|
||||||
|
/mob/living/silicon/robot/gravekeeper/proc/scramble_hardware(var/chance)
|
||||||
|
if(prob(chance)) //Small chance to spawn with a scrambled
|
||||||
|
emag_items = 1
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/gravekeeper/handle_special_unlocks()
|
||||||
|
if(!emag_items)
|
||||||
|
scramble_hardware(10)
|
||||||
|
if (churn_count == 5)
|
||||||
|
module.emag += new /obj/item/device/self_repair_system/advanced(module)
|
||||||
|
hud_used.update_robot_modules_display()
|
||||||
|
//CHOMPAdd End
|
||||||
|
|||||||
@@ -333,3 +333,12 @@
|
|||||||
return new /datum/ai_laws/tyrant()
|
return new /datum/ai_laws/tyrant()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//CHOMPAdd Start
|
||||||
|
/mob/living/silicon/robot/lost/handle_special_unlocks()
|
||||||
|
if(!emag_items)
|
||||||
|
scramble_hardware(20)
|
||||||
|
if (churn_count == 5)
|
||||||
|
module.emag += new /obj/item/device/self_repair_system/advanced(module)
|
||||||
|
hud_used.update_robot_modules_display()
|
||||||
|
//CHOMPAdd End
|
||||||
|
|||||||
@@ -366,6 +366,9 @@
|
|||||||
if(M.ckey)
|
if(M.ckey)
|
||||||
GLOB.prey_digested_roundstat++
|
GLOB.prey_digested_roundstat++
|
||||||
|
|
||||||
|
owner.churn_count++ //CHOMPAdd
|
||||||
|
owner.handle_special_unlocks() //CHOMPAdd
|
||||||
|
|
||||||
var/personal_nutrition_modifier = M.get_digestion_nutrition_modifier()
|
var/personal_nutrition_modifier = M.get_digestion_nutrition_modifier()
|
||||||
var/pred_digestion_efficiency = owner.get_digestion_efficiency_modifier()
|
var/pred_digestion_efficiency = owner.get_digestion_efficiency_modifier()
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
var/mute_entry = FALSE //Toggleable vorgan entry logs.
|
var/mute_entry = FALSE //Toggleable vorgan entry logs.
|
||||||
var/parasitic = FALSE //Digestion immunity and nutrition leeching variable
|
var/parasitic = FALSE //Digestion immunity and nutrition leeching variable
|
||||||
var/liquidbelly_visuals = TRUE //Toggle for liquidbelly level visuals.
|
var/liquidbelly_visuals = TRUE //Toggle for liquidbelly level visuals.
|
||||||
|
var/churn_count = 0 //Counter for digested livings
|
||||||
|
|
||||||
var/passtable_reset // For crawling
|
var/passtable_reset // For crawling
|
||||||
var/passtable_crawl_checked = FALSE
|
var/passtable_crawl_checked = FALSE
|
||||||
@@ -15,6 +16,9 @@
|
|||||||
var/vore_icons = 0 // Bitfield for which fields we have vore icons for.
|
var/vore_icons = 0 // Bitfield for which fields we have vore icons for.
|
||||||
var/vore_eyes = FALSE // For mobs with fullness specific eye overlays.
|
var/vore_eyes = FALSE // For mobs with fullness specific eye overlays.
|
||||||
|
|
||||||
|
/mob/living/proc/handle_special_unlocks()
|
||||||
|
return
|
||||||
|
|
||||||
// Update fullness based on size & quantity of belly contents
|
// Update fullness based on size & quantity of belly contents
|
||||||
/mob/proc/update_fullness(var/returning = FALSE)
|
/mob/proc/update_fullness(var/returning = FALSE)
|
||||||
if(!returning)
|
if(!returning)
|
||||||
|
|||||||
@@ -58,14 +58,18 @@
|
|||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
// To repair a single module
|
||||||
/obj/item/device/self_repair_system
|
/obj/item/device/self_repair_system
|
||||||
name = "plating repair system"
|
name = "plating repair system"
|
||||||
desc = "A nanite control system to repair damaged armour plating and wiring while not moving. Destroyed armour can't be restored."
|
desc = "A nanite control system to repair damaged armour plating and wiring while not moving. Destroyed armour can't be restored."
|
||||||
icon = 'icons/obj/robot_component.dmi'
|
icon = 'icons/obj/robot_component.dmi'
|
||||||
icon_state = "armor"
|
icon_state = "armor"
|
||||||
|
var/repair_time = 25
|
||||||
|
var/repair_amount = 2.5
|
||||||
|
var/power_tick = 25
|
||||||
var/disabled_icon = "armor"
|
var/disabled_icon = "armor"
|
||||||
var/active_icon = "armor_broken"
|
var/active_icon = "armor_broken"
|
||||||
var/target_component = "armour"
|
var/list/target_components = list("armour")
|
||||||
var/repairing = FALSE
|
var/repairing = FALSE
|
||||||
|
|
||||||
/obj/item/device/self_repair_system/New()
|
/obj/item/device/self_repair_system/New()
|
||||||
@@ -76,30 +80,42 @@
|
|||||||
if(repairing)
|
if(repairing)
|
||||||
return
|
return
|
||||||
var/mob/living/silicon/robot/R = user
|
var/mob/living/silicon/robot/R = user
|
||||||
var/datum/robot_component/C = R.components[target_component]
|
var/destroyed_components = FALSE
|
||||||
if(C && !istype(C.wrapped, /obj/item/broken_device))
|
var/list/repairable_components = list()
|
||||||
if(C.brute_damage == 0 && C.electronics_damage == 0)
|
for(var/target_component in target_components)
|
||||||
to_chat(R, "<span class='warning'>No brute or burn damage detected in [target_component].</span>")
|
var/datum/robot_component/C = R.components[target_component]
|
||||||
return
|
if(!C)
|
||||||
to_chat(R, "<span class='notice'>Repair system initializated. Repairing plating and wiring.</span>")
|
continue
|
||||||
icon_state = active_icon
|
if(istype(C.wrapped, /obj/item/broken_device))
|
||||||
update_icon()
|
destroyed_components = TRUE
|
||||||
repairing = TRUE
|
else if (C.brute_damage != 0 || C.electronics_damage != 0)
|
||||||
src.self_repair(R, C, 25, 2.5)
|
repairable_components += C
|
||||||
repairing = FALSE
|
if(!repairable_components.len && destroyed_components)
|
||||||
icon_state = disabled_icon
|
to_chat(R, span_warning("Repair system initialization failed. Can't repair destroyed [target_components.len == 1 ? "[R.components[target_components[1]]]'s" : "component's"] plating or wiring."))
|
||||||
update_icon()
|
return
|
||||||
else
|
if(!repairable_components.len)
|
||||||
to_chat(R, "<span class='warning'>Repair system initialization failed. Can't repair destroyed [target_component]'s plating or wiring.</span>")
|
to_chat(R, span_warning("No brute or burn damage detected [target_components.len == 1 ? "in [R.components[target_components[1]]]" : ""]."))
|
||||||
|
return
|
||||||
|
if(destroyed_components)
|
||||||
|
to_chat(R, span_warning("WARNING! Destroyed modules detected. Those can not be repaired!"))
|
||||||
|
icon_state = active_icon
|
||||||
|
update_icon()
|
||||||
|
repairing = TRUE
|
||||||
|
for(var/datum/robot_component/C in repairable_components)
|
||||||
|
to_chat(R, span_notice("Repair system initializated. Repairing plating and wiring of [C]."))
|
||||||
|
src.self_repair(R, C, repair_time, repair_amount)
|
||||||
|
repairing = FALSE
|
||||||
|
icon_state = disabled_icon
|
||||||
|
update_icon()
|
||||||
|
|
||||||
/obj/item/device/self_repair_system/proc/self_repair(mob/living/silicon/robot/R, datum/robot_component/C, var/tick_delay, var/heal_per_tick)
|
/obj/item/device/self_repair_system/proc/self_repair(mob/living/silicon/robot/R, datum/robot_component/C, var/tick_delay, var/heal_per_tick)
|
||||||
if(!C || !R.cell)
|
if(!C || !R.cell)
|
||||||
return
|
return
|
||||||
if(C.brute_damage == 0 && C.electronics_damage == 0)
|
if(C.brute_damage == 0 && C.electronics_damage == 0)
|
||||||
to_chat(R, "<span class='notice'>Repair of [target_component] completed.</span>")
|
to_chat(R, span_notice("Repair of [C] completed."))
|
||||||
return
|
return
|
||||||
if(!R.use_direct_power(50, 500)) //We don't want to drain ourselves too far down during exploration
|
if(!R.use_direct_power(power_tick, 500)) //We don't want to drain ourselves too far down during exploration
|
||||||
to_chat(R, "<span class='warning'>Not enough power to initialize the repair system.</span>")
|
to_chat(R, span_warning("Not enough power to initialize the repair system."))
|
||||||
return
|
return
|
||||||
if(do_after(R, tick_delay))
|
if(do_after(R, tick_delay))
|
||||||
if(!C)
|
if(!C)
|
||||||
@@ -108,3 +124,12 @@
|
|||||||
C.electronics_damage -= min(C.electronics_damage, heal_per_tick)
|
C.electronics_damage -= min(C.electronics_damage, heal_per_tick)
|
||||||
R.updatehealth()
|
R.updatehealth()
|
||||||
src.self_repair(R, C, tick_delay, heal_per_tick)
|
src.self_repair(R, C, tick_delay, heal_per_tick)
|
||||||
|
|
||||||
|
// To repair multiple modules
|
||||||
|
/obj/item/device/self_repair_system/advanced
|
||||||
|
name = "self repair system"
|
||||||
|
desc = "A nanite control system to repair damaged components while not moving. Destroyed components can't be restored."
|
||||||
|
target_components = list("actuator", "radio", "power cell", "diagnosis unit", "camera", "comms", "armour")
|
||||||
|
power_tick = 10
|
||||||
|
repair_time = 15
|
||||||
|
repair_amount = 3
|
||||||
|
|||||||
Reference in New Issue
Block a user