mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
first port
This commit is contained in:
@@ -4,6 +4,9 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
// if true, everyone item when created will have its name changed to be
|
||||
// more... RPG-like.
|
||||
|
||||
GLOBAL_VAR_INIT(stickpocalypse, FALSE) // if true, all non-embeddable items will be able to harmlessly stick to people when thrown
|
||||
GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to embed in people, takes precedence over stickpocalypse
|
||||
|
||||
/obj/item
|
||||
name = "item"
|
||||
icon = 'icons/obj/items_and_weapons.dmi'
|
||||
@@ -104,7 +107,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
|
||||
|
||||
var/datum/embedding_behavior/embedding
|
||||
var/list/embedding = NONE
|
||||
|
||||
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
|
||||
var/heat = 0
|
||||
@@ -152,7 +155,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
|
||||
/obj/item/Initialize()
|
||||
|
||||
if (attack_verb)
|
||||
if(attack_verb)
|
||||
attack_verb = typelist("attack_verb", attack_verb)
|
||||
|
||||
. = ..()
|
||||
@@ -160,9 +163,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
new path(src)
|
||||
actions_types = null
|
||||
|
||||
if(GLOB.rpg_loot_items)
|
||||
AddComponent(/datum/component/fantasy)
|
||||
|
||||
if(force_string)
|
||||
item_flags |= FORCE_STRING_OVERRIDE
|
||||
|
||||
@@ -172,16 +172,6 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
if(damtype == "brute")
|
||||
hitsound = "swing_hit"
|
||||
|
||||
if (!embedding)
|
||||
embedding = getEmbeddingBehavior()
|
||||
else if (islist(embedding))
|
||||
embedding = getEmbeddingBehavior(arglist(embedding))
|
||||
else if (!istype(embedding, /datum/embedding_behavior))
|
||||
stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()")
|
||||
|
||||
if(sharpness) //give sharp objects butchering functionality, for consistency
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed)
|
||||
|
||||
/obj/item/Destroy()
|
||||
item_flags &= ~DROPDEL //prevent reqdels
|
||||
if(ismob(loc))
|
||||
@@ -191,6 +181,27 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
qdel(X)
|
||||
return ..()
|
||||
|
||||
/obj/item/ComponentInitialize()
|
||||
. = ..()
|
||||
|
||||
// this proc says it's for initializing components, but we're initializing elements too because it's you and me against the world >:)
|
||||
if(embedding)
|
||||
AddElement(/datum/element/embed, embedding)
|
||||
else if(GLOB.embedpocalypse)
|
||||
embedding = EMBED_POINTY
|
||||
AddElement(/datum/element/embed, embedding)
|
||||
name = "pointy [name]"
|
||||
else if(GLOB.stickpocalypse)
|
||||
embedding = EMBED_HARMLESS
|
||||
AddElement(/datum/element/embed, embedding)
|
||||
name = "sticky [name]"
|
||||
|
||||
if(GLOB.rpg_loot_items)
|
||||
AddComponent(/datum/component/fantasy)
|
||||
|
||||
if(sharpness) //give sharp objects butchering functionality, for consistency
|
||||
AddComponent(/datum/component/butchering, 80 * toolspeed)
|
||||
|
||||
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
|
||||
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
|
||||
return 0
|
||||
@@ -928,3 +939,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
. = ..()
|
||||
if(var_name == NAMEOF(src, slowdown))
|
||||
set_slowdown(var_value) //don't care if it's a duplicate edit as slowdown'll be set, do it anyways to force normal behavior.
|
||||
|
||||
/**
|
||||
* Does the current embedding var meet the criteria for being harmless? Namely, does it have a pain multiplier and jostle pain mult of 0? If so, return true.
|
||||
*
|
||||
*/
|
||||
/obj/item/proc/is_embed_harmless()
|
||||
if(embedding)
|
||||
return (!embedding["pain_mult"] && !embedding["jostle_pain_mult"])
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
/obj/item/grenade/iedcasing/attack_self(mob/user) //
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
if(!botch_check(user))
|
||||
to_chat(user, "<span class='warning'>You light the [name]!</span>")
|
||||
cut_overlay("improvised_grenade_filled")
|
||||
preprime(user, null, FALSE)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
var/det_time = 50
|
||||
var/display_timer = 1
|
||||
var/clumsy_check = GRENADE_CLUMSY_FUMBLE
|
||||
var/sticky = FALSE
|
||||
|
||||
/obj/item/grenade/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] primes [src], then eats it! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -32,19 +33,21 @@
|
||||
if(!QDELETED(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/grenade/proc/clown_check(mob/living/carbon/human/user)
|
||||
/obj/item/grenade/proc/botch_check(mob/living/carbon/human/user)
|
||||
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
|
||||
if(clumsy)
|
||||
if(clumsy_check == GRENADE_CLUMSY_FUMBLE && prob(50))
|
||||
to_chat(user, "<span class='warning'>Huh? How does this thing work?</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
else if(clumsy_check == GRENADE_NONCLUMSY_FUMBLE && !(user.mind && HAS_TRAIT(user.mind, TRAIT_CLOWN_MENTALITY)))
|
||||
to_chat(user, "<span class='warning'>You pull the pin on [src]. Attached to it is a pink ribbon that says, \"<span class='clown'>HONK</span>\"</span>")
|
||||
preprime(user, 5, FALSE)
|
||||
return FALSE
|
||||
return TRUE
|
||||
return TRUE
|
||||
|
||||
else if(sticky && prob(50)) // to add risk to sticky tape grenade cheese, no return cause we still prime as normal after
|
||||
to_chat(user, "<span class='warning'>What the... [src] is stuck to your hand!</span>")
|
||||
ADD_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
|
||||
|
||||
/obj/item/grenade/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -56,8 +59,16 @@
|
||||
|
||||
|
||||
/obj/item/grenade/attack_self(mob/user)
|
||||
if(HAS_TRAIT(src, TRAIT_NODROP))
|
||||
to_chat(user, "<span class='notice'>You try prying [src] off your hand...</span>")
|
||||
if(do_after(user, 70, target=src))
|
||||
to_chat(user, "<span class='notice'>You manage to remove [src] from your hand.</span>")
|
||||
REMOVE_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)
|
||||
|
||||
return
|
||||
|
||||
if(!active)
|
||||
if(clown_check(user))
|
||||
if(!botch_check(user)) // if they botch the prime, it'll be handled in botch_check
|
||||
preprime(user)
|
||||
|
||||
/obj/item/grenade/proc/log_grenade(mob/user, turf/T)
|
||||
|
||||
@@ -122,7 +122,9 @@
|
||||
var/obj/item/I = AM
|
||||
I.throw_speed = max(1, (I.throw_speed - 3))
|
||||
I.throw_range = max(1, (I.throw_range - 3))
|
||||
I.embedding = I.embedding.setRating(embed_chance = 0)
|
||||
if(I.embedding)
|
||||
I.embedding["embed_chance"] = 0
|
||||
I.AddElement(/datum/element/embed, I.embedding)
|
||||
|
||||
target.add_overlay(plastic_overlay, TRUE)
|
||||
if(!nadeassembly)
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
icon_state = "buckknife"
|
||||
item_state = "knife"
|
||||
desc = "A military combat utility survival knife."
|
||||
embedding = list("pain_mult" = 4, "embed_chance" = 65, "fall_chance" = 10, "ignore_throwspeed_threshold" = TRUE)
|
||||
force = 20
|
||||
throwforce = 20
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "cut")
|
||||
@@ -148,6 +149,7 @@
|
||||
icon_state = "survivalknife"
|
||||
item_state = "knife"
|
||||
desc = "A hunting grade survival knife."
|
||||
embedding = list("pain_mult" = 4, "embed_chance" = 35, "fall_chance" = 10)
|
||||
force = 15
|
||||
throwforce = 15
|
||||
bayonet = TRUE
|
||||
@@ -159,6 +161,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi'
|
||||
desc = "A sharpened bone. The bare minimum in survival."
|
||||
embedding = list("pain_mult" = 4, "embed_chance" = 35, "fall_chance" = 10)
|
||||
force = 15
|
||||
throwforce = 15
|
||||
custom_materials = null
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
sharpness = IS_SHARP
|
||||
embedding = list("embed_chance" = 75, "embedded_impact_pain_multiplier" = 10)
|
||||
embedding = list("embed_chance" = 75, "impact_pain_mult" = 10)
|
||||
armour_penetration = 35
|
||||
block_chance = 50
|
||||
var/list/possible_colors = list("red" = LIGHT_COLOR_RED, "blue" = LIGHT_COLOR_LIGHT_CYAN, "green" = LIGHT_COLOR_GREEN, "purple" = LIGHT_COLOR_LAVENDER)
|
||||
|
||||
@@ -53,6 +53,8 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(embedding)
|
||||
AddElement(/datum/element/embed, embedding)
|
||||
icon_state = icon_state_on
|
||||
w_class = w_class_on
|
||||
else
|
||||
@@ -62,6 +64,8 @@
|
||||
throw_speed = initial(throw_speed)
|
||||
if(attack_verb_off.len)
|
||||
attack_verb = attack_verb_off
|
||||
if(embedding)
|
||||
RemoveElement(/datum/element/embed, embedding)
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
total_mass = initial(total_mass)
|
||||
|
||||
@@ -21,6 +21,7 @@ GLOBAL_LIST_INIT(rod_recipes, list ( \
|
||||
max_amount = 50
|
||||
attack_verb = list("hit", "bludgeoned", "whacked")
|
||||
hitsound = 'sound/weapons/grenadelaunch.ogg'
|
||||
embedding = list()
|
||||
novariants = TRUE
|
||||
|
||||
/obj/item/stack/rods/suicide_act(mob/living/carbon/user)
|
||||
|
||||
@@ -291,6 +291,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
max_integrity = 40
|
||||
sharpness = IS_SHARP
|
||||
var/icon_prefix
|
||||
embedding = list("embed_chance" = 65)
|
||||
|
||||
|
||||
/obj/item/shard/suicide_act(mob/user)
|
||||
|
||||
62
code/game/objects/items/stacks/tape.dm
Normal file
62
code/game/objects/items/stacks/tape.dm
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
|
||||
/obj/item/stack/sticky_tape
|
||||
name = "sticky tape"
|
||||
singular_name = "sticky tape"
|
||||
desc = "Used for sticking to things for sticking said things to people."
|
||||
icon = 'icons/obj/tapes.dmi'
|
||||
icon_state = "tape_w"
|
||||
var/prefix = "sticky"
|
||||
item_flags = NOBLUDGEON
|
||||
amount = 5
|
||||
max_amount = 5
|
||||
resistance_flags = FLAMMABLE
|
||||
grind_results = list(/datum/reagent/cellulose = 5)
|
||||
|
||||
var/list/conferred_embed = EMBED_HARMLESS
|
||||
var/overwrite_existing = FALSE
|
||||
|
||||
/obj/item/stack/sticky_tape/afterattack(obj/item/I, mob/living/user)
|
||||
if(!istype(I))
|
||||
return
|
||||
|
||||
if(I.embedding && I.embedding == conferred_embed)
|
||||
to_chat(user, "<span class='warning'>[I] is already coated in [src]!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] begins wrapping [I] with [src].</span>", "<span class='notice'>You begin wrapping [I] with [src].</span>")
|
||||
|
||||
if(do_after(user, 30, target=I))
|
||||
I.embedding = conferred_embed
|
||||
I.AddElement(/datum/element/embed, I.embedding)
|
||||
to_chat(user, "<span class='notice'>You finish wrapping [I] with [src].</span>")
|
||||
use(1)
|
||||
I.name = "[prefix] [I.name]"
|
||||
|
||||
if(istype(I, /obj/item/grenade))
|
||||
var/obj/item/grenade/sticky_bomb = I
|
||||
sticky_bomb.sticky = TRUE
|
||||
|
||||
/obj/item/stack/sticky_tape/super
|
||||
name = "super sticky tape"
|
||||
singular_name = "super sticky tape"
|
||||
desc = "Quite possibly the most mischevious substance in the galaxy. Use with extreme lack of caution."
|
||||
icon_state = "tape_y"
|
||||
prefix = "super sticky"
|
||||
conferred_embed = EMBED_HARMLESS_SUPERIOR
|
||||
|
||||
/obj/item/stack/sticky_tape/pointy
|
||||
name = "pointy tape"
|
||||
singular_name = "pointy tape"
|
||||
desc = "Used for sticking to things for sticking said things inside people."
|
||||
icon_state = "tape_evil"
|
||||
prefix = "pointy"
|
||||
conferred_embed = EMBED_POINTY
|
||||
|
||||
/obj/item/stack/sticky_tape/pointy/super
|
||||
name = "super pointy tape"
|
||||
singular_name = "super pointy tape"
|
||||
desc = "You didn't know tape could look so sinister. Welcome to Space Station 13."
|
||||
icon_state = "tape_spikes"
|
||||
prefix = "super pointy"
|
||||
conferred_embed = EMBED_POINTY_SUPERIOR
|
||||
@@ -582,7 +582,7 @@
|
||||
force_wielded = 18
|
||||
throwforce = 20
|
||||
throw_speed = 4
|
||||
embedding = list("embedded_impact_pain_multiplier" = 1.5, "embed_chance" = 65)
|
||||
embedding = list("impact_pain_mult" = 3)
|
||||
armour_penetration = 10
|
||||
custom_materials = list(/datum/material/iron=1150, /datum/material/glass=2075)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
|
||||
@@ -297,12 +297,26 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
force = 2
|
||||
throwforce = 20 //This is never used on mobs since this has a 100% embed chance.
|
||||
throw_speed = 4
|
||||
embedding = list("embedded_pain_multiplier" = 4, "embed_chance" = 100, "embedded_fall_chance" = 0)
|
||||
embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0)
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
sharpness = IS_SHARP
|
||||
custom_materials = list(/datum/material/iron=500, /datum/material/glass=500)
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
/obj/item/throwing_star/stamina
|
||||
name = "shock throwing star"
|
||||
desc = "An aerodynamic disc designed to cause excruciating pain when stuck inside fleeing targets, hopefully without causing fatal harm."
|
||||
throwforce = 5
|
||||
embedding = list("pain_chance" = 5, "embed_chance" = 100, "fall_chance" = 0, "jostle_chance" = 10, "pain_stam_pct" = 0.8, "jostle_pain_mult" = 3)
|
||||
|
||||
/obj/item/throwing_star/toy
|
||||
name = "toy throwing star"
|
||||
desc = "An aerodynamic disc strapped with adhesive for sticking to people, good for playing pranks and getting yourself killed by security."
|
||||
sharpness = IS_BLUNT
|
||||
force = 0
|
||||
throwforce = 0
|
||||
embedding = list("pain_mult" = 0, "jostle_pain_mult" = 0, "embed_chance" = 100, "fall_chance" = 0)
|
||||
|
||||
/obj/item/switchblade
|
||||
name = "switchblade"
|
||||
icon_state = "switchblade"
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
|
||||
baseturfs = /turf/open/floor/plating
|
||||
|
||||
var/hardness = 40 //lower numbers are harder. Used to determine the probability of a hulk smashing through.
|
||||
|
||||
|
||||
///lower numbers are harder. Used to determine the probability of a hulk smashing through. Also, (hardness - 40) is used as a modifier for objects trying to embed in this (hardness of 30 results in a -10% chance)
|
||||
var/hardness = 40
|
||||
var/slicing_duration = 100 //default time taken to slice the wall
|
||||
var/sheet_type = /obj/item/stack/sheet/metal
|
||||
var/sheet_amount = 2
|
||||
|
||||
Reference in New Issue
Block a user