Merge branch 'master' into fuckatmos
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
desc = "Graffiti. Damn kids."
|
||||
icon = 'icons/effects/crayondecal.dmi'
|
||||
icon_state = "rune1"
|
||||
plane = GAME_PLANE //makes the graffiti visible over a wall.
|
||||
gender = NEUTER
|
||||
mergeable_decal = FALSE
|
||||
var/do_icon_rotate = TRUE
|
||||
|
||||
@@ -449,7 +449,11 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
return 0
|
||||
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M, mob/living/carbon/user)
|
||||
|
||||
if(user.has_trait(TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
|
||||
return
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
var/is_human_victim = 0
|
||||
var/obj/item/bodypart/affecting = M.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
if(isturf(A))
|
||||
return
|
||||
if(istype(A,/obj/item/storage/lockbox))
|
||||
if(istype(A,/obj/item/storage/lockbox) || istype(A, /obj/item/storage/pod))
|
||||
A.emag_act(user)
|
||||
uses = max(uses - 1, 0)
|
||||
if(!uses)
|
||||
|
||||
@@ -68,6 +68,8 @@
|
||||
var/pre_noise = FALSE
|
||||
var/post_noise = FALSE
|
||||
|
||||
var/datum/team/gang/gang //For marking territory.
|
||||
var/gang_tag_delay = 30 //this is the delay for gang mode tag applications on anything that gang = true on.
|
||||
|
||||
/obj/item/toy/crayon/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is jamming [src] up [user.p_their()] nose and into [user.p_their()] brain. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
@@ -288,6 +290,13 @@
|
||||
else if(drawing in numerals)
|
||||
temp = "number"
|
||||
|
||||
// If a gang member is using a gang spraycan, it'll behave differently
|
||||
var/gang_mode = FALSE
|
||||
if(gang && user.mind && user.mind.has_antag_datum(/datum/antagonist/gang)) //Heres a check.
|
||||
gang_mode = TRUE // No more runtimes if a non-gang member sprays a gang can, it just works like normal cans.
|
||||
// discontinue if the area isn't valid for tagging because gang "honour"
|
||||
if(gang_mode && (!can_claim_for_gang(user, target)))
|
||||
return
|
||||
|
||||
var/graf_rot
|
||||
if(drawing in oriented)
|
||||
@@ -310,20 +319,22 @@
|
||||
clicky = CLAMP(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
|
||||
|
||||
if(!instant)
|
||||
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
|
||||
to_chat(user, "<span class='notice'>You start drawing a [temp] on the [target.name]...</span>")
|
||||
|
||||
if(pre_noise)
|
||||
audible_message("<span class='notice'>You hear spraying.</span>")
|
||||
playsound(user.loc, 'sound/effects/spray.ogg', 5, 1, 5)
|
||||
|
||||
var/takes_time = !instant
|
||||
var/takes_time = !instant //For order purposes, since I'm maximum bad.
|
||||
if(gang_mode)
|
||||
takes_time = TRUE
|
||||
|
||||
var/wait_time = 50
|
||||
if(paint_mode == PAINT_LARGE_HORIZONTAL)
|
||||
wait_time *= 3
|
||||
|
||||
if(takes_time)
|
||||
if(!do_after(user, 50, target = target))
|
||||
if(takes_time) //This is what deteremines the time it takes to spray a tag in gang mode. 50 is Default.
|
||||
if(!do_after(user, gang_tag_delay, target = target)) //25 is a good number, but we have gang_tag_delay var now.
|
||||
return
|
||||
|
||||
if(length(text_buffer))
|
||||
@@ -332,26 +343,34 @@
|
||||
|
||||
var/list/turf/affected_turfs = list()
|
||||
|
||||
|
||||
if(actually_paints)
|
||||
switch(paint_mode)
|
||||
if(PAINT_NORMAL)
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(target, paint_color, drawing, temp, graf_rot)
|
||||
C.add_hiddenprint(user)
|
||||
C.pixel_x = clickx
|
||||
C.pixel_y = clicky
|
||||
affected_turfs += target
|
||||
if(PAINT_LARGE_HORIZONTAL)
|
||||
var/turf/left = locate(target.x-1,target.y,target.z)
|
||||
var/turf/right = locate(target.x+1,target.y,target.z)
|
||||
if(is_type_in_list(left, validSurfaces) && is_type_in_list(right, validSurfaces))
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
|
||||
if(gang_mode)
|
||||
// Double check it wasn't tagged in the meanwhile.
|
||||
if(!can_claim_for_gang(user, target))
|
||||
return
|
||||
tag_for_gang(user, target)
|
||||
affected_turfs += target
|
||||
else
|
||||
switch(paint_mode)
|
||||
if(PAINT_NORMAL)
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(target, paint_color, drawing, temp, graf_rot)
|
||||
C.add_hiddenprint(user)
|
||||
affected_turfs += left
|
||||
affected_turfs += right
|
||||
C.pixel_x = clickx
|
||||
C.pixel_y = clicky
|
||||
affected_turfs += target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
|
||||
return
|
||||
if(PAINT_LARGE_HORIZONTAL)
|
||||
var/turf/left = locate(target.x-1,target.y,target.z)
|
||||
var/turf/right = locate(target.x+1,target.y,target.z)
|
||||
if(is_type_in_list(left, validSurfaces) && is_type_in_list(right, validSurfaces))
|
||||
var/obj/effect/decal/cleanable/crayon/C = new(left, paint_color, drawing, temp, graf_rot, PAINT_LARGE_HORIZONTAL_ICON)
|
||||
C.add_hiddenprint(user)
|
||||
affected_turfs += left
|
||||
affected_turfs += right
|
||||
affected_turfs += target
|
||||
else
|
||||
to_chat(user, "<span class='warning'>There isn't enough space to paint!</span>")
|
||||
return
|
||||
|
||||
if(!instant)
|
||||
to_chat(user, "<span class='notice'>You finish drawing \the [temp].</span>")
|
||||
@@ -373,6 +392,52 @@
|
||||
reagents.trans_to(t, ., volume_multiplier)
|
||||
check_empty(user)
|
||||
|
||||
|
||||
//////////////Gang mode stuff/////////////////
|
||||
/obj/item/toy/crayon/proc/can_claim_for_gang(mob/user, atom/target)
|
||||
// Check area validity.
|
||||
// Reject space, player-created areas, and non-station z-levels.
|
||||
var/area/A = get_area(target)
|
||||
if(!A || (!is_station_level(A.z)) || !A.valid_territory)
|
||||
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
|
||||
return FALSE
|
||||
|
||||
var/spraying_over = FALSE
|
||||
for(var/G in target)
|
||||
var/obj/effect/decal/cleanable/crayon/gang/gangtag = G
|
||||
if(istype(gangtag))
|
||||
var/datum/antagonist/gang/GA = user.mind.has_antag_datum(/datum/antagonist/gang)
|
||||
if(gangtag.gang != GA.gang)
|
||||
spraying_over = TRUE
|
||||
break
|
||||
|
||||
var/occupying_gang = territory_claimed(A, user)
|
||||
if(occupying_gang && !spraying_over)
|
||||
to_chat(user, "<span class='danger'>[A] has already been tagged by the [occupying_gang] gang! You must get rid of or spray over the old tag first!</span>")
|
||||
return FALSE
|
||||
|
||||
// If you pass the gauntlet of checks, you're good to proceed
|
||||
return TRUE
|
||||
|
||||
/obj/item/toy/crayon/proc/territory_claimed(area/territory, mob/user)
|
||||
for(var/datum/team/gang/G in GLOB.gangs)
|
||||
if(territory.type in (G.territories|G.new_territories))
|
||||
. = G.name
|
||||
break
|
||||
|
||||
/obj/item/toy/crayon/proc/tag_for_gang(mob/user, atom/target)
|
||||
//Delete any old markings on this tile, including other gang tags
|
||||
for(var/obj/effect/decal/cleanable/crayon/old_marking in target)
|
||||
qdel(old_marking)
|
||||
|
||||
var/datum/antagonist/gang/G = user.mind.has_antag_datum(/datum/antagonist/gang)
|
||||
var/area/territory = get_area(target)
|
||||
|
||||
new /obj/effect/decal/cleanable/crayon/gang(target,G.gang,"graffiti",0,user) // Heres the gang tag.
|
||||
to_chat(user, "<span class='notice'>You tagged [territory] for your gang!</span>")
|
||||
/////////////////Gang end////////////////////
|
||||
|
||||
|
||||
/obj/item/toy/crayon/attack(mob/M, mob/user)
|
||||
if(edible && (M == user))
|
||||
to_chat(user, "You take a bite of the [src.name]. Delicious!")
|
||||
@@ -524,6 +589,7 @@
|
||||
is_capped = TRUE
|
||||
self_contained = FALSE // Don't disappear when they're empty
|
||||
can_change_colour = TRUE
|
||||
gang = TRUE //Gang check is true for all things upon the honored hierarchy of spraycans, except those that are FALSE.
|
||||
|
||||
validSurfaces = list(/turf/open/floor, /turf/closed/wall)
|
||||
reagent_contents = list("welding_fuel" = 1, "ethanol" = 1)
|
||||
@@ -669,6 +735,7 @@
|
||||
icon_capped = "deathcan2_cap"
|
||||
icon_uncapped = "deathcan2"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
volume_multiplier = 25
|
||||
charges = 100
|
||||
@@ -683,6 +750,7 @@
|
||||
icon_capped = "clowncan2_cap"
|
||||
icon_uncapped = "clowncan2"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
reagent_contents = list("lube" = 1, "banana" = 1)
|
||||
volume_multiplier = 5
|
||||
@@ -695,6 +763,7 @@
|
||||
icon_capped = "mimecan_cap"
|
||||
icon_uncapped = "mimecan"
|
||||
use_overlays = FALSE
|
||||
gang = FALSE
|
||||
|
||||
can_change_colour = FALSE
|
||||
paint_color = "#FFFFFF" //RGB
|
||||
@@ -703,6 +772,26 @@
|
||||
post_noise = FALSE
|
||||
reagent_contents = list("nothing" = 1, "mutetoxin" = 1)
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang
|
||||
charges = 20 // Charges back to 20, which is the default value for them.
|
||||
gang = TRUE
|
||||
gang_tag_delay = 15 //Its 50% faster than a regular spraycan, for tagging. After-all they did spend points/meet the boss.
|
||||
|
||||
pre_noise = FALSE
|
||||
post_noise = TRUE // Its even more stealthy just a tad.
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang/Initialize(loc, datum/team/gang/G)
|
||||
..()
|
||||
if(G)
|
||||
gang = G
|
||||
paint_color = G.color
|
||||
update_icon()
|
||||
|
||||
/obj/item/toy/crayon/spraycan/gang/examine(mob/user)
|
||||
. = ..()
|
||||
if(user.mind && user.mind.has_antag_datum(/datum/antagonist/gang) || isobserver(user))
|
||||
to_chat(user, "This spraycan has been specially modified with a stage 2 nozzle kit, making it faster.")
|
||||
|
||||
#undef RANDOM_GRAFFITI
|
||||
#undef RANDOM_LETTER
|
||||
#undef RANDOM_NUMBER
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/brainwashed))
|
||||
target.mind.remove_antag_datum(/datum/antagonist/brainwashed)
|
||||
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable)
|
||||
if(target.mind.has_antag_datum(/datum/antagonist/rev/head) || target.mind.unconvertable || target.mind.has_antag_datum(/datum/antagonist/gang/boss))
|
||||
if(!silent)
|
||||
target.visible_message("<span class='warning'>[target] seems to resist the implant!</span>", "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
||||
var/obj/item/implanter/I = loc
|
||||
@@ -38,9 +38,12 @@
|
||||
I.update_icon()
|
||||
return FALSE
|
||||
|
||||
var/datum/antagonist/gang/gang = target.mind.has_antag_datum(/datum/antagonist/gang)
|
||||
var/datum/antagonist/rev/rev = target.mind.has_antag_datum(/datum/antagonist/rev)
|
||||
if(rev)
|
||||
rev.remove_revolutionary(FALSE, user)
|
||||
if(gang)
|
||||
target.mind.remove_antag_datum(/datum/antagonist/gang)
|
||||
if(!silent)
|
||||
if(target.mind in SSticker.mode.cult)
|
||||
to_chat(target, "<span class='warning'>You feel something interfering with your mental conditioning, but you resist it!</span>")
|
||||
|
||||
@@ -49,8 +49,6 @@
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
@@ -79,8 +77,6 @@
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
else
|
||||
var/turf/T = get_turf(src)
|
||||
if(!isspaceturf(T))
|
||||
consume_turf(T)
|
||||
shard.consume_turf(T)
|
||||
|
||||
/obj/item/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
|
||||
. = ..()
|
||||
@@ -330,18 +330,7 @@
|
||||
else if(!isturf(target))
|
||||
shard.Bumped(target)
|
||||
else
|
||||
consume_turf(target)
|
||||
|
||||
/obj/item/melee/supermatter_sword/proc/consume_turf(turf/T)
|
||||
var/oldtype = T.type
|
||||
var/turf/newT = T.ScrapeAway()
|
||||
if(newT.type == oldtype)
|
||||
return
|
||||
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
|
||||
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
|
||||
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
|
||||
shard.Consume()
|
||||
T.CalculateAdjacentTurfs()
|
||||
shard.consume_turf(target)
|
||||
|
||||
/obj/item/melee/supermatter_sword/add_blood_DNA(list/blood_dna)
|
||||
return FALSE
|
||||
|
||||
@@ -635,6 +635,13 @@
|
||||
attack_verb = list("lit", "flickered", "flashed")
|
||||
squeak_override = list('sound/weapons/magout.ogg' = 1)
|
||||
|
||||
/obj/item/toy/plush/box
|
||||
name = "cardboard plushie"
|
||||
desc = "A toy box plushie, it holds cotten. Only a baddie would place a bomb through the postal system..."
|
||||
icon_state = "box"
|
||||
item_state = "box"
|
||||
attack_verb = list("open", "closed", "packed", "hidden", "rigged", "bombed", "sent", "gave")
|
||||
|
||||
/obj/item/toy/plush/borgplushie
|
||||
name = "robot plushie"
|
||||
desc = "An adorable stuffed toy of a robot."
|
||||
@@ -659,6 +666,12 @@
|
||||
icon_state = "neeb"
|
||||
item_state = "neeb"
|
||||
|
||||
/obj/item/toy/plush/borgplushie/bhijn
|
||||
desc = "An adorable stuffed toy of a IPC."
|
||||
icon_state = "bhijn"
|
||||
item_state = "bhijn"
|
||||
attack_verb = list("closed", "reworked", "merged")
|
||||
|
||||
/obj/item/toy/plush/bird
|
||||
name = "bird plushie"
|
||||
desc = "An adorable stuffed plushie that resembles an avian."
|
||||
@@ -743,6 +756,7 @@
|
||||
/obj/item/toy/plush/mammal/edgar
|
||||
icon_state = "edgar"
|
||||
item_state = "edgar"
|
||||
attack_verb = list("collared", "tricked", "headpatted")
|
||||
|
||||
/obj/item/toy/plush/mammal/frank
|
||||
icon_state = "frank"
|
||||
@@ -777,6 +791,16 @@
|
||||
icon_state = "zed"
|
||||
item_state = "zed"
|
||||
|
||||
/obj/item/toy/plush/mammal/justin
|
||||
icon_state = "justin"
|
||||
item_state = "justin"
|
||||
attack_verb = list("buttslapped", "fixed")
|
||||
|
||||
/obj/item/toy/plush/mammal/reece
|
||||
icon_state = "reece"
|
||||
item_state = "reece"
|
||||
attack_verb = list("healed", "cured", "demoted")
|
||||
|
||||
/obj/item/toy/plush/mammal/dog
|
||||
desc = "An adorable stuffed toy that resembles a canine."
|
||||
icon_state = "katlin"
|
||||
@@ -840,6 +864,12 @@
|
||||
icon_state = "drew"
|
||||
item_state = "drew"
|
||||
|
||||
/obj/item/toy/plush/catgirl/trilby
|
||||
desc = "A masked stuffed toy that resembles a feline scientist."
|
||||
icon_state = "trilby"
|
||||
item_state = "trilby"
|
||||
attack_verb = list("pred", "coded", "remembered")
|
||||
|
||||
/obj/item/toy/plush/catgirl/fermis
|
||||
name = "medcat plushie"
|
||||
desc = "An affectionate stuffed toy that resembles a certain medcat, comes complete with battery operated wagging tail!! You get the impression she's cheering you on to to find happiness and be kind to people."
|
||||
|
||||
@@ -153,3 +153,16 @@
|
||||
slot_flags = null
|
||||
to_chat(user, "<span class='notice'>[src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/shield/makeshift
|
||||
name = "metal shield"
|
||||
desc = "A large shield made of wired and welded sheets of metal. The handle is made of cloth and leather making it unwieldy."
|
||||
armor = list("melee" = 25, "bullet" = 25, "laser" = 5, "energy" = 0, "bomb" = 30, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 80)
|
||||
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
|
||||
item_state = "makeshift_shield"
|
||||
materials = list(MAT_METAL = 18000)
|
||||
slot_flags = null
|
||||
block_chance = 25
|
||||
force = 5
|
||||
throwforce = 7
|
||||
|
||||
@@ -252,7 +252,8 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \
|
||||
new/datum/stack_recipe("bedsheet", /obj/item/bedsheet, 3), \
|
||||
new/datum/stack_recipe("empty sandbag", /obj/item/emptysandbag, 4), \
|
||||
null, \
|
||||
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1), \
|
||||
new/datum/stack_recipe("fingerless gloves", /obj/item/clothing/gloves/fingerless, 1),\
|
||||
new/datum/stack_recipe("white gloves", /obj/item/clothing/gloves/color/white, 1),\
|
||||
new/datum/stack_recipe("black gloves", /obj/item/clothing/gloves/color/black, 3), \
|
||||
null, \
|
||||
new/datum/stack_recipe("blindfold", /obj/item/clothing/glasses/sunglasses/blindfold, 2), \
|
||||
@@ -284,6 +285,13 @@ GLOBAL_LIST_INIT(cardboard_recipes, list ( \
|
||||
new/datum/stack_recipe("light tubes", /obj/item/storage/box/lights/tubes), \
|
||||
new/datum/stack_recipe("light bulbs", /obj/item/storage/box/lights/bulbs), \
|
||||
new/datum/stack_recipe("mouse traps", /obj/item/storage/box/mousetraps), \
|
||||
new/datum/stack_recipe("lethal ammo box", /obj/item/storage/box/lethalshot), \
|
||||
new/datum/stack_recipe("rubber shot ammo box", /obj/item/storage/box/rubbershot), \
|
||||
new/datum/stack_recipe("bean bag ammo box", /obj/item/storage/box/beanbag), \
|
||||
new/datum/stack_recipe("12g ammo box", /obj/item/storage/box/lethalslugs), \
|
||||
new/datum/stack_recipe("stun slug ammo box", /obj/item/storage/box/stunslug), \
|
||||
new/datum/stack_recipe("tech shell ammo box", /obj/item/storage/box/techsslug), \
|
||||
new/datum/stack_recipe("incendiary ammo box", /obj/item/storage/box/fireshot), \
|
||||
new/datum/stack_recipe("cardborg suit", /obj/item/clothing/suit/cardborg, 3), \
|
||||
new/datum/stack_recipe("cardborg helmet", /obj/item/clothing/head/cardborg), \
|
||||
new/datum/stack_recipe("pizza box", /obj/item/pizzabox), \
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
* ID and security PDA cart boxes,
|
||||
* Handcuff, mousetrap, and pillbottle boxes,
|
||||
* Snap-pops and matchboxes,
|
||||
* Replacement light boxes.
|
||||
* Action Figure Boxes
|
||||
* Replacement light boxes,
|
||||
* Shotgun Ammo boxes,
|
||||
* Action Figure Boxes,
|
||||
* Various paper bags.
|
||||
*
|
||||
* For syndicate call-ins see uplink_kits.dm
|
||||
@@ -84,7 +85,6 @@
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/disk/data(src)
|
||||
|
||||
|
||||
/obj/item/storage/box/disks_plantgene
|
||||
name = "plant data disks box"
|
||||
illustration = "disk_kit"
|
||||
@@ -117,7 +117,6 @@
|
||||
new /obj/item/crowbar/red(src)
|
||||
new /obj/item/reagent_containers/hypospray/medipen(src)
|
||||
|
||||
|
||||
// Engineer survival box
|
||||
/obj/item/storage/box/engineer/PopulateContents()
|
||||
new /obj/item/clothing/mask/breath(src)
|
||||
@@ -261,7 +260,6 @@
|
||||
new /obj/item/assembly/flash/handheld(src)
|
||||
new /obj/item/screwdriver(src)
|
||||
|
||||
|
||||
/obj/item/storage/box/teargas
|
||||
name = "box of tear gas grenades (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness and skin irritation.</B>"
|
||||
@@ -615,7 +613,6 @@
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/light/bulb(src)
|
||||
|
||||
|
||||
/obj/item/storage/box/deputy
|
||||
name = "box of deputy armbands"
|
||||
desc = "To be issued to those authorized to act as deputy of security."
|
||||
@@ -721,6 +718,46 @@
|
||||
for(var/i in 1 to 6)
|
||||
new /obj/item/ammo_casing/shotgun/beanbag(src)
|
||||
|
||||
/obj/item/storage/box/lethalslugs
|
||||
name = "box of 12g shotgun slugs"
|
||||
desc = "A box full of lethal 12g slug, designed for riot shotguns."
|
||||
icon_state = "12g_box"
|
||||
illustration = null
|
||||
|
||||
/obj/item/storage/box/lethalslugs/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/projectile/bullet/shotgun_slug(src)
|
||||
|
||||
/obj/item/storage/box/stunslug
|
||||
name = "box of stun slugs"
|
||||
desc = "A box full of stun 12g slugs."
|
||||
icon_state = "stunslug_box"
|
||||
illustration = null
|
||||
|
||||
/obj/item/storage/box/stunslug/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/projectile/bullet/shotgun_stunslug(src)
|
||||
|
||||
/obj/item/storage/box/techsslug
|
||||
name = "box of tech shotgun shells"
|
||||
desc = "A box full of tech shotgun shells."
|
||||
icon_state = "techslug_box"
|
||||
illustration = null
|
||||
|
||||
/obj/item/storage/box/techsslug/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/ammo_casing/shotgun/techshell(src)
|
||||
|
||||
/obj/item/storage/box/fireshot
|
||||
name = "box of incendiary ammo"
|
||||
desc = "A box full of tech incendiary ammo."
|
||||
icon_state = "fireshot_box"
|
||||
illustration = null
|
||||
|
||||
/obj/item/storage/box/techsslug/PopulateContents()
|
||||
for(var/i in 1 to 7)
|
||||
new /obj/item/ammo_casing/shotgun/incendiary(src)
|
||||
|
||||
/obj/item/storage/box/actionfigure
|
||||
name = "box of action figures"
|
||||
desc = "The latest set of collectable action figures."
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define STUNBATON_CHARGE_LENIENCY 0.3
|
||||
|
||||
/obj/item/melee/baton
|
||||
name = "stunbaton"
|
||||
desc = "A stun baton for incapacitating people with."
|
||||
@@ -13,7 +15,7 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 50, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
|
||||
var/stunforce = 140
|
||||
var/status = 0
|
||||
var/status = FALSE
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
var/hitcost = 1000
|
||||
var/throw_hit_chance = 35
|
||||
@@ -44,17 +46,30 @@
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high
|
||||
|
||||
/obj/item/melee/baton/proc/deductcharge(chrgdeductamt)
|
||||
if(cell)
|
||||
//Note this value returned is significant, as it will determine
|
||||
//if a stun is applied or not
|
||||
. = cell.use(chrgdeductamt)
|
||||
if(status && cell.charge < hitcost)
|
||||
//we're below minimum, turn off
|
||||
status = 0
|
||||
update_icon()
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
/obj/item/melee/baton/proc/deductcharge(chrgdeductamt, chargecheck = TRUE)
|
||||
if(!cell)
|
||||
switch_status(FALSE, TRUE)
|
||||
return FALSE
|
||||
//Note this value returned is significant, as it will determine
|
||||
//if a stun is applied or not
|
||||
. = cell.use(chrgdeductamt)
|
||||
if(status && (!. || (chargecheck && cell.charge < hitcost * STUNBATON_CHARGE_LENIENCY)))
|
||||
//we're below minimum, turn off
|
||||
switch_status(FALSE)
|
||||
|
||||
/obj/item/melee/baton/proc/switch_status(new_status = FALSE, silent = FALSE)
|
||||
if(status != new_status)
|
||||
status = new_status
|
||||
if(!silent)
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
if(status)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/melee/baton/process()
|
||||
deductcharge(hitcost * 0.004, FALSE)
|
||||
|
||||
/obj/item/melee/baton/update_icon()
|
||||
if(status)
|
||||
@@ -77,7 +92,7 @@
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell.</span>")
|
||||
else
|
||||
if(C.maxcharge < hitcost)
|
||||
if(C.maxcharge < hitcost * STUNBATON_CHARGE_LENIENCY)
|
||||
to_chat(user, "<span class='notice'>[src] requires a higher capacity cell.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
@@ -92,31 +107,25 @@
|
||||
cell.forceMove(get_turf(src))
|
||||
cell = null
|
||||
to_chat(user, "<span class='notice'>You remove the cell from [src].</span>")
|
||||
status = 0
|
||||
update_icon()
|
||||
switch_status(FALSE, TRUE)
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/melee/baton/attack_self(mob/user)
|
||||
if(cell && cell.charge > hitcost)
|
||||
status = !status
|
||||
if(cell && cell.charge > hitcost * STUNBATON_CHARGE_LENIENCY)
|
||||
switch_status(!status)
|
||||
to_chat(user, "<span class='notice'>[src] is now [status ? "on" : "off"].</span>")
|
||||
playsound(loc, "sparks", 75, 1, -1)
|
||||
else
|
||||
status = 0
|
||||
switch_status(FALSE, TRUE)
|
||||
if(!cell)
|
||||
to_chat(user, "<span class='warning'>[src] does not have a power source!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is out of charge.</span>")
|
||||
update_icon()
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/melee/baton/attack(mob/M, mob/living/carbon/human/user)
|
||||
if(status && user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
clowning_around(user)
|
||||
return
|
||||
|
||||
if(user.getStaminaLoss() >= STAMINA_SOFTCRIT)//CIT CHANGE - makes it impossible to baton in stamina softcrit
|
||||
@@ -153,17 +162,21 @@
|
||||
var/mob/living/carbon/human/H = L
|
||||
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
|
||||
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
|
||||
return 0
|
||||
return FALSE
|
||||
var/stunpwr = stunforce
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(!R || !R.cell || !R.cell.use(hitcost))
|
||||
return 0
|
||||
if(!istype(R) || !R.cell || !R.cell.use(hitcost))
|
||||
return FALSE
|
||||
else
|
||||
if(!deductcharge(hitcost))
|
||||
return 0
|
||||
var/stuncharge = cell.charge
|
||||
if(!deductcharge(hitcost, FALSE))
|
||||
stunpwr *= round(stuncharge/hitcost)
|
||||
if(stunpwr < stunforce * STUNBATON_CHARGE_LENIENCY)
|
||||
return FALSE
|
||||
|
||||
L.Knockdown(stunforce)
|
||||
L.adjustStaminaLoss(stunforce*0.1, affected_zone = (istype(user) ? user.zone_selected : BODY_ZONE_CHEST))//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
|
||||
L.Knockdown(stunpwr)
|
||||
L.adjustStaminaLoss(stunpwr*0.1, affected_zone = (istype(user) ? user.zone_selected : BODY_ZONE_CHEST))//CIT CHANGE - makes stunbatons deal extra staminaloss. Todo: make this also deal pain when pain gets implemented.
|
||||
L.apply_effect(EFFECT_STUTTER, stunforce)
|
||||
SEND_SIGNAL(L, COMSIG_LIVING_MINOR_SHOCK)
|
||||
if(user)
|
||||
@@ -180,11 +193,18 @@
|
||||
H.forcesay(GLOB.hit_appends)
|
||||
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/obj/item/melee/baton/proc/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
|
||||
/obj/item/melee/baton/emp_act(severity)
|
||||
. = ..()
|
||||
if (!(. & EMP_PROTECT_SELF))
|
||||
switch_status(FALSE)
|
||||
deductcharge(1000 / severity)
|
||||
|
||||
//Makeshift stun baton. Replacement for stun gloves.
|
||||
@@ -211,3 +231,5 @@
|
||||
/obj/item/melee/baton/cattleprod/baton_stun()
|
||||
if(sparkler.activate())
|
||||
..()
|
||||
|
||||
#undef STUNBATON_CHARGE_LENIENCY
|
||||
|
||||
@@ -6,27 +6,23 @@
|
||||
item_state = "teleprod"
|
||||
slot_flags = null
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/attack(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
|
||||
..()
|
||||
if(status && user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
if(do_teleport(user, get_turf(user), 50))//honk honk
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost)
|
||||
else
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
deductcharge(hitcost/4)
|
||||
/obj/item/melee/baton/cattleprod/teleprod/baton_stun(mob/living/carbon/M, mob/living/carbon/user)//handles making things teleport when hit
|
||||
. = ..()
|
||||
if(!. || !istype(M) || M.anchored)
|
||||
return
|
||||
else
|
||||
if(status)
|
||||
if(!istype(M) && M.anchored)
|
||||
return .
|
||||
else
|
||||
SEND_SIGNAL(M, COMSIG_LIVING_MINOR_SHOCK)
|
||||
do_teleport(M, get_turf(M), 15)
|
||||
SEND_SIGNAL(M, COMSIG_LIVING_MINOR_SHOCK)
|
||||
do_teleport(M, get_turf(M), 15)
|
||||
|
||||
/obj/item/melee/baton/cattleprod/teleprod/clowning_around(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] accidentally hits [user.p_them()]self with [src]!</span>", \
|
||||
"<span class='userdanger'>You accidentally hit yourself with [src]!</span>")
|
||||
SEND_SIGNAL(user, COMSIG_LIVING_MINOR_SHOCK)
|
||||
user.Knockdown(stunforce*3)
|
||||
if(do_teleport(user, get_turf(user), 50))
|
||||
deductcharge(hitcost)
|
||||
else
|
||||
deductcharge(hitcost * 0.25)
|
||||
|
||||
/obj/item/melee/baton/cattleprod/attackby(obj/item/I, mob/user, params)//handles sticking a crystal onto a stunprod to make a teleprod
|
||||
if(istype(I, /obj/item/stack/ore/bluespace_crystal))
|
||||
|
||||
@@ -75,11 +75,6 @@
|
||||
return ..()
|
||||
if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD)
|
||||
return ..()
|
||||
if(user.has_trait(TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
|
||||
return
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
@@ -103,7 +98,7 @@
|
||||
|
||||
/obj/item/screwdriver/abductor/get_belt_overlay()
|
||||
return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', "screwdriver_nuke")
|
||||
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered hand drill. It's fitted with a screw bit."
|
||||
|
||||
@@ -241,6 +241,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
|
||||
//what happens when the obj's health is below integrity_failure level.
|
||||
/obj/proc/obj_break(damage_flag)
|
||||
SEND_SIGNAL(src, COMSIG_OBJ_BREAK, damage_flag)
|
||||
return
|
||||
|
||||
//what happens when the obj's integrity reaches zero.
|
||||
|
||||
Reference in New Issue
Block a user