mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
People can now pet held mothroaches and pugs if they want to, or use items on them, hopefully without causing many issues. After all, it only took about a couple dozen lines of code to make... ...Oh, did the 527 files changed or the 850~ lines added/removed perhaps catch your eye? Made you wonder if I accidentally pushed the wrong branch? or skewed something up big time? Well, nuh uh. I just happen to be fed up with the melee attack chain still using stringized params instead of an array/list. It was frankly revolting to see how I'd have had to otherwise call `list2params` for what I'm trying to accomplish here, and make this PR another tessera to the immense stupidity of our attack chain procs calling `params2list` over and over and over instead of just using that one call instance from `ClickOn` as an argument. It's 2025, honey, wake up! I also tried to replace some of those single letter vars/args but there are just way too many of them. Improving old code. And I want to be able to pet mobroaches while holding them too. 🆑 qol: You can now interact with held mobs in more ways beside wearing them. /🆑
This commit is contained in:
@@ -67,7 +67,7 @@
|
||||
. = ..()
|
||||
. += span_notice("You could probably attach some <b>wires</b> to it...")
|
||||
|
||||
/obj/item/mod/construction/lavalandcore/attackby(obj/item/weapon, mob/user, params)
|
||||
/obj/item/mod/construction/lavalandcore/attackby(obj/item/weapon, mob/user, list/modifiers)
|
||||
if(!istype(weapon, /obj/item/stack/cable_coil))
|
||||
return ..()
|
||||
if(!weapon.tool_start_check(user, amount=2))
|
||||
@@ -155,7 +155,7 @@
|
||||
display_text = "All it's missing is <b>external plating</b>..."
|
||||
. += span_notice(display_text)
|
||||
|
||||
/obj/item/mod/construction/shell/attackby(obj/item/part, mob/user, params)
|
||||
/obj/item/mod/construction/shell/attackby(obj/item/part, mob/user, list/modifiers)
|
||||
. = ..()
|
||||
switch(step)
|
||||
if(START_STEP)
|
||||
|
||||
@@ -210,7 +210,7 @@
|
||||
return
|
||||
cell.use(0.02 * STANDARD_CELL_RATE * seconds_per_tick, force = TRUE)
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/attackby(obj/item/attacked_by, mob/user, params)
|
||||
/obj/item/clothing/neck/link_scryer/attackby(obj/item/attacked_by, mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(cell || !istype(attacked_by, /obj/item/stock_parts/power_store/cell))
|
||||
return
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/mod/module/anomaly_locked/attackby(obj/item/item, mob/living/user, params)
|
||||
/obj/item/mod/module/anomaly_locked/attackby(obj/item/item, mob/living/user, list/modifiers)
|
||||
if(item.type in accepted_anomalies)
|
||||
if(core)
|
||||
balloon_alert(user, "core already in!")
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
else
|
||||
. += span_warning("The implant is missing.")
|
||||
|
||||
/obj/item/mod/module/pathfinder/attack(mob/living/target, mob/living/user, params)
|
||||
/obj/item/mod/module/pathfinder/attack(mob/living/target, mob/living/user, list/modifiers)
|
||||
if(!ishuman(target) || !implant)
|
||||
return
|
||||
if(!do_after(user, 1.5 SECONDS, target = target))
|
||||
|
||||
Reference in New Issue
Block a user