mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Allow mechs to butcher things with their drill. (#7493)
* Allow mechs to butcher things with their drill. - Vague copy of a TG feature, made difficult by their different code. Still, it works. * Add changelog
This commit is contained in:
@@ -49,11 +49,34 @@
|
||||
for(var/obj/item/weapon/ore/ore in range(chassis,1))
|
||||
if(get_dir(chassis,ore)&chassis.dir)
|
||||
ore.forceMove(ore_box)
|
||||
else if(isliving(target))
|
||||
drill_mob(target, chassis.occupant)
|
||||
return 1
|
||||
else if(target.loc == C)
|
||||
log_message("Drilled through [target]")
|
||||
target.ex_act(2)
|
||||
return 1
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/proc/drill_mob(mob/living/target, mob/user)
|
||||
add_attack_logs(user, target, "attacked", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
|
||||
var/drill_force = force //Couldn't manage it otherwise.
|
||||
if(ishuman(target))
|
||||
target.apply_damage(drill_force, BRUTE)
|
||||
return
|
||||
|
||||
else if(istype(target, /mob/living/simple_mob))
|
||||
var/mob/living/simple_mob/S = target
|
||||
if(target.stat == DEAD)
|
||||
if(S.meat_amount > 0)
|
||||
S.harvest(user)
|
||||
return
|
||||
else
|
||||
S.gib()
|
||||
return
|
||||
else
|
||||
S.apply_damage(drill_force)
|
||||
return
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
name = "diamond drill"
|
||||
desc = "This is an upgraded version of the drill that'll pierce the heavens!"
|
||||
|
||||
@@ -271,18 +271,22 @@
|
||||
|
||||
|
||||
// Harvest an animal's delicious byproducts
|
||||
/mob/living/simple_mob/proc/harvest(var/mob/user)
|
||||
/mob/living/simple_mob/proc/harvest(var/mob/user, var/invisible)
|
||||
var/actual_meat_amount = max(1,(meat_amount/2))
|
||||
var/attacker_name = user.name
|
||||
if(invisible)
|
||||
attacker_name = "someone"
|
||||
|
||||
if(meat_type && actual_meat_amount>0 && (stat == DEAD))
|
||||
for(var/i=0;i<actual_meat_amount;i++)
|
||||
var/obj/item/meat = new meat_type(get_turf(src))
|
||||
meat.name = "[src.name] [meat.name]"
|
||||
if(issmall(src))
|
||||
user.visible_message("<span class='danger'>[user] chops up \the [src]!</span>")
|
||||
user.visible_message("<span class='danger'>[attacker_name] chops up \the [src]!</span>")
|
||||
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
|
||||
qdel(src)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] butchers \the [src] messily!</span>")
|
||||
user.visible_message("<span class='danger'>[attacker_name] butchers \the [src] messily!</span>")
|
||||
gib()
|
||||
|
||||
|
||||
|
||||
36
html/changelogs/Kot - Mechdrill.yml
Normal file
36
html/changelogs/Kot - Mechdrill.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Kot
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Mecha drills can now butcher things better. Like gibs and gore and guts stuff."
|
||||
Reference in New Issue
Block a user