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:
skull132
2016-11-12 00:10:21 +02:00
187 changed files with 6193 additions and 1183 deletions
+2 -1
View File
@@ -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>"
+273 -166
View File
@@ -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)
+22 -1
View File
@@ -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 ..()
+15 -6
View File
@@ -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