Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angle grinder AGAIN! Also, makes plasma cutters used for salvage instead of mining (and base gearpacks) #3146

Merged
merged 65 commits into from
Oct 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
6098b2f
adding angle grinder (no other object modified)
Jan 13, 2023
51b7e7e
make angle grinder work on some things and hurt eyes
Jan 13, 2023
278357a
make the angle grinder work as a 80% circular saw for getho surgery
Jan 13, 2023
280f8dc
typo in the last two commits
Jan 13, 2023
873f927
deconstruct a bunch more stuff and allow to carry on back
Jan 17, 2023
3d665ab
adding a proper icon to the grinde (sprite made by nirv)
Jan 18, 2023
4716a4c
fixed deconstruct windows with grinder
Jan 18, 2023
fcb97a1
angle grinder at a satisfactory price ? (probaly temporary)
Jan 18, 2023
82d5207
added the /atom/proc/deconstruct_act(/mob/living/user, /obj/item/I) p…
Jan 20, 2023
f5975ca
typo
Jan 20, 2023
69d790f
salvage waste planet brocken machines
Jan 22, 2023
6d19596
force locked crates/closet
Jan 22, 2023
16ea42c
make some feature toggleable at compilation
Jan 24, 2023
79c264e
config anglegrinder outpost availability
Jan 24, 2023
9472104
angle grinder open safe, maybe ?
Jan 30, 2023
5193d81
linter
Jan 30, 2023
21b3fb0
i'm gonna eat the linter
Jan 30, 2023
87a3a5d
fix the angle grinder making light
Jan 30, 2023
ef14c14
angle grinder now have it's sound yipee
Jan 30, 2023
f1139ae
move config #defines and make them better
Jan 30, 2023
207d085
deconstruct railing
Jan 30, 2023
1d9a9bf
deconstruct machine FRAME
Jan 31, 2023
d5a5772
correct a typo in the previous commit
Jan 31, 2023
fbe0669
angle grinder deafen on use and you can now wear earmuff on neck
Jan 31, 2023
d04bb56
linter ?
Jan 31, 2023
d632fae
guess who wote non compiling code to correct a linter error ?
Jan 31, 2023
c26b6a3
does the linter take blood tribute ?
Jan 31, 2023
86804e4
white space
Jan 31, 2023
d683af8
Apply the description changes suggested by zevotech
Feb 28, 2023
65ee50f
deconstructing wooden baricade
Apr 19, 2023
6381bb6
gets code up to date and basic changes
Thera-Pissed Jun 23, 2024
bc698e4
more code updates
Thera-Pissed Jun 23, 2024
85021fc
wield these
Thera-Pissed Jun 24, 2024
575c8d5
step 2. make it a backpack mount and take power
Thera-Pissed Jun 24, 2024
564c890
part 3 simple fixes
Thera-Pissed Jun 24, 2024
25fac9e
grilles and windows. windows get broken and are dumb to break
Thera-Pissed Jun 24, 2024
e6bd316
plastitanium
Thera-Pissed Jun 24, 2024
d9329ad
revives gear_packs by bjarl because theyre just better
Thera-Pissed Jun 24, 2024
48d3ca9
makes jackhammers not break walls good except concrete ones
Thera-Pissed Jun 28, 2024
48501d7
adds grinders and normal cutters to colossus, gecko, and hyena
Thera-Pissed Jun 29, 2024
183efd7
merge conflict
Thera-Pissed Jun 29, 2024
925ed42
Merge branch 'master' into angle-grinder-again
Thera-Pissed Jun 29, 2024
318b986
actually updates hyena
Thera-Pissed Jun 29, 2024
71af6be
Merge branch 'master' into angle-grinder-again
Thera-Pissed Jul 2, 2024
dd3a9e1
I love .dmi merge conflicts
Thera-Pissed Jul 5, 2024
4973c65
Merge branch 'master' into angle-grinder-again
Thera-Pissed Jul 5, 2024
04684be
merge conflict and preload cell fix
Thera-Pissed Jul 5, 2024
dfa5080
Merge branch 'angle-grinder-again' of https://github.com/Thera-Pissed…
Thera-Pissed Jul 5, 2024
781132c
conflict from temp fix
Thera-Pissed Jul 12, 2024
2fdc073
cleans up closest deconstuct logic
FalloutFalcon Jul 14, 2024
d2bd1da
Merge pull request #2 from FalloutFalcon/quick-refactor-to-deconstuct
Thera-Pissed Jul 14, 2024
c6ba5be
gear_handle instead of attachment
Thera-Pissed Jul 14, 2024
15e005b
Merge branch 'angle-grinder-again' of https://github.com/Thera-Pissed…
Thera-Pissed Jul 14, 2024
636b461
vsc + githubdesktop = head injury
Thera-Pissed Jul 14, 2024
f10b088
Update angle_grinder.dm
Thera-Pissed Jul 14, 2024
21f8bc2
adv cut effect, part of review, went down mech saw rabbit hole.
Thera-Pissed Jul 15, 2024
65366ea
tweaks & energy saw & inhands
Thera-Pissed Jul 16, 2024
422d597
undoes map changes in prep for destructible walls
Thera-Pissed Jul 16, 2024
e9ba71d
Merge remote-tracking branch 'upstream/master' into angle-grinder-again
Thera-Pissed Sep 16, 2024
32c1f7e
destructable walls stuff
Thera-Pissed Sep 16, 2024
e1da812
part of review
Thera-Pissed Sep 16, 2024
548f971
Update code/game/objects/structures/girders.dm
Thera-Pissed Sep 20, 2024
89cacd4
Merge remote-tracking branch 'upstream/master' into angle-grinder-again
Thera-Pissed Sep 25, 2024
cf8d263
Merge branch 'master' into angle-grinder-again
Thera-Pissed Sep 25, 2024
9b33fa1
grinder works on walls again
Thera-Pissed Sep 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
#define COMSIG_ATOM_CROWBAR_ACT "atom_crowbar_act"
///from base of atom/analyser_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_ANALYSER_ACT "atom_analyser_act"
///from base of atom/deconstruct_act(): (mob/living/user, obj/item/I)
#define COMSIG_ATOM_DECONSTRUCT_ACT "atom_deconstruct_act"

///for any tool behaviors: (mob/living/user, obj/item/I, list/recipes)
#define COMSIG_ATOM_TOOL_ACT(tooltype) "tool_act_[tooltype]"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define TOOL_SCALPEL "scalpel"
#define TOOL_SAW "saw"
#define TOOL_KNIFE "knife" //luv me kuh-nyfe
#define TOOL_DECONSTRUCT "deconstruct"

// If delay between the start and the end of tool operation is less than MIN_TOOL_SOUND_DELAY,
// tool sound is only played when op is started. If not, it's played twice.
Expand Down
3 changes: 3 additions & 0 deletions code/datums/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@
/datum/action/item_action/toggle_mister
name = "Toggle Mister"

/datum/action/item_action/toggle_gear_handle
name = "Toggle Gear Handle"

/datum/action/item_action/activate_injector
name = "Activate Injector"

Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS // Only one of the component can exist on an item
var/wielded = FALSE /// Are we holding the two handed item properly
var/force_multiplier = 0 /// The multiplier applied to force when wielded, does not work with force_wielded, and force_unwielded
var/force_wielded = 0 /// The force of the item when weilded
var/force_unwielded = 0 /// The force of the item when unweilded
var/force_wielded = 0 /// The force of the item when wielded
var/force_unwielded = 0 /// The force of the item when unwielded
var/wieldsound = FALSE /// Play sound when wielded
var/unwieldsound = FALSE /// Play sound when unwielded
var/attacksound = FALSE /// Play sound on attack when wielded
Expand Down
40 changes: 40 additions & 0 deletions code/datums/elements/tool_bang.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* Tool bang bespoke element
*
* Bang the user when using this tool
*/
/datum/element/tool_bang
element_flags = ELEMENT_BESPOKE
id_arg_index = 2
/// Strength of the bang
var/bang_strength

/datum/element/tool_bang/Attach(datum/target, bang_strength)
. = ..()
if(!isitem(target))
return ELEMENT_INCOMPATIBLE

src.bang_strength = bang_strength

RegisterSignal(target, COMSIG_TOOL_IN_USE, PROC_REF(prob_bang))
RegisterSignal(target, COMSIG_TOOL_START_USE, PROC_REF(bang))

/datum/element/tool_bang/Detach(datum/source, force)
. = ..()
UnregisterSignal(source, list(COMSIG_TOOL_IN_USE, COMSIG_TOOL_START_USE))

/datum/element/tool_bang/proc/prob_bang(datum/source, mob/living/user)
SIGNAL_HANDLER

if(prob(90))
return
bang(source, user)

/datum/element/tool_bang/proc/bang(datum/source, mob/living/user)
SIGNAL_HANDLER

if(user && get_dist(get_turf(source), get_turf(user)) <= 1)
if(istype(user, /mob/living/carbon))
var/mob/living/carbon/carbon = user
carbon.soundbang_act(min(bang_strength,1), 0, 1, 5)

6 changes: 6 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,8 @@
. = welder_act(user, I)
if(TOOL_ANALYZER)
. = analyzer_act(user, I)
if(TOOL_DECONSTRUCT)
. |= deconstruct_act(user, I)
if(. || signal_result & COMPONENT_BLOCK_TOOL_ATTACK) //Either the proc or the signal handled the tool's events in some way.
return TRUE

Expand Down Expand Up @@ -1362,6 +1364,10 @@
/atom/proc/analyzer_act(mob/living/user, obj/item/I)
return SEND_SIGNAL(src, COMSIG_ATOM_ANALYSER_ACT, user, I)

///Deconstruct act
/atom/proc/deconstruct_act(mob/living/user, obj/item/I)
return SEND_SIGNAL(src, COMSIG_ATOM_DECONSTRUCT_ACT, user, I)

///Generate a tag for this atom
/atom/proc/GenerateTag()
return
Expand Down
12 changes: 10 additions & 2 deletions code/game/machinery/constructable_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,22 @@
. += "It has \a [circuit] installed."


/obj/structure/frame/deconstruct(disassembled = TRUE)
/obj/structure/frame/deconstruct(disassembled = TRUE, scrapped = FALSE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/sheet/metal(loc, 5)
if(circuit)
if(circuit && !scrapped)
circuit.forceMove(loc)
circuit = null
qdel(src)

/obj/structure/frame/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(!I.tool_start_check(user, amount=0))
return FALSE
if(I.use_tool(src, user, 3 SECONDS, volume=0))
to_chat(user, "<span class='warning'>You cut apart \the [src].</span>", "<span class='notice'>You cut apart \the [src].</span>")
deconstruct()
return TRUE

/obj/structure/frame/machine
name = "machine frame"
Expand Down
8 changes: 8 additions & 0 deletions code/game/machinery/deployable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@
return
return ..()

/obj/structure/barricade/wooden/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(!I.tool_start_check(user, amount=0))
return FALSE
if (I.use_tool(src, user, 2 SECONDS, volume=0))
to_chat(user, "<span class='warning'>You cut apart [src].</span>")
deconstruct()
return TRUE

/obj/structure/barricade/wooden/crude
name = "crude plank barricade"
Expand Down
15 changes: 15 additions & 0 deletions code/game/machinery/doors/airlock.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,21 @@
return
INVOKE_ASYNC(src, (density ? PROC_REF(open) : PROC_REF(close)), 2)

/obj/machinery/door/airlock/deconstruct_act(mob/living/user, obj/item/I)
. = ..()
if(!I.tool_start_check(user, amount=0))
return FALSE
var/decon_time = 5 SECONDS
if(welded)
decon_time += 5 SECONDS
if(locked)
decon_time += 5 SECONDS
if(seal)
decon_time += 15 SECONDS
if (I.use_tool(src, user, decon_time, volume=100))
to_chat(user, "<span class='warning'>You cut open the [src].</span>")
deconstruct(FALSE, user)
return TRUE

/obj/machinery/door/airlock/open(forced=0)
if(operating || welded || locked || seal || !wires)
Expand Down
80 changes: 80 additions & 0 deletions code/game/mecha/equipment/tools/work_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,86 @@
return 1
//WS Edit End - Readded from Smartwire Revert

/obj/item/mecha_parts/mecha_equipment/salvage_saw
name = "109-C Salvage Saw"
desc = "Equipment for cutting open walls and airlocks."
icon_state = "mecha_saw"
equip_cooldown = 5
energy_drain = 10
force = 15
var/dam_force = 30
harmful = TRUE
tool_behaviour = TOOL_DECONSTRUCT
toolspeed = 0.5
var/datum/effect_system/spark_spread/spark_system

/obj/item/mecha_parts/mecha_equipment/salvage_saw/can_attach(obj/mecha/M as obj)
if(..())
if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat))
return 1
return 0

/obj/item/mecha_parts/mecha_equipment/salvage_saw/attach()
..()
toolspeed = 0.5
return

/obj/item/mecha_parts/mecha_equipment/salvage_saw/detach()
..()
toolspeed = 10 //yeah sure, use a mech tool without a mech. see how far that gets you
return ..()

/obj/item/mecha_parts/mecha_equipment/salvage_saw/action(atom/target)
if(!action_checks(target))
return
if(isliving(target))
if(chassis.occupant.a_intent == INTENT_HARM)
var/mob/living/M = target
saw_mob(M, chassis.occupant)
return
else
target.add_overlay(GLOB.cutting_effect)
if(target.deconstruct_act(chassis.occupant, src))
do_sparks(2, TRUE, src)
chassis.stopped--
target.cut_overlay(GLOB.cutting_effect)
if(!chassis.stopped)
occupant_message("[src] finishes cutting, allowing movement again.")

/obj/item/mecha_parts/mecha_equipment/salvage_saw/tool_start_check(user, amount)
if(!chassis.stopped)
occupant_message("[src] begins cutting, locking in place!")
chassis.stopped++
return TRUE

/obj/item/mecha_parts/mecha_equipment/salvage_saw/proc/saw_mob(mob/living/target, mob/user)
target.visible_message("<span class='danger'>[chassis] is sawing [target] with [src]!</span>", \
"<span class='userdanger'>[chassis] is sawing you with [src]!</span>")
if(!do_after_cooldown(target))
return
log_combat(user, target, "sawed", "[name]", "(INTENT: [uppertext(user.a_intent)]) (DAMTYPE: [uppertext(damtype)])")
if(target.stat == DEAD && target.getBruteLoss() >= 400)
log_combat(user, target, "gibbed", name)
target.gib()
else
var/obj/item/bodypart/target_part = target.get_bodypart(ran_zone(BODY_ZONE_CHEST))
target.apply_damage(15, BRUTE, BODY_ZONE_CHEST, target.run_armor_check(target_part, "melee"))

//blood splatters
var/splatter_dir = get_dir(chassis, target)
if(isalien(target))
new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(target.drop_location(), splatter_dir)
else
var/splatter_color = null
if(iscarbon(target))
var/mob/living/carbon/carbon_target = target
splatter_color = carbon_target.dna.blood_type.color
new /obj/effect/temp_visual/dir_setting/bloodsplatter(target.drop_location(), splatter_dir, splatter_color)

//organs go everywhere
if(target_part && prob(10))
target_part.dismember(BRUTE)

//Dunno where else to put this so shrug
/obj/item/mecha_parts/mecha_equipment/conversion_kit
name = "Exosuit Conversion Kit"
Expand Down
3 changes: 3 additions & 0 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
light_on = FALSE
var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming.
var/can_move = 0 //time of next allowed movement
var/stopped = FALSE
var/mob/living/carbon/occupant = null
var/step_in = 10 //make a step in step_in/10 sec.
var/dir_in = 2//What direction will the mech face when entered/powered on? Defaults to South.
Expand Down Expand Up @@ -585,6 +586,8 @@
/obj/mecha/proc/domove(direction)
if(can_move >= world.time)
return 0
if(stopped)
return 0
if(!Process_Spacemove(direction))
return 0
if(!has_charge(step_energy_drain))
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/e

GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons/effects/welding_effect.dmi', "welding_sparks", GASFIRE_LAYER, ABOVE_LIGHTING_PLANE))

GLOBAL_DATUM_INIT(cutting_effect, /mutable_appearance, mutable_appearance('icons/effects/cutting_effect.dmi', "cutting_effect", GASFIRE_LAYER, ABOVE_LIGHTING_PLANE))

GLOBAL_DATUM_INIT(advanced_cutting_effect, /mutable_appearance, mutable_appearance('icons/effects/cutting_effect.dmi', "advanced_cutting_effect", GASFIRE_LAYER, ABOVE_LIGHTING_PLANE))

GLOBAL_DATUM_INIT(cleaning_bubbles, /mutable_appearance, mutable_appearance('icons/effects/effects.dmi', "bubbles", ABOVE_MOB_LAYER, GAME_PLANE))

GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
Expand Down
Loading
Loading