mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 14:37:04 +01:00
[Testmerge ready] Ports tool behaviours; refactors all tools; adds functionality for self-filling reagent containers (#11700)
* Adds support for self-filling reagent containers * Sets tool_behaviour on the default set of tools * Fixing merge conflicts * Refactors welder to use tool behaviour * The refactor: part I * The refactor: part II * Tool Refactor Part III: Revenge of the Maint * Tool Refactor Part IV: A New Hope * Tool Refactor Part V: The Oldcoder Strikes Back * Tool Refactor Part VI: Return of the Coder * VII * Holy shit, it compiles?! * Nannek I completed your TODO, you owe me ice cream * Tool helpers; telepad is compliant * Bugtest, Round 1: Fight Fuck refactoring disposals * Buggfixing, Round 2: Electric Boogaloo * Personal crafting uses tool behaviours now * Construction datums use new tool behaviours; better way of handling fueltank refuelling; more bugfixing * multitool_check_buffer change; removes some useless things in tool_helpers * proc name change * TRUE/FALSE changes * Bugfixing, Round 3: A Good Day To Bugfix Hard Fixes multiple issues raised by the testmerge * Minor style changes
This commit is contained in:
@@ -301,21 +301,6 @@
|
||||
if(loc == user)
|
||||
A.Grant(user)
|
||||
|
||||
if(isscrewdriver(I))
|
||||
if(gun_light && can_flashlight)
|
||||
for(var/obj/item/flashlight/seclite/S in src)
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
|
||||
gun_light = null
|
||||
S.loc = get_turf(user)
|
||||
update_gun_light(user)
|
||||
S.update_brightness(user)
|
||||
update_icon()
|
||||
for(var/datum/action/item_action/toggle_gunlight/TGL in actions)
|
||||
qdel(TGL)
|
||||
else if(bayonet && can_bayonet) //if it has a bayonet, and the bayonet can be removed
|
||||
bayonet.forceMove(get_turf(user))
|
||||
clear_bayonet()
|
||||
|
||||
if(unique_rename)
|
||||
if(istype(I, /obj/item/pen))
|
||||
rename_gun(user)
|
||||
@@ -339,6 +324,24 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/screwdriver_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
if(gun_light && can_flashlight)
|
||||
for(var/obj/item/flashlight/seclite/S in src)
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
|
||||
gun_light = null
|
||||
S.loc = get_turf(user)
|
||||
update_gun_light(user)
|
||||
S.update_brightness(user)
|
||||
update_icon()
|
||||
for(var/datum/action/item_action/toggle_gunlight/TGL in actions)
|
||||
qdel(TGL)
|
||||
else if(bayonet && can_bayonet) //if it has a bayonet, and the bayonet can be removed
|
||||
bayonet.forceMove(get_turf(user))
|
||||
clear_bayonet()
|
||||
|
||||
/obj/item/gun/proc/toggle_gunlight()
|
||||
set name = "Toggle Gun Light"
|
||||
set category = "Object"
|
||||
|
||||
@@ -37,20 +37,23 @@
|
||||
. += "<span class='notice'>There is a [M.name] mod installed, using <b>[M.cost]%</b> capacity.</span>"
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/I, mob/user)
|
||||
if(iscrowbar(I))
|
||||
if(modkits.len)
|
||||
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
|
||||
playsound(loc, I.usesound, 100, 1)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in modkits)
|
||||
M.uninstall(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
|
||||
else if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
if(istype(I, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/MK = I
|
||||
MK.install(src, user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/crowbar_act(mob/user, obj/item/I)
|
||||
. = TRUE
|
||||
if(!modkits.len)
|
||||
to_chat(user, "<span class='notice'>There are no modifications currently installed.</span>")
|
||||
return
|
||||
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
|
||||
for(var/obj/item/borg/upgrade/modkit/M in modkits)
|
||||
M.uninstall(src)
|
||||
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
|
||||
var/current_capacity_used = 0
|
||||
for(var/A in get_modkits())
|
||||
|
||||
Reference in New Issue
Block a user