mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 16:38:18 +01:00
Merge pull request #9993 from Ghommie/Ghommie-cit412
Ports tgstation loom changes, and durathred golems.
This commit is contained in:
@@ -1,135 +1,144 @@
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters_map"
|
||||
item_state = "cutters"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE
|
||||
var/static/list/wirecutter_colors = list(
|
||||
"blue" = "#1861d5",
|
||||
"red" = "#951710",
|
||||
"pink" = "#d5188d",
|
||||
"brown" = "#a05212",
|
||||
"green" = "#0e7f1b",
|
||||
"cyan" = "#18a2d5",
|
||||
"yellow" = "#d58c18"
|
||||
)
|
||||
|
||||
|
||||
/obj/item/wirecutters/Initialize()
|
||||
. = ..()
|
||||
if(random_color) //random colors!
|
||||
icon_state = "cutters"
|
||||
var/our_color = pick(wirecutter_colors)
|
||||
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/wirecutters/update_icon()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "cutters_brass"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/bronze
|
||||
name = "bronze plated wirecutters"
|
||||
desc = "A pair of wirecutters plated with bronze."
|
||||
icon_state = "cutters_brass"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.95 //Wire cutters have 0 time bars though
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed)
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/advanced
|
||||
name = "advanced wirecutters"
|
||||
desc = "A set of reproduction alien wirecutters, they have a silver handle with an exceedingly sharp blade."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.2
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters_map"
|
||||
item_state = "cutters"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
|
||||
tool_behaviour = TOOL_WIRECUTTER
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
var/random_color = TRUE
|
||||
var/static/list/wirecutter_colors = list(
|
||||
"blue" = "#1861d5",
|
||||
"red" = "#951710",
|
||||
"pink" = "#d5188d",
|
||||
"brown" = "#a05212",
|
||||
"green" = "#0e7f1b",
|
||||
"cyan" = "#18a2d5",
|
||||
"yellow" = "#d58c18"
|
||||
)
|
||||
|
||||
|
||||
/obj/item/wirecutters/Initialize()
|
||||
. = ..()
|
||||
if(random_color) //random colors!
|
||||
icon_state = "cutters"
|
||||
var/our_color = pick(wirecutter_colors)
|
||||
add_atom_colour(wirecutter_colors[our_color], FIXED_COLOUR_PRIORITY)
|
||||
update_icon()
|
||||
|
||||
/obj/item/wirecutters/update_icon()
|
||||
if(!random_color) //icon override
|
||||
return
|
||||
cut_overlays()
|
||||
var/mutable_appearance/base_overlay = mutable_appearance(icon, "cutters_cutty_thingy")
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
add_overlay(base_overlay)
|
||||
|
||||
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, usesound, 50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/brass
|
||||
name = "brass wirecutters"
|
||||
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
icon_state = "cutters_brass"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/bronze
|
||||
name = "bronze plated wirecutters"
|
||||
desc = "A pair of wirecutters plated with bronze."
|
||||
icon_state = "cutters_brass"
|
||||
random_color = FALSE
|
||||
toolspeed = 0.95 //Wire cutters have 0 time bars though
|
||||
|
||||
/obj/item/wirecutters/abductor
|
||||
name = "alien wirecutters"
|
||||
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/cyborg
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wirecutters/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
usesound = 'sound/items/jaws_cut.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/wirecutters/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/wirecutters/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power(drop_location())
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
/obj/item/wirecutters/power/attack(mob/living/carbon/C, mob/user)
|
||||
if(istype(C))
|
||||
if(C.handcuffed)
|
||||
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
|
||||
qdel(C.handcuffed)
|
||||
return
|
||||
else if(C.has_status_effect(STATUS_EFFECT_CHOKINGSTRAND))
|
||||
var/man = C == user ? "your" : "[C]'\s"
|
||||
user.visible_message("<span class='notice'>[user] attempts to remove the durathread strand from around [man] neck.</span>", \
|
||||
"<span class='notice'>You attempt to remove the durathread strand from around [man] neck.</span>")
|
||||
if(do_after(user, 15, null, C))
|
||||
user.visible_message("<span class='notice'>[user] succesfuly removes the durathread strand.</span>",
|
||||
"<span class='notice'>You succesfuly remove the durathread strand.</span>")
|
||||
C.remove_status_effect(STATUS_EFFECT_CHOKINGSTRAND)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/wirecutters/advanced
|
||||
name = "advanced wirecutters"
|
||||
desc = "A set of reproduction alien wirecutters, they have a silver handle with an exceedingly sharp blade."
|
||||
icon = 'icons/obj/advancedtools.dmi'
|
||||
icon_state = "cutters"
|
||||
toolspeed = 0.2
|
||||
random_color = FALSE
|
||||
@@ -154,6 +154,9 @@
|
||||
log_admin("[key_name(new_spawn)] possessed a golem shell enslaved to [key_name(owner)].")
|
||||
if(ishuman(new_spawn))
|
||||
var/mob/living/carbon/human/H = new_spawn
|
||||
if(has_owner)
|
||||
var/datum/species/golem/G = H.dna.species
|
||||
G.owner = owner
|
||||
H.set_cloned_appearance()
|
||||
if(!name)
|
||||
if(has_owner)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
//Loom, turns raw cotton and durathread into their respective fabrics.
|
||||
#define FABRIC_PER_SHEET 4
|
||||
|
||||
|
||||
///This is a loom. It's usually made out of wood and used to weave fabric like durathread or cotton into their respective cloth types.
|
||||
/obj/structure/loom
|
||||
name = "loom"
|
||||
desc = "A simple device used to weave cloth and other thread-based fabrics together into usable material."
|
||||
@@ -9,73 +11,34 @@
|
||||
anchored = TRUE
|
||||
|
||||
/obj/structure/loom/attackby(obj/item/I, mob/user)
|
||||
if (user.a_intent != INTENT_HELP)
|
||||
return ..()
|
||||
if (istype(I, /obj/item/stack/sheet))
|
||||
if (!anchored)
|
||||
return to_chat(user, "<span class='notice'>You have to anchor [src] first!</span>")
|
||||
|
||||
var/obj/item/stack/sheet/W = I
|
||||
if(W.is_fabric && W.amount > 1)
|
||||
user.visible_message("<span class='notice'[user] starts weaving [W.name] through the loom.</span>",
|
||||
"<span class='notice'>You start weaving the [W.name] through the loom.</span>")
|
||||
|
||||
if(W.use_tool(src, user, W.pull_effort))
|
||||
new W.loom_result(drop_location())
|
||||
to_chat(user, "<span class='notice'>You weave the [W.name] into a workable fabric.</span>")
|
||||
W.amount = (W.amount - 2)
|
||||
if(W.amount < 1)
|
||||
qdel(W)
|
||||
else if(W.is_fabric)
|
||||
to_chat("<span class='notice'>You need at least 2 [W.name] to loom into fabric!</span>")
|
||||
if(weave(I, user))
|
||||
return
|
||||
else
|
||||
switch (I.tool_behaviour)
|
||||
if (TOOL_SCREWDRIVER)
|
||||
user.visible_message("<span class='info'>[user] starts disassembling [src]...</span>",
|
||||
"<span class='info'>You start disassembling [src]...</span>")
|
||||
I.play_tool_sound(src)
|
||||
if(I.use_tool(src, user, 60))
|
||||
playsound(src.loc, 'sound/items/deconstruct.ogg', 50, TRUE)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
if (TOOL_WRENCH)
|
||||
if (anchored)
|
||||
to_chat(user, "<span class='notice'>You unsecure the [src].</span>")
|
||||
I.play_tool_sound(src)
|
||||
anchored = FALSE
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You secure the [src].</span>")
|
||||
I.play_tool_sound(src)
|
||||
anchored = TRUE
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/structure/loom/deconstruct(disassembled = TRUE)
|
||||
new /obj/item/stack/sheet/mineral/wood (get_turf(src), 10)
|
||||
qdel(src)
|
||||
/obj/structure/loom/wrench_act(mob/living/user, obj/item/I)
|
||||
..()
|
||||
default_unfasten_wrench(user, I, 5)
|
||||
return TRUE
|
||||
|
||||
|
||||
|
||||
/*///Handles the weaving.
|
||||
///Handles the weaving.
|
||||
/obj/structure/loom/proc/weave(obj/item/stack/sheet/S, mob/user)
|
||||
if(!istype(S) || !S.is_fabric)
|
||||
return FALSE
|
||||
if(!anchored)
|
||||
user.show_message("<span class='notice'>The loom needs to be wrenched down.</span>", MSG_VISUAL)
|
||||
user.show_message("<span class='notice'>The loom needs to be wrenched down.</span>", 1)
|
||||
return FALSE
|
||||
if(S.amount < FABRIC_PER_SHEET)
|
||||
user.show_message("<span class='notice'>You need at least [FABRIC_PER_SHEET] units of fabric before using this.</span>", 1)
|
||||
return FALSE
|
||||
user.show_message("<span class='notice'>You start weaving \the [S.name] through the loom..</span>", MSG_VISUAL)
|
||||
user.show_message("<span class='notice'>You start weaving \the [S.name] through the loom..</span>", 1)
|
||||
if(S.use_tool(src, user, S.pull_effort))
|
||||
if(S.amount >= FABRIC_PER_SHEET)
|
||||
new S.loom_result(drop_location())
|
||||
S.use(FABRIC_PER_SHEET)
|
||||
user.show_message("<span class='notice'>You weave \the [S.name] into a workable fabric.</span>", MSG_VISUAL)
|
||||
user.show_message("<span class='notice'>You weave \the [S.name] into a workable fabric.</span>", 1)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/loom/unanchored
|
||||
anchored = FALSE
|
||||
|
||||
#undef FABRIC_PER_SHEET */
|
||||
#undef FABRIC_PER_SHEET
|
||||
|
||||
Reference in New Issue
Block a user