Porting the twohanded component.
This commit is contained in:
@@ -272,8 +272,8 @@
|
||||
icon_state = "tac"
|
||||
/obj/structure/closet/secure_closet/lethalshots/PopulateContents()
|
||||
..()
|
||||
new /obj/item/twohanded/electrostaff(src)
|
||||
new /obj/item/twohanded/electrostaff(src)
|
||||
new /obj/item/electrostaff(src)
|
||||
new /obj/item/electrostaff(src)
|
||||
for(var/i in 1 to 3)
|
||||
new /obj/item/storage/box/lethalshot(src)
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
integrity_failure = 0.33
|
||||
var/locked = TRUE
|
||||
var/open = FALSE
|
||||
var/obj/item/twohanded/fireaxe/fireaxe
|
||||
var/obj/item/fireaxe/fireaxe
|
||||
|
||||
/obj/structure/fireaxecabinet/Initialize()
|
||||
. = ..()
|
||||
@@ -50,8 +50,8 @@
|
||||
obj_integrity = max_integrity
|
||||
update_icon()
|
||||
else if(open || broken)
|
||||
if(istype(I, /obj/item/twohanded/fireaxe) && !fireaxe)
|
||||
var/obj/item/twohanded/fireaxe/F = I
|
||||
if(istype(I, /obj/item/fireaxe) && !fireaxe)
|
||||
var/obj/item/fireaxe/F = I
|
||||
if(F.wielded)
|
||||
to_chat(user, "<span class='warning'>Unwield the [F.name] first.</span>")
|
||||
return
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
icon_state = "fullgrass_[rand(1, 3)]"
|
||||
. = ..()
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants
|
||||
/obj/item/kirbyplants
|
||||
name = "potted plant"
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
icon_state = "plant-01"
|
||||
@@ -300,23 +300,24 @@
|
||||
throw_speed = 2
|
||||
throw_range = 4
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/Initialize()
|
||||
/obj/item/kirbyplants/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/tactical)
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE, force_unwielded=10, force_wielded=10)
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/random
|
||||
/obj/item/kirbyplants/random
|
||||
icon = 'icons/obj/flora/_flora.dmi'
|
||||
icon_state = "random_plant"
|
||||
var/list/static/states
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/random/Initialize()
|
||||
/obj/item/kirbyplants/random/Initialize()
|
||||
. = ..()
|
||||
icon = 'icons/obj/flora/plants.dmi'
|
||||
if(!states)
|
||||
generate_states()
|
||||
icon_state = pick(states)
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/random/proc/generate_states()
|
||||
/obj/item/kirbyplants/random/proc/generate_states()
|
||||
states = list()
|
||||
for(var/i in 1 to 25)
|
||||
var/number
|
||||
@@ -328,12 +329,12 @@
|
||||
states += "applebush"
|
||||
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/dead
|
||||
/obj/item/kirbyplants/dead
|
||||
name = "RD's potted plant"
|
||||
desc = "A gift from the botanical staff, presented after the RD's reassignment. There's a tag on it that says \"Y'all come back now, y'hear?\"\nIt doesn't look very healthy..."
|
||||
icon_state = "plant-25"
|
||||
|
||||
/obj/item/twohanded/required/kirbyplants/photosynthetic
|
||||
/obj/item/kirbyplants/photosynthetic
|
||||
name = "photosynthetic potted plant"
|
||||
desc = "A bioluminescent plant."
|
||||
icon_state = "plant-09"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
var/bonespear = FALSE
|
||||
var/obj/item/twohanded/spear/spear
|
||||
var/obj/item/spear/spear
|
||||
var/obj/item/bodypart/head/victim
|
||||
|
||||
/obj/structure/headpike/bone //for bone spears
|
||||
@@ -20,9 +20,9 @@
|
||||
name = "[victim.name] on a spear"
|
||||
update_icon()
|
||||
if(bonespear)
|
||||
spear = locate(/obj/item/twohanded/bonespear) in parts_list
|
||||
spear = locate(/obj/item/spear/bonespear) in parts_list
|
||||
else
|
||||
spear = locate(/obj/item/twohanded/spear) in parts_list
|
||||
spear = locate(/obj/item/spear) in parts_list
|
||||
|
||||
/obj/structure/headpike/Initialize()
|
||||
. = ..()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
//copypaste sorry
|
||||
var/obj/item/storage/bag/trash/mybag
|
||||
var/obj/item/mop/mymop
|
||||
var/obj/item/twohanded/broom/mybroom
|
||||
var/obj/item/broom/mybroom
|
||||
var/obj/item/reagent_containers/spray/cleaner/myspray
|
||||
var/obj/item/lightreplacer/myreplacer
|
||||
var/signs = 0
|
||||
@@ -48,9 +48,9 @@
|
||||
m.janicart_insert(user, src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
else if(istype(I, /obj/item/twohanded/broom))
|
||||
else if(istype(I, /obj/item/broom))
|
||||
if(!mybroom)
|
||||
var/obj/item/twohanded/broom/b=I
|
||||
var/obj/item/broom/b=I
|
||||
b.janicart_insert(user,src)
|
||||
else
|
||||
to_chat(user, fail_msg)
|
||||
|
||||
Reference in New Issue
Block a user