mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Main-feature-complete
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
var/silk_production = FALSE
|
||||
var/silk_reserve = 100
|
||||
var/silk_max_reserve = 500
|
||||
var/silk_color = "#FFFFFF"
|
||||
|
||||
var/list/traits = list()
|
||||
|
||||
|
||||
+110
-1
@@ -857,6 +857,8 @@
|
||||
|
||||
if(species.is_weaver)
|
||||
to_chat(src, "Your silk reserves are at [species.silk_reserve]/[species.silk_max_reserve].")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You are not a weaver! How are you doing this? Tell a developer!</span>")
|
||||
|
||||
/mob/living/carbon/human/proc/toggle_silk_production()
|
||||
set name = "Toggle Silk Production"
|
||||
@@ -865,12 +867,15 @@
|
||||
if(species.is_weaver)
|
||||
species.silk_production = !(species.silk_production)
|
||||
to_chat(src, "You are [species.silk_production ? "now" : "no longer"] producing silk.")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You are not a weaver! How are you doing this? Tell a developer!</span>")
|
||||
|
||||
/mob/living/carbon/human/proc/weave_structure()
|
||||
set name = "Weave Structure"
|
||||
set category = "Abilities"
|
||||
|
||||
if(!(species.is_weaver))
|
||||
to_chat(src, "<span class='warning'>You are not a weaver! How are you doing this? Tell a developer!</span>")
|
||||
return
|
||||
|
||||
var/choice
|
||||
@@ -880,16 +885,120 @@
|
||||
while(finalized == "No" && src.client)
|
||||
choice = input(src,"What would you like to weave?") as null|anything in weavable_structures
|
||||
desired_result = weavable_structures[choice]
|
||||
if(desired_result || !istype(desired_result))
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
if(choice)
|
||||
finalized = alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation","Yes","No")
|
||||
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
if(desired_result.cost > species.silk_reserve)
|
||||
to_chat(src, "<span class='warning'>You don't have enough silk to weave that!</span>")
|
||||
return
|
||||
|
||||
if(stat)
|
||||
to_chat(src, "<span class='warning'>You can't do that in your current state!</span>")
|
||||
return
|
||||
|
||||
if(locate(desired_result.result_type) in src.loc)
|
||||
to_chat(src, "<span class='warning'>You can't create another weaversilk [desired_result.title] here!</span>")
|
||||
return
|
||||
|
||||
if(!isturf(src.loc))
|
||||
to_chat(src, "<span class='warning'>You can't weave here!</span>")
|
||||
return
|
||||
|
||||
if(do_after(src, desired_result.time, exclusive = TRUE))
|
||||
if(desired_result.cost > species.silk_reserve)
|
||||
to_chat(src, "<span class='warning'>You don't have enough silk to weave that!</span>")
|
||||
return
|
||||
|
||||
if(locate(desired_result.result_type) in src.loc)
|
||||
to_chat(src, "<span class='warning'>You can't create another weaversilk [desired_result.title] here!</span>")
|
||||
return
|
||||
|
||||
if(!isturf(src.loc))
|
||||
to_chat(src, "<span class='warning'>You can't weave here!</span>")
|
||||
return
|
||||
|
||||
species.silk_reserve = max(species.silk_reserve - desired_result.cost, 0)
|
||||
|
||||
//new desired_result.result_type(src.loc)
|
||||
var/atom/O = new desired_result.result_type(src.loc)
|
||||
O.color = species.silk_color
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/weave_item()
|
||||
set name = "Weave Item"
|
||||
set category = "Abilities"
|
||||
|
||||
if(!(species.is_weaver))
|
||||
return
|
||||
|
||||
var/choice
|
||||
var/datum/weaver_recipe/item/desired_result
|
||||
var/finalized = "No"
|
||||
|
||||
while(finalized == "No" && src.client)
|
||||
choice = input(src,"What would you like to weave?") as null|anything in weavable_items
|
||||
desired_result = weavable_structures[choice]
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
if(choice)
|
||||
finalized = alert(src, "Are you sure you want to weave [desired_result.title]? It will cost you [desired_result.cost] silk.","Confirmation","Yes","No")
|
||||
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
if(!(species.is_weaver))
|
||||
to_chat(src, "<span class='warning'>You are not a weaver! How are you doing this? Tell a developer!</span>")
|
||||
return
|
||||
|
||||
if(desired_result.cost > species.silk_reserve)
|
||||
to_chat(src, "<span class='warning'>You don't have enough silk to weave that!</span>")
|
||||
return
|
||||
|
||||
if(stat)
|
||||
to_chat(src, "<span class='warning'>You can't do that in your current state!</span>")
|
||||
return
|
||||
|
||||
if(!isturf(src.loc))
|
||||
to_chat(src, "<span class='warning'>You can't weave here!</span>")
|
||||
return
|
||||
|
||||
if(do_after(src, desired_result.time, exclusive = TRUE))
|
||||
if(desired_result.cost > species.silk_reserve)
|
||||
to_chat(src, "<span class='warning'>You don't have enough silk to weave that!</span>")
|
||||
return
|
||||
|
||||
if(!isturf(src.loc))
|
||||
to_chat(src, "<span class='warning'>You can't weave here!</span>")
|
||||
return
|
||||
|
||||
species.silk_reserve = max(species.silk_reserve - desired_result.cost, 0)
|
||||
|
||||
//new desired_result.result_type(src.loc)
|
||||
var/atom/O = new desired_result.result_type(src.loc)
|
||||
O.color = species.silk_color
|
||||
|
||||
/mob/living/carbon/human/proc/set_silk_color()
|
||||
set name = "Set Silk Color"
|
||||
set category = "Abilities"
|
||||
|
||||
if(!(species.is_weaver))
|
||||
to_chat(src, "<span class='warning'>You are not a weaver! How are you doing this? Tell a developer!</span>")
|
||||
return
|
||||
|
||||
var/new_silk_color = input("Pick a color for your woven products:","Silk Color", species.silk_color) as null|color
|
||||
if(new_silk_color)
|
||||
species.silk_color = new_silk_color
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/weaveWebBindings()
|
||||
set name = "Weave Web Bindings"
|
||||
set category = "Species Powers"
|
||||
|
||||
@@ -380,7 +380,11 @@
|
||||
icobase_tail = 1
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/proc/weaveWebBindings)
|
||||
/mob/living/carbon/human/proc/check_silk_amount,
|
||||
/mob/living/carbon/human/proc/toggle_silk_production,
|
||||
/mob/living/carbon/human/proc/weave_structure,
|
||||
/mob/living/carbon/human/proc/weave_item,
|
||||
/mob/living/carbon/human/proc/set_silk_color)
|
||||
|
||||
min_age = 18
|
||||
max_age = 80
|
||||
|
||||
@@ -151,4 +151,5 @@
|
||||
H.verbs |= /mob/living/carbon/human/proc/check_silk_amount
|
||||
H.verbs |= /mob/living/carbon/human/proc/toggle_silk_production
|
||||
H.verbs |= /mob/living/carbon/human/proc/weave_structure
|
||||
H.verbs |= /mob/living/carbon/human/proc/weave_item
|
||||
H.verbs |= /mob/living/carbon/human/proc/weave_item
|
||||
H.verbs |= /mob/living/carbon/human/proc/set_silk_color
|
||||
@@ -1,3 +1,5 @@
|
||||
// Structures
|
||||
|
||||
/obj/effect/weaversilk
|
||||
name = "weaversilk web"
|
||||
desc = "A thin layer of fiberous webs. It looks like it can be torn down with one strong hit."
|
||||
@@ -6,12 +8,13 @@
|
||||
density = 0
|
||||
|
||||
/obj/effect/weaversilk/attack_hand(mob/user as mob)
|
||||
..()
|
||||
if(user.a_intent == I_HURT)
|
||||
to_chat(user,"<span class='warning'>You easily tear down [name].</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/weaversilk/floor
|
||||
var/possible_icon_states = list("floorweb1", "floorweb2")
|
||||
var/possible_icon_states = list("floorweb1", "floorweb2", "floorweb3", "floorweb4", "floorweb5", "floorweb6", "floorweb7", "floorweb8")
|
||||
plane = DIRTY_PLANE
|
||||
|
||||
/obj/effect/weaversilk/floor/Initialize()
|
||||
@@ -22,10 +25,22 @@
|
||||
name = "weaversilk web wall"
|
||||
desc = "A thin layer of fiberous webs, but just thick enough to block your way. It looks like it can be torn down with one strong hit."
|
||||
icon_state = "wallweb1"
|
||||
var/possible_icon_states = list("wallweb1", "wallweb2", "wallweb3")
|
||||
density = 1
|
||||
|
||||
/obj/effect/weaversilk/wall/Initialize()
|
||||
..()
|
||||
icon_state = pick(possible_icon_states)
|
||||
|
||||
/obj/effect/weaversilk/wall/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = mover
|
||||
if(H.species.is_weaver)
|
||||
return TRUE
|
||||
..()
|
||||
|
||||
/obj/structure/bed/double/weaversilk_nest
|
||||
name = "nest"
|
||||
name = "weaversilk nest"
|
||||
desc = "A nest of some kind, made of fiberous material."
|
||||
icon = 'icons/vore/weaver_icons_vr.dmi'
|
||||
icon_state = "nest"
|
||||
@@ -45,3 +60,38 @@
|
||||
to_chat(user,"<span class='warning'>You easily tear down [name].</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/weaversilk/trap
|
||||
name = "weaversilk trap"
|
||||
desc = "A silky, yet firm trap. Be careful not to step into it! Or don't..."
|
||||
icon_state = "trap"
|
||||
var/trap_active = TRUE
|
||||
|
||||
/obj/effect/weaversilk/trap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(istype(AM, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if(H.species.is_weaver)
|
||||
return
|
||||
if(isliving(AM) && trap_active)
|
||||
var/mob/living/L = AM
|
||||
if(L.m_intent == "run")
|
||||
L.visible_message(
|
||||
"<span class='danger'>[L] steps on \the [src].</span>",
|
||||
"<span class='danger'>You step on \the [src]!</span>",
|
||||
"<b>You hear a squishy noise!</b>"
|
||||
)
|
||||
set_dir(L.dir)
|
||||
can_buckle = 1
|
||||
buckle_mob(L)
|
||||
L.Stun(1 SECOND)
|
||||
to_chat(L, "<span class='danger'>The sticky fibers of \the [src] ensnare, trapping you in place!</span>")
|
||||
trap_active = 0
|
||||
can_buckle = initial(can_buckle)
|
||||
desc += " Actually, it looks like it's been all spent."
|
||||
..()
|
||||
|
||||
|
||||
|
||||
// Items
|
||||
|
||||
|
||||
@@ -2,26 +2,31 @@
|
||||
var/title = null
|
||||
var/result_type
|
||||
var/cost = 0
|
||||
var/time = 50
|
||||
var/one_per_turf = FALSE
|
||||
var/time = 5 SECONDS
|
||||
|
||||
/datum/weaver_recipe/structure
|
||||
one_per_turf = TRUE
|
||||
|
||||
/datum/weaver_recipe/structure/floor
|
||||
title = "Floor"
|
||||
title = "floor"
|
||||
result_type = /obj/effect/weaversilk/floor
|
||||
cost = 25
|
||||
time = 1 SECOND
|
||||
|
||||
/datum/weaver_recipe/structure/wall
|
||||
title = "Wall"
|
||||
title = "wall"
|
||||
result_type = /obj/effect/weaversilk/wall
|
||||
cost = 100
|
||||
|
||||
/datum/weaver_recipe/structure/nest
|
||||
title = "Wall"
|
||||
title = "nest"
|
||||
result_type = /obj/structure/bed/double/weaversilk_nest
|
||||
cost = 100
|
||||
|
||||
/datum/weaver_recipe/structure/trap
|
||||
title = "trap"
|
||||
result_type = /obj/effect/weaversilk/trap
|
||||
cost = 250
|
||||
time = 15 SECONDS
|
||||
|
||||
/datum/weaver_recipe/item
|
||||
one_per_turf = FALSE
|
||||
time = 10 SECONDS
|
||||
Reference in New Issue
Block a user