Skip to content

Commit

Permalink
energy weapons dont need the transforming parent type
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed Sep 30, 2024
1 parent 2892509 commit 21cf5f0
Show file tree
Hide file tree
Showing 40 changed files with 148 additions and 156 deletions.
2 changes: 1 addition & 1 deletion _maps/RandomRuins/BeachRuins/beach_treasure_cove.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@
pixel_x = -6;
pixel_y = 10
},
/obj/item/melee/transforming/energy/sword/saber/pirate/red{
/obj/item/melee/energy/sword/saber/pirate/red{
pixel_y = 8;
pixel_x = 10
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/RandomRuins/JungleRuins/jungle_cavecrew.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,7 @@
pixel_y = -8;
pixel_x = 5
},
/obj/item/melee/transforming/energy/sword/saber/pirate/red,
/obj/item/melee/energy/sword/saber/pirate/red,
/turf/open/floor/wood,
/area/ruin/jungle/cavecrew/dormitories)
"Dh" = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2482,7 +2482,7 @@
icon_state = "gib3-old";
pixel_x = -6
},
/obj/item/melee/transforming/energy/sword/saber/pirate/yellow{
/obj/item/melee/energy/sword/saber/pirate/yellow{
pixel_x = -5;
pixel_y = 16
},
Expand Down
12 changes: 6 additions & 6 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2661,7 +2661,7 @@
/obj/item/clothing/suit/armor/tdome/red,
/obj/item/clothing/head/helmet/thunderdome,
/obj/item/melee/baton/loaded,
/obj/item/melee/transforming/energy/sword/saber/red,
/obj/item/melee/energy/sword/saber/red,
/obj/effect/turf_decal/industrial/warning{
dir = 4
},
Expand Down Expand Up @@ -3962,7 +3962,7 @@
/obj/item/clothing/suit/armor/tdome/green,
/obj/item/clothing/head/helmet/thunderdome,
/obj/item/melee/baton/loaded,
/obj/item/melee/transforming/energy/sword/saber/green,
/obj/item/melee/energy/sword/saber/green,
/obj/effect/turf_decal/industrial/warning{
dir = 8
},
Expand Down Expand Up @@ -6922,7 +6922,7 @@
/obj/effect/turf_decal/corner/opaque/blue{
dir = 8
},
/obj/item/melee/transforming/energy/ctf,
/obj/item/melee/energy/ctf,
/turf/open/floor/plasteel/dark,
/area/ctf)
"cEn" = (
Expand Down Expand Up @@ -7850,7 +7850,7 @@
/obj/effect/turf_decal/corner/opaque/red{
dir = 8
},
/obj/item/melee/transforming/energy/ctf,
/obj/item/melee/energy/ctf,
/turf/open/floor/plasteel/dark,
/area/ctf)
"eDS" = (
Expand Down Expand Up @@ -8401,7 +8401,7 @@
/obj/item/clothing/suit/armor/tdome/green,
/obj/item/clothing/head/helmet/thunderdome,
/obj/item/melee/baton/loaded,
/obj/item/melee/transforming/energy/sword/saber/green,
/obj/item/melee/energy/sword/saber/green,
/obj/effect/turf_decal/industrial/warning{
dir = 8
},
Expand Down Expand Up @@ -14416,7 +14416,7 @@
/obj/item/clothing/suit/armor/tdome/red,
/obj/item/clothing/head/helmet/thunderdome,
/obj/item/melee/baton/loaded,
/obj/item/melee/transforming/energy/sword/saber/red,
/obj/item/melee/energy/sword/saber/red,
/obj/effect/turf_decal/industrial/warning{
dir = 4
},
Expand Down
2 changes: 1 addition & 1 deletion _maps/shuttles/pirate/pirate_noderider.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@
/obj/item/storage/box/handcuffs,
/obj/item/clothing/glasses/meson,
/obj/item/megaphone,
/obj/item/melee/transforming/energy/sword/saber/red,
/obj/item/melee/energy/sword/saber/red,
/obj/item/pinpointer/crew,
/obj/item/clothing/mask/gas/atmos,
/obj/item/clothing/mask/whistle,
Expand Down
18 changes: 9 additions & 9 deletions code/game/gamemodes/clown_ops/clown_weapons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

//BANANIUM SWORD

/obj/item/melee/transforming/energy/sword/bananium
/obj/item/melee/energy/sword/bananium
name = "bananium sword"
desc = "An elegant weapon, for a more civilized age."
force = 0
Expand All @@ -69,44 +69,44 @@
light_color = COLOR_YELLOW
var/next_trombone_allowed = 0

/obj/item/melee/transforming/energy/sword/bananium/Initialize()
/obj/item/melee/energy/sword/bananium/Initialize()
. = ..()
adjust_slipperiness()

/* Adds or removes a slippery component, depending on whether the sword
* is active or not.
*/
/obj/item/melee/transforming/energy/sword/proc/adjust_slipperiness()
/obj/item/melee/energy/sword/proc/adjust_slipperiness()
if(HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE))
AddComponent(/datum/component/slippery, 60, GALOSHES_DONT_HELP)
else
qdel(GetComponent(/datum/component/slippery))

/obj/item/melee/transforming/energy/sword/bananium/attack(mob/living/M, mob/living/user)
/obj/item/melee/energy/sword/bananium/attack(mob/living/M, mob/living/user)
..()
if(HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE))
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(src, M)

/obj/item/melee/transforming/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
/obj/item/melee/energy/sword/bananium/throw_impact(atom/hit_atom, throwingdatum)
. = ..()
if(HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE))
var/datum/component/slippery/slipper = GetComponent(/datum/component/slippery)
slipper.Slip(src, hit_atom)

/obj/item/melee/transforming/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params)
if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/transforming/energy/sword/bananium))
/obj/item/melee/energy/sword/bananium/attackby(obj/item/I, mob/living/user, params)
if((world.time > next_trombone_allowed) && istype(I, /obj/item/melee/energy/sword/bananium))
next_trombone_allowed = world.time + 50
to_chat(user, "<span class='warning'>You slap the two swords together. Sadly, they do not seem to fit!</span>")
playsound(src, 'sound/misc/sadtrombone.ogg', 50)
return TRUE
return ..()

/obj/item/melee/transforming/energy/sword/bananium/on_transform(obj/item/source, mob/user, active)
/obj/item/melee/energy/sword/bananium/on_transform(obj/item/source, mob/user, active)
. = ..()
adjust_slipperiness()

/obj/item/melee/transforming/energy/sword/bananium/ignition_effect(atom/A, mob/user)
/obj/item/melee/energy/sword/bananium/ignition_effect(atom/A, mob/user)
return ""

//BANANIUM SHIELD
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/melee/dualsaber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
return 1

/obj/item/dualsaber/ignition_effect(atom/A, mob/user)
// same as /obj/item/melee/transforming/energy, mostly
// same as /obj/item/melee/energy, mostly
if(!wielded)
return ""
var/in_mouth = ""
Expand Down
Loading

0 comments on commit 21cf5f0

Please sign in to comment.