Lick clean re add (#7269)

Co-authored-by: Selis <selis@xynolabs.com>
This commit is contained in:
Kashargul
2023-12-01 23:39:43 +01:00
committed by GitHub
parent 75946b25bc
commit 4add60f9f2
9 changed files with 139 additions and 6 deletions

View File

@@ -397,6 +397,12 @@
var/obj/item/I = O
if(!I || !istype(I,/obj/item)) return
//CHOMPAdd Start
if(istype(I, /obj/item/device/robot_tongue) && isrobot(user))
var/obj/item/device/robot_tongue/J = I
if(J.water.energy < J.water.max_energy) return
//CHOMPAdd End
to_chat(usr, "<span class='notice'>You start washing \the [I].</span>")
busy = 1

View File

@@ -241,6 +241,8 @@
icon_state = "synthtongue"
hitsound = 'sound/effects/attackblob.ogg'
var/emagged = 0
var/datum/matter_synth/water = null //CHOMPAdd readds water
var/busy = 0 //CHOMPAdd prevents abuse
/obj/item/device/robot_tongue/New()
..()
@@ -269,16 +271,49 @@
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
if(user.client && (target in user.client.screen))
to_chat(user, "<span class='warning'>You need to take \the [target.name] off before cleaning it!</span>")
//CHOMPADD Start
if(busy)
to_chat(user, "<span class='warning'>You are already licking something else.</span>")
return
if(istype(target, /obj/structure/sink) || istype(target, /obj/structure/toilet)) //Dog vibes.
if (water.energy == water.max_energy && istype(target, /obj/structure/sink)) return
if (water.energy == water.max_energy && istype(target, /obj/structure/toilet))
to_chat(user, "<span class='notice'>You refrain from lapping water from the [target.name] with your reserves filled.</span>")
return
user.visible_message("<span class='filter_notice'>[user] begins to lap up water from [target.name].</span>", "<span class='notice'>You begin to lap up water from [target.name].</span>")
busy = 1
if(do_after(user, 50))
busy = 0
water.add_charge(50)
to_chat(src, "<span class='filter_notice'>You refill some of your water reserves.</span>")
else if(water.energy < 5)
to_chat(user, "<span class='notice'>Your mouth feels dry. You should drink up some water .</span>")
//CHOMPADD End
return
//CHOMPADD Start
else if(istype(target,/obj/effect/decal/cleanable))
user.visible_message("<span class='filter_notice'>[user] begins to lick off \the [target.name].</span>", "<span class='notice'>You begin to lick off \the [target.name]...</span>")
busy = 1
if(do_after(user, 50))
busy = 0
to_chat(user, "<span class='notice'>You finish licking off \the [target.name].</span>")
water.use_charge(5)
qdel(target)
var/mob/living/silicon/robot/R = user
R.cell.charge += 50
//CHOMPADD End
else if(istype(target,/obj/item))
if(istype(target,/obj/item/trash))
user.visible_message("<span class='filter_notice'>[user] nibbles away at \the [target.name].</span>", "<span class='notice'>You begin to nibble away at \the [target.name]...</span>")
busy = 1 //CHOMPAdd prevents abuse
if(do_after (user, 50))
busy = 0 //CHOMPAdd prevents abuse
user.visible_message("<span class='filter_notice'>[user] finishes eating \the [target.name].</span>", "<span class='notice'>You finish eating \the [target.name].</span>")
to_chat(user, "<span class='notice'>You finish off \the [target.name].</span>")
qdel(target)
var/mob/living/silicon/robot/R = user
R.cell.charge += 250
water.use_charge(5) //CHOMPAdd
return
if(istype(target,/obj/item/weapon/reagent_containers/food))
user.visible_message("[user] nibbles away at \the [target.name].", "<span class='notice'>You begin to nibble away at \the [target.name]...</span>")
@@ -291,14 +326,28 @@
return
if(istype(target,/obj/item/weapon/cell))
user.visible_message("<span class='filter_notice'>[user] begins cramming \the [target.name] down its throat.</span>", "<span class='notice'>You begin cramming \the [target.name] down your throat...</span>")
busy = 1 //CHOMPAdd prevents abuse
if(do_after (user, 50))
busy = 0 //CHOMPAdd prevents abuse
user.visible_message("<span class='filter_notice'>[user] finishes gulping down \the [target.name].</span>", "<span class='notice'>You finish swallowing \the [target.name].</span>")
to_chat(user, "<span class='notice'>You finish off \the [target.name], and gain some charge!</span>")
var/mob/living/silicon/robot/R = user
var/obj/item/weapon/cell/C = target
R.cell.charge += C.charge / 3
water.use_charge(5) //CHOMPAdd
qdel(target)
return
//CHOMPAdd Start
user.visible_message("<span class='filter_notice'>[user] begins to lick \the [target.name] clean...</span>", "<span class='notice'>You begin to lick \the [target.name] clean...</span>")
busy = 1
if(do_after(user, 50, exclusive = TRUE))
busy = 0
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
water.use_charge(5)
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
//CHOMPADD End
else if(ishuman(target))
if(src.emagged)
var/mob/living/silicon/robot/R = user
@@ -315,9 +364,26 @@
else
user.visible_message("<span class='notice'>\The [user] affectionately licks all over \the [target]'s face!</span>", "<span class='notice'>You affectionately lick all over \the [target]'s face!</span>")
playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
water.use_charge(5) //CHOMPAdd
var/mob/living/carbon/human/H = target
if(H.species.lightweight == 1)
H.Weaken(3)
//CHOMPAdd Start
else
user.visible_message("<span class='filter_notice'>[user] begins to lick \the [target.name] clean...</span>", "<span class='notice'>You begin to lick \the [target.name] clean...</span>")
busy = 1
if(do_after(user, 50))
busy = 0
to_chat(user, "<span class='notice'>You clean \the [target.name].</span>")
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
water.use_charge(5)
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
T.dirt = 0
busy = 0
//CHOMPADD End
return
/obj/item/pupscrubber

View File

@@ -37,6 +37,7 @@
var/datum/matter_synth/glass = null
var/datum/matter_synth/wood = null
var/datum/matter_synth/plastic = null
var/datum/matter_synth/water = null //CHOMPAdd readd water
var/digest_brute = 2
var/digest_burn = 3
var/digest_multiplier = 1
@@ -583,6 +584,7 @@
if(air_master.current_cycle%3==1 && length(touchable_items))
//Burn all the mobs or add them to the exclusion list
var/volume = 0 //CHOMPAdd
for(var/mob/living/T in (touchable_items))
touchable_items -= T //Exclude mobs from loose item picking.
if((T.status_flags & GODMODE) || !T.digestable)
@@ -596,6 +598,10 @@
var/actual_burn = T.getFireLoss() - old_burn
var/damage_gain = actual_brute + actual_burn
hound.nutrition += 2.5 * damage_gain //drain(-25 * damage_gain) //25*total loss as with voreorgan stats.//CHOMPEdit
//CHOMPAdd Start
if(water)
water.add_charge(damage_gain)
//CHOMPAdd End
if(T.stat == DEAD)
if(ishuman(T))
log_admin("[key_name(hound)] has digested [key_name(T)] with a cyborg belly. ([hound ? "<a href='?_src_=holder;[HrefToken()];adminplayerobservecoodjump=1;X=[hound.x];Y=[hound.y];Z=[hound.z]'>JMP</a>" : "null"])")
@@ -629,6 +635,17 @@
items_preserved |= brain
else
T.drop_from_inventory(I, src)
//CHOMPAdd Start
if(ishuman(T))
var/mob/living/carbon/human/Prey = T
volume = (Prey.bloodstr.total_volume + Prey.ingested.total_volume + Prey.touching.total_volume + Prey.weight) * Prey.size_multiplier
if(water)
water.add_charge(volume)
if(T.reagents)
volume = T.reagents.total_volume
if(water)
water.add_charge(volume)
//CHOMPAdd End
if(T.ckey)
GLOB.prey_digested_roundstat++
if(patient == T)
@@ -644,6 +661,10 @@
//Handle the target being anything but a /mob/living
var/obj/item/T = target
if(istype(T))
//CHOMPAdd Start
if(T.reagents)
volume = T.reagents.total_volume
//CHOMPAdd End
var/digested = T.digest_act(item_storage = src)
if(!digested)
items_preserved |= T
@@ -653,6 +674,10 @@
for(var/tech in tech_item.origin_tech)
files.UpdateTech(tech, tech_item.origin_tech[tech])
synced = FALSE
//CHOMPAdd Start
if(volume && water)
water.add_charge(volume)
//CHOMPAdd End
if(recycles && T.matter)
for(var/material in T.matter)
var/total_material = T.matter[material]

View File

@@ -108,6 +108,7 @@
/mob/living/silicon/robot/proc/sensor_mode,
/mob/living/silicon/robot/proc/robot_checklaws,
/mob/living/silicon/robot/proc/robot_mount,
/mob/living/silicon/robot/proc/ex_reserve_refill, //CHOMPEdit re-adds the extinquisher refill from water
/mob/living/proc/toggle_rider_reins,
/mob/living/proc/shred_limb
)

View File

@@ -205,9 +205,19 @@ var/global/list/robot_modules = list(
// Cyborgs (non-drones), default loadout. This will be given to every module.
/obj/item/weapon/robot_module/robot/create_equipment(var/mob/living/silicon/robot/robot)
..()
//CHOMPEdit Start
var/datum/matter_synth/water = new /datum/matter_synth(500)
water.name = "Water reserves"
water.recharge_rate = 10
water.max_energy = 1000
robot.water_res = water
synths += water
var/obj/item/device/robot_tongue/T = new /obj/item/device/robot_tongue(src)
T.water = water
src.modules += T
//CHOMPEdit End
src.modules += new /obj/item/device/gps/robot(src)
src.modules += new /obj/item/device/boop_module(src)
src.modules += new /obj/item/device/robot_tongue(src)
src.modules += new /obj/item/device/flash/robot(src)
src.modules += new /obj/item/weapon/extinguisher(src)
src.modules += new /obj/item/weapon/gripper/scene(src) //CHOMPEdit - Give all borgs a scene gripper

View File

@@ -1,6 +1,3 @@
/mob/living/silicon/robot //ChompEDIT
var/sleeper_resting = FALSE //CHOMPEdit - Enable resting belly sprites for dogborgs that have the sprites
/mob/living/silicon/robot/verb/robot_nom(var/mob/living/T in living_mobs(1))
set name = "Robot Nom"
set category = "IC"

View File

@@ -0,0 +1,7 @@
/obj/item/device/robot_tongue/examine(user)
. = ..()
if(Adjacent(user))
if(water.energy)
. += "<span class='notice'>[src] is wet. Just like it should be.</span>"
if(water.energy < 5)
. += "<span class='notice'>[src] is dry.</span>"

View File

@@ -1,3 +1,7 @@
/mob/living/silicon/robot
var/sleeper_resting = FALSE //Enable resting belly sprites for dogborgs that have the sprites
var/datum/matter_synth/water_res = null //Enable water for lick clean
/mob/living/silicon/robot/verb/purge_nutrition()
set name = "Purge Nutrition"
set category = "IC"
@@ -8,3 +12,19 @@
nutrition = 1000
to_chat(src, "<span class='warning'>You have purged most of the nutrition lingering in your systems.</span>")
return TRUE
/mob/living/silicon/robot/proc/ex_reserve_refill()
set name = "Refill Extinguisher"
set category = "Object"
var/datum/matter_synth/water = water_res
for(var/obj/item/weapon/extinguisher/E in module.modules)
if(E.reagents.total_volume < E.max_water)
if(water && water.energy > 0)
var/amount = E.max_water - E.reagents.total_volume
if(water.energy < amount)
amount = water.energy
water.use_charge(amount)
E.reagents.add_reagent("water", amount)
to_chat(src, "<span class='filter_notice'>You refill the extinguisher using your water reserves.</span>")
else
to_chat(src, "<span class='filter_notice'>Insufficient water reserves.</span>")

View File

@@ -4738,6 +4738,7 @@
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\xenomorph_hybrid_trait.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\robot.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\robot_movement.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\dogborg\dog_modules.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\civilian.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\clown.dm"