Merge remote-tracking branch 'ParadiseSS13/master' into Virtual-Avatars

This commit is contained in:
Warior4356
2017-04-02 02:47:42 -07:00
534 changed files with 17194 additions and 7096 deletions
+17 -17
View File
@@ -337,8 +337,8 @@ steam.start() -- spawns the effect
return
/obj/effect/effect/bad_smoke/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/effect/effect/bad_smoke/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /obj/item/projectile/beam))
var/obj/item/projectile/beam/B = mover
B.damage = (B.damage/2)
@@ -877,21 +877,22 @@ steam.start() -- spawns the effect
// Similar to smoke, but spreads out more
// metal foams leave behind a foamed metal wall
/obj/effect/effect/foam
/obj/structure/foam
name = "foam"
icon = 'icons/effects/effects.dmi'
icon_state = "foam"
opacity = 0
anchored = 1
density = 0
layer = OBJ_LAYER + 0.9
mouse_opacity = 0
animate_movement = 0
var/amount = 3
var/expand = 1
animate_movement = 0
var/metal = 0
/obj/effect/effect/foam/New(loc, var/ismetal=0)
/obj/structure/foam/New(loc, var/ismetal=0)
..(loc)
icon_state = "[ismetal ? "m":""]foam"
if(!ismetal && reagents)
@@ -918,11 +919,11 @@ steam.start() -- spawns the effect
flick("[icon_state]-disolve", src)
sleep(5)
delete()
qdel(src)
return
// on delete, transfer any reagents to the floor
/obj/effect/effect/foam/Destroy()
/obj/structure/foam/Destroy()
if(!metal && reagents)
reagents.handle_reactions()
for(var/atom/A in oview(1, src))
@@ -933,7 +934,7 @@ steam.start() -- spawns the effect
reagents.reaction(A, TOUCH, fraction)
return ..()
/obj/effect/effect/foam/process()
/obj/structure/foam/process()
if(--amount < 0)
return
@@ -948,11 +949,11 @@ steam.start() -- spawns the effect
if(!T.Enter(src))
continue
var/obj/effect/effect/foam/F = locate() in T
var/obj/structure/foam/F = locate() in T
if(F)
continue
F = new /obj/effect/effect/foam(T, metal)
F = new /obj/structure/foam(T, metal)
F.amount = amount
if(!metal)
F.create_reagents(15)
@@ -963,15 +964,15 @@ steam.start() -- spawns the effect
// foam disolves when heated
// except metal foams
/obj/effect/effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!metal && prob(max(0, exposed_temperature - 475)))
flick("[icon_state]-disolve", src)
spawn(5)
delete()
qdel(src)
/obj/effect/effect/foam/Crossed(var/atom/movable/AM)
/obj/structure/foam/Crossed(var/atom/movable/AM)
if(metal)
return
@@ -1016,13 +1017,13 @@ steam.start() -- spawns the effect
/datum/effect/system/foam_spread/start()
spawn(0)
var/obj/effect/effect/foam/F = locate() in location
var/obj/structure/foam/F = locate() in location
if(F)
F.amount += amount
F.amount = min(F.amount, 27)
return
F = new /obj/effect/effect/foam(location, metal)
F = new /obj/structure/foam(location, metal)
F.amount = amount
if(!metal) // don't carry other chemicals if a metal foam
@@ -1124,8 +1125,7 @@ steam.start() -- spawns the effect
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>");
qdel(src)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
if(air_group) return 0
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
return !density
/obj/structure/foamedmetal/CanAtmosPass()
+60 -29
View File
@@ -1,6 +1,6 @@
//separate dm since hydro is getting bloated already
/obj/effect/glowshroom
/obj/structure/glowshroom
name = "glowshroom"
desc = "Mycena Bregprox, a species of mushroom that glows in the dark."
anchored = 1
@@ -10,30 +10,55 @@
icon_state = "glowshroom" //replaced in New
layer = 2.1
var/endurance = 30
var/potency = 30
var/delay = 1200
var/floor = 0
var/yield = 3
var/generation = 1
var/spreadIntoAdjacentChance = 60
light_color = "#006622"
var/obj/item/seeds/myseed = /obj/item/seeds/glowshroom
obj/effect/glowshroom/glowcap
/obj/structure/glowshroom/glowcap
name = "glowcap"
desc = "Mycena Ruthenia, a species of mushroom that, while it does glow in the dark, is not actually bioluminescent."
icon_state = "glowcap"
light_color = "#8E0300"
myseed = /obj/item/seeds/glowshroom/glowcap
/obj/effect/glowshroom/single
yield = 0
/obj/structure/glowshroom/shadowshroom
name = "shadowshroom"
desc = "Mycena Umbra, a species of mushroom that emits shadow instead of light."
icon_state = "shadowshroom"
myseed = /obj/item/seeds/glowshroom/shadowshroom
/obj/effect/glowshroom/examine(mob/user)
/obj/structure/glowshroom/single/Spread()
return
/obj/structure/glowshroom/examine(mob/user)
. = ..()
to_chat(user, "This is a [generation]\th generation [name]!")
/obj/effect/glowshroom/New()
/obj/structure/glowshroom/Destroy()
if(myseed)
qdel(myseed)
myseed = null
return ..()
/obj/structure/glowshroom/New(loc, obj/item/seeds/newseed, mutate_stats)
..()
set_light(round(potency/10))
dir = CalcDir()
if(newseed)
myseed = newseed.Copy()
myseed.forceMove(src)
else
myseed = new myseed(src)
if(mutate_stats) //baby mushrooms have different stats :3
myseed.adjust_potency(rand(-3,6))
myseed.adjust_yield(rand(-1,2))
myseed.adjust_production(rand(-3,6))
myseed.adjust_endurance(rand(-3,6))
delay = delay - myseed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
endurance = myseed.endurance
if(myseed.get_gene(/datum/plant_gene/trait/glow))
var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow)
set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color)
setDir(CalcDir())
var/base_icon_state = initial(icon_state)
if(!floor)
switch(dir) //offset to make it be on the wall rather than on the floor
@@ -49,10 +74,12 @@ obj/effect/glowshroom/glowcap
else //if on the floor, glowshroom on-floor sprite
icon_state = "[base_icon_state]f"
addtimer(src, "Spread", delay)
addtimer(src, "Spread", delay, FALSE)
/obj/effect/glowshroom/proc/Spread()
for(var/i = 1 to yield)
/obj/structure/glowshroom/proc/Spread()
var/turf/ownturf = get_turf(src)
var/shrooms_planted = 0
for(var/i in 1 to myseed.yield)
if(prob(1/(generation * generation) * 100))//This formula gives you diminishing returns based on generation. 100% with 1st gen, decreasing to 25%, 11%, 6, 4, 2...
var/list/possibleLocs = list()
var/spreadsIntoAdjacent = FALSE
@@ -61,7 +88,9 @@ obj/effect/glowshroom/glowcap
spreadsIntoAdjacent = TRUE
for(var/turf/simulated/floor/earth in view(3,src))
if(spreadsIntoAdjacent || !locate(/obj/effect/glowshroom) in view(1,earth))
if(!ownturf.CanAtmosPass(earth))
continue
if(spreadsIntoAdjacent || !locate(/obj/structure/glowshroom) in view(1,earth))
possibleLocs += earth
CHECK_TICK
@@ -72,7 +101,7 @@ obj/effect/glowshroom/glowcap
var/shroomCount = 0 //hacky
var/placeCount = 1
for(var/obj/effect/glowshroom/shroom in newLoc)
for(var/obj/structure/glowshroom/shroom in newLoc)
shroomCount++
for(var/wallDir in cardinal)
var/turf/isWall = get_step(newLoc,wallDir)
@@ -81,16 +110,18 @@ obj/effect/glowshroom/glowcap
if(shroomCount >= placeCount)
continue
var/obj/effect/glowshroom/child = new type(newLoc)//The baby mushrooms have different stats :3
child.potency = max(potency + rand(-3,6), 0)
child.yield = max(yield + rand(-1,2), 0)
child.delay = max(delay + rand(-30,60), 0)
child.endurance = max(endurance + rand(-3,6), 1)
var/obj/structure/glowshroom/child = new type(newLoc, myseed, TRUE)
child.generation = generation + 1
shrooms_planted++
CHECK_TICK
else
shrooms_planted++ //if we failed due to generation, don't try to plant one later
if(shrooms_planted < myseed.yield) //if we didn't get all possible shrooms planted, try again later
myseed.yield -= shrooms_planted
addtimer(src, "Spread", delay, FALSE)
/obj/effect/glowshroom/proc/CalcDir(turf/location = loc)
/obj/structure/glowshroom/proc/CalcDir(turf/location = loc)
var/direction = 16
for(var/wallDir in cardinal)
@@ -98,7 +129,7 @@ obj/effect/glowshroom/glowcap
if(newTurf.density)
direction |= wallDir
for(var/obj/effect/glowshroom/shroom in location)
for(var/obj/structure/glowshroom/shroom in location)
if(shroom == src)
continue
if(shroom.floor) //special
@@ -122,13 +153,13 @@ obj/effect/glowshroom/glowcap
floor = 1
return 1
/obj/effect/glowshroom/attackby(obj/item/I, mob/user)
/obj/structure/glowshroom/attackby(obj/item/I, mob/user)
..()
if(I.damtype != STAMINA)
endurance -= I.force
CheckEndurance()
/obj/effect/glowshroom/ex_act(severity)
/obj/structure/glowshroom/ex_act(severity)
switch(severity)
if(1)
qdel(src)
@@ -139,11 +170,11 @@ obj/effect/glowshroom/glowcap
if(prob(5))
qdel(src)
/obj/effect/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
endurance -= 5
CheckEndurance()
/obj/effect/glowshroom/proc/CheckEndurance()
/obj/structure/glowshroom/proc/CheckEndurance()
if(endurance <= 0)
qdel(src)
qdel(src)
+3
View File
@@ -6,6 +6,7 @@
icon = 'icons/obj/weapons.dmi'
icon_state = "uglyminearmed"
var/triggered = 0
var/faction = "syndicate"
/obj/effect/mine/proc/mineEffect(mob/living/victim)
to_chat(victim, "<span class='danger'>*click*</span>")
@@ -15,6 +16,8 @@
return
if(isanimal(AM))
var/mob/living/simple_animal/SA = AM
if(faction && (faction in SA.faction))
return
if(!SA.flying)
triggermine(SA)
else
@@ -121,6 +121,7 @@
/obj/item/weapon/wirecutters = 10,
/obj/item/weapon/wrench = 40,
/obj/item/weapon/relic = 35,
/obj/item/weaponcrafting/receiver = 20,
/obj/item/clothing/shoes/brown = 30,
/obj/item/seeds/ambrosia/deus = 10,
/obj/item/seeds/ambrosia = 20,
@@ -148,7 +149,7 @@
/obj/item/weapon/implanter/storage = 1,
/obj/item/toy/cards/deck/syndicate = 2,
/obj/item/weapon/storage/secure/briefcase/syndie = 2,
"" = 90
"" = 70
)
/obj/effect/spawner/lootdrop/crate_spawner // for ruins
+23 -23
View File
@@ -1,5 +1,5 @@
//generic procs copied from obj/effect/alien
/obj/effect/spider
/obj/structure/spider
name = "web"
desc = "it's stringy and sticky"
icon = 'icons/effects/effects.dmi'
@@ -8,7 +8,7 @@
var/health = 15
//similar to weeds, but only barfed out by nurses manually
/obj/effect/spider/ex_act(severity)
/obj/structure/spider/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
@@ -20,7 +20,7 @@
qdel(src)
return
/obj/effect/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
/obj/structure/spider/attackby(var/obj/item/weapon/W, var/mob/user, params)
if(W.attack_verb.len)
visible_message("<span class='danger'>[user] has [pick(W.attack_verb)] \the [src] with \the [W]!</span>")
else
@@ -38,29 +38,29 @@
health -= damage
healthcheck()
/obj/effect/spider/bullet_act(var/obj/item/projectile/Proj)
/obj/structure/spider/bullet_act(var/obj/item/projectile/Proj)
..()
health -= Proj.damage
healthcheck()
/obj/effect/spider/proc/healthcheck()
/obj/structure/spider/proc/healthcheck()
if(health <= 0)
qdel(src)
/obj/effect/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
/obj/structure/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
health -= 5
healthcheck()
/obj/effect/spider/stickyweb
/obj/structure/spider/stickyweb
icon_state = "stickyweb1"
/obj/effect/spider/stickyweb/New()
/obj/structure/spider/stickyweb/New()
if(prob(50))
icon_state = "stickyweb2"
/obj/effect/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/structure/spider/stickyweb/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider))
return 1
else if(istype(mover, /mob/living))
@@ -71,7 +71,7 @@
return prob(30)
return 1
/obj/effect/spider/eggcluster
/obj/structure/spider/eggcluster
name = "egg cluster"
desc = "They seem to pulse slightly with an inner life"
icon_state = "eggs"
@@ -80,24 +80,24 @@
var/faction = list()
var/master_commander = null
/obj/effect/spider/eggcluster/New()
/obj/structure/spider/eggcluster/New()
pixel_x = rand(3,-3)
pixel_y = rand(3,-3)
processing_objects.Add(src)
/obj/effect/spider/eggcluster/process()
/obj/structure/spider/eggcluster/process()
amount_grown += rand(0,2)
if(amount_grown >= 100)
var/num = rand(3,12)
for(var/i=0, i<num, i++)
var/obj/effect/spider/spiderling/S = new /obj/effect/spider/spiderling(src.loc)
var/obj/structure/spider/spiderling/S = new /obj/structure/spider/spiderling(src.loc)
S.faction = faction
S.master_commander = master_commander
if(player_spiders)
S.player_spiders = 1
qdel(src)
/obj/effect/spider/spiderling
/obj/structure/spider/spiderling
name = "spiderling"
desc = "It never stays still for long."
icon_state = "spiderling"
@@ -113,27 +113,27 @@
var/master_commander = null
var/selecting_player = 0
/obj/effect/spider/spiderling/New()
/obj/structure/spider/spiderling/New()
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
processing_objects.Add(src)
/obj/effect/spider/spiderling/Bump(atom/user)
/obj/structure/spider/spiderling/Bump(atom/user)
if(istype(user, /obj/structure/table))
src.loc = user.loc
else
..()
/obj/effect/spider/spiderling/proc/die()
/obj/structure/spider/spiderling/proc/die()
visible_message("<span class='alert'>[src] dies!</span>")
new /obj/effect/decal/cleanable/spiderling_remains(src.loc)
qdel(src)
/obj/effect/spider/spiderling/healthcheck()
/obj/structure/spider/spiderling/healthcheck()
if(health <= 0)
die()
/obj/effect/spider/spiderling/process()
/obj/structure/spider/spiderling/process()
if(travelling_in_vent)
if(istype(src.loc, /turf))
travelling_in_vent = 0
@@ -217,16 +217,16 @@
icon_state = "greenshatter"
anchored = 1
/obj/effect/spider/cocoon
/obj/structure/spider/cocoon
name = "cocoon"
desc = "Something wrapped in silky spider web"
icon_state = "cocoon1"
health = 60
/obj/effect/spider/cocoon/New()
/obj/structure/spider/cocoon/New()
icon_state = pick("cocoon1","cocoon2","cocoon3")
/obj/effect/spider/cocoon/Destroy()
/obj/structure/spider/cocoon/Destroy()
src.visible_message("<span class='danger'>\The [src] splits open.</span>")
for(var/atom/movable/A in contents)
A.loc = src.loc
+4 -4
View File
@@ -55,7 +55,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/strip_delay = DEFAULT_ITEM_STRIP_DELAY
var/put_on_delay = DEFAULT_ITEM_PUTON_DELAY
var/breakouttime = 0
var/flags_cover = 0 //for flags such as GLASSESCOVERSEYES
var/flags_size = 0 //flag, primarily used for clothing to determine if a fatty can wear something or not.
var/block_chance = 0
@@ -432,9 +432,9 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
var/mob/living/carbon/human/H = M
if(istype(H) && ( \
(H.head && H.head.flags & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags & GLASSESCOVERSEYES) \
(H.head && H.head.flags_cover & HEADCOVERSEYES) || \
(H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || \
(H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
to_chat(user, "<span class='danger'>You're going to need to remove that mask/helmet/glasses first!</span>")
+5
View File
@@ -8,6 +8,11 @@
var/mob/owner = null // Carp doesn't attack owner, set when using in hand
var/owned = 1 // Boolean, no owner to begin with
/obj/item/toy/carpplushie/dehy_carp/Destroy()
owner = null
return ..()
// Attack self
/obj/item/toy/carpplushie/dehy_carp/attack_self(mob/user as mob)
src.add_fingerprint(user) // Anyone can add their fingerprints to it with this
+34 -60
View File
@@ -1,14 +1,10 @@
//moved these here from code/defines/obj/weapon.dm
//please preference put stuff where it's easy to find - C
/obj/item/weapon/autopsy_scanner
name = "autopsy scanner"
desc = "Extracts information on wounds."
icon = 'icons/obj/autopsy_scanner.dmi'
icon_state = ""
flags = CONDUCT
w_class = 1
w_class = WEIGHT_CLASS_TINY
origin_tech = "materials=1;biotech=1"
var/list/datum/autopsy_data_scanner/wdata = list()
var/list/datum/autopsy_data_scanner/chemtraces = list()
@@ -28,28 +24,23 @@
var/hits = 0
var/time_inflicted = 0
proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/datum/autopsy_data/proc/copy()
var/datum/autopsy_data/W = new()
W.weapon = weapon
W.pretend_weapon = pretend_weapon
W.damage = damage
W.hits = hits
W.time_inflicted = time_inflicted
return W
/obj/item/weapon/autopsy_scanner/proc/add_data(var/obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len) return
/obj/item/weapon/autopsy_scanner/proc/add_data(obj/item/organ/external/O)
if(!O.autopsy_data.len && !O.trace_chemicals.len)
return
for(var/V in O.autopsy_data)
var/datum/autopsy_data/W = O.autopsy_data[V]
if(!W.pretend_weapon)
/*
// the more hits, the more likely it is that we get the right weapon type
if(prob(50 + W.hits * 10 + W.damage))
*/
// Buffing this stuff up for now!
if(1)
W.pretend_weapon = W.weapon
else
@@ -76,10 +67,11 @@
chemtraces += V
/obj/item/weapon/autopsy_scanner/verb/print_data()
set src in view(usr, 1)
set name = "Print Data"
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
to_chat(usr, "No.")
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return
var/scan_data = ""
@@ -101,8 +93,10 @@
var/wname = W.pretend_weapon
if(wname in weapon_chances) weapon_chances[wname] += W.damage
else weapon_chances[wname] = max(W.damage, 1)
if(wname in weapon_chances)
weapon_chances[wname] += W.damage
else
weapon_chances[wname] = max(W.damage, 1)
total_score+=W.damage
@@ -126,7 +120,8 @@
if(30 to 1000)
damage_desc = "<font color='red'>severe</font>"
if(!total_score) total_score = D.organs_scanned.len
if(!total_score)
total_score = D.organs_scanned.len
scan_data += "<b>Weapon #[n]</b><br>"
if(damaging_weapon)
@@ -148,8 +143,7 @@
scan_data += chemID
scan_data += "<br>"
for(var/mob/O in viewers(usr))
O.show_message("\red \the [src] rattles and prints out a sheet of paper.", 1)
usr.visible_message("<span class='warning'>[src] rattles and prints out a sheet of paper.</span>")
playsound(loc, 'sound/goonstation/machines/printer_thermal.ogg', 50, 1)
sleep(10)
@@ -159,24 +153,9 @@
P.info = "<tt>[scan_data]</tt>"
P.overlays += "paper_words"
if(istype(usr,/mob/living/carbon))
// place the item in the usr's hand if possible
if(!usr.r_hand)
P.loc = usr
usr.r_hand = P
P.layer = 20
P.plane = HUD_PLANE
else if(!usr.l_hand)
P.loc = usr
usr.l_hand = P
P.layer = 20
P.plane = HUD_PLANE
usr.put_in_hands(P)
if(istype(usr,/mob/living/carbon/human))
usr:update_inv_l_hand()
usr:update_inv_r_hand()
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M, mob/living/carbon/user)
if(!istype(M))
return
@@ -185,23 +164,18 @@
if(target_name != M.name)
target_name = M.name
src.wdata = list()
src.chemtraces = list()
src.timeofdeath = null
to_chat(user, "\red A new patient has been registered.. Purging data for previous patient.")
wdata.Cut()
chemtraces.Cut()
timeofdeath = null
to_chat(user, "<span class='warning'>A new patient has been registered. Purging data for previous patient.</span>")
src.timeofdeath = M.timeofdeath
timeofdeath = M.timeofdeath
var/obj/item/organ/external/S = M.get_organ(user.zone_sel.selecting)
if(!S)
to_chat(usr, "<b>You can't scan this body part.</b>")
to_chat(user, "<span class='warning'>You can't scan this body part.</span>")
return
if(!S.open)
to_chat(usr, "<b>You have to cut the limb open first!</b>")
return
for(var/mob/O in viewers(M))
O.show_message("\red [user.name] scans the wounds on [M.name]'s [S.name] with \the [src.name]", 1)
M.visible_message("<span class='warning'>[user] scans the wounds on [M]'s [S] with [src]</span>")
src.add_data(S)
return 1
add_data(S)
return 1
@@ -35,6 +35,7 @@
return 0
on = !on
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_brightness(user)
for(var/X in actions)
var/datum/action/A = X
@@ -54,8 +55,8 @@
return
var/mob/living/carbon/human/H = M //mob has protective eyewear
if(istype(H) && ((H.head && H.head.flags & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) || (H.glasses && H.glasses.flags & GLASSESCOVERSEYES)))
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags & MASKCOVERSEYES) ? "mask" : "glasses"] first.</span>")
if(istype(H) && ((H.head && H.head.flags_cover & HEADCOVERSEYES) || (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) || (H.glasses && H.glasses.flags_cover & GLASSESCOVERSEYES)))
to_chat(user, "<span class='notice'>You're going to need to remove that [(H.head && H.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (H.wear_mask && H.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask" : "glasses"] first.</span>")
return
if(M == user) //they're using it on themselves
-87
View File
@@ -1,87 +0,0 @@
#define MODKIT_HELMET 1
#define MODKIT_SUIT 2
#define MODKIT_FULL 3
/obj/item/device/modkit
name = "hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
icon_state = "modkit"
var/parts = MODKIT_FULL
var/target_species = "Human"
var/list/permitted_types = list(
/obj/item/clothing/head/helmet/space/hardsuit,
/obj/item/clothing/suit/space/hardsuit
)
/obj/item/device/modkit/afterattack(obj/item/O, mob/user as mob, proximity)
if(!proximity)
return
if(!target_species)
return //it shouldn't be null, okay?
if(!parts)
to_chat(user, "<span class='warning'>This kit has no parts for this modification left.</span>")
user.unEquip(src)
qdel(src)
return
var/allowed = 0
for(var/permitted_type in permitted_types)
if(istype(O, permitted_type))
allowed = 1
var/obj/item/clothing/I = O
if(!istype(I) || !allowed)
to_chat(user, "<span class='notice'>[src] is unable to modify that.</span>")
return
var/excluding = ("exclude" in I.species_restricted)
var/in_list = (target_species in I.species_restricted)
if(excluding ^ in_list)
to_chat(user, "<span class='notice'>[I] is already modified.</span>")
return
if(!isturf(O.loc))
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
return
playsound(user.loc, O.usesound, 100, 1)
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
I.refit_for_species(target_species)
if(istype(I, /obj/item/clothing/head/helmet))
parts &= ~MODKIT_HELMET
if(istype(I, /obj/item/clothing/suit))
parts &= ~MODKIT_SUIT
if(!parts)
user.unEquip(src)
qdel(src)
/obj/item/device/modkit/examine(mob/user)
..(user)
to_chat(user, "It looks as though it modifies hardsuits to fit [target_species] users.")
/obj/item/device/modkit/tajaran
name = "Tajaran hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
target_species = "Tajaran"
/obj/item/device/modkit/unathi
name = "Unathi hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Unathi."
target_species = "Unathi"
/obj/item/device/modkit/skrell
name = "Skrell hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Skrell."
target_species = "Skrell"
/obj/item/device/modkit/vox
name = "Vox hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Vox."
target_species = "Vox"
+5 -2
View File
@@ -32,6 +32,9 @@
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
/obj/item/device/multitool/Destroy()
buffer = null
return ..()
/obj/item/device/multitool/ai_detect
var/track_cooldown = 0
@@ -56,7 +59,7 @@
multitool_detect()
icon_state = "[initial(icon_state)][detect_state]"
track_cooldown = world.time + track_delay
/obj/item/device/multitool/ai_detect/proc/multitool_detect()
var/turf/our_turf = get_turf(src)
for(var/mob/living/silicon/ai/AI in ai_list)
@@ -76,7 +79,7 @@
if(get_dist(our_turf, detect_turf) < rangewarning)
detect_state = PROXIMITY_NEAR
break
/obj/item/device/multitool/ai_detect/admin
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors. Has a strange tag that says 'Grief in Safety'" //What else should I say for a meme item?
track_delay = 5
@@ -27,6 +27,8 @@
/obj/item/device/powersink/Destroy()
processing_objects.Remove(src)
processing_power_items.Remove(src)
PN = null
attached = null
return ..()
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
@@ -315,7 +315,7 @@ var/global/list/default_medbay_channels = list(
actually transmit large mass. Headsets are the only radio devices capable
of sending subspace transmissions to the Communications Satellite.
A headset sends a signal to a subspace listener/reciever elsewhere in space,
A headset sends a signal to a subspace listener/receiver elsewhere in space,
the signal gets processed and logged, and an audible transmission gets sent
to each individual headset.
*/
+3 -3
View File
@@ -253,7 +253,7 @@ REAGENT SCANNER
if(H.gene_stability < 40)
user.show_message("<span class='userdanger'>Subject's genes are quickly breaking down!</span>")
else if(H.gene_stability < 70)
user.show_message("<span class='danger'>Subject's genes are showing signs of spontenous breakdown.</span>")
user.show_message("<span class='danger'>Subject's genes are showing signs of spontaneous breakdown.</span>")
else if(H.gene_stability < 85)
user.show_message("<span class='warning'>Subject's genes are showing minor signs of instability.</span>")
else
@@ -279,7 +279,7 @@ REAGENT SCANNER
else
to_chat(user, "<span class='notice'>You install the upgrade in the [src].</span>")
overlays += "advanced"
playsound(src.loc, usesound, 50, 1)
playsound(loc, W.usesound, 50, 1)
upgraded = 1
qdel(W)
@@ -531,5 +531,5 @@ REAGENT SCANNER
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
if(T.cores > 1)
user.show_message("Anomalious slime core amount detected", 1)
user.show_message("Anomalous slime core amount detected", 1)
user.show_message("Growth progress: [T.amount_grown]/10", 1)
+2 -2
View File
@@ -147,9 +147,9 @@ var/list/tape_roll_applications = list()
tape_roll_applications[F] |= direction
return
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/item/tape/CanPass(atom/movable/mover, turf/target, height=0)
if(!density) return 1
if(air_group || (height==0)) return 1
if(height==0) return 1
if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) )
return 1
+5 -5
View File
@@ -175,7 +175,7 @@
heal_burn = 12
//Splits//
//Splints//
/obj/item/stack/medical/splint
@@ -203,14 +203,14 @@
to_chat(user, "<span class='notice'>You remove the splint from [H]'s [limb].</span>")
return
if(M == user)
user.visible_message("<span class='notice'>[user] starts to apply [src] to [H]'s [limb].</span>", \
"<span class='notice'>You start to apply [src] to [H]'s [limb].</span>", \
user.visible_message("<span class='notice'>[user] starts to apply [src] to their [limb].</span>", \
"<span class='notice'>You start to apply [src] to your [limb].</span>", \
"<span class='notice'>You hear something being wrapped.</span>")
if(!do_mob(user, H, self_delay))
return
else
user.visible_message("<span class='green'>[user] applies [src] to their [limb].</span>", \
"<span class='green'>You apply [src] to your [limb].</span>", \
user.visible_message("<span class='green'>[user] applies [src] to [H]'s [limb].</span>", \
"<span class='green'>You apply [src] to [H]'s [limb].</span>", \
"<span class='green'>You hear something being wrapped.</span>")
affecting.status |= ORGAN_SPLINTED
+12 -39
View File
@@ -1,3 +1,7 @@
var/global/list/datum/stack_recipe/rod_recipes = list ( \
new/datum/stack_recipe("grille", /obj/structure/grille, 2, time = 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/rods
name = "metal rod"
desc = "Some rods. Can be used for building, or something."
@@ -11,7 +15,7 @@
throw_speed = 3
throw_range = 7
materials = list(MAT_METAL=1000)
max_amount = 60
max_amount = 50
attack_verb = list("hit", "bludgeoned", "whacked")
hitsound = 'sound/weapons/grenadelaunch.ogg'
toolspeed = 1
@@ -20,9 +24,9 @@
/obj/item/stack/rods/cyborg
materials = list()
/obj/item/stack/rods/New(var/loc, var/amount=null)
/obj/item/stack/rods/New(loc, amount=null)
..()
recipes = rod_recipes
update_icon()
/obj/item/stack/rods/update_icon()
@@ -32,12 +36,12 @@
else
icon_state = "rods"
/obj/item/stack/rods/attackby(obj/item/W as obj, mob/user as mob, params)
/obj/item/stack/rods/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(get_amount() < 2)
to_chat(user, "<span class='warning'>You need at least two rods to do this.</span>")
to_chat(user, "<span class='warning'>You need at least two rods to do this!</span>")
return
if(WT.remove_fuel(0,user))
@@ -47,9 +51,9 @@
// stack was moved into another one on the pile
new_item = locate() in user.loc
user.visible_message("<span class='warning'>[user.name] shaped [src] into metal with the weldingtool.</span>", \
"<span class='notice'>You shaped [src] into metal with the weldingtool.</span>", \
"<span class='warning'>You hear welding.</span>")
user.visible_message("[user.name] shape [src] into metal with the welding tool.", \
"<span class='notice'>You shape [src] into metal with the welding tool.</span>", \
"<span class='italics'>You hear welding.</span>")
var/replace = user.get_inactive_hand() == src
use(2)
@@ -59,34 +63,3 @@
user.put_in_hands(new_item)
return
..()
/obj/item/stack/rods/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(!istype(user.loc,/turf)) return 0
if(locate(/obj/structure/grille, usr.loc))
for(var/obj/structure/grille/G in usr.loc)
if(G.destroyed)
G.health = 10
G.density = 1
G.destroyed = 0
G.icon_state = "grille"
use(1)
else
return 1
else
if(amount < 2)
to_chat(user, "\blue You need at least two rods to do this.")
return
to_chat(usr, "\blue Assembling grille...")
if(!do_after(usr, 10, target = user))
return
var /obj/structure/grille/F = new /obj/structure/grille/ ( usr.loc )
to_chat(usr, "\blue You assemble a grille")
F.add_fingerprint(usr)
use(2)
return
@@ -22,6 +22,7 @@
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
var/full_window = /obj/structure/window/full/basic
merge_type = /obj/item/stack/sheet/glass
/obj/item/stack/sheet/glass/fifty
amount = 50
@@ -155,6 +156,7 @@
origin_tech = "materials=2"
var/created_window = /obj/structure/window/reinforced
var/full_window = /obj/structure/window/full/reinforced
merge_type = /obj/item/stack/sheet/rglass
/obj/item/stack/sheet/rglass/cyborg
materials = list()
@@ -5,7 +5,6 @@ Mineral Sheets
- Diamond
- Uranium
- Plasma
- Plastic
- Gold
- Silver
- Bananium
@@ -77,23 +76,6 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
new/datum/stack_recipe("Xenomorph Statue", /obj/structure/statue/plasma/xeno, 5, one_per_turf = 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
)
var/global/list/datum/stack_recipe/bananium_recipes = list ( \
new/datum/stack_recipe("bananium tile", /obj/item/stack/tile/mineral/bananium, 1, 4, 20), \
null, \
@@ -196,19 +178,6 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, amount*10)
qdel(src)
/obj/item/stack/sheet/mineral/plastic
name = "Plastic"
icon_state = "sheet-plastic"
origin_tech = "materials=3"
/obj/item/stack/sheet/mineral/plastic/New()
..()
recipes = plastic_recipes
/obj/item/stack/sheet/mineral/plastic/cyborg
name = "plastic sheets"
icon_state = "sheet-plastic"
/obj/item/stack/sheet/mineral/gold
name = "gold"
icon_state = "sheet-gold"
@@ -4,7 +4,9 @@
* Plasteel
* Wood
* Cloth
* Plastic
* Cardboard
* Runed Metal (cult)
*/
/*
@@ -20,6 +22,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
new /datum/stack_recipe("barber chair", /obj/structure/stool/bed/chair/barber, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wheelchair", /obj/structure/stool/bed/chair/wheelchair, 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("psychiatrist bed", /obj/structure/stool/psychbed, 5, one_per_turf = 1, on_floor = 1),
null,
new /datum/stack_recipe_list("office chairs",list(
new /datum/stack_recipe("dark office chair", /obj/structure/stool/bed/chair/office/dark, 5, one_per_turf = 1, on_floor = 1),
@@ -47,9 +50,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
new /datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 10, time = 15, one_per_turf = 1, on_floor = 1),
null,
new /datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 20),
new /datum/stack_recipe/rods("metal rod", /obj/item/stack/rods, 1, 2, 60),
new /datum/stack_recipe/rods("metal rod", /obj/item/stack/rods, 1, 2, 50),
null,
new /datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, time = 25, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("modular console", /obj/machinery/modular_computer/console/buildable/, 10, time = 25, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, time = 25, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, time = 25, one_per_turf = 1, on_floor = 1),
@@ -97,6 +101,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list(
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=1"
merge_type = /obj/item/stack/sheet/metal
/obj/item/stack/sheet/metal/cyborg
materials = list()
@@ -133,6 +138,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list(
throwforce = 10.0
flags = CONDUCT
origin_tech = "materials=2"
merge_type = /obj/item/stack/sheet/plasteel
/obj/item/stack/sheet/plasteel/New(var/loc, var/amount=null)
recipes = plasteel_recipes
@@ -149,13 +155,15 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
new /datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("bookcase", /obj/structure/bookcase, 5, time = 50, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("dog bed", /obj/structure/stool/bed/dogbed, 10, time = 10, one_per_turf = 1, on_floor = 1), \
new /datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40),
new /datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("coffin", /obj/structure/closet/coffin, 5, time = 15, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("easel", /obj/structure/easel, 3, one_per_turf = 1, on_floor = 1),
new /datum/stack_recipe("wooden buckler", /obj/item/weapon/shield/riot/buckler, 20, time = 40),
new /datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10)
new /datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),
new /datum/stack_recipe("baseball bat", /obj/item/weapon/melee/baseball_bat, 5, time = 15)
)
/obj/item/stack/sheet/wood
@@ -166,6 +174,7 @@ var/global/list/datum/stack_recipe/wood_recipes = list(
icon_state = "sheet-wood"
origin_tech = "materials=1;biotech=1"
burn_state = FLAMMABLE
merge_type = /obj/item/stack/sheet/wood
/obj/item/stack/sheet/wood/New(var/loc, var/amount=null)
recipes = wood_recipes
@@ -203,6 +212,7 @@ var/global/list/datum/stack_recipe/cloth_recipes = list ( \
burn_state = FLAMMABLE
force = 0
throwforce = 0
merge_type = /obj/item/stack/sheet/cloth
/obj/item/stack/sheet/cloth/New(loc, amount=null)
recipes = cloth_recipes
@@ -235,6 +245,7 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list (
icon_state = "sheet-card"
origin_tech = "materials=1"
burn_state = FLAMMABLE
merge_type = /obj/item/stack/sheet/cardboard
/obj/item/stack/sheet/cardboard/New(var/loc, var/amt = null)
recipes = cardboard_recipes
@@ -260,6 +271,7 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
icon_state = "sheet-runed"
icon = 'icons/obj/items.dmi'
sheettype = "runed"
merge_type = /obj/item/stack/sheet/runed_metal
/obj/item/stack/sheet/runed_metal/attack_self(mob/living/user)
if(!iscultist(user))
@@ -289,3 +301,40 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \
throw_speed = 1
throw_range = 3
origin_tech = "materials=2;biotech=2"
var/global/list/datum/stack_recipe/plastic_recipes = list ( \
new/datum/stack_recipe("plastic flaps", /obj/structure/plasticflaps, 5, one_per_turf = 1, on_floor = 1, time = 40), \
new/datum/stack_recipe("plastic crate", /obj/structure/closet/crate/plastic, 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic ashtray", /obj/item/ashtray/plastic, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("plastic fork", /obj/item/weapon/kitchen/utensil/pfork, 1, on_floor = 1), \
new/datum/stack_recipe("plastic spoon", /obj/item/weapon/kitchen/utensil/pspoon, 1, on_floor = 1), \
new/datum/stack_recipe("plastic knife", /obj/item/weapon/kitchen/knife/plastic, 1, on_floor = 1), \
new/datum/stack_recipe("plastic bag", /obj/item/weapon/storage/bag/plasticbag, 3, on_floor = 1), \
new/datum/stack_recipe("bear mould", /obj/item/weapon/kitchen/mould/bear, 1, on_floor = 1), \
new/datum/stack_recipe("worm mould", /obj/item/weapon/kitchen/mould/worm, 1, on_floor = 1), \
new/datum/stack_recipe("bean mould", /obj/item/weapon/kitchen/mould/bean, 1, on_floor = 1), \
new/datum/stack_recipe("ball mould", /obj/item/weapon/kitchen/mould/ball, 1, on_floor = 1), \
new/datum/stack_recipe("cane mould", /obj/item/weapon/kitchen/mould/cane, 1, on_floor = 1), \
new/datum/stack_recipe("cash mould", /obj/item/weapon/kitchen/mould/cash, 1, on_floor = 1), \
new/datum/stack_recipe("coin mould", /obj/item/weapon/kitchen/mould/coin, 1, on_floor = 1), \
new/datum/stack_recipe("sucker mould", /obj/item/weapon/kitchen/mould/loli, 1, on_floor = 1), \
)
/obj/item/stack/sheet/plastic
name = "plastic"
desc = "Compress dinosaur over millions of years, then refine, split and mold, and voila! You have plastic."
singular_name = "plastic sheet"
icon_state = "sheet-plastic"
throwforce = 7
origin_tech = "materials=1;biotech=1"
merge_type = /obj/item/stack/sheet/plastic
/obj/item/stack/sheet/plastic/New()
recipes = plastic_recipes
. = ..()
/obj/item/stack/sheet/plastic/fifty
amount = 50
/obj/item/stack/sheet/plastic/five
amount = 5
+4 -1
View File
@@ -14,11 +14,14 @@
var/singular_name
var/amount = 1
var/max_amount //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
/obj/item/stack/New(var/loc, var/amt = null)
..()
if(amt != null) //Allow for stacks with the amount=0
amount = amt
if(!merge_type)
merge_type = type
/obj/item/stack/Destroy()
if(usr && usr.machine == src)
@@ -232,7 +235,7 @@
/obj/item/stack/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, type))
if(istype(W, merge_type))
var/obj/item/stack/S = W
if(S.amount >= max_amount)
return 1
@@ -17,6 +17,10 @@
mineralType = "uranium"
materials = list(MAT_URANIUM=500)
var/global/list/datum/stack_recipe/gold_tile_recipes = list ( \
new/datum/stack_recipe("fancy gold tile", /obj/item/stack/tile/mineral/gold/fancy, max_res_amount = 20), \
)
/obj/item/stack/tile/mineral/gold
name = "gold tile"
singular_name = "gold floor tile"
@@ -26,6 +30,26 @@
mineralType = "gold"
materials = list(MAT_GOLD=500)
/obj/item/stack/tile/mineral/gold/New(loc, amount=null)
..()
recipes = gold_tile_recipes
var/global/list/datum/stack_recipe/goldfancy_tile_recipes = list ( \
new/datum/stack_recipe("regular gold tile", /obj/item/stack/tile/mineral/gold, max_res_amount = 20), \
)
/obj/item/stack/tile/mineral/gold/fancy
icon_state = "tile_goldfancy"
turf_type = /turf/simulated/floor/mineral/gold/fancy
/obj/item/stack/tile/mineral/gold/fancy/New(loc, amount=null)
..()
recipes = goldfancy_tile_recipes
var/global/list/datum/stack_recipe/silver_tile_recipes = list ( \
new/datum/stack_recipe("fancy silver tile", /obj/item/stack/tile/mineral/silver/fancy, max_res_amount = 20), \
)
/obj/item/stack/tile/mineral/silver
name = "silver tile"
singular_name = "silver floor tile"
@@ -35,6 +59,22 @@
mineralType = "silver"
materials = list(MAT_SILVER=500)
/obj/item/stack/tile/mineral/silver/New(loc, amount=null)
..()
recipes = silver_tile_recipes
var/global/list/datum/stack_recipe/silverfancy_tile_recipes = list ( \
new/datum/stack_recipe("regular silver tile", /obj/item/stack/tile/mineral/silver, max_res_amount = 20), \
)
/obj/item/stack/tile/mineral/silver/fancy
icon_state = "tile_silverfancy"
turf_type = /turf/simulated/floor/mineral/silver/fancy
/obj/item/stack/tile/mineral/silver/fancy/New(loc, amount=null)
..()
recipes = silverfancy_tile_recipes
/obj/item/stack/tile/mineral/diamond
name = "diamond tile"
singular_name = "diamond floor tile"
@@ -136,6 +136,7 @@
icon_state = "tile_space"
turf_type = /turf/simulated/floor/fakespace
burn_state = FLAMMABLE
merge_type = /obj/item/stack/tile/fakespace
/obj/item/stack/tile/fakespace/loaded
amount = 30
@@ -148,6 +149,7 @@
icon_state = "tile_noslip"
turf_type = /turf/simulated/floor/noslip
origin_tech = "materials=3"
merge_type = /obj/item/stack/tile/noslip
/obj/item/stack/tile/noslip/loaded
amount = 20
+151
View File
@@ -0,0 +1,151 @@
/obj/item/weapon/twohanded/rcl
name = "rapid cable layer (RCL)"
desc = "A device used to rapidly deploy cables. It has screws on the side which can be removed to slide off the cables."
icon = 'icons/obj/tools.dmi'
icon_state = "rcl-0"
item_state = "rcl-0"
opacity = 0
force = 5 //Plastic is soft
throwforce = 5
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "engineering=4;materials=4"
var/max_amount = 90
var/active = 0
var/obj/structure/cable/last = null
var/obj/item/stack/cable_coil/loaded = null
/obj/item/weapon/twohanded/rcl/attackby(obj/item/weapon/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(!loaded)
if(user.drop_item())
loaded = W
loaded.forceMove(src)
loaded.max_amount = max_amount //We store a lot.
else
to_chat(user, "<span class='warning'>[user.get_active_hand()] is stuck to your hand!</span>")
return
else
if(loaded.amount < max_amount)
var/amount = min(loaded.amount + C.amount, max_amount)
C.use(amount - loaded.amount)
loaded.amount = amount
else
return
update_icon()
to_chat(user, "<span class='notice'>You add the cables to the [src]. It now contains [loaded.amount].</span>")
else if(isscrewdriver(W))
if(!loaded)
return
to_chat(user, "<span class='notice'>You loosen the securing screws on the side, allowing you to lower the guiding edge and retrieve the wires.</span>")
while(loaded.amount > 30) //There are only two kinds of situations: "nodiff" (60,90), or "diff" (31-59, 61-89)
var/diff = loaded.amount % 30
if(diff)
loaded.use(diff)
new /obj/item/stack/cable_coil(user.loc, diff)
else
loaded.use(30)
new /obj/item/stack/cable_coil(user.loc, 30)
loaded.max_amount = initial(loaded.max_amount)
loaded.forceMove(user.loc)
user.put_in_hands(loaded)
loaded = null
update_icon()
else
..()
/obj/item/weapon/twohanded/rcl/examine(mob/user)
..()
if(loaded)
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>")
/obj/item/weapon/twohanded/rcl/Destroy()
if(loaded)
qdel(loaded)
loaded = null
last = null
active = 0
return ..()
/obj/item/weapon/twohanded/rcl/update_icon()
if(!loaded)
icon_state = "rcl-0"
item_state = "rcl-0"
return
switch(loaded.amount)
if(61 to INFINITY)
icon_state = "rcl-30"
item_state = "rcl"
if(31 to 60)
icon_state = "rcl-20"
item_state = "rcl"
if(1 to 30)
icon_state = "rcl-10"
item_state = "rcl"
else
icon_state = "rcl-0"
item_state = "rcl-0"
/obj/item/weapon/twohanded/rcl/proc/is_empty(mob/user, loud = 1)
update_icon()
if(!loaded || !loaded.amount)
if(loud)
to_chat(user, "<span class='notice'>The last of the cables unreel from [src].</span>")
if(loaded)
qdel(loaded)
loaded = null
unwield(user)
active = wielded
return 1
return 0
/obj/item/weapon/twohanded/rcl/dropped(mob/wearer)
..()
active = 0
last = null
/obj/item/weapon/twohanded/rcl/attack_self(mob/user)
..()
active = wielded
if(!active)
last = null
else if(!last)
for(var/obj/structure/cable/C in get_turf(user))
if(C.d1 == 0 || C.d2 == 0)
last = C
break
/obj/item/weapon/twohanded/rcl/moved(mob/user, turf/old_loc, direct)
if(active)
trigger(user)
/obj/item/weapon/twohanded/rcl/proc/trigger(mob/user)
if(is_empty(user, 0))
to_chat(user, "<span class='warning'>\The [src] is empty!</span>")
return
if(last)
if(get_dist(last, user) == 1) //hacky, but it works
var/turf/T = get_turf(user)
if(!isturf(T) || T.intact || !T.can_have_cabling())
last = null
return
if(get_dir(last, user) == last.d2)
//Did we just walk backwards? Well, that's the one direction we CAN'T complete a stub.
last = null
return
loaded.cable_join(last, user)
if(is_empty(user))
return //If we've run out, display message and exit
else
last = null
last = loaded.place_turf(get_turf(loc), user, turn(user.dir, 180))
is_empty(user) //If we've run out, display message
/obj/item/weapon/twohanded/rcl/pre_loaded/New() //Comes preloaded with cable, for testing stuff
..()
loaded = new()
loaded.max_amount = max_amount
loaded.amount = max_amount
update_icon()
+1
View File
@@ -12,6 +12,7 @@
burn_state = FLAMMABLE
singular_name = "credit"
max_amount = 1000000
merge_type = /obj/item/stack/spacecash
/obj/item/stack/spacecash/New(loc, amt = null)
..()
+1
View File
@@ -48,6 +48,7 @@ LIGHTERS ARE IN LIGHTERS.DM
/obj/item/clothing/mask/cigarette/Destroy()
if(reagents)
qdel(reagents)
reagents = null
processing_objects -= src
return ..()
@@ -13,7 +13,7 @@
var/mob/living/carbon/M = AM
M.slip("soap", 4, 2)
/obj/item/weapon/soap/afterattack(atom/target, mob/user as mob, proximity)
/obj/item/weapon/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.
//So this is a workaround. This also makes more sense from an IC standpoint. ~Carn
@@ -37,6 +37,9 @@
var/obj/effect/decal/cleanable/C = locate() in target
qdel(C)
target.clean_blood()
if(istype(target, /turf/simulated))
var/turf/simulated/T = target
T.dirt = 0
return
/obj/item/weapon/soap/attack(mob/target as mob, mob/user as mob)
@@ -22,16 +22,22 @@
if(src.used)
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.flags & NO_DNA)
to_chat(user, "<span class='warning'>You failed to inject [M], as they have no DNA to scramble, nor flesh to inject.</span>")
return
if(M == user)
user.visible_message("<span class='danger'>[user.name] injects \himself with [src]!</span>")
user.visible_message("<span class='danger'>[user] injects \himself with [src]!</span>")
src.injected(user,user)
else
user.visible_message("<span class='danger'>[user.name] is trying to inject [M.name] with [src]!</span>")
user.visible_message("<span class='danger'>[user] is trying to inject [M] with [src]!</span>")
if(do_mob(user,M,30))
user.visible_message("<span class='danger'>[user.name] injects [M.name] with [src].</span>")
user.visible_message("<span class='danger'>[user] injects [M] with [src].</span>")
src.injected(M, user)
else
to_chat(user, "\red You failed to inject [M.name].")
to_chat(user, "<span class='warning'>You failed to inject [M].</span>")
proc/injected(var/mob/living/carbon/target, var/mob/living/carbon/user)
scramble(1, target, 100)
@@ -18,10 +18,11 @@
..()
/obj/item/weapon/grenade/plastic/Destroy()
qdel(nadeassembly)
nadeassembly = null
if(nadeassembly)
qdel(nadeassembly)
nadeassembly = null
target = null
..()
return ..()
/obj/item/weapon/grenade/plastic/attackby(obj/item/I, mob/user, params)
if(!nadeassembly && istype(I, /obj/item/device/assembly_holder))
@@ -34,6 +34,7 @@
if(ptank)
qdel(ptank)
ptank = null
previousturf = null
return ..()
+5 -1
View File
@@ -13,6 +13,10 @@
var/improvised = 0
var/garrote_time
/obj/item/weapon/twohanded/garrote/Destroy()
strangling = null
return ..()
/obj/item/weapon/twohanded/garrote/update_icon()
if(strangling) // If we're strangling someone we want our icon to stay wielded
icon_state = "garrot_unwrap"
@@ -70,7 +74,7 @@
to_chat(user, "<span class='warning'>You cannot use [src] on [M] from that angle!</span>")
return
if(improvised && ((M.head && (M.head.flags & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags & MASKCOVERSMOUTH)))) // Improvised garrotes are blocked by mouth-covering items.
if(improvised && ((M.head && (M.head.flags_cover & HEADCOVERSMOUTH)) || (M.wear_mask && (M.wear_mask.flags_cover & MASKCOVERSMOUTH)))) // Improvised garrotes are blocked by mouth-covering items.
to_chat(user, "<span class = 'warning'>[M]'s neck is blocked by something they're wearing!</span>")
if(strangling)
@@ -26,6 +26,14 @@
payload_name += " " // formatting, ignore me
update_icon()
/obj/item/weapon/grenade/chem_grenade/Destroy()
if(nadeassembly)
qdel(nadeassembly)
nadeassembly = null
for(var/thing in beakers)
qdel(thing)
beakers.Cut()
return ..()
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
..(user)
@@ -12,7 +12,7 @@
for(var/mob/living/M in hearers(7, flashbang_turf))
bang(get_turf(M), M)
for(var/obj/effect/blob/B in hear(8,flashbang_turf)) //Blob damage here
for(var/obj/structure/blob/B in hear(8,flashbang_turf)) //Blob damage here
var/damage = round(30/(get_dist(B,get_turf(src))+1))
B.health -= damage
B.update_icon()
@@ -30,7 +30,7 @@
sleep(10)
src.smoke.start()
for(var/obj/effect/blob/B in view(8,src))
for(var/obj/structure/blob/B in view(8,src))
var/damage = round(30/(get_dist(B,src)+1))
B.health -= damage
B.update_icon()
@@ -13,6 +13,12 @@
var/list/signs = list()
var/max_signs = 20
/obj/item/weapon/holosign_creator/Destroy()
for(var/sign in signs)
qdel(sign)
signs.Cut()
return ..()
/obj/item/weapon/holosign_creator/afterattack(atom/target, mob/user, flag)
if(flag)
var/turf/T = get_turf(target)
@@ -3,7 +3,7 @@
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
icon_state = "nullrod"
item_state = "nullrod"
force = 18
force = 15
throw_speed = 3
throw_range = 4
throwforce = 10
@@ -197,7 +197,7 @@
item_state = "hfrequency1"
desc = "Bad references are the DNA of the soul."
attack_verb = list("chopped", "sliced", "cut", "zandatsu'd")
/obj/item/weapon/nullrod/scythe/spellblade
icon_state = "spellblade"
item_state = "spellblade"
@@ -328,7 +328,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "carpplushie"
item_state = "carp_plushie"
force = 15
force = 13
attack_verb = list("bitten", "eaten", "fin slapped")
hitsound = 'sound/weapons/bite.ogg'
var/used_blessing = FALSE
@@ -346,7 +346,7 @@
name = "monk's staff"
desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown."
w_class = 4
force = 15
force = 13
block_chance = 40
slot_flags = SLOT_BACK
sharp = 0
+2
View File
@@ -18,6 +18,7 @@
var/mopspeed = 30
/obj/item/weapon/mop/New()
..()
create_reagents(mopcap)
janitorial_equipment += src
@@ -28,6 +29,7 @@
/obj/item/weapon/mop/proc/clean(turf/simulated/A)
if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1))
A.clean_blood()
A.dirt = 0
for(var/obj/effect/O in A)
if(is_cleanable(O))
qdel(O)
+18
View File
@@ -35,6 +35,24 @@
else
..()
/obj/item/weapon/shard/afterattack(atom/movable/AM, mob/user, proximity)
if(!proximity || !(src in user))
return
if(isturf(AM))
return
if(istype(AM, /obj/item/weapon/storage))
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.gloves)
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
if(affecting.status & ORGAN_ROBOT)
return
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
if(affecting.take_damage(force*0.5))
H.UpdateDamageIcon()
H.updatehealth()
/obj/item/weapon/shard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = I
@@ -423,11 +423,15 @@
desc = "A box for containing construction permits, used to officially declare built rooms as additions to the station."
icon_state = "id"
/obj/item/weapon/storage/box/permits/New() //There's only a few, so blueprints are still useful beyond setting every room's name to PRIMARY FART STORAGE
/obj/item/weapon/storage/box/permits/New()
..()
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
new /obj/item/areaeditor/permit(src)
/obj/item/weapon/storage/box/ids
+8 -2
View File
@@ -201,11 +201,17 @@
stunforce = 5
hitcost = 3750
slot_flags = SLOT_BACK
var/obj/item/device/assembly/igniter/sparkler = 0
var/obj/item/device/assembly/igniter/sparkler = null
/obj/item/weapon/melee/baton/cattleprod/New()
..()
sparkler = new (src)
sparkler = new(src)
/obj/item/weapon/melee/baton/cattleprod/Destroy()
if(sparkler)
qdel(sparkler)
sparkler = null
return ..()
/obj/item/weapon/melee/baton/cattleprod/baton_stun()
if(sparkler.activate())
@@ -301,7 +301,7 @@
if(!Adj|| !istype(target, /turf))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/effect/foam/F = new /obj/effect/effect/foam(get_turf(target), 1)
var/obj/structure/foam/F = new /obj/structure/foam(get_turf(target), 1)
F.amount = 0
metal_synthesis_cooldown++
spawn(100)
+25 -23
View File
@@ -28,12 +28,12 @@
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
/obj/item/weapon/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating themself to death with [src]! It looks like they're trying to commit suicide!</span>")
user.visible_message("<span class='suicide'>[user] is beating themselves to death with [src]! It looks like they're trying to commit suicide!</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return (BRUTELOSS)
/obj/item/weapon/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
@@ -44,7 +44,7 @@
desc = "A brass wrench. It's faintly warm to the touch."
icon_state = "wrench_brass"
toolspeed = 0.5
/obj/item/weapon/wrench/abductor
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
@@ -55,7 +55,7 @@
origin_tech = "materials=5;engineering=5;abductor=3"
/obj/item/weapon/wrench/power
name = "Hand Drill"
name = "hand drill"
desc = "A simple powered drill with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
@@ -162,7 +162,7 @@
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/weapon/screwdriver/brass
name = "brass screwdriver"
desc = "A screwdriver made of brass. The handle feels freezing cold."
@@ -178,7 +178,7 @@
toolspeed = 0.1
/obj/item/weapon/screwdriver/power
name = "Hand Drill"
name = "hand drill"
desc = "A simple hand drill with a screwdriver bit attached."
icon_state = "drill_screw"
item_state = "drill"
@@ -249,7 +249,7 @@
return
else
..()
/obj/item/weapon/wirecutters/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is cutting at their arteries with [src]! It looks like they're trying to commit suicide!</span>")
playsound(loc, usesound, 50, 1, -1)
@@ -275,12 +275,12 @@
toolspeed = 0.5
/obj/item/weapon/wirecutters/power
name = "Jaws of Life"
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)
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_GOLD=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
@@ -388,7 +388,7 @@
location = get_turf(M)
if(isturf(location))
location.hotspot_expose(700, 5)
/obj/item/weapon/weldingtool/attackby(obj/item/I, mob/user, params)
if(isscrewdriver(I))
flamethrower_screwdriver(I, user)
@@ -495,7 +495,7 @@
//Switches the welder on
/obj/item/weapon/weldingtool/proc/switched_on(mob/user)
if(!status)
to_chat(user, "span class='warning'>[src] can't be turned on while unsecured!</span>")
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
return
welding = !welding
if(welding)
@@ -578,7 +578,7 @@
/obj/item/weapon/weldingtool/mini/flamethrower_screwdriver()
return
/obj/item/weapon/weldingtool/abductor
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
@@ -589,7 +589,7 @@
change_icons = 0
origin_tech = "plasmatech=5;engineering=5;abductor=3"
can_off_process = 1
/obj/item/weapon/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
reagents.add_reagent("fuel", 1)
@@ -617,7 +617,7 @@
light_intensity = 1
toolspeed = 0.5
var/last_gen = 0
/obj/item/weapon/weldingtool/experimental/brass
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
@@ -651,12 +651,14 @@ obj/item/weapon/weldingtool/experimental/process()
/obj/item/weapon/crowbar/red
icon_state = "crowbar_red"
item_state = "crowbar_red"
force = 8
/obj/item/weapon/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
/obj/item/weapon/crowbar/abductor
@@ -670,16 +672,16 @@ obj/item/weapon/weldingtool/experimental/process()
/obj/item/weapon/crowbar/large
name = "crowbar"
desc = "It's a big crowbar. It doesn't fit in your pockets, because it's big."
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"
item_state = "crowbar_large"
toolspeed = 0.5
/obj/item/weapon/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
@@ -688,11 +690,11 @@ obj/item/weapon/weldingtool/experimental/process()
toolspeed = 0.5
/obj/item/weapon/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"
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)
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_DIAMOND=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
force = 15
@@ -714,7 +716,7 @@ obj/item/weapon/weldingtool/experimental/process()
// Conversion kit
/obj/item/weapon/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"
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 = 'icons/obj/weapons.dmi'
icon_state = "kit"
flags = CONDUCT
+64 -1
View File
@@ -138,4 +138,67 @@ obj/item/weapon/wirerod/attackby(obj/item/I, mob/user, params)
icon_state = "kidanspear"
item_state = "kidanspear"
force = 10
throwforce = 15
throwforce = 15
/obj/item/weapon/melee/baseball_bat
name = "baseball bat"
desc = "There ain't a skull in the league that can withstand a swatter."
icon = 'icons/obj/items.dmi'
icon_state = "baseball_bat"
item_state = "baseball_bat"
force = 10
throwforce = 12
attack_verb = list("beat", "smacked")
w_class = WEIGHT_CLASS_HUGE
var/homerun_ready = 0
var/homerun_able = 0
/obj/item/weapon/melee/baseball_bat/homerun
name = "home run bat"
desc = "This thing looks dangerous... Dangerously good at baseball, that is."
homerun_able = 1
/obj/item/weapon/melee/baseball_bat/attack_self(mob/user)
if(!homerun_able)
..()
return
if(homerun_ready)
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
..()
return
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
if(do_after(user, 90, target = src))
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
homerun_ready = 1
..()
/obj/item/weapon/melee/baseball_bat/attack(mob/living/target, mob/living/user)
. = ..()
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(homerun_ready)
user.visible_message("<span class='userdanger'>It's a home run!</span>")
target.throw_at(throw_target, rand(8,10), 14, user)
target.ex_act(2)
playsound(get_turf(src), 'sound/weapons/HOMERUN.ogg', 100, 1)
homerun_ready = 0
return
else
target.throw_at(throw_target, rand(1,2), 7, user)
/obj/item/weapon/melee/baseball_bat/ablative
name = "metal baseball bat"
desc = "This bat is made of highly reflective, highly armored material."
icon_state = "baseball_bat_metal"
item_state = "baseball_bat_metal"
force = 12
throwforce = 15
/obj/item/weapon/melee/baseball_bat/ablative/IsReflect()//some day this will reflect thrown items instead of lasers
var/picksound = rand(1,2)
var/turf = get_turf(src)
if(picksound == 1)
playsound(turf, 'sound/weapons/effects/batreflect1.ogg', 50, 1)
if(picksound == 2)
playsound(turf, 'sound/weapons/effects/batreflect2.ogg', 50, 1)
return 1
+5
View File
@@ -19,6 +19,11 @@
burntime = 15
var/obj/item/weapon/canvas/painting = null
/obj/structure/easel/Destroy()
if(painting)
qdel(painting)
painting = null
return ..()
//Adding canvases
/obj/structure/easel/attackby(var/obj/item/I, var/mob/user, params)
+1 -1
View File
@@ -28,7 +28,7 @@
to_chat(user, "<span class='notice'>You cannot hang [W] on [src]</span>")
return ..()
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0)
var/can_hang = 0
for(var/T in allowed)
if(istype(mover,T))
@@ -34,8 +34,8 @@
/obj/structure/closet/alter_health()
return get_turf(src)
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0 || wall_mounted)) return 1
/obj/structure/closet/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0 || wall_mounted) return 1
return (!density)
/obj/structure/closet/proc/can_open()
@@ -262,7 +262,8 @@
return
if(isrobot(user))
return
if(!usr.drop_item())
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
@@ -1,4 +1,5 @@
/obj/structure/closet/secure_closet/freezer
desc = "It's a card-locked refrigerative storage unit. This one is lead-lined."
/obj/structure/closet/secure_closet/freezer/update_icon()
if(broken)
@@ -78,7 +78,9 @@
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
if(isrobot(user))
return
user.drop_item()
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
else if((istype(W, /obj/item/weapon/card/emag)||istype(W, /obj/item/weapon/melee/energy/blade)) && !broken)
@@ -22,6 +22,15 @@ var/global/list/captain_display_cases = list()
var/obj/item/device/assembly/prox_sensor/sensor = null
var/state = DISPLAYCASE_FRAME_CIRCUIT
/obj/structure/displaycase_frame/Destroy()
if(circuit)
qdel(circuit)
circuit = null
if(sensor)
qdel(sensor)
sensor = null
return ..()
/obj/structure/displaycase_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
var/pstate = state
var/turf/T = get_turf(src)
+14 -14
View File
@@ -17,6 +17,12 @@
/obj/structure/door_assembly/New()
update_state()
/obj/structure/door_assembly/Destroy()
if(electronics)
qdel(electronics)
electronics = null
return ..()
/obj/structure/door_assembly/door_assembly_com
base_icon_state = "com"
base_name = "Command Airlock"
@@ -94,7 +100,7 @@
base_name = "Maintenance Hatch"
airlock_type = "/maintenance_hatch"
glass = -1
/obj/structure/door_assembly/door_assembly_highsecurity // Borrowing this until WJohnston makes sprites for the assembly
base_icon_state = "highsec"
base_name = "High Security Airlock"
@@ -103,7 +109,7 @@
/obj/structure/door_assembly/door_assembly_shuttle
base_icon_state = "shuttle"
base_name = "shuttle airlock"
base_name = "Shuttle Airlock"
airlock_type = "/shuttle"
glass = -1
@@ -115,12 +121,6 @@
airlock_type = "/multi_tile/glass"
glass = -1 //To prevent bugs in deconstruction process.
/obj/structure/door_assembly/door_assembly_cult
base_name = "cult airlock assembly"
icon = 'icons/obj/doors/Doorcult.dmi'
base_icon_state ="construction"
airlock_type = "/cult"
/obj/structure/door_assembly/multi_tile/New()
if(dir in list(EAST, WEST))
bound_width = width * world.icon_size
@@ -146,7 +146,6 @@
airlock_type = "/cult"
glass = -1
/obj/structure/door_assembly/door_assembly_cultruned
icon = 'icons/obj/doors/Doorcultruned.dmi'
base_icon_state = "construction"
@@ -154,7 +153,6 @@
airlock_type = "/cult/runed"
glass = -1
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
@@ -183,10 +181,10 @@
new /obj/item/stack/sheet/rglass(src.loc)
glass = 0
else if(!anchored)
user.visible_message("[user] dissassembles the airlock assembly.", "You start to dissassemble the airlock assembly.")
user.visible_message("[user] disassembles the airlock assembly.", "You start to disassemble the airlock assembly.")
if(do_after(user, 40 * WT.toolspeed, target = src))
if(!src || !WT.isOn()) return
to_chat(user, "\blue You dissasembled the airlock assembly!")
to_chat(user, "\blue You disassembled the airlock assembly!")
new /obj/item/stack/sheet/metal(src.loc, 4)
qdel(src)
else
@@ -220,8 +218,9 @@
if(do_after(user, 40 * W.toolspeed, target = src))
if(!src) return
to_chat(user, "\blue You cut the airlock wires.!")
new/obj/item/stack/cable_coil(src.loc, 1)
to_chat(user, "\blue You cut the airlock's wires!")
if(state == 1)
new/obj/item/stack/cable_coil(src.loc, 1)
src.state = 0
else if(istype(W, /obj/item/weapon/airlock_electronics) && state == 1 && W:icon_state != "door_electronics_smoked")
@@ -292,6 +291,7 @@
else
path = text2path("/obj/machinery/door/airlock[airlock_type]")
var/obj/machinery/door/airlock/door = new path(src.loc)
door.setDir(dir)
door.assembly_type = type
door.electronics = src.electronics
if(src.electronics.one_access)
+27
View File
@@ -14,6 +14,33 @@
var/obj/item/weapon/storage/toolbox/emergency/myredtoolbox = null
var/obj/item/taperoll/engineering/myengitape = null
/obj/structure/engineeringcart/Destroy()
if(myglass)
qdel(myglass)
myglass = null
if(mymetal)
qdel(mymetal)
mymetal = null
if(myplasteel)
qdel(myplasteel)
myplasteel = null
if(myflashlight)
qdel(myflashlight)
myflashlight = null
if(mybluetoolbox)
qdel(mybluetoolbox)
mybluetoolbox = null
if(myyellowtoolbox)
qdel(myyellowtoolbox)
myyellowtoolbox = null
if(myredtoolbox)
qdel(myredtoolbox)
myredtoolbox = null
if(myengitape)
qdel(myengitape)
myengitape = null
return ..()
/obj/structure/engineeringcart/proc/put_in_cart(obj/item/I, mob/user)
user.drop_item()
I.loc = src
@@ -8,6 +8,11 @@
var/obj/item/weapon/extinguisher/has_extinguisher = new/obj/item/weapon/extinguisher
var/opened = 0
/obj/structure/extinguisher_cabinet/Destroy()
if(has_extinguisher)
qdel(has_extinguisher)
has_extinguisher = null
return ..()
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
if(isrobot(user) || isalien(user))
+1 -1
View File
@@ -6,7 +6,7 @@
/obj/structure/window/full/CheckExit(atom/movable/O as mob|obj, target as turf)
return 1
/obj/structure/window/full/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/window/full/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
return 0
+176 -122
View File
@@ -7,11 +7,16 @@
anchored = 1
flags = CONDUCT
pressure_resistance = 5*ONE_ATMOSPHERE
layer = 2.9
var/health = 10
var/destroyed = 0
layer = BELOW_OBJ_LAYER
level = 3
var/health = 10
var/broken = 0
var/can_deconstruct = TRUE
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
var/rods_broken = 1
var/grille_type = null
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/fence/
var/width = 3
@@ -26,7 +31,6 @@
bound_width = world.icon_size
bound_height = width * world.icon_size
/obj/structure/grille/fence/east_west
//width=80
//height=42
@@ -38,19 +42,23 @@
icon='icons/fence-ns.dmi'
/obj/structure/grille/ex_act(severity)
qdel(src)
switch(severity)
if(1)
qdel(src)
else
take_damage(rand(5,10), BRUTE, 0)
/obj/structure/grille/blob_act()
qdel(src)
if(!broken)
obj_break()
/obj/structure/grille/Bumped(atom/user)
if(ismob(user)) shock(user, 70)
if(ismob(user))
shock(user, 70)
/obj/structure/grille/attack_hand(mob/living/user as mob)
/obj/structure/grille/attack_hand(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] kicks [src].</span>", \
"<span class='warning'>You kick [src].</span>", \
"You hear twisting metal.")
@@ -58,26 +66,23 @@
if(shock(user, 70))
return
if(HULK in user.mutations)
health -= 5
take_damage(5)
else
health -= 1
healthcheck()
take_damage(rand(1,2))
/obj/structure/grille/attack_alien(mob/living/user as mob)
if(istype(user, /mob/living/carbon/alien/larva)) return
/obj/structure/grille/attack_alien(mob/living/user)
if(istype(user, /mob/living/carbon/alien/larva))
return
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
user.visible_message("<span class='warning'>[user] mangles [src].</span>", \
"<span class='warning'>You mangle [src].</span>", \
"You hear twisting metal.")
if(!shock(user, 70))
health -= 5
healthcheck()
return
take_damage(5)
/obj/structure/grille/attack_slime(mob/living/user as mob)
/obj/structure/grille/attack_slime(mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
var/mob/living/carbon/slime/S = user
@@ -89,12 +94,11 @@
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= rand(2,3)
healthcheck()
return
take_damage(rand(1,2))
/obj/structure/grille/attack_animal(var/mob/living/simple_animal/M as mob)
if(M.melee_damage_upper == 0) return
/obj/structure/grille/attack_animal(mob/living/simple_animal/M)
if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
return
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
@@ -102,18 +106,15 @@
"<span class='warning'>You smash against [src].</span>", \
"You hear twisting metal.")
health -= M.melee_damage_upper
healthcheck()
return
take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type)
/obj/structure/grille/mech_melee_attack(obj/mecha/M)
if(..())
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
health -= M.force * 0.5
healthcheck()
take_damage(M.force * 0.5, M.damtype)
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
if(istype(mover) && mover.checkpass(PASSGRILLE))
return 1
else
@@ -128,118 +129,144 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
/obj/structure/grille/bullet_act(var/obj/item/projectile/Proj)
if(!Proj)
return
..()
if((Proj.damage_type != STAMINA)) //Grilles can't be exhausted to death
src.health -= Proj.damage*0.3
healthcheck()
return
/obj/structure/grille/bullet_act(obj/item/projectile/Proj)
. = ..()
take_damage(Proj.damage*0.3, Proj.damage_type)
/obj/structure/grille/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
if(iswirecutter(W))
if(!shock(user, 100))
playsound(loc, W.usesound, 100, 1)
if(!destroyed)
new /obj/item/stack/rods(loc, 2)
else
new /obj/item/stack/rods(loc)
qdel(src)
deconstruct()
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
playsound(loc, W.usesound, 100, 1)
anchored = !anchored
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] the grille.</span>", \
"<span class='notice'>You have [anchored ? "fastened the grille to" : "unfastened the grill from"] the floor.</span>")
user.visible_message("<span class='notice'>[user] [anchored ? "fastens" : "unfastens"] [src].</span>", \
"<span class='notice'>You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.</span>")
return
else if(istype(W, /obj/item/stack/rods) && broken)
var/obj/item/stack/rods/R = W
if(!shock(user, 90))
user.visible_message("<span class='notice'>[user] rebuilds the broken grille.</span>", \
"<span class='notice'>You rebuild the broken grille.</span>")
new grille_type(loc)
R.use(1)
qdel(src)
return
//window placing begin
else if( istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass) )
var/dir_to_set = 1
if(loc == user.loc)
dir_to_set = user.dir
else
if( ( x == user.x ) || (y == user.y) ) //Only supposed to work for cardinal directions.
if( x == user.x )
if( y > user.y )
dir_to_set = 2
else
dir_to_set = 1
else if( y == user.y )
if( x > user.x )
dir_to_set = 8
else
dir_to_set = 4
else
to_chat(user, "<span class='notice'>You can't reach.</span>")
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass))
if(!broken)
var/obj/item/stack/ST = W
if (ST.get_amount() < 1)
to_chat(user, "<span class='warning'>You need at least one sheet of glass for that!</span>")
return
to_chat(user, "<span class='notice'>You start placing the window.</span>")
if(do_after(user, 20 * W.toolspeed, target = src))
if(!src) return //Grille destroyed while waiting
var/dir_to_set = NORTH
if(!anchored)
to_chat(user, "<span class='warning'>[src] needs to be fastened to the floor first!</span>")
return
if(loc == user.loc)
dir_to_set = user.dir
else
if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions.
if(x == user.x)
if(y > user.y)
dir_to_set = SOUTH
else
dir_to_set = NORTH
else if(y == user.y)
if(x > user.x)
dir_to_set = WEST
else
dir_to_set = EAST
else
to_chat(user, "<span class='notice'>You can't reach.</span>")
return //Only works for cardinal direcitons, diagonals aren't supposed to work like this.
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
if(WINDOW.dir == dir_to_set)
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window/reinforced(loc) //reinforced window
else if(istype(W,/obj/item/stack/sheet/glass))
WD = new/obj/structure/window/basic(loc) //normal window
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
else
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
WD.dir = dir_to_set
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
var/obj/item/stack/ST = W
ST.use(1)
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
WD.update_icon()
return
to_chat(user, "<span class='notice'>You start placing the window...</span>")
if(do_after(user, 20 * W.toolspeed, target = src))
if(!loc || !anchored) //Grille destroyed or unanchored while waiting
return
for(var/obj/structure/window/WINDOW in loc)
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
to_chat(user, "<span class='notice'>There is already a window facing this way there.</span>")
return
var/obj/structure/window/WD
if(istype(W,/obj/item/stack/sheet/rglass))
WD = new/obj/structure/window/reinforced(loc) //reinforced window
else if(istype(W,/obj/item/stack/sheet/glass))
WD = new/obj/structure/window/basic(loc) //normal window
else if(istype(W,/obj/item/stack/sheet/plasmaglass))
WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window
else
WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window
WD.setDir(dir_to_set)
WD.ini_dir = dir_to_set
WD.anchored = 0
WD.state = 0
ST.use(1)
to_chat(user, "<span class='notice'>You place the [WD] on [src].</span>")
WD.update_icon()
return
//window placing end
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
return attacked_by(W, user)
else if(istype(W, /obj/item/weapon/shard))
health -= W.force * 0.1
else if(!shock(user, 70))
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
health -= W.force
if("brute")
health -= W.force * 0.1
healthcheck()
..()
return
/obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
if(!(I.flags&NOBLUDGEON))
if(I.force)
visible_message("<span class='danger'>[user] has hit [src] with [I]!</span>")
take_damage(I.force * 0.3, I.damtype)
/obj/structure/grille/proc/deconstruct(disassembled = TRUE)
if(!loc) //if already qdel'd somehow, we do nothing
return
if(can_deconstruct)
var/obj/R = new rods_type(loc, rods_amount)
transfer_fingerprints_to(R)
qdel(src)
/obj/structure/grille/proc/healthcheck()
/obj/structure/grille/proc/obj_break()
if(!broken && can_deconstruct)
new broken_type(loc)
var/obj/R = new rods_type(loc, rods_broken)
transfer_fingerprints_to(R)
qdel(src)
/obj/structure/grille/proc/take_damage(damage, damage_type = BRUTE, sound_effect = 1)
switch(damage_type)
if(BURN)
if(sound_effect)
playsound(loc, 'sound/items/welder.ogg', 80, 1)
if(BRUTE)
if(sound_effect)
if(damage)
playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
else
playsound(loc, 'sound/weapons/tap.ogg', 50, 1)
else
return
health -= damage
if(health <= 0)
if(!destroyed)
icon_state = "brokengrille"
density = 0
destroyed = 1
new /obj/item/stack/rods(loc)
if(!broken)
obj_break()
else
if(health <= -6)
new /obj/item/stack/rods(loc)
qdel(src)
return
return
deconstruct()
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
/obj/structure/grille/proc/shock(mob/user as mob, prb)
if(!anchored || destroyed) // deanchored/destroyed grilles are never connected
/obj/structure/grille/proc/shock(mob/user, prb)
if(!anchored || broken) // unanchored/broken grilles are never connected
return 0
if(!prob(prb))
return 0
@@ -258,8 +285,35 @@
return 0
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(!destroyed)
if(!broken)
if(exposed_temperature > T0C + 1500)
health -= 1
healthcheck()
take_damage(1)
..()
/obj/structure/grille/hitby(atom/movable/AM)
..()
var/tforce = 0
if(ismob(AM))
tforce = 5
else if(isobj(AM))
if(prob(50))
var/obj/item/I = AM
tforce = max(0, I.throwforce * 0.5)
else if(anchored && !broken)
var/turf/T = get_turf(src)
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(loc, 'sound/magic/LightningShock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 3, C.powernet.avail * 0.01) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.powernet.load += C.powernet.avail * 0.0375 // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
take_damage(tforce)
/obj/structure/grille/broken // Pre-broken grilles for map placement
icon_state = "brokengrille"
density = 0
health = 0
broken = 1
rods_amount = 1
rods_broken = 0
grille_type = /obj/structure/grille
broken_type = null
+2 -4
View File
@@ -33,7 +33,7 @@
air_update_turf(1)
return ..()
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/inflatable/CanPass(atom/movable/mover, turf/target, height=0)
return 0
/obj/structure/inflatable/CanAtmosPass(turf/T)
@@ -178,9 +178,7 @@
/obj/structure/inflatable/door/attack_hand(mob/user as mob)
return TryToSwitchState(user)
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group)
return state
/obj/structure/inflatable/door/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
+13 -1
View File
@@ -19,12 +19,24 @@
/obj/structure/janitorialcart/New()
..()
create_reagents(100)
janitorial_equipment += src
/obj/structure/janitorialcart/Destroy()
janitorial_equipment -= src
if(mybag)
qdel(mybag)
mybag = null
if(mymop)
qdel(mymop)
mymop = null
if(myspray)
qdel(myspray)
myspray = null
if(myreplacer)
qdel(myreplacer)
myreplacer = null
return ..()
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
+126 -153
View File
@@ -1,8 +1,6 @@
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its
//machineryness
//NOT using the existing /obj/machinery/door type, since that has some complications on its own, mainly based on its machineryness
/obj/structure/mineral_door
name = "mineral door"
name = "metal door"
density = 1
anchored = 1
opacity = 1
@@ -10,16 +8,21 @@
icon = 'icons/obj/doors/mineral_doors.dmi'
icon_state = "metal"
var/mineralType = "metal"
var/initial_state
var/state = 0 //closed, 1 == open
var/isSwitchingStates = 0
var/close_delay = -1 //-1 if does not auto close.
var/hardness = 1
var/oreAmount = 7
var/sheetType = /obj/item/stack/sheet/metal
var/sheetAmount = 7
var/openSound = 'sound/effects/stonedoor_openclose.ogg'
var/closeSound = 'sound/effects/stonedoor_openclose.ogg'
var/damageSound = null
/obj/structure/mineral_door/New(location)
..()
icon_state = mineralType
name = "[mineralType] door"
initial_state = icon_state
/obj/structure/mineral_door/initialize()
..()
@@ -39,32 +42,38 @@
..()
if(!state)
return TryToSwitchState(user)
return
/obj/structure/mineral_door/attack_ai(mob/user as mob) //those aren't machinery, they're just big fucking slabs of a mineral
/obj/structure/mineral_door/attack_ai(mob/user) //those aren't machinery, they're just big fucking slabs of a mineral
if(isAI(user)) //so the AI can't open it
return
else if(isrobot(user)) //but cyborgs can
if(get_dist(user,src) <= 1) //not remotely though
return TryToSwitchState(user)
else if(isrobot(user) && Adjacent(user)) //but cyborgs can, but not remotely
return TryToSwitchState(user)
/obj/structure/mineral_door/attack_hand(mob/user as mob)
/obj/structure/mineral_door/attack_hand(mob/user)
return TryToSwitchState(user)
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group) return 0
/obj/structure/mineral_door/attack_animal(mob/user)
return TryToSwitchState(user)
/obj/structure/mineral_door/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
SwitchState()
/obj/structure/mineral_door/CanPass(atom/movable/mover, turf/target, height = 0)
if(istype(mover, /obj/effect/beam))
return !opacity
return !density
/obj/structure/mineral_door/CanAtmosPass()
/obj/structure/mineral_door/CanAtmosPass(turf/T)
return !density
/obj/structure/mineral_door/proc/TryToSwitchState(atom/user)
if(isSwitchingStates) return
if(ismob(user))
var/mob/M = user
if(world.time - user.last_bumped <= 60) return //NOTE do we really need that?
if(isSwitchingStates)
return
if(isliving(user))
var/mob/living/M = user
if(world.time - user.last_bumped <= 60)
return //NOTE do we really need that?
if(M.client)
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -83,211 +92,175 @@
/obj/structure/mineral_door/proc/Open()
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]opening",src)
playsound(loc, openSound, 100, 1)
flick("[initial_state]opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
air_update_turf(1)
update_icon()
isSwitchingStates = 0
air_update_turf(1)
if(close_delay != -1)
spawn(close_delay)
Close()
/obj/structure/mineral_door/proc/Close()
if(isSwitchingStates || state != 1)
return
var/turf/T = get_turf(src)
for(var/mob/living/L in T)
return
isSwitchingStates = 1
playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 100, 1)
flick("[mineralType]closing",src)
playsound(loc, closeSound, 100, 1)
flick("[initial_state]closing",src)
sleep(10)
density = 1
opacity = 1
state = 0
air_update_turf(1)
update_icon()
isSwitchingStates = 0
air_update_turf(1)
/obj/structure/mineral_door/update_icon()
if(state)
icon_state = "[mineralType]open"
icon_state = "[initial_state]open"
else
icon_state = mineralType
icon_state = initial_state
/obj/structure/mineral_door/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/weapon/pickaxe))
/obj/structure/mineral_door/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/pickaxe))
var/obj/item/weapon/pickaxe/digTool = W
to_chat(user, "You start digging the [name].")
if(do_after(user,digTool.digspeed * hardness, target = src) && src)
to_chat(user, "You finished digging.")
Dismantle()
else if(istype(W,/obj/item/weapon)) //not sure, can't not just weapons get passed to this proc?
hardness -= W.force/100
to_chat(user, "You hit the [name] with your [W.name]!")
CheckHardness()
else
to_chat(user, "<span class='notice'>You start digging \the [src].</span>")
if(do_after(user, digTool.digspeed * hardness, target = src) && src)
to_chat(user, "<span class='notice'>You finished digging.</span>")
deconstruct(TRUE)
else if(user.a_intent != I_HARM)
attack_hand(user)
return
else
attacked_by(W, user)
/obj/structure/mineral_door/proc/attacked_by(obj/item/I, mob/user)
if(I.damtype != STAMINA)
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
visible_message("<span class='notice'>[user] hits \the [src] with \the [I].</span>")
if(damageSound)
playsound(loc, damageSound, 100, 1)
else
playsound(loc, I.hitsound, 100, 1)
hardness -= I.force / 100
CheckHardness()
/obj/structure/mineral_door/proc/CheckHardness()
if(hardness <= 0)
Dismantle(1)
deconstruct(FALSE)
/obj/structure/mineral_door/proc/Dismantle(devastated = 0)
if(!devastated)
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
/obj/structure/mineral_door/proc/deconstruct(disassembled = TRUE)
var/turf/T = get_turf(src)
if(sheetType)
if(disassembled)
new sheetType(T, sheetAmount)
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 1, i <= oreAmount, i++)
new ore(get_turf(src))
else
if(mineralType == "metal")
var/ore = /obj/item/stack/sheet/metal
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
else
var/ore = text2path("/obj/item/stack/sheet/mineral/[mineralType]")
for(var/i = 3, i <= oreAmount, i++)
new ore(get_turf(src))
new sheetType(T, max(sheetAmount - 2, 1))
qdel(src)
/obj/structure/mineral_door/ex_act(severity = 1)
switch(severity)
if(1)
Dismantle(1)
deconstruct(FALSE)
if(2)
if(prob(20))
Dismantle(1)
deconstruct(FALSE)
else
hardness--
CheckHardness()
if(3)
hardness -= 0.1
CheckHardness()
return
/obj/structure/mineral_door/iron
mineralType = "metal"
hardness = 3
/obj/structure/mineral_door/silver
mineralType = "silver"
name = "silver door"
icon_state = "silver"
sheetType = /obj/item/stack/sheet/mineral/silver
hardness = 3
/obj/structure/mineral_door/gold
mineralType = "gold"
name = "gold door"
icon_state = "gold"
sheetType = /obj/item/stack/sheet/mineral/gold
/obj/structure/mineral_door/uranium
mineralType = "uranium"
name = "uranium door"
icon_state = "uranium"
sheetType = /obj/item/stack/sheet/mineral/uranium
hardness = 3
light_range = 2
/obj/structure/mineral_door/sandstone
mineralType = "sandstone"
name = "sandstone door"
icon_state = "sandstone"
sheetType = /obj/item/stack/sheet/mineral/sandstone
hardness = 0.5
/obj/structure/mineral_door/transparent
opacity = 0
Close()
..()
set_opacity(0)
/obj/structure/mineral_door/transparent/Close()
..()
set_opacity(0)
/obj/structure/mineral_door/transparent/plasma
mineralType = "plasma"
name = "plasma door"
icon_state = "plasma"
sheetType = /obj/item/stack/sheet/mineral/plasma
attackby(obj/item/weapon/W as obj, mob/user as mob)
if(is_hot(W))
message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma mineral door ignited by [key_name(user)] in ([x],[y],[z])")
TemperatureAct(100)
..()
/obj/structure/mineral_door/transparent/plasma/attackby(obj/item/weapon/W, mob/user)
if(is_hot(W))
message_admins("Plasma mineral door ignited by [key_name_admin(user)] in ([x], [y], [z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)", 0, 1)
log_game("Plasma mineral door ignited by [key_name(user)] in ([x], [y], [z])")
TemperatureAct(100)
else
return ..()
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
/obj/structure/mineral_door/transparent/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 300)
TemperatureAct(exposed_temperature)
proc/TemperatureAct(temperature)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
hardness = 0
CheckHardness()
/obj/structure/mineral_door/transparent/plasma/proc/TemperatureAct(temperature)
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
deconstruct(FALSE)
/obj/structure/mineral_door/transparent/diamond
mineralType = "diamond"
name = "diamond door"
icon_state = "diamond"
sheetType = /obj/item/stack/sheet/mineral/diamond
hardness = 10
/obj/structure/mineral_door/wood
mineralType = "wood"
name = "wood door"
icon_state = "wood"
openSound = 'sound/effects/doorcreaky.ogg'
closeSound = 'sound/effects/doorcreaky.ogg'
sheetType = /obj/item/stack/sheet/wood
hardness = 1
burn_state = FLAMMABLE
burntime = 30
Open()
isSwitchingStates = 1
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
set_opacity(0)
state = 1
update_icon()
isSwitchingStates = 0
Close()
isSwitchingStates = 1
playsound(loc, 'sound/effects/doorcreaky.ogg', 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
set_opacity(1)
state = 0
update_icon()
isSwitchingStates = 0
Dismantle(devastated = 0)
if(!devastated)
for(var/i = 1, i <= oreAmount, i++)
new/obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
/obj/structure/mineral_door/resin
mineralType = "resin"
name = "resin door"
icon_state = "resin"
hardness = 1.5
var/close_delay = 100
close_delay = 100
openSound = 'sound/effects/attackblob.ogg'
closeSound = 'sound/effects/attackblob.ogg'
damageSound = 'sound/effects/attackblob.ogg'
sheetType = null
TryToSwitchState(atom/user)
if(isalien(user))
return ..()
Open()
isSwitchingStates = 1
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
flick("[mineralType]opening",src)
sleep(10)
density = 0
set_opacity(0)
state = 1
update_icon()
isSwitchingStates = 0
spawn(close_delay)
if(!isSwitchingStates && state == 1)
Close()
Close()
isSwitchingStates = 1
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
flick("[mineralType]closing",src)
sleep(10)
density = 1
set_opacity(1)
state = 0
update_icon()
isSwitchingStates = 0
Dismantle(devastated = 0)
qdel(src)
CheckHardness()
playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
..()
/obj/structure/mineral_door/resin/TryToSwitchState(atom/user)
if(isalien(user))
return ..()
+7 -1
View File
@@ -84,22 +84,28 @@
var/active = FALSE
var/ghost_alert_delay = 30 SECONDS
var/last_ghost_alert
var/alert_title = "Ethereal Beacon Active!"
var/atom/attack_atom
/obj/structure/ghost_beacon/initialize()
. = ..()
last_ghost_alert = world.time
attack_atom = src
if(active)
processing_objects.Add(src)
/obj/structure/ghost_beacon/Destroy()
if(active)
processing_objects.Remove(src)
attack_atom = null
return ..()
/obj/structure/ghost_beacon/attack_ghost(mob/dead/observer/user)
if(user.can_advanced_admin_interact())
attack_hand(user)
else if(attack_atom != src)
attack_atom.attack_ghost(user)
/obj/structure/ghost_beacon/attack_hand(mob/user)
if(!is_admin(user))
@@ -113,5 +119,5 @@
/obj/structure/ghost_beacon/process()
if(last_ghost_alert + ghost_alert_delay < world.time)
notify_ghosts("[src] active in [get_area(src)].", 'sound/effects/ghost2.ogg', source = src)
notify_ghosts("[src] active in [get_area(src)].", 'sound/effects/ghost2.ogg', title = alert_title, source = attack_atom, action = (attack_atom == src ? NOTIFY_JUMP : NOTIFY_ATTACK))
last_ghost_alert = world.time
@@ -8,6 +8,7 @@
var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite
/obj/structure/mopbucket/New()
..()
create_reagents(100)
janitorial_equipment += src
+12 -10
View File
@@ -58,16 +58,18 @@
qdel(src)
else if(iswelder(W) && !anchored)
playsound(loc, W.usesound, 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc)
return
playsound(loc, W.usesound, 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(TRUE)
var/obj/item/weapon/weldingtool/WT = W
if(WT.remove_fuel(0, user))
playsound(loc, W.usesound, 40, 1)
user.visible_message("[user] is slicing apart the [name].", \
"<span class='notice'>You are slicing apart the [name]...</span>")
if(do_after(user, 40 * W.toolspeed, target = src))
if(!loc)
return
playsound(loc, W.usesound, 50, 1)
user.visible_message("[user] slices apart the [name].", \
"<span class='notice'>You slice apart the [name]!</span>")
Dismantle(TRUE)
else
hardness -= W.force/100
..()
@@ -15,6 +15,7 @@
buckle_lying = 1
burn_state = FLAMMABLE
burntime = 30
buildstackamount = 2
var/movable = 0 // For mobility checks
/obj/structure/stool/bed/MouseDrop(atom/over_object)
@@ -24,23 +25,38 @@
name = "psych bed"
desc = "For prime comfort during psychiatric evaluations."
icon_state = "psychbed"
buildstackamount = 5
can_buckle = 1
buckle_lying = 1
/obj/structure/stool/bed/dogbed
name = "dog bed"
icon_state = "dogbed"
desc = "A comfy-looking dog bed. You can even strap your pet in, in case the gravity turns off."
anchored = 0
buildstackamount = 10
buildstacktype = /obj/item/stack/sheet/wood
/obj/structure/stool/bed/dogbed/ian
name = "Ian's bed"
desc = "Ian's bed! Looks comfy."
anchored = 1
/obj/structure/stool/bed/alien
name = "resting contraption"
desc = "This looks similar to contraptions from earth. Could aliens be stealing our technology?"
desc = "This looks similar to contraptions from Earth. Could aliens be stealing our technology?"
icon_state = "abed"
/obj/structure/stool/bed/proc/handle_rotation()
return
/obj/structure/stool/bed/attack_animal(var/mob/living/simple_animal/M)//No more buckling hostile mobs to chairs to render them immobile forever
if(M.environment_smash)
new /obj/item/stack/sheet/metal(src.loc)
/obj/structure/stool/bed/attack_animal(mob/living/simple_animal/user)
if(user.environment_smash)
user.do_attack_animation(src)
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
new buildstacktype(loc, buildstackamount)
qdel(src)
/*
* Roller beds
*/
@@ -56,7 +72,7 @@
if(buckled_mob)
user_unbuckle_mob(user)
else
user.visible_message("<span class='notice'>[user] collapses \the [src.name].</span>", "<span class='notice'>You collapse \the [src.name].</span>")
user.visible_message("<span class='notice'>[user] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
new/obj/item/roller(get_turf(src))
qdel(src)
return
@@ -72,7 +88,6 @@
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
/obj/item/roller
name = "roller bed"
desc = "A collapsed roller bed that can be carried around."
@@ -80,7 +95,6 @@
icon_state = "folded"
w_class = 4 // Can't be put in backpacks.
/obj/item/roller/attack_self(mob/user)
var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc)
R.add_fingerprint(user)
@@ -90,8 +104,8 @@
if(istype(W, /obj/item/roller_holder))
var/obj/item/roller_holder/RH = W
if(!RH.held)
user.visible_message("<span class='notice'>[user] collects \the [src.name].</span>", "<span class='notice'>You collect \the [src.name].</span>")
src.forceMove(RH)
user.visible_message("<span class='notice'>[user] collects \the [name].</span>", "<span class='notice'>You collect \the [name].</span>")
forceMove(RH)
RH.held = src
/obj/structure/stool/bed/roller/MouseDrop(over_object, src_location, over_location)
@@ -101,13 +115,11 @@
return
if(buckled_mob)
return 0
usr.visible_message("<span class='notice'>[usr] collapses \the [src.name].</span>", "<span class='notice'>You collapse \the [src.name].</span>")
usr.visible_message("<span class='notice'>[usr] collapses \the [name].</span>", "<span class='notice'>You collapse \the [name].</span>")
new/obj/item/roller(get_turf(src))
qdel(src)
return
/obj/item/roller_holder
name = "roller bed rack"
desc = "A rack for carrying a collapsed roller bed."
@@ -4,6 +4,7 @@
icon_state = "chair"
buckle_lying = 0 //you sit in a chair, not lay
burn_state = FIRE_PROOF
buildstackamount = 1
var/propelled = 0 // Check for fire-extinguisher-driven chairs
@@ -82,6 +83,8 @@
/obj/structure/stool/bed/chair/wood
burn_state = FLAMMABLE
burntime = 20
buildstackamount = 3
buildstacktype = /obj/item/stack/sheet/wood
// TODO: Special ash subtype that looks like charred chair legs
/obj/structure/stool/bed/chair/wood/narsie_act()
@@ -97,16 +100,6 @@
name = "wooden chair"
desc = "Old is never too old to not be in fashion."
/obj/structure/stool/bed/chair/wood/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
new /obj/item/stack/sheet/wood(get_turf(src))
qdel(src)
else
..()
/obj/structure/stool/bed/chair/comfy
name = "comfy chair"
desc = "It looks comfy."
@@ -114,6 +107,7 @@
color = rgb(255,255,255)
burn_state = FLAMMABLE
burntime = 30
buildstackamount = 2
var/image/armrest = null
/obj/structure/stool/bed/chair/comfy/New()
@@ -158,15 +152,7 @@
/obj/structure/stool/bed/chair/office
anchored = 0
movable = 1
/obj/structure/stool/bed/chair/comfy/attackby(obj/item/weapon/W, mob/user, params)
if(iswrench(W))
playsound(loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(get_turf(src))
new /obj/item/stack/sheet/metal(get_turf(src))
qdel(src)
else
..()
buildstackamount = 5
/obj/structure/stool/bed/chair/office/Bump(atom/A)
..()
@@ -196,11 +182,13 @@
/obj/structure/stool/bed/chair/barber
icon_state = "barber_chair"
buildstackamount = 1
/obj/structure/stool/bed/chair/sofa
name = "old ratty sofa"
icon_state = "sofamiddle"
anchored = 1
buildstackamount = 1
/obj/structure/stool/bed/chair/sofa/left
icon_state = "sofaend_left"
@@ -4,6 +4,8 @@
icon = 'icons/obj/objects.dmi'
icon_state = "stool"
anchored = 1.0
var/buildstackamount = 1
var/buildstacktype = /obj/item/stack/sheet/metal
/obj/structure/stool/ex_act(severity)
switch(severity)
@@ -12,25 +14,25 @@
return
if(2.0)
if(prob(70))
new /obj/item/stack/sheet/metal(src.loc)
new buildstacktype(loc, buildstackamount)
qdel(src)
return
if(3.0)
if(prob(50))
new /obj/item/stack/sheet/metal(src.loc)
new buildstacktype(loc, buildstackamount)
qdel(src)
return
return
/obj/structure/stool/blob_act()
if(prob(75))
new /obj/item/stack/sheet/metal(src.loc)
new buildstacktype(loc, buildstackamount)
qdel(src)
/obj/structure/stool/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/weapon/wrench))
playsound(src.loc, W.usesound, 50, 1)
new /obj/item/stack/sheet/metal(src.loc)
playsound(loc, W.usesound, 50, 1)
new buildstacktype(loc, buildstackamount)
qdel(src)
/obj/structure/stool/MouseDrop(atom/over_object, src_location, over_location, src_control, over_control, params, skip_fucking_stool_shit = 0)
@@ -41,7 +43,7 @@
if(H==usr && !H.restrained() && !H.stat && in_range(src, over_object))
var/obj/item/weapon/stool/S = new/obj/item/weapon/stool()
S.origin = src
src.loc = S
loc = S
H.put_in_hands(S)
H.visible_message("<span class='warning'>[H] grabs [src] from the floor!</span>", "<span class='warning'>You grab [src] from the floor!</span>")
+4 -4
View File
@@ -126,8 +126,8 @@
/obj/structure/table/attack_tk() // no telehulk sorry
return
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(istype(mover,/obj/item/projectile))
return (check_cover(mover,target))
if(ismob(mover))
@@ -557,8 +557,8 @@
qdel(src)
return
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
if(air_group || (height==0)) return 1
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0) return 1
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
return 1
if(istype(mover) && mover.checkpass(PASSTABLE))
+40 -35
View File
@@ -8,45 +8,50 @@
flags = CONDUCT
var/obj/item/target/pinned_target // the current pinned target
Move()
..()
// Move the pinned target along with the stake
if(pinned_target in view(3, src))
pinned_target.loc = loc
/obj/structure/target_stake/Destroy()
if(pinned_target)
qdel(pinned_target)
pinned_target = null
return ..()
else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null
density = 1
/obj/structure/target_stake/Move()
..()
// Move the pinned target along with the stake
if(pinned_target in view(3, src))
pinned_target.loc = loc
attackby(obj/item/W as obj, mob/user as mob, params)
// Putting objects on the stake. Most importantly, targets
if(pinned_target)
return // get rid of that pinned target first!
else // Sanity check: if the pinned target can't be found in immediate view
pinned_target = null
density = 1
if(istype(W, /obj/item/target))
density = 0
W.density = 1
user.drop_item(src)
W.loc = loc
W.layer = 3.1
pinned_target = W
to_chat(user, "You slide the target into the stake.")
return
/obj/structure/target_stake/attackby(obj/item/W, mob/user, params)
// Putting objects on the stake. Most importantly, targets
if(pinned_target)
return // get rid of that pinned target first!
attack_hand(mob/user as mob)
// taking pinned targets off!
if(pinned_target)
density = 1
pinned_target.density = 0
pinned_target.layer = OBJ_LAYER
if(istype(W, /obj/item/target))
density = 0
W.density = 1
user.drop_item(src)
W.loc = loc
W.layer = 3.1
pinned_target = W
to_chat(user, "You slide the target into the stake.")
pinned_target.loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
to_chat(user, "You take the target out of the stake.")
else
pinned_target.loc = get_turf(user)
/obj/structure/target_stake/attack_hand(mob/user)
// taking pinned targets off!
if(pinned_target)
density = 1
pinned_target.density = 0
pinned_target.layer = OBJ_LAYER
pinned_target.loc = user.loc
if(ishuman(user))
if(!user.get_active_hand())
user.put_in_hands(pinned_target)
to_chat(user, "You take the target out of the stake.")
else
pinned_target.loc = get_turf(user)
to_chat(user, "You take the target out of the stake.")
pinned_target = null
pinned_target = null
@@ -14,9 +14,13 @@
/obj/structure/toilet/New()
..()
open = round(rand(0, 1))
update_icon()
/obj/structure/toilet/Destroy()
swirlie = null
return ..()
/obj/structure/toilet/attack_hand(mob/living/user)
if(swirlie)
@@ -34,6 +34,9 @@ obj/structure/windoor_assembly/New(dir=NORTH)
obj/structure/windoor_assembly/Destroy()
density = 0
if(electronics)
qdel(electronics)
electronics = null
air_update_turf(1)
return ..()
@@ -45,11 +48,10 @@ obj/structure/windoor_assembly/Destroy()
/obj/structure/windoor_assembly/update_icon()
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
if(air_group) return 0
return !density
else
return 1
+17 -16
View File
@@ -90,7 +90,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return !density
return 1
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
/obj/structure/window/CanPass(atom/movable/mover, turf/target, height=0)
if(istype(mover) && mover.checkpass(PASSGLASS))
return 1
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
@@ -108,21 +108,22 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return 1
/obj/structure/window/hitby(AM as mob|obj)
..()
var/tforce = 0
if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
health = max(0, health - tforce)
if(health <= 7 && !reinf)
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
if(health <= 0)
destroy()
/obj/structure/window/hitby(atom/movable/AM)
if(!CanPass(AM, get_step(src, AM.dir))) //So thrown objects that cross a tile with non-full windows will no longer hit the window even if it isn't visually obstructing the path.
..()
var/tforce = 0
if(isobj(AM))
var/obj/item/I = AM
tforce = I.throwforce
if(reinf) tforce *= 0.25
playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
health = max(0, health - tforce)
if(health <= 7 && !reinf)
anchored = 0
update_nearby_icons()
step(src, get_dir(AM, src))
if(health <= 0)
destroy()
/obj/structure/window/attack_hand(mob/user as mob)