Gripper attackby fixes (#13571)

This cannot go wrong, can it?
This commit is contained in:
mikomyazaki
2022-04-20 22:15:15 +02:00
committed by GitHub
parent d8497aa4cb
commit e59589ec8a
184 changed files with 975 additions and 894 deletions
+4 -4
View File
@@ -20,7 +20,7 @@
if(I.iswelder())
var/obj/item/weldingtool/WT = I
if(!WT.isOn())
return
return TRUE
if(WT.remove_fuel(0,user))
user.visible_message("<b>[user]</b> starts slicing \the [src] apart.", SPAN_NOTICE("You start slicing \the [src] apart."))
playsound(src, 'sound/items/welder.ogg', 100, 1)
@@ -31,8 +31,8 @@
if(reinf_material)
reinf_material.place_sheet(get_turf(src))
qdel(src)
return
..()
return TRUE
return ..()
/obj/effect/overlay/thermite
name = "burning thermite"
@@ -43,4 +43,4 @@
layer = 5
/obj/effect/overlay/burnt_wall/steel/Initialize(mapload)
. = ..(mapload, "wall", MATERIAL_STEEL)
. = ..(mapload, "wall", MATERIAL_STEEL)
+10 -9
View File
@@ -180,29 +180,29 @@
var/obj/item/grab/G = I
if(G.state < GRAB_AGGRESSIVE)
to_chat(user, SPAN_WARNING("You need a stronger grip to do that!"))
return
return TRUE
G.affecting.forceMove(src.loc)
visible_message(SPAN_WARNING("[G.assailant] smashes [G.affecting] through the foamed metal wall."))
G.affecting.take_overall_damage(15)
qdel(I)
qdel(src)
return
return TRUE
else if(istype(I, /obj/item/stack/material))
var/obj/item/stack/material/S = I
if(S.get_amount() < 4)
to_chat(user, SPAN_NOTICE("There isn't enough material here to construct a wall."))
return
return TRUE
var/material/M = SSmaterials.get_material_by_name(S.default_type)
if(!istype(M))
return
return TRUE
if(M.integrity < 50)
to_chat(user, SPAN_NOTICE("This material is too soft for use in wall construction."))
return
return TRUE
user.visible_message("<b>[user]</b> starts slotting material into \the [src]...", SPAN_NOTICE("You start slotting material into \the [src], forming it into a wall..."))
if(!do_after(user, 10 SECONDS) || !S.use(4))
return
return TRUE
var/turf/Tsrc = get_turf(src)
var/original_type = Tsrc.type
Tsrc.ChangeTurf(/turf/simulated/wall)
@@ -211,18 +211,18 @@
T.set_material(M)
T.add_hiddenprint(usr)
qdel(src)
return
return TRUE
else if(istype(I, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
if(T.type != /turf/space && !isopenturf(T)) // need to do a hard check here because transit turfs are also space turfs
to_chat(user, SPAN_WARNING("The tile below \the [src] isn't an open space, or space itself!"))
return
return TRUE
var/obj/item/stack/tile/floor/S = I
S.use(1)
T.ChangeTurf(/turf/simulated/floor/airless)
qdel(src)
return
return TRUE
user.do_attack_animation(src, I)
if(prob(I.force * 20 - metal * 25))
@@ -231,6 +231,7 @@
else
to_chat(user, SPAN_NOTICE("You hit the metal foam to no effect."))
shake_animation()
return TRUE
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group)
@@ -66,8 +66,8 @@
/obj/effect/decal/cleanable/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/gun/energy/rifle/cult))
return
..()
return TRUE
return ..()
/obj/effect/decal/cleanable/blood/update_icon()
if(basecolor == "rainbow") basecolor = get_random_colour(1)
@@ -135,7 +135,7 @@
else
to_chat(user, "<span class='notice'>You carefully remove the poster from the wall.</span>")
roll_and_drop(user.loc)
return
return TRUE
/obj/structure/sign/poster/attack_hand(mob/user as mob)
+2 -2
View File
@@ -43,8 +43,8 @@
/obj/effect/decal/remains/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/gun/energy/rifle/cult))
return
..()
return TRUE
return ..()
//Target turns to ash.
/obj/effect/decal/remains/proc/crumble()
@@ -46,4 +46,4 @@
to_chat(user, SPAN_WARNING("\The [src] is solidly attached, it doesn't budge!"))
/obj/effect/plastic_explosive/attackby(var/obj/item/I, var/mob/user)
parent.attackby(I, user)
return parent.attackby(I, user)
+3 -3
View File
@@ -44,7 +44,7 @@
if(istype(I, /obj/item/bluespace_neutralizer))
user.visible_message("<b>[user]</b> collapses \the [src] with \the [I].", SPAN_NOTICE("You collapse \the [src] with \the [I]."))
qdel(src)
return
return TRUE
return ..()
/obj/effect/portal/attack_hand(mob/user)
@@ -226,7 +226,7 @@
/obj/effect/portal/revenant/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/bluespace_neutralizer))
to_chat(user, SPAN_WARNING("You need to activate \the [I] and keep it near \the [src] to collapse it."))
return
return TRUE
return ..()
/obj/effect/portal/revenant/proc/reduce_health(var/amount = 1)
@@ -264,4 +264,4 @@
#undef COLOR_STAGE_THREE
#undef COLOR_STAGE_TWO
#undef COLOR_STAGE_ONE
#undef COLOR_STAGE_ZERO
#undef COLOR_STAGE_ZERO
+3 -1
View File
@@ -28,6 +28,7 @@
if(WT.remove_fuel(0, user))
damage = 15
playsound(loc, 'sound/items/welder.ogg', 100, 1)
return TRUE
else
user.do_attack_animation(src)
playsound(loc, W.hitsound, 50, 1, -1)
@@ -277,11 +278,12 @@
die()
/obj/effect/spider/spiderling/attackby(var/obj/item/W, var/mob/user)
..()
. = ..()
if(istype(W, /obj/item/newspaper))
var/obj/item/newspaper/N = W
if(N.rolled)
die()
return TRUE
/**
* Makes the organ spew out all of the spiderlings it has. It's triggered at the point