mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into id_computer_demote_terminate_freejob
This commit is contained in:
@@ -477,9 +477,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
|
||||
return R.cell.charge >= (amount * use_multiplier)
|
||||
|
||||
/obj/item/rcd/proc/detonate_pulse()
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and \
|
||||
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
|
||||
vibrating violently!</b></span>")
|
||||
audible_message("<span class='danger'><b>[src] begins to vibrate and buzz loudly!</b></span>", "<span class='danger'><b>[src] begins vibrating violently!</b></span>")
|
||||
// 5 seconds to get rid of it
|
||||
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ RSF
|
||||
if(!proximity) return
|
||||
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
|
||||
return
|
||||
var spawn_location
|
||||
var/spawn_location
|
||||
var/turf/T = get_turf(A)
|
||||
if(istype(T) && !T.density)
|
||||
spawn_location = T
|
||||
|
||||
@@ -361,13 +361,13 @@
|
||||
|
||||
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
|
||||
if(!src.registered_name)
|
||||
var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
|
||||
var/t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
|
||||
if(!t)
|
||||
to_chat(user, "<span class='warning'>Invalid name.</span>")
|
||||
return
|
||||
src.registered_name = t
|
||||
|
||||
var u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN))
|
||||
var/u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN))
|
||||
if(!u)
|
||||
to_chat(user, "<span class='warning'>Invalid assignment.</span>")
|
||||
src.registered_name = ""
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
/obj/structure/chrono_field/update_icon()
|
||||
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
|
||||
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
|
||||
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
|
||||
if(ttk_frame != RPpos)
|
||||
RPpos = ttk_frame
|
||||
mob_underlay.icon_state = "frame[RPpos]"
|
||||
|
||||
@@ -31,6 +31,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
var/smoketime = 150
|
||||
var/chem_volume = 60
|
||||
var/list/list_reagents = list("nicotine" = 40)
|
||||
var/first_puff = TRUE // the first puff is a bit more reagents ingested
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/mask.dmi',
|
||||
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
|
||||
@@ -194,8 +195,9 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
if(reagents && reagents.total_volume) // check if it has any reagents at all
|
||||
if(is_being_smoked) // if it's being smoked, transfer reagents to the mob
|
||||
var/mob/living/carbon/C = loc
|
||||
for (var/datum/reagent/R in reagents.reagent_list)
|
||||
reagents.trans_id_to(C, R.id, max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
reagents.trans_id_to(C, R.id, first_puff ? 1 : max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
|
||||
first_puff = FALSE
|
||||
if(!reagents.total_volume) // There were reagents, but now they're gone
|
||||
to_chat(C, "<span class='notice'>Your [name] loses its flavor.</span>")
|
||||
else // else just remove some of the reagents
|
||||
@@ -309,6 +311,11 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
pixel_y = rand(-10,10)
|
||||
transform = turn(transform,rand(0,360))
|
||||
|
||||
/obj/item/cigbutt/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/cigbutt/cigarbutt
|
||||
name = "cigar butt"
|
||||
desc = "A manky old cigar butt."
|
||||
@@ -360,7 +367,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
lit = FALSE
|
||||
icon_state = icon_off
|
||||
item_state = icon_off
|
||||
M.update_inv_wear_mask(0)
|
||||
M.update_inv_wear_mask()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
smoke()
|
||||
@@ -377,6 +384,7 @@ LIGHTERS ARE IN LIGHTERS.DM
|
||||
to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>")
|
||||
reagents.add_reagent("nicotine", chem_volume)
|
||||
smoketime = initial(smoketime)
|
||||
first_puff = TRUE
|
||||
|
||||
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/reagent_containers))
|
||||
|
||||
@@ -5,16 +5,22 @@
|
||||
icon_state = "lipstick"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/colour = "red"
|
||||
var/open = 0
|
||||
var/list/lipstick_colors = list(
|
||||
"purple" = "purple",
|
||||
"jade" = "#216F43",
|
||||
"lime" = "lime",
|
||||
"black" = "black",
|
||||
"green" = "green",
|
||||
"blue" = "blue",
|
||||
"white" = "white")
|
||||
var/open = FALSE
|
||||
var/static/list/lipstick_colors
|
||||
|
||||
/obj/item/lipstick/Initialize(mapload)
|
||||
. = ..()
|
||||
if(!lipstick_colors)
|
||||
lipstick_colors = list(
|
||||
"black" = "#000000",
|
||||
"white" = "#FFFFFF",
|
||||
"red" = "#FF0000",
|
||||
"green" = "#00C000",
|
||||
"blue" = "#0000FF",
|
||||
"purple" = "#D55CD0",
|
||||
"jade" = "#216F43",
|
||||
"lime" = "#00FF00",
|
||||
)
|
||||
|
||||
/obj/item/lipstick/purple
|
||||
name = "purple lipstick"
|
||||
@@ -22,7 +28,7 @@
|
||||
|
||||
/obj/item/lipstick/jade
|
||||
name = "jade lipstick"
|
||||
colour = "#216F43"
|
||||
colour = "jade"
|
||||
|
||||
/obj/item/lipstick/lime
|
||||
name = "lime lipstick"
|
||||
@@ -47,40 +53,38 @@
|
||||
/obj/item/lipstick/random
|
||||
name = "lipstick"
|
||||
|
||||
/obj/item/lipstick/random/New()
|
||||
..()
|
||||
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
|
||||
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
|
||||
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
|
||||
/obj/item/lipstick/random/Initialize(mapload)
|
||||
. = ..()
|
||||
var/lscolor = pick(lipstick_colors) // A random color is picked from the var defined initially in a new var.
|
||||
colour = lipstick_colors[lscolor] // The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
|
||||
name = "[lscolor] lipstick" // The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
|
||||
|
||||
|
||||
/obj/item/lipstick/attack_self(mob/user as mob)
|
||||
overlays.Cut()
|
||||
/obj/item/lipstick/attack_self(mob/user)
|
||||
cut_overlays()
|
||||
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
|
||||
open = !open
|
||||
if(open)
|
||||
var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color")
|
||||
colored.color = colour
|
||||
var/image/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color")
|
||||
colored.color = lipstick_colors[colour]
|
||||
icon_state = "lipstick_uncap"
|
||||
overlays += colored
|
||||
add_overlay(colored)
|
||||
else
|
||||
icon_state = "lipstick"
|
||||
|
||||
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
|
||||
if(!open) return
|
||||
|
||||
if(!istype(M, /mob)) return
|
||||
/obj/item/lipstick/attack(mob/M, mob/user)
|
||||
if(!open || !istype(M))
|
||||
return
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.lip_style) //if they already have lipstick on
|
||||
if(H.lip_style) // If they already have lipstick on
|
||||
to_chat(user, "<span class='notice'>You need to wipe off the old lipstick first!</span>")
|
||||
return
|
||||
if(H == user)
|
||||
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with [src].</span>", \
|
||||
"<span class='notice'>You take a moment to apply [src]. Perfect!</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.lip_color = lipstick_colors[colour]
|
||||
H.update_body()
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
|
||||
@@ -89,7 +93,7 @@
|
||||
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
|
||||
"<span class='notice'>You apply \the [src].</span>")
|
||||
H.lip_style = "lipstick"
|
||||
H.lip_color = colour
|
||||
H.lip_color = lipstick_colors[colour]
|
||||
H.update_body()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(powered) //so it doesn't show charge if it's unpowered
|
||||
if(cell)
|
||||
var/ratio = cell.charge / cell.maxcharge
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
ratio = CEILING(ratio*4, 1) * 25
|
||||
overlays += "[icon_state]-charge[ratio]"
|
||||
|
||||
/obj/item/defibrillator/CheckParts(list/parts_list)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
result = roll(sides)
|
||||
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
|
||||
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
|
||||
if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
|
||||
result = rigged_value
|
||||
else if(rigged == DICE_TOTALLY_RIGGED)
|
||||
result = rigged_value
|
||||
|
||||
@@ -147,10 +147,6 @@
|
||||
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
|
||||
|
||||
add_attack_logs(user, M, attack_log, ATKLOG_ALL)
|
||||
if(!iscarbon(user))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = user
|
||||
|
||||
inject(M, user)
|
||||
used = TRUE
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
scramble(1, H, 100)
|
||||
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
|
||||
H.sync_organ_dna(assimilate = 1)
|
||||
H.update_body(0)
|
||||
H.update_body()
|
||||
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
|
||||
H.reset_markings() //...Or markings.
|
||||
H.dna.ResetUIFrom(H)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return
|
||||
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
|
||||
if(user.is_in_active_hand(src))
|
||||
newtime = Clamp(newtime, 10, 60000)
|
||||
newtime = clamp(newtime, 10, 60000)
|
||||
det_time = newtime
|
||||
to_chat(user, "Timer set for [det_time] seconds.")
|
||||
|
||||
|
||||
@@ -49,8 +49,7 @@
|
||||
to_chat(user, "<span class='notice'>You cut open the present.</span>")
|
||||
|
||||
for(var/mob/M in src) //Should only be one but whatever.
|
||||
M.loc = src.loc
|
||||
M.reset_perspective(null)
|
||||
M.forceMove(loc)
|
||||
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -13,22 +13,12 @@
|
||||
/obj/item/grenade/clown_grenade/prime()
|
||||
..()
|
||||
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
|
||||
/*
|
||||
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
|
||||
if(prob(75))
|
||||
banana(T)
|
||||
*/
|
||||
var/i = 0
|
||||
var/number = 0
|
||||
for(var/direction in GLOB.alldirs)
|
||||
for(i = 0; i < 2; i++)
|
||||
number++
|
||||
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
|
||||
/* var/direction = pick(alldirs)
|
||||
var/spaces = pick(1;150, 2)
|
||||
var/a = 0
|
||||
for(a = 0; a < spaces; a++)
|
||||
step(peel,direction)*/
|
||||
var/a = 1
|
||||
if(number & 2)
|
||||
for(a = 1; a <= 2; a++)
|
||||
@@ -39,21 +29,17 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel
|
||||
trip_stun = 0
|
||||
trip_weaken = 7
|
||||
trip_tiles = 4
|
||||
trip_walksafe = FALSE
|
||||
|
||||
trip_chance = 100
|
||||
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
|
||||
/obj/item/grown/bananapeel/traitorpeel/New(newloc, obj/item/seeds/new_seed)
|
||||
. = ..()
|
||||
if(.)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2) // Was 5 -- TLE
|
||||
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
|
||||
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
|
||||
AddComponent(/datum/component/slippery, src, 0, 7, 100, 4, FALSE)
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
|
||||
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
|
||||
H.take_overall_damage(0, rand(2,8))
|
||||
H.take_organ_damage(2)
|
||||
return ..()
|
||||
|
||||
/obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
|
||||
var/burned = rand(1,3)
|
||||
|
||||
@@ -488,7 +488,7 @@
|
||||
var/mob/living/carbon/human/holder = loc
|
||||
if(src == holder.l_hand || src == holder.r_hand) // Holding this in your hand will
|
||||
for(var/mob/living/carbon/human/H in range(5, loc))
|
||||
if(H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
if(H.mind && H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full))
|
||||
H.mind.vampire.nullified = max(5, H.mind.vampire.nullified + 2)
|
||||
if(prob(10))
|
||||
to_chat(H, "<span class='userdanger'>Being in the presence of [holder]'s [src] is interfering with your powers!</span>")
|
||||
|
||||
@@ -244,12 +244,18 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/match/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(burnt)
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/proc/help_light_cig(mob/living/M)
|
||||
var/mask_item = M.get_item_by_slot(slot_wear_mask)
|
||||
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
|
||||
return mask_item
|
||||
|
||||
|
||||
/obj/item/match/firebrand
|
||||
name = "firebrand"
|
||||
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
icon = 'icons/obj/library.dmi'
|
||||
due_date = 0 // Game time in 1/10th seconds
|
||||
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
|
||||
has_drm = TRUE // No reuploading. Piracy is a crime
|
||||
|
||||
|
||||
/obj/item/book/manual/engineering_construction
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
var/w_class_on = WEIGHT_CLASS_BULKY
|
||||
var/icon_state_on = "axe1"
|
||||
var/icon_state_on
|
||||
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
|
||||
usesound = 'sound/weapons/blade1.ogg'
|
||||
@@ -37,7 +37,7 @@
|
||||
return BRUTELOSS|FIRELOSS
|
||||
|
||||
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
user.take_organ_damage(5,5)
|
||||
active = !active
|
||||
@@ -48,9 +48,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
@@ -80,6 +80,7 @@
|
||||
name = "energy axe"
|
||||
desc = "An energised battle axe."
|
||||
icon_state = "axe0"
|
||||
icon_state_on = "axe1"
|
||||
force = 40
|
||||
force_on = 150
|
||||
throwforce = 25
|
||||
@@ -290,7 +291,7 @@
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in H.mutations) && prob(50))
|
||||
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
|
||||
H.take_organ_damage(10,10)
|
||||
active = !active
|
||||
@@ -301,9 +302,9 @@
|
||||
throw_speed = 4
|
||||
if(attack_verb_on.len)
|
||||
attack_verb = attack_verb_on
|
||||
if(!item_color)
|
||||
if(icon_state_on)
|
||||
icon_state = icon_state_on
|
||||
set_light(brightness_on)
|
||||
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
|
||||
else
|
||||
icon_state = "sword[item_color]"
|
||||
set_light(brightness_on, l_color=colormap[item_color])
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
break
|
||||
|
||||
if(!success)
|
||||
user.loc = pick(L)
|
||||
user.forceMove(pick(L))
|
||||
|
||||
smoke.start()
|
||||
src.uses -= 1
|
||||
|
||||
@@ -88,6 +88,11 @@
|
||||
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/item/shard/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
C.stored_comms["glass"] += 3
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/obj/item/shard/plasma
|
||||
name = "plasma shard"
|
||||
desc = "A shard of plasma glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return (active)
|
||||
|
||||
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
|
||||
if(user.disabilities & CLUMSY && prob(50))
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
|
||||
user.take_organ_damage(5)
|
||||
active = !active
|
||||
|
||||
@@ -11,15 +11,11 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
discrete = 1
|
||||
|
||||
trip_stun = 4
|
||||
trip_weaken = 2
|
||||
trip_chance = 100
|
||||
trip_walksafe = FALSE
|
||||
trip_verb = TV_SLIP
|
||||
|
||||
var/cleanspeed = 50 //slower than mop
|
||||
|
||||
/obj/item/soap/ComponentInitialize()
|
||||
AddComponent(/datum/component/slippery, src, 4, 2, 100, 0, FALSE)
|
||||
|
||||
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
|
||||
if(!proximity) return
|
||||
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
|
||||
|
||||
@@ -33,9 +33,11 @@
|
||||
icon_state = "trashbag"
|
||||
item_state = "trashbag"
|
||||
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
max_w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = null
|
||||
storage_slots = 30
|
||||
max_combined_w_class = 30
|
||||
can_hold = list() // any
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
|
||||
@@ -45,18 +47,15 @@
|
||||
return TOXLOSS
|
||||
|
||||
/obj/item/storage/bag/trash/update_icon()
|
||||
if(contents.len == 0)
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
icon_state = "[initial(icon_state)]"
|
||||
else if(contents.len < 12)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else if(contents.len < 21)
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
else
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
switch(contents.len)
|
||||
if(20 to INFINITY)
|
||||
icon_state = "[initial(icon_state)]3"
|
||||
if(11 to 20)
|
||||
icon_state = "[initial(icon_state)]2"
|
||||
if(1 to 11)
|
||||
icon_state = "[initial(icon_state)]1"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/storage/bag/trash/cyborg
|
||||
|
||||
@@ -422,13 +421,13 @@
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
|
||||
if( isturf(target) || istype(target,/obj/structure/table) )
|
||||
var foundtable = istype(target,/obj/structure/table/)
|
||||
var/foundtable = istype(target,/obj/structure/table/)
|
||||
if( !foundtable ) //it must be a turf!
|
||||
for(var/obj/structure/table/T in target)
|
||||
foundtable = 1
|
||||
break
|
||||
|
||||
var turf/dropspot
|
||||
var/turf/dropspot
|
||||
if( !foundtable ) // don't unload things onto walls or other silly places.
|
||||
dropspot = user.loc
|
||||
else if( isturf(target) ) // they clicked on a turf with a table in it
|
||||
@@ -438,7 +437,7 @@
|
||||
|
||||
overlays = null
|
||||
|
||||
var droppedSomething = 0
|
||||
var/droppedSomething = 0
|
||||
|
||||
for(var/obj/item/I in contents)
|
||||
I.loc = dropspot
|
||||
|
||||
@@ -215,6 +215,13 @@
|
||||
//if we get this far, handle the insertion checks as normal
|
||||
.=..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/decompile_act(obj/item/matter_decompiler/C, mob/user)
|
||||
if(!length(contents))
|
||||
C.stored_comms["wood"] += 1
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/fancy/cigarettes/dromedaryco
|
||||
name = "\improper DromedaryCo packet"
|
||||
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
|
||||
|
||||
@@ -83,13 +83,14 @@
|
||||
return
|
||||
|
||||
/obj/item/storage/AltClick(mob/user)
|
||||
if(Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
|
||||
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
|
||||
orient2hud(user)
|
||||
if(user.s_active)
|
||||
user.s_active.close(user)
|
||||
show_to(user)
|
||||
playsound(loc, "rustle", 50, 1, -5)
|
||||
add_fingerprint(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/proc/return_inv()
|
||||
|
||||
@@ -540,7 +541,7 @@
|
||||
return depth
|
||||
|
||||
/obj/item/storage/serialize()
|
||||
var data = ..()
|
||||
var/data = ..()
|
||||
var/list/content_list = list()
|
||||
data["content"] = content_list
|
||||
data["slots"] = storage_slots
|
||||
|
||||
@@ -121,19 +121,6 @@
|
||||
desc = "A sleek, sturdy box"
|
||||
icon_state = "box_of_doom"
|
||||
|
||||
/obj/item/storage/box/syndie_kit/romerol
|
||||
name = "Romerol Kit"
|
||||
desc = "A box containing a deadly virus capable of reanimating dead as zombies."
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
can_hold = list(/obj/item/reagent_containers/glass/bottle/romerol,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/dropper)
|
||||
|
||||
/obj/item/storage/box/syndie_kit/romerol/New()
|
||||
..()
|
||||
new /obj/item/reagent_containers/glass/bottle/romerol(src)
|
||||
new /obj/item/reagent_containers/syringe(src)
|
||||
new /obj/item/reagent_containers/dropper(src)
|
||||
return
|
||||
|
||||
/obj/item/storage/box/syndie_kit/space
|
||||
name = "Boxed Space Suit and Helmet"
|
||||
can_hold = list(/obj/item/clothing/suit/space/syndicate/black/red, /obj/item/clothing/head/helmet/space/syndicate/black/red, /obj/item/tank/emergency_oxygen/syndi, /obj/item/clothing/mask/gas/syndicate)
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
L.apply_effect(STUTTER, stunforce)
|
||||
|
||||
if(user)
|
||||
user.lastattacked = L
|
||||
L.lastattacker = user
|
||||
L.lastattacker = user.real_name
|
||||
L.lastattackerckey = user.ckey
|
||||
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
|
||||
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
|
||||
add_attack_logs(user, L, "stunned")
|
||||
|
||||
@@ -53,13 +53,8 @@ obj/item/tank/oxygen/empty/New()
|
||||
|
||||
/obj/item/tank/anesthetic/New()
|
||||
..()
|
||||
|
||||
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
|
||||
var/datum/gas/sleeping_agent/trace_gas = new()
|
||||
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
|
||||
air_contents.trace_gases += trace_gas
|
||||
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
|
||||
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
|
||||
|
||||
/*
|
||||
* Air
|
||||
|
||||
@@ -115,7 +115,7 @@ Frequency:
|
||||
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
|
||||
return
|
||||
var/list/L = list( )
|
||||
for(var/obj/machinery/computer/teleporter/com in world)
|
||||
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
|
||||
if(com.target)
|
||||
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
|
||||
L["[com.id] (Active)"] = com.target
|
||||
|
||||
@@ -1,785 +0,0 @@
|
||||
#define HEALPERWELD 15
|
||||
|
||||
/* Tools!
|
||||
* Note: Multitools are in devices
|
||||
*
|
||||
* Contains:
|
||||
* Wrench
|
||||
* Screwdriver
|
||||
* Wirecutters
|
||||
* Welding Tool
|
||||
* Crowbar
|
||||
* Revolver Conversion Kit
|
||||
*/
|
||||
|
||||
//Wrench
|
||||
/obj/item/wrench
|
||||
name = "wrench"
|
||||
desc = "A wrench with common uses. Can be found in your hand."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "wrench"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
usesound = 'sound/items/ratchet.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=150)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/wrench/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/cyborg
|
||||
name = "automatic wrench"
|
||||
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/wrench/brass
|
||||
name = "brass wrench"
|
||||
desc = "A brass wrench. It's faintly warm to the touch."
|
||||
icon_state = "wrench_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/wrench/abductor
|
||||
name = "alien wrench"
|
||||
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "wrench"
|
||||
usesound = 'sound/effects/empulse.ogg'
|
||||
toolspeed = 0.1
|
||||
origin_tech = "materials=5;engineering=5;abductor=3"
|
||||
|
||||
/obj/item/wrench/power
|
||||
name = "hand drill"
|
||||
desc = "A simple powered drill with a bolt bit."
|
||||
icon_state = "drill_bolt"
|
||||
item_state = "drill"
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
attack_verb = list("drilled", "screwed", "jabbed")
|
||||
toolspeed = 0.25
|
||||
|
||||
/obj/item/wrench/power/attack_self(mob/user)
|
||||
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
|
||||
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(s_drill)
|
||||
|
||||
/obj/item/wrench/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/wrench/medical
|
||||
name = "medical wrench"
|
||||
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
|
||||
icon_state = "wrench_medical"
|
||||
force = 2 //MEDICAL
|
||||
throwforce = 4
|
||||
origin_tech = "materials=1;engineering=1;biotech=3"
|
||||
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
|
||||
|
||||
/obj/item/wrench/medical/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
// TODO Make them glow with the power of the M E D I C A L W R E N C H
|
||||
// during their ascension
|
||||
|
||||
// Stun stops them from wandering off
|
||||
user.Stun(5)
|
||||
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
|
||||
|
||||
// Let the sound effect finish playing
|
||||
sleep(20)
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
for(var/obj/item/W in user)
|
||||
user.unEquip(W)
|
||||
|
||||
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
|
||||
W.add_fingerprint(user)
|
||||
W.desc += " For some reason, it reminds you of [user.name]."
|
||||
|
||||
if(!user)
|
||||
return
|
||||
|
||||
user.dust()
|
||||
return OBLITERATION
|
||||
|
||||
//Screwdriver
|
||||
/obj/item/screwdriver
|
||||
name = "screwdriver"
|
||||
desc = "You can be totally screwy with this."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "screwdriver_map"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
materials = list(MAT_METAL=75)
|
||||
attack_verb = list("stabbed")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
usesound = 'sound/items/screwdriver.ogg'
|
||||
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 //if the screwdriver uses random coloring
|
||||
|
||||
/obj/item/screwdriver/nuke
|
||||
name = "screwdriver"
|
||||
desc = "A screwdriver with an ultra thin tip."
|
||||
icon_state = "screwdriver_nuke"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/screwdriver/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/New(loc, var/param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
|
||||
if (prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M) || user.a_intent == INTENT_HELP)
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
return ..()
|
||||
if(HAS_TRAIT(user, TRAIT_PACIFISM))
|
||||
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
|
||||
return
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
/obj/item/screwdriver/brass
|
||||
name = "brass screwdriver"
|
||||
desc = "A screwdriver made of brass. The handle feels freezing cold."
|
||||
icon_state = "screwdriver_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/screwdriver/abductor
|
||||
name = "alien screwdriver"
|
||||
desc = "An ultrasonic screwdriver."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "screwdriver"
|
||||
usesound = 'sound/items/pshoom.ogg'
|
||||
toolspeed = 0.1
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power
|
||||
name = "hand drill"
|
||||
desc = "A simple hand drill with a screwdriver bit attached."
|
||||
icon_state = "drill_screw"
|
||||
item_state = "drill"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
|
||||
force = 8 //might or might not be too high, subject to change
|
||||
throwforce = 8
|
||||
throw_speed = 2
|
||||
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
|
||||
attack_verb = list("drilled", "screwed", "jabbed","whacked")
|
||||
hitsound = 'sound/items/drill_hit.ogg'
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.25
|
||||
random_color = FALSE
|
||||
|
||||
/obj/item/screwdriver/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/screwdriver/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
|
||||
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
|
||||
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(b_drill)
|
||||
|
||||
/obj/item/screwdriver/cyborg
|
||||
name = "powered screwdriver"
|
||||
desc = "An electrical screwdriver, designed to be both precise and quick."
|
||||
usesound = 'sound/items/drill_use.ogg'
|
||||
toolspeed = 0.5
|
||||
|
||||
//Wirecutters
|
||||
/obj/item/wirecutters
|
||||
name = "wirecutters"
|
||||
desc = "This cuts wires."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "cutters"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 6
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=80)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
attack_verb = list("pinched", "nipped")
|
||||
hitsound = 'sound/items/wirecutter.ogg'
|
||||
usesound = 'sound/items/wirecutter.ogg'
|
||||
sharp = 1
|
||||
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
|
||||
|
||||
/obj/item/wirecutters/New(loc, param_color = null)
|
||||
..()
|
||||
if(random_color)
|
||||
if(!param_color)
|
||||
param_color = pick("yellow", "red")
|
||||
icon_state = "cutters_[param_color]"
|
||||
|
||||
/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_NULL(C.handcuffed)
|
||||
if(C.buckled && C.buckled.buckle_requires_restraints)
|
||||
C.buckled.unbuckle_mob(C)
|
||||
C.update_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."
|
||||
icon_state = "cutters_brass"
|
||||
toolspeed = 0.5
|
||||
random_color = FALSE
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/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
|
||||
origin_tech = "materials=5;engineering=4;abductor=3"
|
||||
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, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
|
||||
icon_state = "jaws_cutter"
|
||||
item_state = "jawsoflife"
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
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(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
|
||||
if(head)
|
||||
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
|
||||
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
|
||||
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(pryjaws)
|
||||
|
||||
//Welding Tool
|
||||
/obj/item/weldingtool
|
||||
name = "welding tool"
|
||||
desc = "A standard edition welder provided by Nanotrasen."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "welder"
|
||||
item_state = "welder"
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 3
|
||||
throwforce = 5
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
hitsound = "swing_hit"
|
||||
usesound = 'sound/items/welder.ogg'
|
||||
var/acti_sound = 'sound/items/welderactivate.ogg'
|
||||
var/deac_sound = 'sound/items/welderdeactivate.ogg'
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
|
||||
resistance_flags = FIRE_PROOF
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=30)
|
||||
origin_tech = "engineering=1;plasmatech=1"
|
||||
toolspeed = 1
|
||||
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
|
||||
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
|
||||
var/max_fuel = 20 //The max amount of fuel the welder can hold
|
||||
var/change_icons = 1
|
||||
var/can_off_process = 0
|
||||
var/light_intensity = 2 //how powerful the emitted light is when used.
|
||||
var/nextrefueltick = 0
|
||||
|
||||
/obj/item/weldingtool/New()
|
||||
..()
|
||||
create_reagents(max_fuel)
|
||||
reagents.add_reagent("fuel", max_fuel)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/examine(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 0)
|
||||
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
|
||||
|
||||
/obj/item/weldingtool/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return FIRELOSS
|
||||
|
||||
/obj/item/weldingtool/proc/update_torch()
|
||||
overlays.Cut()
|
||||
if(welding)
|
||||
overlays += "[initial(icon_state)]-on"
|
||||
item_state = "[initial(item_state)]1"
|
||||
else
|
||||
item_state = "[initial(item_state)]"
|
||||
|
||||
/obj/item/weldingtool/update_icon()
|
||||
if(change_icons)
|
||||
var/ratio = get_fuel() / max_fuel
|
||||
ratio = Ceiling(ratio*4) * 25
|
||||
if(ratio == 100)
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
update_torch()
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/process()
|
||||
switch(welding)
|
||||
if(0)
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
update_icon()
|
||||
if(!can_off_process)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return
|
||||
//Welders left on now use up fuel, but lets not have them run out quite that fast
|
||||
if(1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
if(prob(5))
|
||||
remove_fuel(1)
|
||||
update_icon()
|
||||
|
||||
//This is to start fires. process() is only called if the welder is on.
|
||||
var/turf/location = loc
|
||||
if(ismob(location))
|
||||
var/mob/M = location
|
||||
if(M.l_hand == src || M.r_hand == src)
|
||||
location = get_turf(M)
|
||||
if(isturf(location))
|
||||
location.hotspot_expose(700, 5)
|
||||
|
||||
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
|
||||
if(isscrewdriver(I))
|
||||
flamethrower_screwdriver(I, user)
|
||||
else if(istype(I, /obj/item/stack/rods))
|
||||
flamethrower_rods(I, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/attack(mob/M, mob/user)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected]
|
||||
|
||||
if(!S)
|
||||
return
|
||||
|
||||
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
|
||||
return ..()
|
||||
|
||||
if(!isOn()) //why wasn't this being checked already?
|
||||
to_chat(user, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
|
||||
return 1
|
||||
|
||||
if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
|
||||
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
|
||||
return
|
||||
|
||||
if(!S.brute_dam)
|
||||
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
|
||||
return
|
||||
|
||||
if(get_fuel() >= 1)
|
||||
if(H == user)
|
||||
if(!do_mob(user, H, 10))
|
||||
return 1
|
||||
if(!remove_fuel(1,null))
|
||||
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
|
||||
var/rembrute = HEALPERWELD
|
||||
var/nrembrute = 0
|
||||
var/childlist
|
||||
if(!isnull(S.children))
|
||||
childlist = S.children.Copy()
|
||||
var/parenthealed = FALSE
|
||||
while(rembrute > 0)
|
||||
var/obj/item/organ/external/E
|
||||
if(S.brute_dam)
|
||||
E = S
|
||||
else if(LAZYLEN(childlist))
|
||||
E = pick_n_take(childlist)
|
||||
if(!E.brute_dam || !E.is_robotic())
|
||||
continue
|
||||
else if(S.parent && !parenthealed)
|
||||
E = S.parent
|
||||
parenthealed = TRUE
|
||||
if(!E.brute_dam || !E.is_robotic())
|
||||
break
|
||||
else
|
||||
break
|
||||
playsound(src.loc, usesound, 50, 1)
|
||||
nrembrute = max(rembrute - E.brute_dam, 0)
|
||||
E.heal_damage(rembrute,0,0,1)
|
||||
rembrute = nrembrute
|
||||
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [E.name] with \the [src].</span>")
|
||||
if(H.bleed_rate && H.isSynthetic())
|
||||
H.bleed_rate = 0
|
||||
user.visible_message("<span class='alert'>\The [user] patches some leaks on [M] with \the [src].</span>")
|
||||
return 1
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(welding)
|
||||
remove_fuel(1)
|
||||
var/turf/location = get_turf(user)
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
if(get_fuel() <= 0)
|
||||
set_light(0)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
if(L.IgniteMob())
|
||||
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
|
||||
log_game("[key_name(user)] set [key_name(L)] on fire")
|
||||
|
||||
/obj/item/weldingtool/attack_self(mob/user)
|
||||
switched_on(user)
|
||||
if(welding)
|
||||
set_light(light_intensity)
|
||||
|
||||
update_icon()
|
||||
|
||||
//Returns the amount of fuel in the welder
|
||||
/obj/item/weldingtool/proc/get_fuel()
|
||||
return reagents.get_reagent_amount("fuel")
|
||||
|
||||
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
|
||||
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
|
||||
if(!welding || !check_fuel())
|
||||
return FALSE
|
||||
if(get_fuel() >= amount)
|
||||
reagents.remove_reagent("fuel", amount)
|
||||
check_fuel()
|
||||
if(M)
|
||||
M.flash_eyes(light_intensity)
|
||||
return TRUE
|
||||
else
|
||||
if(M)
|
||||
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
|
||||
return FALSE
|
||||
|
||||
//Returns whether or not the welding tool is currently on.
|
||||
/obj/item/weldingtool/proc/isOn()
|
||||
return welding
|
||||
|
||||
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
|
||||
/obj/item/weldingtool/proc/check_fuel(mob/user)
|
||||
if(get_fuel() <= 0 && welding)
|
||||
switched_on(user)
|
||||
update_icon()
|
||||
//mob icon update
|
||||
if(ismob(loc))
|
||||
var/mob/M = loc
|
||||
M.update_inv_r_hand(0)
|
||||
M.update_inv_l_hand(0)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
//Switches the welder on
|
||||
/obj/item/weldingtool/proc/switched_on(mob/user)
|
||||
if(!status)
|
||||
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
|
||||
return
|
||||
welding = !welding
|
||||
if(welding)
|
||||
if(get_fuel() >= 1)
|
||||
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
|
||||
playsound(loc, acti_sound, 50, 1)
|
||||
force = 15
|
||||
damtype = "fire"
|
||||
hitsound = 'sound/items/welder.ogg'
|
||||
update_icon()
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more fuel!</span>")
|
||||
switched_off(user)
|
||||
else
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
|
||||
playsound(loc, deac_sound, 50, 1)
|
||||
switched_off(user)
|
||||
|
||||
//Switches the welder off
|
||||
/obj/item/weldingtool/proc/switched_off(mob/user)
|
||||
welding = 0
|
||||
set_light(0)
|
||||
|
||||
force = 3
|
||||
damtype = "brute"
|
||||
hitsound = "swing_hit"
|
||||
update_icon()
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
|
||||
if(welding)
|
||||
to_chat(user, "<span class='warning'>Turn it off first!</span>")
|
||||
return
|
||||
status = !status
|
||||
if(status)
|
||||
to_chat(user, "<span class='notice'>You resecure [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
|
||||
if(!status)
|
||||
var/obj/item/stack/rods/R = I
|
||||
if(R.use(1))
|
||||
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
|
||||
if(!remove_item_from_storage(F))
|
||||
user.unEquip(src)
|
||||
loc = F
|
||||
F.weldtool = src
|
||||
add_fingerprint(user)
|
||||
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
|
||||
user.put_in_hands(F)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
|
||||
|
||||
/obj/item/weldingtool/largetank
|
||||
name = "Industrial Welding Tool"
|
||||
desc = "A slightly larger welder with a larger tank."
|
||||
icon_state = "indwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=60)
|
||||
origin_tech = "engineering=2;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/largetank/cyborg
|
||||
name = "integrated welding tool"
|
||||
desc = "An advanced welder designed to be used in robotic systems."
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/mini
|
||||
name = "emergency welding tool"
|
||||
desc = "A miniature welder used during emergencies."
|
||||
icon_state = "miniwelder"
|
||||
max_fuel = 10
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
materials = list(MAT_METAL=30, MAT_GLASS=10)
|
||||
change_icons = 0
|
||||
|
||||
/obj/item/weldingtool/mini/flamethrower_screwdriver()
|
||||
return
|
||||
|
||||
/obj/item/weldingtool/abductor
|
||||
name = "alien welding tool"
|
||||
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
icon_state = "welder"
|
||||
toolspeed = 0.1
|
||||
light_intensity = 0
|
||||
change_icons = 0
|
||||
origin_tech = "plasmatech=5;engineering=5;abductor=3"
|
||||
can_off_process = 1
|
||||
|
||||
/obj/item/weldingtool/abductor/process()
|
||||
if(get_fuel() <= max_fuel)
|
||||
reagents.add_reagent("fuel", 1)
|
||||
..()
|
||||
|
||||
/obj/item/weldingtool/hugetank
|
||||
name = "Upgraded Welding Tool"
|
||||
desc = "An upgraded welder based off the industrial welder."
|
||||
icon_state = "upindwelder"
|
||||
item_state = "upindwelder"
|
||||
max_fuel = 80
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "engineering=3;plasmatech=2"
|
||||
|
||||
/obj/item/weldingtool/experimental
|
||||
name = "Experimental Welding Tool"
|
||||
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
|
||||
icon_state = "exwelder"
|
||||
item_state = "exwelder"
|
||||
max_fuel = 40
|
||||
materials = list(MAT_METAL=70, MAT_GLASS=120)
|
||||
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
|
||||
change_icons = 0
|
||||
can_off_process = 1
|
||||
light_intensity = 1
|
||||
toolspeed = 0.5
|
||||
var/last_gen = 0
|
||||
|
||||
/obj/item/weldingtool/experimental/brass
|
||||
name = "brass welding tool"
|
||||
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
|
||||
icon_state = "brasswelder"
|
||||
item_state = "brasswelder"
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
obj/item/weldingtool/experimental/process()
|
||||
..()
|
||||
if(get_fuel() < max_fuel && nextrefueltick < world.time)
|
||||
nextrefueltick = world.time + 10
|
||||
reagents.add_reagent("fuel", 1)
|
||||
|
||||
//Crowbar
|
||||
/obj/item/crowbar
|
||||
name = "pocket crowbar"
|
||||
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
|
||||
icon = 'icons/obj/tools.dmi'
|
||||
icon_state = "crowbar"
|
||||
item_state = "crowbar"
|
||||
usesound = 'sound/items/crowbar.ogg'
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT
|
||||
force = 5
|
||||
throwforce = 7
|
||||
item_state = "crowbar"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
materials = list(MAT_METAL=50)
|
||||
origin_tech = "engineering=1;combat=1"
|
||||
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
|
||||
toolspeed = 1
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
|
||||
|
||||
/obj/item/crowbar/red
|
||||
icon_state = "crowbar_red"
|
||||
item_state = "crowbar_red"
|
||||
force = 8
|
||||
|
||||
/obj/item/crowbar/brass
|
||||
name = "brass crowbar"
|
||||
desc = "A brass crowbar. It feels faintly warm to the touch."
|
||||
icon_state = "crowbar_brass"
|
||||
item_state = "crowbar_brass"
|
||||
toolspeed = 0.5
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/crowbar/abductor
|
||||
name = "alien crowbar"
|
||||
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
|
||||
icon = 'icons/obj/abductor.dmi'
|
||||
usesound = 'sound/weapons/sonic_jackhammer.ogg'
|
||||
icon_state = "crowbar"
|
||||
toolspeed = 0.1
|
||||
origin_tech = "combat=4;engineering=4;abductor=3"
|
||||
|
||||
/obj/item/crowbar/large
|
||||
name = "crowbar"
|
||||
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
|
||||
force = 12
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
throw_speed = 3
|
||||
throw_range = 3
|
||||
materials = list(MAT_METAL=70)
|
||||
icon_state = "crowbar_large"
|
||||
item_state = "crowbar_large"
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/cyborg
|
||||
name = "hydraulic crowbar"
|
||||
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 10
|
||||
toolspeed = 0.5
|
||||
|
||||
/obj/item/crowbar/power
|
||||
name = "jaws of life"
|
||||
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
|
||||
icon_state = "jaws_pry"
|
||||
item_state = "jawsoflife"
|
||||
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
|
||||
origin_tech = "materials=2;engineering=2"
|
||||
usesound = 'sound/items/jaws_pry.ogg'
|
||||
force = 15
|
||||
toolspeed = 0.25
|
||||
var/airlock_open_time = 100 // Time required to open powered airlocks
|
||||
|
||||
/obj/item/crowbar/power/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/crowbar/power/attack_self(mob/user)
|
||||
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
|
||||
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
|
||||
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
|
||||
qdel(src)
|
||||
user.put_in_active_hand(cutjaws)
|
||||
|
||||
// Conversion kit
|
||||
/obj/item/conversion_kit
|
||||
name = "\improper Revolver Conversion Kit"
|
||||
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
|
||||
icon_state = "kit"
|
||||
flags = CONDUCT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
origin_tech = "combat=2"
|
||||
var/open = 0
|
||||
|
||||
/obj/item/conversion_kit/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/conversion_kit/update_icon()
|
||||
icon_state = "[initial(icon_state)]_[open]"
|
||||
|
||||
/obj/item/conversion_kit/attack_self(mob/user)
|
||||
open = !open
|
||||
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
|
||||
update_icon()
|
||||
@@ -34,15 +34,15 @@
|
||||
if(TH.force_wielded > initial(TH.force_wielded))
|
||||
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
|
||||
TH.force_wielded = clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
|
||||
if(I.force > initial(I.force))
|
||||
to_chat(user, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
|
||||
if(!requires_sharpness)
|
||||
I.sharp = 1
|
||||
I.force = Clamp(I.force + increment, 0, max)
|
||||
I.throwforce = Clamp(I.throwforce + increment, 0, max)
|
||||
I.force = clamp(I.force + increment, 0, max)
|
||||
I.throwforce = clamp(I.throwforce + increment, 0, max)
|
||||
I.name = "[prefix] [I.name]"
|
||||
playsound(get_turf(src), usesound, 50, 1)
|
||||
name = "worn out [name]"
|
||||
|
||||
Reference in New Issue
Block a user