mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Final merge
Merge branch 'development-2' into development # Conflicts: # baystation12.dme # code/_helpers/icons.dm # code/controllers/master_controller.dm # code/game/machinery/Sleeper.dm # code/game/machinery/computer3/laptop.dm # code/game/machinery/doors/door.dm # code/game/machinery/floorlayer.dm # code/game/machinery/vending.dm # code/game/mecha/mech_fabricator.dm # code/game/objects/effects/decals/contraband.dm # code/game/objects/explosion.dm # code/game/objects/items/robot/robot_upgrades.dm # code/game/objects/items/weapons/melee/misc.dm # code/game/objects/items/weapons/storage/boxes.dm # code/game/objects/structures/crates_lockers/closets/secure/security.dm # code/game/objects/structures/window.dm # code/modules/clothing/spacesuits/rig/rig.dm # code/modules/clothing/suits/jobs.dm # code/modules/mob/freelook/update_triggers.dm # code/modules/mob/living/carbon/human/human_defense.dm # code/modules/mob/living/carbon/human/human_movement.dm # code/modules/mob/living/carbon/human/life.dm # code/modules/mob/living/carbon/human/species/species.dm # code/modules/mob/living/carbon/human/species/station/station.dm # code/modules/mob/living/living_defines.dm # code/modules/mob/mob_helpers.dm # code/modules/mob/mob_movement.dm # code/modules/projectiles/ammunition/boxes.dm # nano/templates/sleeper.tmpl
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// baystation12 posters
|
||||
// aurora station posters
|
||||
/datum/poster/bay_1
|
||||
icon_state="bsposter1"
|
||||
name = "Unlucky Space Explorer"
|
||||
@@ -286,5 +286,45 @@
|
||||
|
||||
/datum/poster/bay_58
|
||||
icon_state="bsposter58"
|
||||
name = "space carp information poster"
|
||||
desc = "This poster showcases an old spacer saying on the dangers of migrant space carp."
|
||||
name = "space bear information poster"
|
||||
desc = "This poster displays a picture of a legendary space bear."
|
||||
|
||||
/datum/poster/bay_59
|
||||
icon_state = "bsposter59"
|
||||
name = "ATLAS poster"
|
||||
desc = "ATLAS: For all of Humanity."
|
||||
|
||||
/datum/poster/bay_60
|
||||
icon_state = "bsposter60"
|
||||
name = "N.S.S. Aurora"
|
||||
desc = "This poster is a picture of the old, now defunct, N.S.S. Aurora. Commissioned in 2454 and decommissioned in the early days of 2458."
|
||||
|
||||
/datum/poster/bay_61
|
||||
icon_state = "bsposter61"
|
||||
name = "Xenobiology Safety Protocols"
|
||||
desc = "This posters warms the crew about the dangers of xenobiology outbreaks."
|
||||
|
||||
/datum/poster/bay_62
|
||||
icon_state = "bsposter62"
|
||||
name = "Xenobiology Division"
|
||||
desc = "This one depicts a green skrell research director doing autopsy on an alien lifeform."
|
||||
|
||||
/datum/poster/bay_63
|
||||
icon_state = "bsposter63"
|
||||
name = "Suit Sensors"
|
||||
desc = "This particular one depicts a female doctor tending to an injured crewmember. It says; \"Remember to enable your suit sensors!\"."
|
||||
|
||||
/datum/poster/bay_64
|
||||
icon_state = "bsposter64"
|
||||
name = "Maintenance Drones"
|
||||
desc = "This particular one depicts a maintenance drone. It reminders the crew to don't disturb them when they are doing repairs."
|
||||
|
||||
/datum/poster/bay_65
|
||||
icon_state = "bsposter65"
|
||||
name = "Importance of Plasma"
|
||||
desc = "A corporate morale poster showing three forms of plasma. Teaching the very basics of this really important substance."
|
||||
|
||||
/datum/poster/bay_66
|
||||
icon_state = "bsposter66"
|
||||
name = "BFG 9000"
|
||||
desc = "A picture of a big freakin' gun."
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, adminlog = 1, z_transfer = UP|DOWN)
|
||||
src = null //so we don't abort once src is deleted
|
||||
spawn(0)
|
||||
var/power = max(0,devastation_range) * 2 + max(0,heavy_impact_range) + max(0,light_impact_range)
|
||||
if(config.use_recursive_explosions)
|
||||
var/power = devastation_range * 2 + heavy_impact_range + light_impact_range //The ranges add up, ie light 14 includes both heavy 7 and devestation 3. So this calculation means devestation counts for 4, heavy for 2 and light for 1 power, giving us a cap of 27 power.
|
||||
explosion_rec(epicenter, power)
|
||||
return
|
||||
|
||||
@@ -28,30 +28,73 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
var/far_dist = 0
|
||||
far_dist += heavy_impact_range * 5
|
||||
far_dist += devastation_range * 20
|
||||
// Play sounds; we want sounds to be different depending on distance so we will manually do it ourselves.
|
||||
|
||||
// Stereo users will also hear the direction of the explosion!
|
||||
|
||||
// Calculate far explosion sound range. Only allow the sound effect for heavy/devastating explosions.
|
||||
|
||||
// 3/7/14 will calculate to 80 + 35
|
||||
var/volume = 10 + (power * 20)
|
||||
|
||||
var/frequency = get_rand_frequency()
|
||||
for(var/mob/M in player_list)
|
||||
// Double check for client
|
||||
if(M && M.client)
|
||||
var/turf/M_turf = get_turf(M)
|
||||
if(M_turf && M_turf.z == epicenter.z)
|
||||
var/dist = get_dist(M_turf, epicenter)
|
||||
// If inside the blast radius + world.view - 2
|
||||
if(dist <= round(max_range + world.view - 2, 1))
|
||||
M.playsound_local(epicenter, get_sfx("explosion"), 100, 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
|
||||
var/closedist = round(max_range + world.view - 2, 1)
|
||||
|
||||
//You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
|
||||
//Whether or not this explosion causes enough vibration to send sound or shockwaves through the station
|
||||
var/vibration = 1
|
||||
if (istype(epicenter,/turf/space))
|
||||
vibration = 0
|
||||
for (var/turf/T in range(src, max_range))
|
||||
if (!istype(T,/turf/space))
|
||||
//If there is a nonspace tile within the explosion radius
|
||||
//Then we can reverberate shockwaves through that, and allow it to be felt in a vacuum
|
||||
vibration = 1
|
||||
|
||||
else if(dist <= far_dist)
|
||||
var/far_volume = Clamp(far_dist, 30, 50) // Volume is based on explosion size and dist
|
||||
far_volume += (dist <= far_dist * 0.5 ? 50 : 0) // add 50 volume if the mob is pretty close to the explosion
|
||||
M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', far_volume, 1, frequency, falloff = 5)
|
||||
if (vibration)
|
||||
for(var/mob/M in player_list)
|
||||
// Double check for client
|
||||
var/reception = 2//Whether the person can be shaken or hear sound
|
||||
//2 = BOTH
|
||||
//1 = shockwaves only
|
||||
//0 = no effect
|
||||
if(M && M.client)
|
||||
var/turf/M_turf = get_turf(M)
|
||||
|
||||
|
||||
|
||||
if(M_turf && M_turf.z == epicenter.z)
|
||||
if (istype(M_turf,/turf/space))
|
||||
//If the person is standing in space, they wont hear
|
||||
//But they may still feel the shaking
|
||||
reception = 0
|
||||
for (var/turf/T in range(M, 1))
|
||||
if (!istype(T,/turf/space))
|
||||
//If theyre touching the hull or on some extruding part of the station
|
||||
reception = 1//They will get screenshake
|
||||
break
|
||||
|
||||
if (!reception)
|
||||
continue
|
||||
|
||||
var/dist = get_dist(M_turf, epicenter)
|
||||
if (reception == 2 && (M.ear_deaf <= 0 || !M.ear_deaf))//Dont play sounds to deaf people
|
||||
// If inside the blast radius + world.view - 2
|
||||
if(dist <= closedist)
|
||||
M.playsound_local(epicenter, get_sfx("explosion"), min(100, volume), 1, frequency, falloff = 5) // get_sfx() is so that everyone gets the same sound
|
||||
//You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
|
||||
|
||||
else
|
||||
volume = M.playsound_local(epicenter, 'sound/effects/explosionfar.ogg', volume, 1, frequency, usepressure = 0, falloff = 1000)
|
||||
//Playsound local will return the final volume the sound is actually played at
|
||||
//It will return 0 if the sound volume falls to 0 due to falloff or pressure
|
||||
//Also return zero if sound playing failed for some other reason
|
||||
|
||||
//Deaf people will feel vibrations though
|
||||
if (volume > 0)//Only shake camera if someone was close enough to hear it
|
||||
shake_camera(M, min(60,max(2,(power*18) / dist)), min(3.5,((power*3) / dist)),0.05)
|
||||
//Maximum duration is 6 seconds, and max strength is 3.5
|
||||
//Becuse values higher than those just get really silly
|
||||
|
||||
var/close = range(world.view+round(devastation_range,1), epicenter)
|
||||
// to all distanced mobs play a different sound
|
||||
for(var/mob/M in world) if(M.z == epicenter.z) if(!(M in close))
|
||||
// check if the mob can hear
|
||||
if(M.ear_deaf <= 0 || !M.ear_deaf) if(!istype(M.loc,/turf/space))
|
||||
M << 'sound/effects/explosionfar.ogg'
|
||||
if(adminlog)
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
|
||||
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
||||
@@ -104,7 +147,6 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
proc/secondaryexplosion(turf/epicenter, range)
|
||||
for(var/turf/tile in range(range, epicenter))
|
||||
tile.ex_act(2)
|
||||
|
||||
@@ -243,6 +243,7 @@
|
||||
// note this isn't called during the initial dressing of a player
|
||||
/obj/item/proc/equipped(var/mob/user, var/slot)
|
||||
layer = 20
|
||||
equip_slot = slot
|
||||
if(user.client) user.client.screen |= src
|
||||
if(user.pulling == src) user.stop_pulling()
|
||||
return
|
||||
@@ -654,3 +655,47 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
|
||||
/obj/item/proc/pwr_drain()
|
||||
return 0 // Process Kill
|
||||
|
||||
|
||||
//a proc that any worn thing can call to update its itemstate
|
||||
//Should be cheaper than calling regenerate icons on the mob
|
||||
/obj/item/proc/update_worn_icon()
|
||||
if (!equip_slot || !istype(loc, /mob))
|
||||
return
|
||||
|
||||
var/mob/M = loc
|
||||
switch (equip_slot)
|
||||
if (slot_back)
|
||||
M.update_inv_back()
|
||||
if (slot_wear_mask)
|
||||
M.update_inv_wear_mask()
|
||||
if (slot_l_hand)
|
||||
M.update_inv_l_hand()
|
||||
if (slot_r_hand)
|
||||
M.update_inv_r_hand()
|
||||
if (slot_belt)
|
||||
M.update_inv_belt()
|
||||
if (slot_wear_id)
|
||||
M.update_inv_wear_id()
|
||||
if (slot_l_ear)
|
||||
M.update_inv_ears()
|
||||
if (slot_r_ear)
|
||||
M.update_inv_ears()
|
||||
if (slot_glasses)
|
||||
M.update_inv_glasses()
|
||||
if (slot_gloves)
|
||||
M.update_inv_gloves()
|
||||
if (slot_head)
|
||||
M.update_inv_head()
|
||||
if (slot_shoes)
|
||||
M.update_inv_shoes()
|
||||
if (slot_wear_suit)
|
||||
M.update_inv_wear_suit()
|
||||
if (slot_w_uniform)
|
||||
M.update_inv_w_uniform()
|
||||
if (slot_l_store)
|
||||
M.update_inv_pockets()
|
||||
if (slot_r_store)
|
||||
M.update_inv_pockets()
|
||||
if (slot_s_store)
|
||||
M.update_inv_s_store()
|
||||
|
||||
@@ -343,7 +343,8 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
return id
|
||||
|
||||
/obj/item/device/pda/AltClick(var/mob/user)
|
||||
verb_remove_id()
|
||||
if (ismob(src.loc))
|
||||
verb_remove_id()
|
||||
|
||||
/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location)
|
||||
var/mob/M = usr
|
||||
|
||||
@@ -271,7 +271,15 @@
|
||||
on = 0
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/flashlight/glowstick/attack_self(mob/user)
|
||||
/obj/item/device/flashlight/glowstick/attack_self(var/mob/living/user)
|
||||
|
||||
if(((CLUMSY in user.mutations)) && prob(50))
|
||||
user << "<span class='notice'>You break \the [src] apart, spilling its contents everywhere!</span>"
|
||||
fuel = 0
|
||||
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
|
||||
user.apply_effect((rand(15,30)),IRRADIATE,blocked = user.getarmor(null, "rad"))
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!fuel)
|
||||
user << "<span class='notice'>\The [src] has already been used.</span>"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#define STATUS_INACTIVE 0
|
||||
#define STATUS_ACTIVE 1
|
||||
#define STATUS_BROKEN 2
|
||||
#define STATUS_BROKEN -1
|
||||
|
||||
#define LAYER_ATTACHED 3.2
|
||||
#define LAYER_NORMAL 3
|
||||
@@ -8,50 +8,75 @@
|
||||
/obj/item/device/magnetic_lock
|
||||
name = "magnetic door lock"
|
||||
desc = "A large, ID locked device used for completely locking down airlocks."
|
||||
icon = 'icons/obj/magnetic_locks/centcom.dmi'
|
||||
icon_state = "inactive"
|
||||
icon = 'icons/obj/magnetic_locks.dmi'
|
||||
icon_state = "inactive_CENTCOM"
|
||||
//icon_state = "inactive"
|
||||
w_class = 3
|
||||
req_access = list(103)
|
||||
req_access = list(access_cent_specops)
|
||||
health = 90
|
||||
|
||||
var/department = "CENTCOM"
|
||||
var/status = 0
|
||||
var/locked = 1
|
||||
var/hacked = 0
|
||||
var/constructionstate = 0
|
||||
var/drainamount = 20
|
||||
var/drain_per_second = 3
|
||||
var/last_process_time = 0
|
||||
var/obj/machinery/door/airlock/target_node1 = null
|
||||
var/obj/machinery/door/airlock/target_node2 = null
|
||||
var/obj/machinery/door/airlock/target = null
|
||||
var/obj/item/weapon/cell/powercell
|
||||
var/obj/item/weapon/cell/internal_cell
|
||||
|
||||
/obj/item/device/magnetic_lock/security
|
||||
icon = 'icons/obj/magnetic_locks/security.dmi'
|
||||
department = "Security"
|
||||
req_access = list(1)
|
||||
icon_state = "inactive_Security"
|
||||
req_access = list(access_security)
|
||||
|
||||
/obj/item/device/magnetic_lock/engineering
|
||||
icon = 'icons/obj/magnetic_locks/engineering.dmi'
|
||||
department = "Engineering"
|
||||
icon_state = "inactive_Engineering"
|
||||
req_access = null
|
||||
req_one_access = list(11, 24)
|
||||
req_one_access = list(access_engine_equip, access_atmospherics)
|
||||
|
||||
/obj/item/device/magnetic_lock/New()
|
||||
..()
|
||||
|
||||
powercell = new /obj/item/weapon/cell/high()
|
||||
internal_cell = new /obj/item/weapon/cell/device()
|
||||
|
||||
/obj/item/device/magnetic_lock/examine()
|
||||
..()
|
||||
if (istext(department))
|
||||
desc += " It is painted with [department] colors."
|
||||
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/magnetic_lock/examine(mob/user)
|
||||
..(user)
|
||||
|
||||
if (status == STATUS_BROKEN)
|
||||
usr << "<span class='danger'>It looks broken!</span>"
|
||||
user << "<span class='danger'>It looks broken!</span>"
|
||||
else
|
||||
if (powercell)
|
||||
var/power = round(powercell.charge / powercell.maxcharge * 100)
|
||||
usr << "\blue The powercell is at [power]% charge."
|
||||
user << "<span class='notice'>The powercell is at [power]% charge.</span>"
|
||||
else
|
||||
usr << "\red It has no powercell to power it!"
|
||||
var/int_power = round(internal_cell.charge / internal_cell.maxcharge * 100)
|
||||
user << "<span class='warning'>It has no powercell to power it! Internal cell is at [int_power]% charge.</span>"
|
||||
|
||||
/obj/item/device/magnetic_lock/attack_hand(var/mob/user)
|
||||
if (status == STATUS_ACTIVE)
|
||||
ui_interact(user)
|
||||
add_fingerprint(user)
|
||||
if (constructionstate == 1 && powercell)
|
||||
powercell.update_icon()
|
||||
powercell.add_fingerprint(user)
|
||||
user.put_in_active_hand(powercell)
|
||||
user << "You remove \the [powercell]."
|
||||
powercell = null
|
||||
setconstructionstate(2)
|
||||
else if (anchored)
|
||||
if (!locked)
|
||||
detach()
|
||||
else
|
||||
user << "<span class='warning'>\The [src] is locked in place!</span>"
|
||||
else
|
||||
..()
|
||||
|
||||
@@ -64,6 +89,24 @@
|
||||
user << "<span class='danger'>[src] is broken beyond repair!</span>"
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
if (!constructionstate && !hacked)
|
||||
if (check_access(I))
|
||||
locked = !locked
|
||||
playsound(src, 'sound/machines/ping.ogg', 30, 1)
|
||||
var/msg = "[I] through \the [src] and it [locked ? "locks" : "unlocks"] with a beep."
|
||||
var/pos_adj = "[user.name] swipes \his "
|
||||
var/fp_adj = "You swipe your "
|
||||
user.visible_message("<span class='warning'>[addtext(pos_adj, msg)]</span>", "<span class='notice'>[addtext(fp_adj, msg)]</span>")
|
||||
update_icon()
|
||||
else
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1)
|
||||
user << span("warning", "\The [src] buzzes as you swipe your [I].")
|
||||
return
|
||||
else
|
||||
user << "<span class='danger'>You cannot swipe your [I] through [src] with it partially dismantled!</span>"
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/weapon) && user.a_intent == "hurt")
|
||||
if (I.force >= 8)
|
||||
user.visible_message("<span class='danger'>[user] bashes [src] with [I]!</span>", "<span class='danger'>You strike [src] with [I], damaging it!</span>")
|
||||
@@ -80,220 +123,283 @@
|
||||
emagcard.uses--
|
||||
visible_message("<span class='danger'>[src] sparks and falls off the door!</span>", "<span class='danger'>You emag [src], frying its circuitry[status == STATUS_ACTIVE ? " and making it drop onto the floor" : ""]!</span>")
|
||||
|
||||
setstatus(STATUS_BROKEN)
|
||||
status = STATUS_BROKEN
|
||||
if (target)
|
||||
detach()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (status == STATUS_ACTIVE && istype(I, /obj/item/weapon/card/id))
|
||||
if (check_access(I) && !constructionstate)
|
||||
user << "<span class='notice'>You swipe your [I] through [src], making it drop onto the floor with a thud.</span>"
|
||||
setstatus(STATUS_INACTIVE)
|
||||
return
|
||||
else if (constructionstate)
|
||||
user << "<span class='danger'>You cannot swipe your [I] through [src] with it partially dismantled!</span>"
|
||||
return
|
||||
else
|
||||
user << "<span class='danger'>A red light flashes on [src] as you swipe your [I] through it.</span>"
|
||||
flick("deny",src)
|
||||
if (iswelder(I))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if (WT.remove_fuel(2, user))
|
||||
user.visible_message(span("notice", "[user] starts welding the metal shell of [src]."), span("notice", "You start [hacked ? "repairing" : "welding open"] the metal covering of [src]."))
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
overlays += "overlay_welding"
|
||||
if (do_after(user, 25, 1))
|
||||
user << span("notice", "You are able to [hacked ? "repair" : "weld through"] the metal shell of [src].")
|
||||
if (hacked) locked = 1
|
||||
else locked = 0
|
||||
hacked = !hacked
|
||||
overlays -= "overlay_welding"
|
||||
else
|
||||
overlays -= "overlay_welding"
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You unfasten and remove the plastic cover from [src], revealing a thick metal shell.</span>"
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
setconstructionstate(1)
|
||||
if (iscrowbar(I))
|
||||
if (!locked)
|
||||
user << span("notice", "You pry the cover off [src].")
|
||||
setconstructionstate(1)
|
||||
else
|
||||
user << span("notice", "You try to pry the cover off [src] but it doesn't budge.</span>")
|
||||
return
|
||||
|
||||
if (1)
|
||||
if (istype(I, /obj/item/weapon/screwdriver))
|
||||
user << "<span class='notice'>You put the metal cover of back onto [src], and screw it tight.</span>"
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
if (istype(I, /obj/item/weapon/cell))
|
||||
if (powercell)
|
||||
user << span("notice","There's already a powercell in \the [src].")
|
||||
return
|
||||
|
||||
if (iscrowbar(I))
|
||||
user << span("notice", "You wedge the cover back in place.")
|
||||
setconstructionstate(0)
|
||||
return
|
||||
if (istype(I, /obj/item/weapon/cell))
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
powercell = I
|
||||
return
|
||||
if (istype(I, /obj/item/weapon/crowbar))
|
||||
if (isnull(powercell))
|
||||
user << "<span class='notice'>There is no powercell in \the [src].</span>"
|
||||
return
|
||||
user << "<span class='notice'>You remove \the [powercell] from \the [src].</span>"
|
||||
if (loc == user)
|
||||
powercell.forceMove(user.loc)
|
||||
else
|
||||
powercell.forceMove(loc)
|
||||
powercell = null
|
||||
return
|
||||
if (istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = I
|
||||
if (WT.remove_fuel(1, user))
|
||||
user.visible_message("<span class='notice'>[user] starts welding through the metal shell of [src].</span>", "<span class='notice'>You start welding through the metal covering of [src]</span>")
|
||||
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
|
||||
if (do_after(user, 25))
|
||||
user << "<span class='notice'>You are able to weld through the metal shell of [src].</span>"
|
||||
setconstructionstate(2)
|
||||
return
|
||||
|
||||
if (2)
|
||||
if (istype(I, /obj/item/weapon/crowbar))
|
||||
user << "<span class='notice'>You pry off the metal covering from [src].</span>"
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
|
||||
if (isscrewdriver(I))
|
||||
user << span("notice", "You unscrew and remove the wiring cover from \the [src].")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
setconstructionstate(3)
|
||||
return
|
||||
|
||||
if (iscrowbar(I))
|
||||
user << span("notice", "You wedge the cover back in place.")
|
||||
setconstructionstate(0)
|
||||
return
|
||||
|
||||
if (istype(I, /obj/item/weapon/cell))
|
||||
if (!powercell)
|
||||
user << span("notice","You place the [I] inside \the [src].")
|
||||
user.drop_item()
|
||||
I.loc = src
|
||||
powercell = I
|
||||
setconstructionstate(1)
|
||||
return
|
||||
|
||||
if (3)
|
||||
if (istype(I, /obj/item/weapon/wirecutters))
|
||||
user << "<span class='notice'>You cut the wires connecting the [src]'s magnets to their powersupply, [target ? "making the device fall off [target] and rendering it unusable." : "rendering the device unusable."]</span>"
|
||||
if (iswirecutter(I))
|
||||
user << span("notice", "You cut the wires connecting the [src]'s magnets to their internal powersupply, [target ? "making the device fall off [target] and rendering it unusable." : "rendering the device unusable."]")
|
||||
playsound(loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
setconstructionstate(4)
|
||||
return
|
||||
|
||||
/obj/item/device/magnetic_lock/process()
|
||||
if (powercell && powercell.charge > drainamount)
|
||||
powercell.charge -= drainamount
|
||||
else
|
||||
if (powercell)
|
||||
powercell.charge = 0
|
||||
visible_message("<span class='danger'>[src] beeps loudly and falls off \the [target]; its powercell having run out of power.</span>")
|
||||
setstatus(STATUS_INACTIVE)
|
||||
if (isscrewdriver(I))
|
||||
user << span("notice", "You replace and screw tight the wiring cover from \the [src].")
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
setconstructionstate(2)
|
||||
return
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/attachto(var/obj/machinery/door/airlock/newtarget, var/mob/user as mob)
|
||||
if (4)
|
||||
if (iswirecutter(I))
|
||||
user << span("notice", "You repair the wires connecting the [src]'s magnets to their internal powersupply")
|
||||
setconstructionstate(3)
|
||||
return
|
||||
|
||||
/obj/item/device/magnetic_lock/process()
|
||||
var/obj/item/weapon/cell/C = powercell // both of these are for viewing ease
|
||||
var/obj/item/weapon/cell/BU = internal_cell
|
||||
var/delta_sec = (world.time - last_process_time) / 10
|
||||
var/drainamount = drain_per_second * delta_sec
|
||||
if (C)
|
||||
if (C.charge > drainamount)
|
||||
C.charge -= drainamount
|
||||
var/int_diff = min(drainamount, BU.maxcharge - BU.charge)
|
||||
if (C.charge > int_diff && BU.charge != BU.maxcharge)
|
||||
if (int_diff < drainamount)
|
||||
BU.charge = BU.maxcharge
|
||||
C.charge -= int_diff
|
||||
else
|
||||
BU.charge += drainamount
|
||||
C.charge -= drainamount
|
||||
else if (BU.charge > (drainamount - C.charge))
|
||||
var/diff = drainamount - C.charge
|
||||
C.charge = 0
|
||||
BU.charge -= diff
|
||||
else
|
||||
BU.charge = 0
|
||||
visible_message(span("danger", "[src] beeps loudly and falls off \the [target]; its powercell having run out of power."))
|
||||
detach(0)
|
||||
else if (BU.charge > drainamount)
|
||||
BU.charge -= drainamount
|
||||
else
|
||||
BU.charge = 0
|
||||
visible_message(span("danger", "[src] beeps loudly and falls off \the [target]; its powercell having run out of power."))
|
||||
detach(0)
|
||||
last_process_time = world.time
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/check_target(var/obj/machinery/door/airlock/newtarget, var/mob/user as mob)
|
||||
if (status == STATUS_BROKEN)
|
||||
user << "<span class='danger'>[src] is damaged beyond repair! It cannot be used!</span>"
|
||||
return
|
||||
user << span("danger", "[src] is damaged beyond repair! It cannot be used!")
|
||||
return 0
|
||||
|
||||
if (hacked)
|
||||
user << span("danger", "[src] buzzes; it can't be used until you repair it!")
|
||||
return 0
|
||||
|
||||
if (!newtarget.density || newtarget.operating)
|
||||
user << "<span class='danger'>[newtarget] must be closed before you can attach [src] to it!</span>"
|
||||
return
|
||||
user << span("danger", "[newtarget] must be closed before you can attach [src] to it!")
|
||||
return 0
|
||||
|
||||
if (newtarget.p_open)
|
||||
user << "<span class='danger'>You must close [newtarget]'s maintenance panel before attaching [src] to it!</span>"
|
||||
return
|
||||
user << span("danger", "You must close [newtarget]'s maintenance panel before attaching [src] to it!")
|
||||
return 0
|
||||
|
||||
if (!user.Adjacent(newtarget))
|
||||
user << span("danger", "You must stand next to [newtarget] while attaching it!")
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/attachto(var/obj/machinery/door/airlock/newtarget, var/mob/user as mob)
|
||||
if (!check_target(newtarget, user)) return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] starts mounting [src] onto [newtarget].</span>", "<span class='notice'>You begin mounting [src] onto [newtarget].</span>")
|
||||
|
||||
if (do_after(user, 35, 1))
|
||||
if (status == STATUS_BROKEN)
|
||||
user << "<span class='danger'>[src] is damaged beyond repair! It cannot be used!</span>"
|
||||
|
||||
if (!check_target(newtarget, user)) return
|
||||
|
||||
if(!internal_cell.charge)
|
||||
user << "<span class='warning'>\The [src] looks dead and out of power.</span>"
|
||||
return
|
||||
|
||||
if (!newtarget.density)
|
||||
user << "<span class='danger'>[newtarget] must be closed before you can attach [src] to it!</span>"
|
||||
return
|
||||
var/direction = get_dir(user, newtarget)
|
||||
if ((direction in alldirs) && !(direction in cardinal))
|
||||
direction = turn(direction, -45)
|
||||
if (check_neighbor_density(get_turf(newtarget.loc), direction))
|
||||
direction = turn(direction, 90)
|
||||
if (check_neighbor_density(get_turf(newtarget.loc), direction))
|
||||
user << "<span class='warning'>There is something in the way of \the [newtarget]!</span>"
|
||||
return
|
||||
|
||||
if (newtarget.p_open)
|
||||
user << "<span class='danger'>You must close [newtarget]'s maintenance panel before attaching [src] to it!</span>"
|
||||
return
|
||||
if (is_type_in_oview(/obj/machinery/door/airlock, 1, newtarget))
|
||||
if (alert("Brace adjacent airlocks?",,"Yes", "No") == "Yes")
|
||||
if (!check_target(newtarget, user)) return
|
||||
for (var/obj/machinery/door/airlock/A in get_step(newtarget.loc, turn(direction, -90)))
|
||||
if (istype(A, newtarget.type))
|
||||
if (!check_target(A, user)) return
|
||||
target_node1 = A
|
||||
target_node1.bracer = src
|
||||
break
|
||||
for (var/obj/machinery/door/airlock/B in get_step(newtarget.loc, turn(direction, 90)))
|
||||
if (istype(B, newtarget.type))
|
||||
if (!check_target(B, user)) return
|
||||
target_node2 = B
|
||||
target_node2.bracer = src
|
||||
break
|
||||
|
||||
user.visible_message("<span class='notice'>[user] attached [src] onto [newtarget] and flicks it on. The magnetic lock now seals [newtarget].</span>", "<span class='notice'>You attached [src] onto [newtarget] and switched on the magnetic lock.</span>")
|
||||
user.drop_item()
|
||||
|
||||
setstatus(STATUS_ACTIVE, newtarget)
|
||||
forceMove(get_step(newtarget.loc, reverse_direction(direction)))
|
||||
set_dir(reverse_direction(direction))
|
||||
status = STATUS_ACTIVE
|
||||
attach(newtarget)
|
||||
return
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/setstatus(var/newstatus, var/obj/machinery/door/airlock/newtarget as obj)
|
||||
switch (newstatus)
|
||||
if (STATUS_INACTIVE)
|
||||
if (status != STATUS_ACTIVE)
|
||||
return
|
||||
if (!target)
|
||||
return
|
||||
|
||||
detach()
|
||||
icon_state = "inactive"
|
||||
status = newstatus
|
||||
|
||||
if (STATUS_ACTIVE)
|
||||
if (status != STATUS_INACTIVE)
|
||||
return
|
||||
if (!newtarget)
|
||||
return
|
||||
|
||||
attach(newtarget)
|
||||
icon_state = "active"
|
||||
status = newstatus
|
||||
|
||||
if (STATUS_BROKEN)
|
||||
spark()
|
||||
|
||||
if (target)
|
||||
var/playflick = 1
|
||||
if (constructionstate)
|
||||
playflick = 0
|
||||
|
||||
detach(playflick)
|
||||
|
||||
icon_state = "broken"
|
||||
status = newstatus
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/setconstructionstate(var/newstate)
|
||||
constructionstate = newstate
|
||||
if (newstate == 0)
|
||||
if (status == STATUS_ACTIVE)
|
||||
icon_state = "active"
|
||||
else
|
||||
icon_state = "inactive"
|
||||
else if (newstate == 2)
|
||||
flick("deconstruct_2_anim", src)
|
||||
if (!powercell && newstate == 1)
|
||||
setconstructionstate(2)
|
||||
return
|
||||
else if (newstate == 4)
|
||||
setstatus(STATUS_BROKEN)
|
||||
else
|
||||
icon_state = "deconstruct_[constructionstate]"
|
||||
detach(playflick = 0)
|
||||
update_icon()
|
||||
constructionstate = newstate
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/detach(var/playflick = 1)
|
||||
if (target)
|
||||
|
||||
if (playflick)
|
||||
spawn(-15) flick("release", src)
|
||||
spawn(-15) flick("release_[department]", src)
|
||||
|
||||
adjustsprite(null)
|
||||
status = STATUS_INACTIVE
|
||||
set_dir(SOUTH)
|
||||
update_icon()
|
||||
layer = LAYER_NORMAL
|
||||
|
||||
target.bracer = null
|
||||
|
||||
processing_objects.Remove(src)
|
||||
|
||||
target = null
|
||||
if (target_node1)
|
||||
target_node1.bracer = null
|
||||
target_node1 = null
|
||||
if (target_node2)
|
||||
target_node2.bracer = null
|
||||
target_node2 = null
|
||||
anchored = 0
|
||||
|
||||
processing_objects.Remove(src)
|
||||
last_process_time = 0
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/attach(var/obj/machinery/door/airlock/newtarget as obj)
|
||||
adjustsprite(newtarget)
|
||||
layer = LAYER_ATTACHED
|
||||
flick("deploy", src)
|
||||
|
||||
newtarget.bracer = src
|
||||
target = newtarget
|
||||
|
||||
last_process_time = world.time
|
||||
processing_objects.Add(src)
|
||||
|
||||
anchored = 1
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/adjustsprite(var/obj/target as obj)
|
||||
if (target)
|
||||
switch (get_dir(src, target))
|
||||
spawn(-15)
|
||||
flick("deploy_[department]", src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/device/magnetic_lock/update_icon()
|
||||
if (status == STATUS_ACTIVE && target)
|
||||
icon_state = "active_[department]"
|
||||
switch (dir)
|
||||
if (NORTH)
|
||||
pixel_x = 0
|
||||
pixel_y = 32
|
||||
if (NORTHEAST)
|
||||
pixel_x = 32
|
||||
pixel_y = 32
|
||||
if (EAST)
|
||||
pixel_x = 32
|
||||
pixel_y = 0
|
||||
if (SOUTHEAST)
|
||||
pixel_x = 32
|
||||
pixel_y = -32
|
||||
if (EAST)
|
||||
pixel_x = -32
|
||||
pixel_y = 0
|
||||
if (SOUTH)
|
||||
pixel_x = 0
|
||||
pixel_y = -32
|
||||
if (SOUTHWEST)
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
if (WEST)
|
||||
pixel_x = -32
|
||||
pixel_y = 0
|
||||
if (NORTHWEST)
|
||||
pixel_x = -32
|
||||
pixel_y = 32
|
||||
else
|
||||
if (WEST)
|
||||
pixel_x = 32
|
||||
pixel_y = 0
|
||||
else if (status >= STATUS_INACTIVE)
|
||||
icon_state = "inactive_[department]"
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
else
|
||||
icon_state = "broken_[department]"
|
||||
pixel_x = 0
|
||||
pixel_y = 0
|
||||
update_overlays()
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/update_overlays()
|
||||
overlays.Cut()
|
||||
switch (status)
|
||||
if (STATUS_BROKEN)
|
||||
icon_state = "broken"
|
||||
return
|
||||
|
||||
if (STATUS_INACTIVE to STATUS_ACTIVE)
|
||||
if (hacked)
|
||||
overlays += "overlay_hacked"
|
||||
else if (locked)
|
||||
overlays += "overlay_locked"
|
||||
else
|
||||
overlays += "overlay_unlocked"
|
||||
switch (constructionstate)
|
||||
if (0)
|
||||
return
|
||||
if (1 to 4)
|
||||
overlays += "overlay_deconstruct_[constructionstate]"
|
||||
|
||||
/obj/item/device/magnetic_lock/proc/takedamage(var/damage)
|
||||
health -= damage
|
||||
@@ -303,7 +409,8 @@
|
||||
|
||||
if (health <= 0)
|
||||
visible_message("<span class='danger'>[src] sparks[target ? " and falls off of \the [target]!" : "!"] It is now completely unusable!</span>")
|
||||
setstatus(STATUS_BROKEN)
|
||||
status = STATUS_BROKEN
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if (prob(50))
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
tank_two = null
|
||||
else
|
||||
return
|
||||
|
||||
|
||||
T.loc = get_turf(src)
|
||||
update_icon()
|
||||
|
||||
@@ -166,18 +166,18 @@
|
||||
/obj/item/device/transfer_valve/proc/split_gases()
|
||||
if(!valve_open)
|
||||
return
|
||||
|
||||
|
||||
valve_open = 0
|
||||
|
||||
if(deleted(tank_one) || deleted(tank_two))
|
||||
|
||||
if(deleted(tank_one) || deleted(tank_two) || !tank_one.air_contents || !tank_two.air_contents)
|
||||
return
|
||||
|
||||
|
||||
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
|
||||
var/datum/gas_mixture/temp
|
||||
temp = tank_two.air_contents.remove_ratio(ratio1)
|
||||
tank_one.air_contents.merge(temp)
|
||||
tank_two.air_contents.volume -= tank_one.air_contents.volume
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Exadv1: I know this isn't how it's going to work, but this was just to check
|
||||
|
||||
@@ -161,3 +161,19 @@
|
||||
|
||||
R.emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/item/borg/upgrade/combat
|
||||
name = "combat cyborg module"
|
||||
desc = "Unlocks the combat cyborg module"
|
||||
construction_cost = list(DEFAULT_WALL_MATERIAL=10000,"glass"=15000,"gold"= 5000,"diamond" = 1000)
|
||||
icon_state = "cyborg_upgrade3"
|
||||
require_module = 0
|
||||
|
||||
/obj/item/borg/upgrade/combat/action(var/mob/living/silicon/robot/R)
|
||||
if(..()) return 0
|
||||
|
||||
if(R.crisis_override == 1)
|
||||
return 0
|
||||
|
||||
R.crisis_override = 1
|
||||
return 1
|
||||
|
||||
@@ -128,6 +128,7 @@
|
||||
/obj/item/weapon/grenade/flashbang/clusterbang/prime()
|
||||
var/numspawned = rand(4,8)
|
||||
var/again = 0
|
||||
var/atom/A = loc
|
||||
for(var/more = numspawned,more > 0,more--)
|
||||
if(prob(35))
|
||||
again++
|
||||
@@ -135,15 +136,15 @@
|
||||
|
||||
for(,numspawned > 0, numspawned--)
|
||||
spawn(0)
|
||||
new /obj/item/weapon/grenade/flashbang/cluster(src.loc)//Launches flashbangs
|
||||
new /obj/item/weapon/grenade/flashbang/cluster(A)//Launches flashbangs
|
||||
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
|
||||
for(,again > 0, again--)
|
||||
spawn(0)
|
||||
new /obj/item/weapon/grenade/flashbang/clusterbang/segment(src.loc)//Creates a 'segment' that launches a few more flashbangs
|
||||
new /obj/item/weapon/grenade/flashbang/clusterbang/segment(A)//Creates a 'segment' that launches a few more flashbangs
|
||||
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
qdel(src)
|
||||
return
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/clusterbang/segment
|
||||
desc = "A smaller segment of a clusterbang. Better run."
|
||||
@@ -152,6 +153,7 @@
|
||||
icon_state = "clusterbang_segment"
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/clusterbang/segment/New()//Segments should never exist except part of the clusterbang, since these immediately 'do their thing' and asplode
|
||||
|
||||
icon_state = "clusterbang_segment_active"
|
||||
active = 1
|
||||
banglet = 1
|
||||
@@ -168,13 +170,14 @@
|
||||
for(var/more = numspawned,more > 0,more--)
|
||||
if(prob(35))
|
||||
numspawned --
|
||||
|
||||
var/atom/A = src.loc
|
||||
for(,numspawned > 0, numspawned--)
|
||||
spawn(0)
|
||||
new /obj/item/weapon/grenade/flashbang/cluster(src.loc)
|
||||
new /obj/item/weapon/grenade/flashbang/cluster(A)
|
||||
playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
spawn(1)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/flashbang/cluster/New()//Same concept as the segments, so that all of the parts don't become reliant on the clusterbang
|
||||
spawn(0)
|
||||
@@ -186,5 +189,5 @@
|
||||
walk_away(src,temploc,stepdist)
|
||||
var/dettime = rand(15,60)
|
||||
spawn(dettime)
|
||||
prime()
|
||||
..()
|
||||
prime()
|
||||
..()
|
||||
|
||||
@@ -31,8 +31,10 @@
|
||||
/obj/item/weapon/material/sword/rapier
|
||||
name = "rapier"
|
||||
desc = "A slender, fancy and sharply pointed sword."
|
||||
icon = 'icons/obj/sword.dmi'
|
||||
icon_state = "rapier"
|
||||
item_state = "claymore"
|
||||
item_state = "rapier"
|
||||
contained_sprite = 1
|
||||
slot_flags = SLOT_BELT
|
||||
attack_verb = list("attacked", "stabbed", "prodded", "poked", "lunged")
|
||||
|
||||
@@ -61,3 +63,15 @@
|
||||
icon_state = "sabre"
|
||||
item_state = "katana"
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/material/sword/axe
|
||||
name = "battle axe"
|
||||
desc = "A one handed battle axe, still a deadly weapon."
|
||||
icon = 'icons/obj/sword.dmi'
|
||||
icon_state = "axe"
|
||||
item_state = "axe"
|
||||
contained_sprite = 1
|
||||
slot_flags = SLOT_BACK
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
|
||||
|
||||
@@ -223,10 +223,21 @@
|
||||
var/image/IM = image(I.icon,I.icon_state)
|
||||
IM.overlays = I.overlays.Copy()
|
||||
HS.overlays += IM
|
||||
HS.name = "[I.name] on a spear"
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
//predefined materials for spears
|
||||
/obj/item/weapon/material/twohanded/spear/steel/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
|
||||
/obj/item/weapon/material/twohanded/spear/plasteel/New(var/newloc)
|
||||
..(newloc,"plasteel")
|
||||
|
||||
/obj/item/weapon/material/twohanded/spear/diamond/New(var/newloc)
|
||||
..(newloc,"diamond")
|
||||
|
||||
/obj/structure/headspear
|
||||
name = "head on a spear"
|
||||
desc = "How barbaric."
|
||||
@@ -239,4 +250,4 @@
|
||||
new /obj/item/weapon/material/twohanded/spear(user.loc)
|
||||
for(var/obj/item/organ/external/head/H in src)
|
||||
H.loc = user.loc
|
||||
qdel(src)
|
||||
qdel(src)
|
||||
|
||||
@@ -50,4 +50,25 @@
|
||||
/obj/item/weapon/melee/chainsword/suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is slicing \himself apart with the [src.name]! It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|OXYLOSS)
|
||||
*/
|
||||
*/
|
||||
|
||||
//This is essentially a crowbar and a baseball bat in one.
|
||||
/obj/item/weapon/melee/hammer
|
||||
name = "kneebreaker hammer"
|
||||
desc = "A heavy hammer made of plasteel, the other end could be used to pry open doors."
|
||||
icon = 'icons/obj/kneehammer.dmi'
|
||||
icon_state = "kneehammer"
|
||||
item_state = "kneehammer"
|
||||
contained_sprite = 1
|
||||
slot_flags = SLOT_BELT
|
||||
force = 22
|
||||
throwforce = 70
|
||||
//This should do around 15 brute when you throw it, there's probably a better way to do it.
|
||||
throw_speed = 1
|
||||
throw_range = 5
|
||||
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
|
||||
w_class = 3
|
||||
origin_tech = "materials=3;syndicate=2"
|
||||
sharp = 0
|
||||
edge = 0
|
||||
hitsound = 'sound/weapons/genhit3.ogg'
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
/obj/item/device/flashlight,
|
||||
/obj/item/device/pda,
|
||||
/obj/item/device/radio/headset,
|
||||
/obj/item/weapon/melee/energy/sword,
|
||||
/obj/item/weapon/melee,
|
||||
/obj/item/weapon/shield/energy,
|
||||
/obj/item/weapon/pinpointer,
|
||||
/obj/item/weapon/plastique,
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
* Handcuff, mousetrap, and pillbottle boxes,
|
||||
* Snap-pops and matchboxes,
|
||||
* Replacement light boxes.
|
||||
*
|
||||
* Kitchen utensil box
|
||||
* Random preserved snack box
|
||||
* For syndicate call-ins see uplink_kits.dm
|
||||
*/
|
||||
|
||||
@@ -323,6 +324,7 @@
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
new /obj/item/weapon/grenade/flashbang(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/teargas
|
||||
name = "box of pepperspray grenades"
|
||||
desc = "A box containing 7 tear gas grenades. A gas mask is printed on the label.<br> WARNING: Exposure carries risk of serious injury or death. Keep away from persons with lung conditions."
|
||||
@@ -337,7 +339,20 @@
|
||||
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
|
||||
new /obj/item/weapon/grenade/chem_grenade/teargas(src)
|
||||
|
||||
/obj/item/weapon/storage/box/smokebombs
|
||||
name = "box of smoke grenades"
|
||||
desc = "A box full of smoke grenades, used by special law enforcement teams and military organisations. Provides cover, confusion, and distraction."
|
||||
icon_state = "flashbang"
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
new /obj/item/weapon/grenade/smokebomb(src)
|
||||
|
||||
/obj/item/weapon/storage/box/emps
|
||||
name = "box of emp grenades"
|
||||
@@ -730,3 +745,57 @@
|
||||
can_hold = list(/obj/item/organ, /obj/item/weapon/reagent_containers/food, /obj/item/weapon/reagent_containers/glass)
|
||||
max_storage_space = 21
|
||||
use_to_pickup = 1 // for picking up broken bulbs, not that most people will try
|
||||
|
||||
/obj/item/weapon/storage/box/kitchen
|
||||
name = "kitchen supplies"
|
||||
desc = "Contains an assortment of utensils and containers useful in the preparation of food and drinks."
|
||||
|
||||
/obj/item/weapon/storage/box/kitchen/New()
|
||||
new /obj/item/weapon/material/knife(src)//Should always have a knife
|
||||
|
||||
var/list/utensils = list(/obj/item/weapon/material/kitchen/rollingpin,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker,
|
||||
/obj/item/weapon/material/kitchen/utensil/fork,
|
||||
/obj/item/weapon/reagent_containers/food/condiment/enzyme,
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon,
|
||||
/obj/item/weapon/material/kitchen/utensil/knife,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/shaker)
|
||||
for (var/i = 0,i<6,i++)
|
||||
var/type = pick(utensils)
|
||||
new type(src)
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/snack
|
||||
name = "rations box"
|
||||
desc = "Contains a random assortment of preserved foods. Guaranteed to remain edible* in room-temperature longterm storage for centuries!"
|
||||
|
||||
/obj/item/weapon/storage/box/snack/New()
|
||||
var/list/snacks = list(
|
||||
/obj/item/weapon/reagent_containers/food/snacks/koisbar,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candy,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/candy_corn,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chips,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chocolatebar,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chocolateegg,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/popcorn,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/no_raisin,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/syndicake,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/fortunecookie,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/poppypretzel,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cracker,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/liquidfood,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/tastybread,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/meatsnack,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/maps,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/nathisnack,
|
||||
)
|
||||
for (var/i = 0,i<7,i++)
|
||||
var/type = pick(snacks)
|
||||
new type(src)
|
||||
..()
|
||||
|
||||
@@ -131,6 +131,8 @@
|
||||
/obj/item/weapon/storage/firstaid/surgery
|
||||
name = "surgery kit"
|
||||
desc = "Contains tools for surgery. Has precise foam fitting for safe transport."
|
||||
icon_state = "purplefirstaid"
|
||||
item_state = "firstaid-advanced"
|
||||
|
||||
/obj/item/weapon/storage/firstaid/surgery/New()
|
||||
..()
|
||||
|
||||
@@ -579,13 +579,13 @@
|
||||
max_storage_space += I.get_storage_cost()
|
||||
|
||||
//Useful for spilling the contents of containers all over the floor
|
||||
/obj/item/weapon/storage/proc/spill()
|
||||
if (istype(loc, /turf))//If its not on the floor this might cause issues
|
||||
var/turf/T = get_turf(src)
|
||||
for (var/obj/O in contents)
|
||||
contents.Remove(O)
|
||||
O.forceMove(T)
|
||||
O.tumble(2)
|
||||
/obj/item/weapon/storage/proc/spill(var/dist = 2, var/turf/T = null)
|
||||
if (!T || !istype(T, /turf))//If its not on the floor this might cause issues
|
||||
T = get_turf(src)
|
||||
|
||||
for (var/obj/O in contents)
|
||||
remove_from_storage(O, T)
|
||||
O.tumble(2)
|
||||
|
||||
|
||||
//Returns the storage depth of an atom. This is the number of storage items the atom is contained in before reaching toplevel (the area).
|
||||
|
||||
@@ -14,6 +14,11 @@
|
||||
max_storage_space = 14 //enough to hold all starting contents
|
||||
origin_tech = list(TECH_COMBAT = 1)
|
||||
attack_verb = list("robusted")
|
||||
var/stunhit = 0
|
||||
|
||||
/obj/item/weapon/storage/toolbox/initialize()
|
||||
spawn(3)
|
||||
update_force()
|
||||
|
||||
/obj/item/weapon/storage/toolbox/emergency
|
||||
name = "emergency toolbox"
|
||||
@@ -79,3 +84,24 @@
|
||||
new /obj/item/weapon/crowbar(src)
|
||||
new /obj/item/weapon/wirecutters(src)
|
||||
new /obj/item/device/multitool(src)
|
||||
|
||||
|
||||
/obj/item/weapon/storage/toolbox/proc/update_force()
|
||||
force = initial(force)
|
||||
for (var/obj/item/I in contents)
|
||||
force += I.w_class*1.5
|
||||
|
||||
/obj/item/weapon/storage/toolbox/handle_item_insertion(obj/item/W as obj, prevent_warning = 0)
|
||||
if (..(W, prevent_warning))
|
||||
update_force()
|
||||
|
||||
|
||||
/obj/item/weapon/storage/toolbox/attack(mob/living/M as mob, mob/user as mob)
|
||||
update_force()
|
||||
..(M, user)
|
||||
if (contents.len)
|
||||
spill(3, get_turf(M))
|
||||
playsound(M, 'sound/items/trayhit2.ogg', 100, 1) //sound playin' again
|
||||
update_force()
|
||||
user.visible_message(span("danger", "[user] smashes the [src] into [M], causing it to break open and strew its contents across the area"))
|
||||
|
||||
|
||||
@@ -184,3 +184,32 @@
|
||||
slot_flags = null
|
||||
baton_color = "#FFDF00"
|
||||
|
||||
/obj/item/weapon/melee/baton/stunrod
|
||||
name = "stunrod"
|
||||
desc = "A more-than-lethal weapon used to deal with high threat situations."
|
||||
icon = 'icons/obj/stunrod.dmi'
|
||||
icon_state = "stunrod"
|
||||
item_state = "stunrod"
|
||||
force = 20
|
||||
baton_color = "#75ACFF"
|
||||
origin_tech = "combat=4,illegal=2"
|
||||
contained_sprite = 1
|
||||
|
||||
/obj/item/weapon/melee/baton/stunrod/New()
|
||||
..()
|
||||
bcell = new/obj/item/weapon/cell/high(src)
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/melee/baton/stunrod/update_icon() //this is needed due to how contained sprites work
|
||||
if(status)
|
||||
icon_state = "[initial(name)]_active"
|
||||
item_state = "[initial(name)]_active"
|
||||
else if(!bcell)
|
||||
icon_state = "[initial(name)]_nocell"
|
||||
item_state = "[initial(name)]"
|
||||
else
|
||||
icon_state = "[initial(name)]"
|
||||
item_state = "[initial(name)]"
|
||||
|
||||
..()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
|
||||
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
|
||||
playsound(loc, 'sound/effects/adminhelp.ogg', 15)
|
||||
|
||||
|
||||
/*
|
||||
* Classic Baton
|
||||
*/
|
||||
@@ -79,14 +79,14 @@
|
||||
add_fingerprint(user)
|
||||
|
||||
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
|
||||
overlays.Cut()//this might delete other item overlays as well but eeeeeeeh
|
||||
|
||||
overlays.Remove(blood_overlay)
|
||||
var/icon/I = new /icon(src.icon, src.icon_state)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', "itemblood"),ICON_MULTIPLY)
|
||||
blood_overlay = I
|
||||
|
||||
blood_overlay = image(I)
|
||||
blood_overlay.color = blood_color
|
||||
overlays += blood_overlay
|
||||
update_icon()
|
||||
|
||||
return
|
||||
|
||||
@@ -101,8 +101,10 @@
|
||||
else
|
||||
user.take_organ_damage(2*force)
|
||||
return
|
||||
if(..())
|
||||
//playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
if(..() == 1)
|
||||
playsound(src.loc, "swing_hit", 50, 1, -1)
|
||||
if(user.zone_sel.selecting == "r_leg" || user.zone_sel.selecting == "l_leg")
|
||||
target.Weaken(5) //nerfed, because yes.
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -303,15 +303,24 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.species.flags & IS_SYNTHETIC)
|
||||
if(M == user)
|
||||
user << "\red You can't repair damage to your own body - it's against OH&S."
|
||||
user << "<span class='warning'>You can't repair damage to your own body - it's against OH&S.</span>"
|
||||
return
|
||||
|
||||
if(S.brute_dam)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.name] with \the [src].")
|
||||
if(S.brute_dam == 0)
|
||||
// Organ undamaged
|
||||
user << "Nothing to fix here!"
|
||||
return
|
||||
if (!src.welding)
|
||||
// Welder is switched off!
|
||||
user << "<span class='warning'>You need to light the welding tool, first!</span>"
|
||||
return
|
||||
if (src.remove_fuel(0))
|
||||
// Use a bit of fuel and repair
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("<span class='warning'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else
|
||||
user << "Nothing to fix!"
|
||||
// Welding tool is out of fuel
|
||||
user << "Need more welding fuel!"
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -214,3 +214,18 @@
|
||||
health -= W.force
|
||||
healthcheck()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/canesword
|
||||
name = "thin sword"
|
||||
desc = "A thin, sharp blade with an elegant handle."
|
||||
icon = 'icons/obj/sword.dmi'
|
||||
icon_state = "canesword"
|
||||
item_state = "canesword"
|
||||
force = 20
|
||||
throwforce = 5
|
||||
w_class = 4
|
||||
sharp = 1
|
||||
edge = 1
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
contained_sprite = 1
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/list/icon_supported_species_tags //Used with icon_auto_adapt, a list of species which have differing appearances for this item
|
||||
var/icon_species_in_hand = 0//If 1, we will use the species tag even for rendering this item in the left/right hand.
|
||||
|
||||
var/equip_slot = 0
|
||||
/obj/Destroy()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
desc = "This is a random piece of technology supplies."
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "cell"
|
||||
spawn_nothing_percentage = 50
|
||||
// spawn_nothing_percentage = 50
|
||||
item_to_spawn()
|
||||
return pick(prob(3);/obj/random/powercell,\
|
||||
prob(2);/obj/random/technology_scanner,\
|
||||
@@ -157,7 +157,7 @@
|
||||
desc = "Hot Stuff."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "purplecomb"
|
||||
spawn_nothing_percentage = 50
|
||||
// spawn_nothing_percentage = 50
|
||||
item_to_spawn()
|
||||
return pick(prob(3);/obj/item/weapon/storage/pill_bottle/tramadol,\
|
||||
prob(4);/obj/item/weapon/haircomb,\
|
||||
@@ -280,3 +280,414 @@
|
||||
/obj/item/toy/plushie/kitten,\
|
||||
/obj/item/toy/plushie/lizard)
|
||||
|
||||
/obj/random/smalltank/item_to_spawn()
|
||||
if (prob(40))
|
||||
return /obj/item/weapon/tank/emergency_oxygen
|
||||
else if (prob(60))
|
||||
return /obj/item/weapon/tank/emergency_oxygen/engi
|
||||
else
|
||||
return /obj/item/weapon/tank/emergency_oxygen/double
|
||||
|
||||
/obj/random/belt/item_to_spawn()
|
||||
var/list/belts = list("/obj/item/weapon/storage/belt/utility" = 1,
|
||||
"/obj/item/weapon/storage/belt/medical" = 0.4,
|
||||
"/obj/item/weapon/storage/belt/medical/emt" = 0.4,
|
||||
"/obj/item/weapon/storage/belt/security/tactical" = 0.1,
|
||||
"/obj/item/weapon/storage/belt/military" = 0.1,
|
||||
"/obj/item/weapon/storage/belt/janitor" = 0.4
|
||||
)
|
||||
return pickweight(belts)
|
||||
|
||||
|
||||
//Spawns a random backpack
|
||||
//Novelty and rare backpacks have lower weights
|
||||
/obj/random/backpack/item_to_spawn()
|
||||
var/list/packs = list(
|
||||
"/obj/item/weapon/storage/backpack" = 3,
|
||||
"/obj/item/weapon/storage/backpack/holding" = 0.5,
|
||||
"/obj/item/weapon/storage/backpack/santabag" = 2,
|
||||
"/obj/item/weapon/storage/backpack/cultpack" = 2,
|
||||
"/obj/item/weapon/storage/backpack/clown" = 2,
|
||||
"/obj/item/weapon/storage/backpack/medic" = 3,
|
||||
"/obj/item/weapon/storage/backpack/security" = 3,
|
||||
"/obj/item/weapon/storage/backpack/captain" = 2,
|
||||
"/obj/item/weapon/storage/backpack/industrial" = 3,
|
||||
"/obj/item/weapon/storage/backpack/toxins" = 3,
|
||||
"/obj/item/weapon/storage/backpack/hydroponics" = 3,
|
||||
"/obj/item/weapon/storage/backpack/genetics" = 3,
|
||||
"/obj/item/weapon/storage/backpack/virology" = 3,
|
||||
"/obj/item/weapon/storage/backpack/chemistry" = 3,
|
||||
"/obj/item/weapon/storage/backpack/cloak" = 2,
|
||||
"/obj/item/weapon/storage/backpack/syndie" = 2,
|
||||
"/obj/item/weapon/storage/backpack/wizard" = 2,
|
||||
"/obj/item/weapon/storage/backpack/satchel" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_norm" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_eng" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_med" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_vir" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_chem" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_gen" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_tox" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_sec" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_hyd" = 3,
|
||||
"/obj/item/weapon/storage/backpack/satchel_cap" = 2,
|
||||
"/obj/item/weapon/storage/backpack/satchel_syndie" = 2,
|
||||
"/obj/item/weapon/storage/backpack/satchel_wizard" = 2,
|
||||
"/obj/item/weapon/storage/backpack/ert" = 2,
|
||||
"/obj/item/weapon/storage/backpack/ert/security" = 2,
|
||||
"/obj/item/weapon/storage/backpack/ert/engineer" = 2,
|
||||
"/obj/item/weapon/storage/backpack/ert/medical" = 2,
|
||||
"/obj/item/weapon/storage/backpack/duffel" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/cap" = 2,
|
||||
"/obj/item/weapon/storage/backpack/duffel/hyd" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/vir" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/med" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/eng" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/tox" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/sec" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/gen" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/chem" = 3,
|
||||
"/obj/item/weapon/storage/backpack/duffel/syndie" = 2,
|
||||
"/obj/item/weapon/storage/backpack/duffel/wizard" = 2
|
||||
)
|
||||
return pickweight(packs)
|
||||
|
||||
|
||||
/obj/random/voidsuit
|
||||
var/damaged = 0
|
||||
|
||||
/obj/random/voidsuit/New(var/_damaged = 0)
|
||||
damaged = _damaged
|
||||
..()
|
||||
|
||||
/obj/random/voidsuit/spawn_item()
|
||||
var/list/suit_types = list(
|
||||
"/space/void" = 2,
|
||||
"/space/void/engineering" = 2,
|
||||
"/space/void/mining" = 2,
|
||||
"/space/void/medical" = 2.3,
|
||||
"/space/void/security" = 1,
|
||||
"/space/void/atmos" = 1.5,
|
||||
"/space/void/merc" = 0.5,
|
||||
"/space/void/captain" = 0.3
|
||||
)
|
||||
var/atom/L = src.loc
|
||||
var/suffix = pickweight(suit_types)
|
||||
|
||||
var/stype = "/obj/item/clothing/suit[suffix]"
|
||||
var/htype = "/obj/item/clothing/head/helmet[suffix]"
|
||||
var/obj/item/clothing/suit/space/newsuit = new stype(L)
|
||||
new htype(L)
|
||||
new /obj/item/clothing/shoes/magboots(L)
|
||||
if (damaged && prob(60))//put some damage on it
|
||||
var/damtype = pick(BRUTE,BURN)
|
||||
var/amount = rand(1,5)
|
||||
newsuit.create_breaches(damtype, amount)
|
||||
|
||||
/obj/random/vendor
|
||||
var/depleted = 0
|
||||
|
||||
/obj/random/vendor/New(var/_depleted = 0)
|
||||
depleted = _depleted
|
||||
..()
|
||||
|
||||
/obj/random/vendor/spawn_item()
|
||||
var/list/options = list(
|
||||
"/obj/machinery/vending/boozeomat" = 1,
|
||||
"/obj/machinery/vending/coffee" = 1,
|
||||
"/obj/machinery/vending/snack" = 1,
|
||||
"/obj/machinery/vending/cola" = 1,
|
||||
"/obj/machinery/vending/cart" = 1.5,
|
||||
"/obj/machinery/vending/cigarette" = 1,
|
||||
"/obj/machinery/vending/medical" = 1.2,
|
||||
"/obj/machinery/vending/phoronresearch" = 0.7,
|
||||
"/obj/machinery/vending/security" = 0.3,
|
||||
"/obj/machinery/vending/hydronutrients" = 1,
|
||||
"/obj/machinery/vending/hydroseeds" = 1,
|
||||
"/obj/machinery/vending/magivend" = 0.5,//The things it dispenses are just costumes to non-wizards
|
||||
"/obj/machinery/vending/dinnerware" = 1,
|
||||
"/obj/machinery/vending/sovietsoda" = 2,
|
||||
"/obj/machinery/vending/tool" = 1,
|
||||
"/obj/machinery/vending/engivend" = 0.6,
|
||||
"/obj/machinery/vending/engineering" = 1,
|
||||
"/obj/machinery/vending/robotics" = 1
|
||||
)
|
||||
var/turf/L = get_turf(src)
|
||||
var/type = pickweight(options)
|
||||
var/obj/machinery/vending/V = new type(L)
|
||||
|
||||
if (!depleted)
|
||||
return
|
||||
|
||||
//Greatly reduce the contents. it will have 0-20% of what it usually has
|
||||
for (var/content in V.products)
|
||||
if (prob(40))
|
||||
V.products[content] = 0//40% chance to completely lose an item
|
||||
else
|
||||
var/multiplier = rand(0,20)//Else, we reduce it to a very low percentage
|
||||
if (multiplier)
|
||||
multiplier /= 100
|
||||
|
||||
V.products[content] *= multiplier
|
||||
if (V.products[content] < 1 && V.products[content] > 0)//But we'll usually have at least 1 left
|
||||
V.products[content] = 0
|
||||
|
||||
|
||||
/obj/random/pda_cart/item_to_spawn()
|
||||
var/list/options = typesof(/obj/item/weapon/cartridge)
|
||||
var/type = pick(options)
|
||||
|
||||
//reroll syndicate cartridge once to make it less common
|
||||
if (type == /obj/item/weapon/cartridge/syndicate)
|
||||
type = pick(options)
|
||||
|
||||
return type
|
||||
|
||||
/obj/random/glowstick
|
||||
name = "random glowstick"
|
||||
desc = "This is a random glowstick."
|
||||
icon = 'icons/obj/glowsticks.dmi'
|
||||
icon_state = "glowstick"
|
||||
|
||||
/obj/random/glowstick/item_to_spawn()
|
||||
return pick(/obj/item/device/flashlight/glowstick,\
|
||||
/obj/item/device/flashlight/glowstick/red,\
|
||||
/obj/item/device/flashlight/glowstick/blue,\
|
||||
/obj/item/device/flashlight/glowstick/orange,\
|
||||
/obj/item/device/flashlight/glowstick/yellow)
|
||||
|
||||
/obj/random/booze
|
||||
name = "random alcoholic drink"
|
||||
desc = "This is a random alcoholic drink."
|
||||
icon = 'icons/obj/drinks.dmi'
|
||||
icon_state = "broken_bottle"
|
||||
|
||||
/obj/random/booze/item_to_spawn()
|
||||
return pick(/obj/item/weapon/reagent_containers/food/drinks/bottle/gin,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/vodka,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/tequilla,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/rum,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/vermouth,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/kahlua,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/cognac,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/wine,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/absinthe,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/melonliquor,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/pwine,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/brandy,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/guinnes,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/bottle/drambuie,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/beer,\
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/ale)
|
||||
|
||||
/obj/random/melee
|
||||
name = "random melee weapon"
|
||||
desc = "This is a random melee weapon."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "baton"
|
||||
|
||||
/obj/random/melee/item_to_spawn()
|
||||
return pick(/obj/item/weapon/melee/telebaton,\
|
||||
/obj/item/weapon/melee/energy/sword,\
|
||||
/obj/item/weapon/melee/energy/sword/pirate,\
|
||||
/obj/item/weapon/melee/energy/glaive,\
|
||||
/obj/item/weapon/melee/chainsword,\
|
||||
/obj/item/weapon/melee/baton/stunrod,\
|
||||
/obj/item/weapon/material/harpoon,\
|
||||
/obj/item/weapon/material/scythe,\
|
||||
/obj/item/weapon/material/twohanded/spear/plasteel,\
|
||||
/obj/item/weapon/material/sword/trench,\
|
||||
/obj/item/weapon/material/sword/rapier)
|
||||
|
||||
/obj/random/coin
|
||||
name = "random coin"
|
||||
desc = "This is a random coin."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "coin"
|
||||
|
||||
/obj/random/coin/item_to_spawn()
|
||||
var/list/coin = list("/obj/item/weapon/coin/iron" = 5,
|
||||
"/obj/item/weapon/coin/silver" = 3,
|
||||
"/obj/item/weapon/coin/gold" = 1,
|
||||
"/obj/item/weapon/coin/silver" = 0.7,
|
||||
"/obj/item/weapon/coin/phoron" = 0.5,
|
||||
"obj/item/weapon/coin/uranium" = 0.5,
|
||||
"/obj/item/weapon/coin/platinum" = 0.2,
|
||||
"/obj/item/weapon/coin/diamond" = 0.1,
|
||||
)
|
||||
return pickweight(coin)
|
||||
|
||||
/obj/random/energy_antag
|
||||
name = "random energy weapon"
|
||||
desc = "This is a random energy weapon."
|
||||
icon = 'icons/obj/gun.dmi'
|
||||
icon_state = "retro100"
|
||||
|
||||
/obj/random/energy_antag/item_to_spawn()
|
||||
|
||||
return pick(/obj/item/weapon/gun/energy/retro,\
|
||||
/obj/item/weapon/gun/energy/xray,\
|
||||
/obj/item/weapon/gun/energy/gun,\
|
||||
/obj/item/weapon/gun/energy/pistol,\
|
||||
/obj/item/weapon/gun/energy/rifle,\
|
||||
/obj/item/weapon/gun/energy/mindflayer,\
|
||||
/obj/item/weapon/gun/energy/toxgun,\
|
||||
/obj/item/weapon/gun/energy/vaurca/gatlinglaser,\
|
||||
/obj/item/weapon/gun/energy/vaurca/blaster,\
|
||||
/obj/item/weapon/gun/energy/crossbow/largecrossbow)
|
||||
|
||||
/obj/random/colored_jumpsuit
|
||||
name = "random colored jumpsuit"
|
||||
desc = "This is a random colowerd jumpsuit."
|
||||
icon = 'icons/obj/clothing/uniforms.dmi'
|
||||
icon_state = "black"
|
||||
|
||||
/obj/random/colored_jumpsuit/item_to_spawn()
|
||||
|
||||
return pick(/obj/item/clothing/under/color/black,\
|
||||
/obj/item/clothing/under/color/blackf,\
|
||||
/obj/item/clothing/under/color/blue,\
|
||||
/obj/item/clothing/under/color/green,\
|
||||
/obj/item/clothing/under/color/grey,\
|
||||
/obj/item/clothing/under/color/orange,\
|
||||
/obj/item/clothing/under/color/pink,\
|
||||
/obj/item/clothing/under/color/red,\
|
||||
/obj/item/clothing/under/color/white,\
|
||||
/obj/item/clothing/under/color/yellow,\
|
||||
/obj/item/clothing/under/lightblue,\
|
||||
/obj/item/clothing/under/aqua,\
|
||||
/obj/item/clothing/under/purple,\
|
||||
/obj/item/clothing/under/lightpurple,\
|
||||
/obj/item/clothing/under/lightgreen,\
|
||||
/obj/item/clothing/under/lightbrown,\
|
||||
/obj/item/clothing/under/brown,\
|
||||
/obj/item/clothing/under/yellowgreen,\
|
||||
/obj/item/clothing/under/darkblue,\
|
||||
/obj/item/clothing/under/lightred,\
|
||||
/obj/item/clothing/under/darkred)
|
||||
|
||||
/obj/random/loot
|
||||
name = "random maintenance loot items"
|
||||
desc = "Stuff for the maint-dwellers."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "gift3"
|
||||
|
||||
/obj/random/loot/item_to_spawn()
|
||||
|
||||
var/list/maint = list("/obj/item/clothing/glasses/meson" = 1,
|
||||
"/obj/item/clothing/glasses/meson/prescription" = 0.7,
|
||||
"/obj/item/clothing/glasses/material" = 0.8,
|
||||
"/obj/item/clothing/glasses/sunglasses" = 1.5,
|
||||
"/obj/item/clothing/glasses/welding" = 1.2,
|
||||
"/obj/item/clothing/under/captain_fly" = 0.7,
|
||||
"/obj/item/clothing/under/rank/mailman" = 0.6,
|
||||
"/obj/item/clothing/under/rank/vice" = 0.8,
|
||||
"/obj/item/clothing/under/assistantformal" = 1,
|
||||
"/obj/item/clothing/under/rainbow" = 0.9,
|
||||
"/obj/item/clothing/under/overalls" = 1,
|
||||
"/obj/item/clothing/under/redcoat" = 0.5,
|
||||
"/obj/item/clothing/under/serviceoveralls" = 1,
|
||||
"/obj/item/clothing/under/psyche" = 0.5,
|
||||
"/obj/item/clothing/under/track" = 0.9,
|
||||
"/obj/item/clothing/under/rank/dispatch" = 1,
|
||||
"/obj/item/clothing/under/syndicate/tacticool" = 1,
|
||||
"/obj/item/clothing/under/syndicate/tracksuit" = 0.2,
|
||||
"/obj/item/clothing/accessory/badge" = 0.2,
|
||||
"/obj/item/clothing/accessory/badge/old" = 0.2,
|
||||
"/obj/item/clothing/accessory/storage/webbing" = 0.6,
|
||||
"/obj/item/clothing/accessory/storage/knifeharness" = 0.3,
|
||||
"/obj/item/clothing/head/collectable/petehat" = 0.3,
|
||||
"/obj/item/clothing/head/hardhat" = 1.2,
|
||||
"/obj/item/clothing/head/redcoat" = 0.4,
|
||||
"/obj/item/clothing/head/syndicatefake" = 0.5,
|
||||
"/obj/item/clothing/head/richard" = 0.3,
|
||||
"/obj/item/clothing/head/soft/rainbow" = 0.7,
|
||||
"/obj/item/clothing/head/plaguedoctorhat" = 0.5,
|
||||
"/obj/item/clothing/head/cueball" = 0.5,
|
||||
"/obj/item/clothing/head/pirate" = 0.4,
|
||||
"/obj/item/clothing/head/bearpelt" = 0.4,
|
||||
"/obj/item/clothing/head/witchwig" = 0.5,
|
||||
"/obj/item/clothing/head/pumpkinhead" = 0.6,
|
||||
"/obj/item/clothing/head/kitty" = 0.2,
|
||||
"/obj/item/clothing/head/ushanka" = 0.6,
|
||||
"/obj/item/clothing/head/helmet/augment" = 0.1,
|
||||
"/obj/item/clothing/mask/balaclava" = 1,
|
||||
"/obj/item/clothing/mask/gas" = 1.5,
|
||||
"/obj/item/clothing/mask/gas/cyborg" = 0.7,
|
||||
"/obj/item/clothing/mask/gas/owl_mask" = 0.8,
|
||||
"/obj/item/clothing/mask/gas/syndicate" = 0.4,
|
||||
"/obj/item/clothing/mask/fakemoustache" = 0.4,
|
||||
"/obj/item/clothing/mask/horsehead" = 0.9,
|
||||
"/obj/item/clothing/shoes/rainbow" = 1,
|
||||
"/obj/item/clothing/shoes/jackboots" = 1,
|
||||
"/obj/item/clothing/shoes/workboots" = 1,
|
||||
"/obj/item/clothing/shoes/cyborg" = 0.4,
|
||||
"/obj/item/clothing/shoes/galoshes" = 0.6,
|
||||
"/obj/item/clothing/shoes/slippers_worn" = 0.5,
|
||||
"/obj/item/clothing/shoes/combat" = 0.2,
|
||||
"/obj/item/clothing/shoes/clown_shoes" = 0.1,
|
||||
"/obj/item/clothing/suit/storage/hazardvest" = 1,
|
||||
"/obj/item/clothing/suit/storage/leather_jacket/nanotrasen" = 0.7,
|
||||
"/obj/item/clothing/suit/storage/toggle/tracksuit" = 0.7,
|
||||
"/obj/item/clothing/suit/ianshirt" = 0.5,
|
||||
"/obj/item/clothing/suit/syndicatefake" = 0.6,
|
||||
"/obj/item/clothing/suit/imperium_monk" = 0.4,
|
||||
"/obj/item/clothing/suit/storage/vest" = 0.2,
|
||||
"/obj/item/clothing/gloves/black" = 1,
|
||||
"/obj/item/clothing/gloves/fyellow" = 1.2,
|
||||
"/obj/item/clothing/gloves/yellow" = 0.9,
|
||||
"/obj/item/clothing/gloves/watch" = 0.3,
|
||||
"/obj/item/clothing/gloves/boxing" = 0.3,
|
||||
"/obj/item/clothing/gloves/boxing/green" = 0.8,
|
||||
"/obj/item/clothing/gloves/botanic_leather" = 0.7,
|
||||
"/obj/item/clothing/gloves/combat" = 0.2,
|
||||
"/obj/item/toy/bosunwhistle" = 0.5,
|
||||
"/obj/item/toy/balloon" = 0.4,
|
||||
"/obj/item/weapon/haircomb" = 0.5,
|
||||
"/obj/item/weapon/lipstick" = 0.6,
|
||||
"/obj/item/weapon/material/knife/hook" = 0.3,
|
||||
"/obj/item/weapon/material/hatchet/tacknife" = 0.4,
|
||||
"/obj/item/weapon/storage/fancy/cigarettes/dromedaryco" = 1.2,
|
||||
"/obj/item/weapon/storage/bag/plasticbag" = 1,
|
||||
"/obj/item/weapon/extinguisher" = 1.3,
|
||||
"/obj/item/weapon/extinguisher/mini" = 0.9,
|
||||
"/obj/item/device/flashlight" = 1,
|
||||
"/obj/item/device/flashlight/heavy" = 0.5,
|
||||
"/obj/item/device/flashlight/maglight" = 0.4,
|
||||
"/obj/item/device/flashlight/flare" = 0.5,
|
||||
"/obj/item/device/flashlight/lantern" = 0.4,
|
||||
"/obj/item/weapon/reagent_containers/food/drinks/teapot" = 0.4,
|
||||
"/obj/item/weapon/reagent_containers/food/drinks/flask/shiny" = 0.3,
|
||||
"/obj/item/weapon/reagent_containers/food/drinks/flask/lithium" = 0.3,
|
||||
"/obj/item/bodybag" = 0.7,
|
||||
"/obj/item/weapon/reagent_containers/spray/cleaner" = 0.6,
|
||||
"/obj/item/weapon/tank/emergency_oxygen" = 0.7,
|
||||
"/obj/item/weapon/tank/emergency_oxygen/double" = 0.4,
|
||||
"/obj/item/clothing/mask/smokable/pipe/cobpipe" = 0.5,
|
||||
"/obj/item/clothing/mask/smokable/cigarette/cigar/cohiba" = 0.7,
|
||||
"/obj/item/weapon/flame/lighter" = 0.9,
|
||||
"/obj/item/weapon/flame/lighter/zippo" = 0.7,
|
||||
"/obj/item/device/gps/engineering" = 0.6,
|
||||
"/obj/item/device/megaphone" = 0.5,
|
||||
"/obj/item/device/floor_painter" = 0.6,
|
||||
"/obj/random/toolbox" = 1,
|
||||
"/obj/random/coin" = 1.2,
|
||||
"/obj/random/tech_supply" = 1.2,
|
||||
"/obj/random/powercell" = 0.8,
|
||||
"/obj/random/colored_jumpsuit" = 0.7,
|
||||
"/obj/random/booze" = 1.1,
|
||||
"/obj/random/belt" = 0.9,
|
||||
"/obj/random/contraband" = 0.9,
|
||||
"/obj/random/glowstick" = 0.7,
|
||||
"/obj/item/weapon/caution/cone" = 0.7,
|
||||
"/obj/item/weapon/staff/broom" = 0.5,
|
||||
"/obj/item/weapon/soap" = 0.4,
|
||||
"/obj/item/weapon/material/wirerod" = 0.4,
|
||||
"/obj/item/weapon/storage/box/donkpockets" = 0.6,
|
||||
"/obj/item/weapon/contraband/poster" = 1.3,
|
||||
"/obj/item/device/magnetic_lock/security" = 0.3,
|
||||
"/obj/item/device/magnetic_lock/engineering" = 0.3
|
||||
)
|
||||
return pickweight(maint)
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
/obj/structure/New()
|
||||
..()
|
||||
updateVisibility(src)
|
||||
if(climbable)
|
||||
verbs += /obj/structure/proc/climb_on
|
||||
|
||||
|
||||
@@ -55,7 +55,12 @@
|
||||
else
|
||||
user << "It is full."
|
||||
|
||||
|
||||
/obj/structure/closet/proc/stored_weight()
|
||||
var/content_size = 0
|
||||
for(var/obj/item/I in src.contents)
|
||||
if(!I.anchored)
|
||||
content_size += Ceiling(I.w_class/2)
|
||||
return content_size
|
||||
|
||||
/obj/structure/closet/alter_health()
|
||||
return get_turf(src)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
icon_state = "cabinet_closed"
|
||||
icon_closed = "cabinet_closed"
|
||||
icon_opened = "cabinet_open"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
/obj/structure/closet/cabinet/update_icon()
|
||||
if(!opened)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
|
||||
New()
|
||||
|
||||
@@ -249,20 +249,22 @@
|
||||
icon_opened = "cabinetdetective_open"
|
||||
icon_broken = "cabinetdetective_broken"
|
||||
icon_off = "cabinetdetective_broken"
|
||||
storage_capacity = 45 //such a big closet deserves a little more capacity
|
||||
|
||||
New()
|
||||
..()
|
||||
new /obj/item/clothing/under/det(src)
|
||||
new /obj/item/clothing/under/det/grey(src)
|
||||
new /obj/item/clothing/under/det/black(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench(src)
|
||||
new /obj/item/clothing/suit/storage/det_trench/grey(src)
|
||||
new /obj/item/clothing/under/det/slob(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit(src)
|
||||
new /obj/item/clothing/suit/storage/det_suit/technicolor(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/blue(src)
|
||||
new /obj/item/clothing/suit/storage/forensics/red(src)
|
||||
new /obj/item/clothing/gloves/black(src)
|
||||
new /obj/item/clothing/head/det(src)
|
||||
new /obj/item/clothing/head/det/grey(src)
|
||||
new /obj/item/clothing/shoes/laceup(src)
|
||||
new /obj/item/clothing/head/det_hat(src)
|
||||
new /obj/item/clothing/head/det_hat/technicolor(src)
|
||||
new /obj/item/clothing/shoes/brown(src)
|
||||
new /obj/item/weapon/storage/box/evidence(src)
|
||||
new /obj/item/device/radio/headset/headset_sec(src)
|
||||
new /obj/item/clothing/suit/storage/vest/detective(src)
|
||||
|
||||
@@ -36,11 +36,20 @@
|
||||
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
|
||||
for(var/obj/O in src)
|
||||
O.forceMove(get_turf(src))
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
if(climbable)
|
||||
structure_shaken()
|
||||
|
||||
for (var/mob/M in src)
|
||||
M.forceMove(get_turf(src))
|
||||
if (M.stat == CONSCIOUS)
|
||||
M.visible_message(span("danger","\The [M.name] bursts out of the [src]!"), span("danger","You burst out of the [src]!"))
|
||||
else
|
||||
M.visible_message(span("danger","\The [M.name] tumbles out of the [src]!"))
|
||||
|
||||
icon_state = icon_opened
|
||||
src.opened = 1
|
||||
|
||||
return 1
|
||||
|
||||
/obj/structure/closet/crate/close()
|
||||
@@ -67,6 +76,14 @@
|
||||
src.opened = 0
|
||||
return 1
|
||||
|
||||
|
||||
/obj/structure/closet/crate/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover,/obj/item/projectile) && prob(50))
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/closet/crate/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(opened)
|
||||
return ..()
|
||||
@@ -496,3 +513,60 @@
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
// new /obj/item/weapon/pestspray(src)
|
||||
|
||||
|
||||
|
||||
//A crate that populates itself with randomly selected loot from randomstock.dm
|
||||
//Can be passed in a rarity value, which is used as a multiplier on the rare/uncommon chance
|
||||
//Quantity of spawns is number of discrete selections from the loot lists, default 10
|
||||
|
||||
/obj/structure/closet/crate/loot
|
||||
name = "unusual container"
|
||||
desc = "A mysterious container of unknown origins. What mysteries lie within?"
|
||||
var/rarity = 1
|
||||
var/quantity = 10
|
||||
var/list/spawntypes
|
||||
|
||||
//The crate chooses its icon randomly from a number of noticeable options.
|
||||
//None of these are the standard grey crate sprite, and a few are currently unused ingame
|
||||
//This ensures that people stumbling across a lootbox will notice it's different and investigate
|
||||
var/list/iconchoices = list(
|
||||
"radiation" = "radiationopen",
|
||||
"o2crate" = "o2crateopen",
|
||||
"freezer" = "freezeropen",
|
||||
"weaponcrate" = "weaponcrateopen",
|
||||
"largebins" = "largebinsopen",
|
||||
"phoroncrate" = "phoroncrateopen",
|
||||
"trashcart" = "trashcartopen",
|
||||
"critter" = "critteropen",
|
||||
"largemetal" = "largemetalopen",
|
||||
"medicalcrate" = "medicalcrateopen")
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/New(var/location, var/_rarity = 1, var/_quantity = 10)
|
||||
|
||||
rarity = _rarity
|
||||
quantity = _quantity
|
||||
..(location)
|
||||
|
||||
|
||||
/obj/structure/closet/crate/loot/initialize()
|
||||
spawntypes = list("1" = STOCK_RARE_PROB*rarity, "2" = STOCK_UNCOMMON_PROB*rarity, "3" = (100 - ((STOCK_RARE_PROB*rarity) + (STOCK_UNCOMMON_PROB*rarity))))
|
||||
|
||||
icon_closed = pick(iconchoices)
|
||||
icon_opened = iconchoices[icon_closed]
|
||||
update_icon()
|
||||
while (quantity > 0)
|
||||
quantity --
|
||||
var/newtype = get_spawntype()
|
||||
spawn_stock(newtype,src)
|
||||
|
||||
/obj/structure/closet/crate/loot/proc/get_spawntype()
|
||||
var/stocktype = pickweight(spawntypes)
|
||||
switch (stocktype)
|
||||
if ("1")
|
||||
return pickweight(random_stock_rare)
|
||||
if ("2")
|
||||
return pickweight(random_stock_uncommon)
|
||||
if ("3")
|
||||
return pickweight(random_stock_common)
|
||||
@@ -78,6 +78,15 @@
|
||||
icon = 'icons/obj/plants.dmi'
|
||||
icon_state = "plant-26"
|
||||
|
||||
//Added random icon selection for potted plants.
|
||||
//It was silly they always used the same sprite when we have 26 sprites of them in the icon file
|
||||
/obj/structure/flora/pottedplant/random/New()
|
||||
..()
|
||||
var/number = rand(1,26)
|
||||
if (number < 10)
|
||||
number = "0[number]"
|
||||
icon_state = "plant-[number]"
|
||||
|
||||
//newbushes
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
|
||||
@@ -23,21 +23,24 @@
|
||||
/obj/structure/sign/attackby(obj/item/tool as obj, mob/user as mob) //deconstruction
|
||||
if(istype(tool, /obj/item/weapon/screwdriver) && !istype(src, /obj/structure/sign/double))
|
||||
user << "You unfasten the sign with your [tool]."
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
unfasten()
|
||||
else ..()
|
||||
|
||||
/obj/structure/sign/proc/unfasten()
|
||||
var/obj/item/sign/S = new(src.loc)
|
||||
S.name = name
|
||||
S.desc = desc
|
||||
S.icon_state = icon_state
|
||||
//var/icon/I = icon('icons/obj/decals.dmi', icon_state)
|
||||
//S.icon = I.Scale(24, 24)
|
||||
S.sign_state = icon_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/sign
|
||||
name = "sign"
|
||||
desc = ""
|
||||
icon = 'icons/obj/decals.dmi'
|
||||
w_class = 3 //big
|
||||
w_class = 5 //big
|
||||
var/sign_state = ""
|
||||
|
||||
/obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/obj/structure/window/attack_tk(mob/user as mob)
|
||||
user.visible_message("<span class='notice'>Something knocks on [src].</span>")
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 60, 1)
|
||||
|
||||
/obj/structure/window/attack_hand(mob/user as mob)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
@@ -186,13 +186,13 @@
|
||||
attack_generic(H,25)
|
||||
return
|
||||
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 90, 1)
|
||||
user.do_attack_animation(src)
|
||||
usr.visible_message("<span class='danger'>\The [usr] bangs against \the [src]!</span>",
|
||||
"<span class='danger'>You bang against \the [src]!</span>",
|
||||
"You hear a banging sound.")
|
||||
else
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
|
||||
playsound(src.loc, 'sound/effects/glassknock.ogg', 60, 1)
|
||||
usr.visible_message("[usr.name] knocks on the [src.name].",
|
||||
"You knock on the [src.name].",
|
||||
"You hear a knocking sound.")
|
||||
@@ -207,6 +207,7 @@
|
||||
take_damage(damage)
|
||||
else
|
||||
visible_message("<span class='notice'>\The [user] bonks \the [src] harmlessly.</span>")
|
||||
playsound(src.loc, 'sound/effects/Glasshit.ogg', 7, 1, -1)
|
||||
user.do_attack_animation(src)
|
||||
return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user