Skip to content

Commit

Permalink
Xeno spell fix (ParadiseSS13#24978)
Browse files Browse the repository at this point in the history
* fixes being unable to build some resin structures

* let's make these defines

* Update code/datums/spells/alien_spells/build_resin_structure.dm
  • Loading branch information
GDNgit authored and m-dzianishchyts committed Apr 3, 2024
1 parent 9427c19 commit f219093
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions code/datums/spells/alien_spells/build_resin_structure.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#define RESIN_WALL "Resin Wall"
#define RESIN_NEST "Resin Nest"
#define RESIN_DOOR "Resin Door"
#define REVIVAL_NEST "Revival Nest"

/datum/spell/alien_spell/build_resin
name = "Build Resin Structure"
desc = "Allows you to create resin structures. Does not work while in space."
Expand All @@ -8,10 +13,10 @@
return new /datum/spell_targeting/self

/datum/spell/alien_spell/build_resin/cast(list/targets, mob/living/carbon/user)
var/static/list/resin_buildings = list("Resin Wall (55)" = image(icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi', icon_state = "resin_wall-0"),
"Resin Nest (55)" = image(icon = 'icons/mob/alien.dmi', icon_state = "nest"),
"Resin door (80)" = image(icon = 'icons/obj/smooth_structures/alien/resin_door.dmi', icon_state = "resin"),
"Revival Nest" = image(icon = 'icons/mob/alien.dmi', icon_state = "placeholder_rejuv_nest"))
var/static/list/resin_buildings = list(RESIN_WALL = image(icon = 'icons/obj/smooth_structures/alien/resin_wall.dmi', icon_state = "resin_wall-0"),
RESIN_NEST = image(icon = 'icons/mob/alien.dmi', icon_state = "nest"),
RESIN_DOOR = image(icon = 'icons/obj/smooth_structures/alien/resin_door.dmi', icon_state = "resin"),
REVIVAL_NEST = image(icon = 'icons/mob/alien.dmi', icon_state = "placeholder_rejuv_nest"))
var/choice = show_radial_menu(user, user, resin_buildings, src, radius = 40)
var/turf/turf_to_spawn_at = user.loc
if(!choice)
Expand All @@ -31,13 +36,13 @@
return
user.visible_message("<span class='alertalien'>[user] vomits up a thick purple substance and shapes it!</span>")
switch(choice)
if("Resin Wall")
if(RESIN_WALL)
new /obj/structure/alien/resin/wall(turf_to_spawn_at)
if("Resin Nest")
if(RESIN_NEST)
new /obj/structure/bed/nest(turf_to_spawn_at)
if("Resin Door")
if(RESIN_DOOR)
new /obj/structure/alien/resin/door(turf_to_spawn_at)
if("Revival Nest")
if(REVIVAL_NEST)
new /obj/structure/bed/revival_nest(turf_to_spawn_at)

/datum/spell/touch/alien_spell/consume_resin
Expand Down Expand Up @@ -80,3 +85,8 @@
user.add_plasma(-10)
qdel(target)
..()

#undef RESIN_WALL
#undef RESIN_NEST
#undef RESIN_DOOR
#undef REVIVAL_NEST

0 comments on commit f219093

Please sign in to comment.