Merge remote-tracking branch 'citadel/master' into combat_v7

This commit is contained in:
silicons
2021-03-15 14:39:16 -07:00
870 changed files with 32914 additions and 23755 deletions
@@ -14,8 +14,41 @@
w_class = WEIGHT_CLASS_SMALL
grind_results = list(/datum/reagent/silicon = 20)
var/build_path = null
///determines if the circuit board originated from a vendor off station or not.
var/onstation = TRUE
/obj/item/circuitboard/proc/apply_default_parts(obj/machinery/M)
if(LAZYLEN(M.component_parts))
// This really shouldn't happen. If it somehow does, print out a stack trace and gracefully handle it.
stack_trace("apply_defauly_parts called on machine that already had component_parts: [M]")
// Move to nullspace so you don't trigger handle_atom_del logic and remove existing parts.
for(var/obj/item/part in M.component_parts)
part.moveToNullspace(loc)
qdel(part)
// List of components always contains the circuit board used to build it.
M.component_parts = list(src)
forceMove(M)
if(M.circuit != src)
// This really shouldn't happen. If it somehow does, print out a stack trace and gracefully handle it.
stack_trace("apply_default_parts called from a circuit board that does not belong to machine: [M]")
// Move to nullspace so you don't trigger handle_atom_del logic, remove old circuit, add new circuit.
M.circuit.moveToNullspace()
qdel(M.circuit)
M.circuit = src
return
/**
* Used to allow the circuitboard to configure a machine in some way, shape or form.
*
* Arguments:
* * machine - The machine to attempt to configure.
*/
/obj/item/circuitboard/proc/configure_machine(obj/machinery/machine)
return
// Circuitboard/machine
@@ -36,8 +69,8 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
if(!req_components)
return
M.component_parts = list(src) // List of components always contains a board
moveToNullspace()
. = ..()
moveToNullspace() // thorw ourselves in nullspace
for(var/comp_path in req_components)
var/comp_amt = req_components[comp_path]
@@ -1,58 +1,22 @@
/obj/item/circuitboard/computer/turbine_computer
name = "Turbine Computer (Computer Board)"
build_path = /obj/machinery/computer/turbine_computer
/obj/item/circuitboard/computer/launchpad_console
name = "Launchpad Control Console (Computer Board)"
build_path = /obj/machinery/computer/launchpad
/obj/item/circuitboard/computer/message_monitor
name = "Message Monitor (Computer Board)"
build_path = /obj/machinery/computer/message_monitor
/obj/item/circuitboard/computer/security
name = "Security Cameras (Computer Board)"
build_path = /obj/machinery/computer/security
/obj/item/circuitboard/computer/security/shuttle
name = "Shuttlelinking Security Cameras (Computer Board)"
build_path = /obj/machinery/computer/security/shuttle
/obj/item/circuitboard/computer/xenobiology
name = "circuit board (Xenobiology Console)"
build_path = /obj/machinery/computer/camera_advanced/xenobio
/obj/item/circuitboard/computer/base_construction
name = "circuit board (Aux Mining Base Construction Console)"
build_path = /obj/machinery/computer/camera_advanced/base_construction
//Command
/obj/item/circuitboard/computer/aiupload
name = "AI Upload (Computer Board)"
icon_state = "command"
build_path = /obj/machinery/computer/upload/ai
/obj/item/circuitboard/computer/borgupload
name = "Cyborg Upload (Computer Board)"
icon_state = "command"
build_path = /obj/machinery/computer/upload/borg
/obj/item/circuitboard/computer/med_data
name = "Medical Records Console (Computer Board)"
build_path = /obj/machinery/computer/med_data
/obj/item/circuitboard/computer/pandemic
name = "PanD.E.M.I.C. 2200 (Computer Board)"
build_path = /obj/machinery/computer/pandemic
/obj/item/circuitboard/computer/scan_consolenew
name = "DNA Machine (Computer Board)"
build_path = /obj/machinery/computer/scan_consolenew
/obj/item/circuitboard/computer/communications
name = "Communications (Computer Board)"
build_path = /obj/machinery/computer/communications
var/lastTimeUsed = 0
/obj/item/circuitboard/computer/bsa_control
name = "Bluespace Artillery Controls (Computer Board)"
build_path = /obj/machinery/computer/bsa_control
/obj/item/circuitboard/computer/card
name = "ID Console (Computer Board)"
icon_state = "command"
build_path = /obj/machinery/computer/card
/obj/item/circuitboard/computer/card/centcom
@@ -73,266 +37,238 @@
return ..()
/obj/item/circuitboard/computer/card/minor/examine(user)
. = ..()
. += "Currently set to \"[dept_list[target_dept]]\"."
..()
to_chat(user, "<span class='notice'>Currently set to \"[dept_list[target_dept]]\".</span>")
//obj/item/circuitboard/computer/shield
// name = "Shield Control (Computer Board)"
// icon_state = "command"
// build_path = /obj/machinery/computer/stationshield
/obj/item/circuitboard/computer/teleporter
name = "Teleporter (Computer Board)"
build_path = /obj/machinery/computer/teleporter
/obj/item/circuitboard/computer/secure_data
name = "Security Records Console (Computer Board)"
build_path = /obj/machinery/computer/secure_data
//Engineering
/obj/item/circuitboard/computer/stationalert
name = "Station Alerts (Computer Board)"
build_path = /obj/machinery/computer/station_alert
/obj/item/circuitboard/computer/apc_control
name = "\improper Power Flow Control Console (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/apc_control
/obj/item/circuitboard/computer/atmos_alert
name = "Atmospheric Alert (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/atmos_alert
/obj/item/circuitboard/computer/atmos_control
name = "Atmospheric Monitor (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/atmos_control
/obj/item/circuitboard/computer/atmos_control/incinerator
name = "Incinerator Air Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/incinerator
/obj/item/circuitboard/computer/atmos_control/toxinsmix
name = "Toxins Mixing Air Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/toxinsmix
/obj/item/circuitboard/computer/atmos_control/tank
name = "Tank Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank
/obj/item/circuitboard/computer/atmos_alert
name = "Atmospheric Alert (Computer Board)"
build_path = /obj/machinery/computer/atmos_alert
/obj/item/circuitboard/computer/atmos_control/tank/oxygen_tank
name = "Oxygen Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/oxygen_tank
/obj/item/circuitboard/computer/pod
name = "Massdriver control (Computer Board)"
build_path = /obj/machinery/computer/pod
/obj/item/circuitboard/computer/atmos_control/tank/toxin_tank
name = "Plasma Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/toxin_tank
/obj/item/circuitboard/computer/robotics
name = "Robotics Control (Computer Board)"
build_path = /obj/machinery/computer/robotics
/obj/item/circuitboard/computer/atmos_control/tank/air_tank
name = "Mixed Air Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/air_tank
/obj/item/circuitboard/computer/cloning
name = "Cloning (Computer Board)"
build_path = /obj/machinery/computer/cloning
var/list/records = list()
/obj/item/circuitboard/computer/atmos_control/tank/mix_tank
name = "Gas Mix Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/mix_tank
/obj/item/circuitboard/computer/cloning/prototype
name = "Prototype Cloning (Computer Board)"
build_path = /obj/machinery/computer/cloning/prototype
/obj/item/circuitboard/computer/atmos_control/tank/nitrous_tank
name = "Nitrous Oxide Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/nitrous_tank
/obj/item/circuitboard/computer/arcade/battle
name = "Arcade Battle (Computer Board)"
build_path = /obj/machinery/computer/arcade/battle
/obj/item/circuitboard/computer/atmos_control/tank/nitrogen_tank
name = "Nitrogen Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/nitrogen_tank
/obj/item/circuitboard/computer/arcade/orion_trail
name = "Orion Trail (Computer Board)"
build_path = /obj/machinery/computer/arcade/orion_trail
/obj/item/circuitboard/computer/atmos_control/tank/carbon_tank
name = "Carbon Dioxide Supply Control (Computer Board)"
build_path = /obj/machinery/computer/atmos_control/tank/carbon_tank
/obj/item/circuitboard/computer/arcade/minesweeper
name = "Minesweeper (Computer Board)"
build_path = /obj/machinery/computer/arcade/minesweeper
// /obj/item/circuitboard/computer/atmos_control/tank/bz_tank
// name = "BZ Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/bz_tank
/obj/item/circuitboard/computer/arcade/amputation
name = "Mediborg's Amputation Adventure (Computer Board)"
build_path = /obj/machinery/computer/arcade/amputation
// /obj/item/circuitboard/computer/atmos_control/tank/freon_tank
// name = "Freon Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/freon_tank
/obj/item/circuitboard/computer/turbine_control
name = "Turbine control (Computer Board)"
build_path = /obj/machinery/computer/turbine_computer
// /obj/item/circuitboard/computer/atmos_control/tank/halon_tank
// name = "Halon Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/halon_tank
/obj/item/circuitboard/computer/solar_control
name = "Solar Control (Computer Board)" //name fixed 250810
build_path = /obj/machinery/power/solar_control
// /obj/item/circuitboard/computer/atmos_control/tank/healium_tank
// name = "Healium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/healium_tank
/obj/item/circuitboard/computer/powermonitor
name = "Power Monitor (Computer Board)" //name fixed 250810
build_path = /obj/machinery/computer/monitor
// /obj/item/circuitboard/computer/atmos_control/tank/hydrogen_tank
// name = "Hydrogen Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/hydrogen_tank
/obj/item/circuitboard/computer/powermonitor/secret
name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's.
build_path = /obj/machinery/computer/monitor/secret
// /obj/item/circuitboard/computer/atmos_control/tank/hypernoblium_tank
// name = "Hypernoblium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/hypernoblium_tank
/obj/item/circuitboard/computer/olddoor
name = "DoorMex (Computer Board)"
build_path = /obj/machinery/computer/pod/old
// /obj/item/circuitboard/computer/atmos_control/tank/miasma_tank
// name = "Miasma Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/miasma_tank
/obj/item/circuitboard/computer/syndicatedoor
name = "ProComp Executive (Computer Board)"
build_path = /obj/machinery/computer/pod/old/syndicate
// /obj/item/circuitboard/computer/atmos_control/tank/nitryl_tank
// name = "Nitryl Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/nitryl_tank
/obj/item/circuitboard/computer/swfdoor
name = "Magix (Computer Board)"
build_path = /obj/machinery/computer/pod/old/swf
// /obj/item/circuitboard/computer/atmos_control/tank/pluoxium_tank
// name = "Pluoxium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/pluoxium_tank
/obj/item/circuitboard/computer/prisoner
name = "Prisoner Management Console (Computer Board)"
build_path = /obj/machinery/computer/prisoner/management
// /obj/item/circuitboard/computer/atmos_control/tank/proto_nitrate_tank
// name = "Proto-Nitrate Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/proto_nitrate_tank
/obj/item/circuitboard/computer/gulag_teleporter_console
name = "Labor Camp teleporter console (Computer Board)"
build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer
// /obj/item/circuitboard/computer/atmos_control/tank/stimulum_tank
// name = "Stimulum Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/stimulum_tank
/obj/item/circuitboard/computer/rdconsole/production
name = "R&D Console Production Only (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/production
// /obj/item/circuitboard/computer/atmos_control/tank/tritium_tank
// name = "Tritium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/tritium_tank
/obj/item/circuitboard/computer/rdconsole
name = "R&D Console (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/core
// /obj/item/circuitboard/computer/atmos_control/tank/water_vapor
// name = "Water Vapor Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/water_vapor
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(build_path == /obj/machinery/computer/rdconsole/core)
name = "R&D Console - Robotics (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/robotics
to_chat(user, "<span class='notice'>Access protocols successfully updated.</span>")
else
name = "R&D Console (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/core
to_chat(user, "<span class='notice'>Defaulting access protocols.</span>")
else
return ..()
// /obj/item/circuitboard/computer/atmos_control/tank/zauker_tank
// name = "Zauker Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/zauker_tank
/obj/item/circuitboard/computer/mecha_control
name = "Exosuit Control Console (Computer Board)"
build_path = /obj/machinery/computer/mecha
// /obj/item/circuitboard/computer/atmos_control/tank/helium_tank
// name = "Helium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/helium_tank
/obj/item/circuitboard/computer/rdservercontrol
name = "R&D Server Control (Computer Board)"
build_path = /obj/machinery/computer/rdservercontrol
// /obj/item/circuitboard/computer/atmos_control/tank/antinoblium_tank
// name = "Antinoblium Supply Control (Computer Board)"
// build_path = /obj/machinery/computer/atmos_control/tank/antinoblium_tank
/obj/item/circuitboard/computer/crew
name = "Crew Monitoring Console (Computer Board)"
build_path = /obj/machinery/computer/crew
/obj/item/circuitboard/computer/auxiliary_base
name = "Auxiliary Base Management Console (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/auxillary_base
/obj/item/circuitboard/computer/mech_bay_power_console
name = "Mech Bay Power Control Console (Computer Board)"
build_path = /obj/machinery/computer/mech_bay_power_console
/obj/item/circuitboard/computer/base_construction
name = "circuit board (Generic Base Construction Console)"
icon_state = "engineering"
build_path = /obj/machinery/computer/camera_advanced/base_construction
/obj/item/circuitboard/computer/cargo
name = "Supply Console (Computer Board)"
build_path = /obj/machinery/computer/cargo
var/contraband = FALSE
// /obj/item/circuitboard/computer/base_construction/aux
// name = "circuit board (Aux Mining Base Construction Console)"
// icon_state = "engineering"
// build_path = /obj/machinery/computer/camera_advanced/base_construction/aux
/obj/item/circuitboard/computer/cargo/multitool_act(mob/living/user)
if(!(obj_flags & EMAGGED))
contraband = !contraband
to_chat(user, "<span class='notice'>Receiver spectrum set to [contraband ? "Broad" : "Standard"].</span>")
else
to_chat(user, "<span class='notice'>The spectrum chip is unresponsive.</span>")
/obj/item/circuitboard/computer/cargo/emag_act(mob/living/user)
. = ..()
if(obj_flags & EMAGGED)
return
contraband = TRUE
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
return TRUE
/obj/item/circuitboard/computer/cargo/express
name = "Express Supply Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/express
/obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user)
if (!(obj_flags & EMAGGED))
to_chat(user, "<span class='notice'>Routing protocols are already set to: \"factory defaults\".</span>")
else
to_chat(user, "<span class='notice'>You reset the routing protocols to: \"factory defaults\".</span>")
obj_flags &= ~EMAGGED
/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user)
. = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT)
if(obj_flags & EMAGGED)
return
to_chat(user, "<span class='notice'>You change the routing protocols, allowing the Drop Pod to land anywhere on the station.</span>")
obj_flags |= EMAGGED
return TRUE
/obj/item/circuitboard/computer/cargo/request
name = "Supply Request Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/request
/obj/item/circuitboard/computer/bounty
name = "Nanotrasen Bounty Console (Computer Board)"
build_path = /obj/machinery/computer/bounty
/obj/item/circuitboard/computer/operating
name = "Operating Computer (Computer Board)"
build_path = /obj/machinery/computer/operating
/obj/item/circuitboard/computer/mining
name = "Outpost Status Display (Computer Board)"
build_path = /obj/machinery/computer/security/mining
/obj/item/circuitboard/computer/research
name = "Research Monitor (Computer Board)"
build_path = /obj/machinery/computer/security/research
// /obj/item/circuitboard/computer/base_construction/centcom
// name = "circuit board (Centcom Base Construction Console)"
// icon_state = "engineering"
// build_path = /obj/machinery/computer/camera_advanced/base_construction/centcom
/obj/item/circuitboard/computer/comm_monitor
name = "Telecommunications Monitor (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/telecomms/monitor
/obj/item/circuitboard/computer/comm_server
name = "Telecommunications Server Monitor (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/telecomms/server
/obj/item/circuitboard/computer/labor_shuttle
name = "Labor Shuttle (Computer Board)"
build_path = /obj/machinery/computer/shuttle/labor
/obj/item/circuitboard/computer/communications
name = "Communications (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/communications
/obj/item/circuitboard/computer/labor_shuttle/one_way
name = "Prisoner Shuttle Console (Computer Board)"
build_path = /obj/machinery/computer/shuttle/labor/one_way
/obj/item/circuitboard/computer/message_monitor
name = "Message Monitor (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/message_monitor
/obj/item/circuitboard/computer/ferry
name = "Transport Ferry (Computer Board)"
build_path = /obj/machinery/computer/shuttle/ferry
/obj/item/circuitboard/computer/powermonitor
name = "Power Monitor (Computer Board)" //name fixed 250810
icon_state = "engineering"
build_path = /obj/machinery/computer/monitor
/obj/item/circuitboard/computer/ferry/request
name = "Transport Ferry Console (Computer Board)"
build_path = /obj/machinery/computer/shuttle/ferry/request
/obj/item/circuitboard/computer/powermonitor/secret
name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's.
icon_state = "engineering"
build_path = /obj/machinery/computer/monitor/secret
/obj/item/circuitboard/computer/mining_shuttle
name = "Mining Shuttle (Computer Board)"
build_path = /obj/machinery/computer/shuttle/mining
/obj/item/circuitboard/computer/sat_control
name = "Satellite Network Control (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/sat_control
/obj/item/circuitboard/computer/mining_shuttle/common
name = "Lavaland Shuttle (Computer Board)"
build_path = /obj/machinery/computer/shuttle/mining/common
/obj/item/circuitboard/computer/solar_control
name = "Solar Control (Computer Board)" //name fixed 250810
icon_state = "engineering"
build_path = /obj/machinery/power/solar_control
/obj/item/circuitboard/computer/snow_taxi
name = "Snow Taxi (Computer Board)"
build_path = /obj/machinery/computer/shuttle/snow_taxi
/obj/item/circuitboard/computer/stationalert
name = "Station Alerts (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/station_alert
/obj/item/circuitboard/computer/white_ship
name = "White Ship (Computer Board)"
build_path = /obj/machinery/computer/shuttle/white_ship
/obj/item/circuitboard/computer/turbine_computer
name = "Turbine Computer (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/turbine_computer
/obj/item/circuitboard/computer/white_ship/pod
name = "Salvage Pod (Computer Board)"
build_path = /obj/machinery/computer/shuttle/white_ship/pod
/obj/item/circuitboard/computer/turbine_control
name = "Turbine control (Computer Board)"
icon_state = "engineering"
build_path = /obj/machinery/computer/turbine_computer
/obj/item/circuitboard/computer/white_ship/pod/recall
name = "Salvage Pod Recall (Computer Board)"
build_path = /obj/machinery/computer/shuttle/white_ship/pod/recall
//Generic
/obj/item/circuitboard/computer/auxillary_base
name = "Auxillary Base Management Console (Computer Board)"
build_path = /obj/machinery/computer/auxillary_base
/obj/item/circuitboard/computer/arcade/amputation
name = "Mediborg's Amputation Adventure (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/arcade/amputation
/obj/item/circuitboard/computer/arcade/battle
name = "Arcade Battle (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/arcade/battle
/obj/item/circuitboard/computer/arcade/orion_trail
name = "Orion Trail (Computer Board)"
build_path = /obj/machinery/computer/arcade/orion_trail
/obj/item/circuitboard/computer/arcade/minesweeper
name = "Minesweeper (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/arcade/minesweeper
/obj/item/circuitboard/computer/holodeck// Not going to let people get this, but it's just here for future
name = "Holodeck Control (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/holodeck
/obj/item/circuitboard/computer/aifixer
name = "AI Integrity Restorer (Computer Board)"
build_path = /obj/machinery/computer/aifixer
/obj/item/circuitboard/computer/slot_machine
name = "Slot Machine (Computer Board)"
build_path = /obj/machinery/computer/slot_machine
/obj/item/circuitboard/computer/libraryconsole
name = "Library Visitor Console (Computer Board)"
build_path = /obj/machinery/computer/libraryconsole
@@ -350,16 +286,34 @@
else
return ..()
/obj/item/circuitboard/computer/apc_control
name = "\improper Power Flow Control Console (Computer Board)"
build_path = /obj/machinery/computer/apc_control
/obj/item/circuitboard/computer/monastery_shuttle
name = "Monastery Shuttle (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/shuttle/monastery_shuttle
/obj/item/circuitboard/computer/olddoor
name = "DoorMex (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/pod/old
/obj/item/circuitboard/computer/pod
name = "Massdriver control (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/pod
/obj/item/circuitboard/computer/slot_machine
name = "Slot Machine (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/slot_machine
/obj/item/circuitboard/computer/swfdoor
name = "Magix (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/pod/old/swf
/obj/item/circuitboard/computer/syndicate_shuttle
name = "Syndicate Shuttle (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/shuttle/syndicate
var/challenge = FALSE
var/moved = FALSE
@@ -372,26 +326,296 @@
GLOB.syndicate_shuttle_boards -= src
return ..()
/obj/item/circuitboard/computer/bsa_control
name = "Bluespace Artillery Controls (Computer Board)"
build_path = /obj/machinery/computer/bsa_control
/obj/item/circuitboard/computer/syndicatedoor
name = "ProComp Executive (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/pod/old/syndicate
/obj/item/circuitboard/computer/sat_control
name = "Satellite Network Control (Computer Board)"
build_path = /obj/machinery/computer/sat_control
/obj/item/circuitboard/computer/white_ship
name = "White Ship (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/shuttle/white_ship
// /obj/item/circuitboard/computer/white_ship/bridge
// name = "White Ship Bridge (Computer Board)"
// icon_state = "generic"
// build_path = /obj/machinery/computer/shuttle/white_ship/bridge
/obj/item/circuitboard/computer/white_ship/pod
name = "Salvage Pod (Computer Board)"
build_path = /obj/machinery/computer/shuttle/white_ship/pod
/obj/item/circuitboard/computer/white_ship/pod/recall
name = "Salvage Pod Recall (Computer Board)"
build_path = /obj/machinery/computer/shuttle/white_ship/pod/recall
/obj/item/circuitboard/computer/snow_taxi
name = "Snow Taxi (Computer Board)"
build_path = /obj/machinery/computer/shuttle/snow_taxi
// /obj/item/circuitboard/computer/bountypad
// name = "Bounty Pad (Computer Board)"
// build_path = /obj/machinery/computer/piratepad_control/civilian
/obj/item/circuitboard/computer/security/shuttle
name = "Shuttlelinking Security Cameras (Computer Board)"
icon_state = "generic"
build_path = /obj/machinery/computer/security/shuttle
//Medical
/obj/item/circuitboard/computer/crew
name = "Crew Monitoring Console (Computer Board)"
icon_state = "medical"
build_path = /obj/machinery/computer/crew
/obj/item/circuitboard/computer/med_data
name = "Medical Records Console (Computer Board)"
icon_state = "medical"
build_path = /obj/machinery/computer/med_data
/obj/item/circuitboard/computer/operating
name = "Operating Computer (Computer Board)"
icon_state = "medical"
build_path = /obj/machinery/computer/operating
/obj/item/circuitboard/computer/pandemic
name = "PanD.E.M.I.C. 2200 (Computer Board)"
icon_state = "medical"
build_path = /obj/machinery/computer/pandemic
/obj/item/circuitboard/computer/cloning
name = "Cloning (Computer Board)"
icon_state = "medical"
build_path = /obj/machinery/computer/cloning
var/list/records = list()
/obj/item/circuitboard/computer/cloning/prototype
name = "Prototype Cloning (Computer Board)"
build_path = /obj/machinery/computer/cloning/prototype
//Science
/obj/item/circuitboard/computer/aifixer
name = "AI Integrity Restorer (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/aifixer
/obj/item/circuitboard/computer/launchpad_console
name = "Launchpad Control Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/launchpad
/obj/item/circuitboard/computer/mech_bay_power_console
name = "Mech Bay Power Control Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/mech_bay_power_console
/obj/item/circuitboard/computer/mecha_control
name = "Exosuit Control Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/mecha
/obj/item/circuitboard/computer/nanite_chamber_control
name = "Nanite Chamber Control (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/nanite_chamber_control
/obj/item/circuitboard/computer/nanite_cloud_controller
name = "Nanite Cloud Control (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/nanite_cloud_controller
/obj/item/circuitboard/computer/rdconsole/production
name = "R&D Console Production Only (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/rdconsole/production
/obj/item/circuitboard/computer/shuttle/flight_control
name = "Shuttle Flight Control (Computer Board)"
build_path = /obj/machinery/computer/custom_shuttle
/obj/item/circuitboard/computer/rdconsole
name = "R&D Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/rdconsole/core
/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params)
if(I.tool_behaviour == TOOL_SCREWDRIVER)
if(build_path == /obj/machinery/computer/rdconsole/core)
name = "R&D Console - Robotics (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/robotics
to_chat(user, "<span class='notice'>Access protocols successfully updated.</span>")
else
name = "R&D Console (Computer Board)"
build_path = /obj/machinery/computer/rdconsole/core
to_chat(user, "<span class='notice'>Defaulting access protocols.</span>")
else
return ..()
/obj/item/circuitboard/computer/rdservercontrol
name = "R&D Server Control (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/rdservercontrol
/obj/item/circuitboard/computer/research
name = "Research Monitor (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/security/research
/obj/item/circuitboard/computer/robotics
name = "Robotics Control (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/robotics
/obj/item/circuitboard/computer/teleporter
name = "Teleporter (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/teleporter
/obj/item/circuitboard/computer/xenobiology
name = "Xenobiology Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/camera_advanced/xenobio
/obj/item/circuitboard/computer/scan_consolenew
name = "DNA Console (Computer Board)"
icon_state = "science"
build_path = /obj/machinery/computer/scan_consolenew
// /obj/item/circuitboard/computer/mechpad
// name = "Mecha Orbital Pad Console (Computer Board)"
// icon_state = "science"
// build_path = /obj/machinery/computer/mechpad
//Security
/obj/item/circuitboard/computer/labor_shuttle
name = "Labor Shuttle (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/shuttle/labor
/obj/item/circuitboard/computer/labor_shuttle/one_way
name = "Prisoner Shuttle Console (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/shuttle/labor/one_way
/obj/item/circuitboard/computer/gulag_teleporter_console
name = "Labor Camp teleporter console (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer
/obj/item/circuitboard/computer/prisoner
name = "Prisoner Management Console (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/prisoner/management
/obj/item/circuitboard/computer/secure_data
name = "Security Records Console (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/secure_data
// /obj/item/circuitboard/computer/warrant
// name = "Security Warrant Viewer (Computer Board)"
// icon_state = "security"
// build_path = /obj/machinery/computer/warrant
/obj/item/circuitboard/computer/security
name = "Security Cameras (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/security
/obj/item/circuitboard/computer/advanced_camera
name = "Advanced Camera Console (Computer Board)"
icon_state = "security"
build_path = /obj/machinery/computer/camera_advanced/syndie
//Service
//Supply
/obj/item/circuitboard/computer/cargo
name = "Supply Console (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/cargo
var/contraband = FALSE
/obj/item/circuitboard/computer/cargo/multitool_act(mob/living/user)
. = ..()
if(!(obj_flags & EMAGGED))
contraband = !contraband
to_chat(user, "<span class='notice'>Receiver spectrum set to [contraband ? "Broad" : "Standard"].</span>")
else
to_chat(user, "<span class='alert'>The spectrum chip is unresponsive.</span>")
/obj/item/circuitboard/computer/cargo/emag_act(mob/living/user)
. = ..()
if(!(obj_flags & EMAGGED))
contraband = TRUE
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
/obj/item/circuitboard/computer/cargo/configure_machine(obj/machinery/computer/cargo/machine)
if(!istype(machine))
CRASH("Cargo board attempted to configure incorrect machine type: [machine] ([machine?.type])")
machine.contraband = contraband
if (obj_flags & EMAGGED)
machine.obj_flags |= EMAGGED
else
machine.obj_flags &= ~EMAGGED
/obj/item/circuitboard/computer/cargo/express
name = "Express Supply Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/express
/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user)
if(!(obj_flags & EMAGGED))
contraband = TRUE
obj_flags |= EMAGGED
to_chat(user, "<span class='notice'>You change the routing protocols, allowing the Drop Pod to land anywhere on the station.</span>")
/obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user)
if (!(obj_flags & EMAGGED))
contraband = !contraband
to_chat(user, "<span class='notice'>Receiver spectrum set to [contraband ? "Broad" : "Standard"].</span>")
else
to_chat(user, "<span class='notice'>You reset the destination-routing protocols and receiver spectrum to factory defaults.</span>")
contraband = FALSE
obj_flags &= ~EMAGGED
/obj/item/circuitboard/computer/cargo/request
name = "Supply Request Console (Computer Board)"
build_path = /obj/machinery/computer/cargo/request
/obj/item/circuitboard/computer/bounty
name = "Nanotrasen Bounty Console (Computer Board)"
build_path = /obj/machinery/computer/bounty
/obj/item/circuitboard/computer/ferry
name = "Transport Ferry (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/shuttle/ferry
/obj/item/circuitboard/computer/ferry/request
name = "Transport Ferry Console (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/shuttle/ferry/request
/obj/item/circuitboard/computer/mining
name = "Outpost Status Display (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/security/mining
/obj/item/circuitboard/computer/mining_shuttle
name = "Mining Shuttle (Computer Board)"
icon_state = "supply"
build_path = /obj/machinery/computer/shuttle/mining
/obj/item/circuitboard/computer/mining_shuttle/common
name = "Lavaland Shuttle (Computer Board)"
build_path = /obj/machinery/computer/shuttle/mining/common
/obj/item/circuitboard/computer/shuttle/docker
name = "Shuttle Navigation Computer (Computer Board)"
build_path = /obj/machinery/computer/camera_advanced/shuttle_docker/custom
// DIY shuttle
/obj/item/circuitboard/computer/shuttle/flight_control
name = "Shuttle Flight Control (Computer Board)"
build_path = /obj/machinery/computer/custom_shuttle
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -721,24 +721,24 @@
/obj/item/disk/medical/defib_heal
name = "Defibrillator Healing Disk"
desc = "An upgrade which increases the healing power of the defibrillator"
desc = "An upgrade which increases the healing power of the defibrillator."
icon_state = "heal_disk"
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
/obj/item/disk/medical/defib_shock
name = "Defibrillator Anti-Shock Disk"
desc = "A safety upgrade that guarantees only the patient will get shocked"
desc = "A safety upgrade that guarantees only the patient will get shocked."
icon_state = "zap_disk"
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 6000, /datum/material/silver = 6000)
/obj/item/disk/medical/defib_decay
name = "Defibrillator Body-Decay Extender Disk"
desc = "An upgrade allowing the defibrillator to work on more decayed bodies"
desc = "An upgrade allowing the defibrillator to work on bodies that have decayed further."
icon_state = "body_disk"
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 18000, /datum/material/gold = 16000, /datum/material/silver = 6000, /datum/material/titanium = 2000)
/obj/item/disk/medical/defib_speed
name = "Defibrillator Fast Charge Disk"
desc = "An upgrade to the defibrillator capacitors, which let it charge faster"
desc = "An upgrade to the defibrillator capacitors, which lets it charge faster."
icon_state = "fast_disk"
custom_materials = list(/datum/material/iron=16000, /datum/material/glass = 8000, /datum/material/gold = 26000, /datum/material/silver = 26000)
+4 -1
View File
@@ -122,7 +122,10 @@
/obj/item/paicard/proc/setPersonality(mob/living/silicon/pai/personality)
src.pai = personality
src.add_overlay("pai-null")
var/list/policies = CONFIG_GET(keyed_list/policyconfig)
var/policy = policies[POLICYCONFIG_PAI]
if(policy)
to_chat(personality, policy)
playsound(loc, 'sound/effects/pai_boot.ogg', 50, 1, -1)
audible_message("\The [src] plays a cheerful startup noise!")
+5
View File
@@ -180,6 +180,11 @@
//Called from turf.dm turf/dblclick
/obj/item/flamethrower/proc/flame_turf(turflist)
var/mob/living/carbon/human/user = loc
// no fun for pacifists
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to put others in danger!</span>")
return
if(!lit || operating)
return
operating = TRUE
+14 -11
View File
@@ -12,7 +12,7 @@
lefthand_file = 'icons/mob/inhands/equipment/toolbox_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/toolbox_righthand.dmi'
icon = 'icons/obj/items_and_weapons.dmi'
w_class = WEIGHT_CLASS_BULKY
w_class = WEIGHT_CLASS_GIGANTIC
force = 12
total_mass = TOTAL_MASS_NORMAL_ITEM // average toolbox
attack_verb = list("robusted")
@@ -70,19 +70,19 @@
else
. += "<span class='his_grace'>[src] is latched closed.</span>"
/obj/item/his_grace/relaymove(mob/living/user) //Allows changelings, etc. to climb out of Him after they revive, provided He isn't active
/obj/item/his_grace/relaymove(mob/living/user, direction) //Allows changelings, etc. to climb out of Him after they revive, provided He isn't active
if(!awakened)
user.forceMove(get_turf(src))
user.visible_message("<span class='warning'>[user] scrambles out of [src]!</span>", "<span class='notice'>You climb out of [src]!</span>")
/obj/item/his_grace/process()
/obj/item/his_grace/process(delta_time)
if(!bloodthirst)
drowse()
return
if(bloodthirst < HIS_GRACE_CONSUME_OWNER && !ascended)
adjust_bloodthirst(1 + FLOOR(LAZYLEN(contents) * 0.5, 1)) //Maybe adjust this?
adjust_bloodthirst((1 + FLOOR(LAZYLEN(contents) * 0.5, 1)) * delta_time) //Maybe adjust this?
else
adjust_bloodthirst(1) //don't cool off rapidly once we're at the point where His Grace consumes all.
adjust_bloodthirst(1 * delta_time) //don't cool off rapidly once we're at the point where His Grace consumes all.
var/mob/living/master = get_atom_on_turf(src, /mob/living)
if(istype(master) && (src in master.held_items))
switch(bloodthirst)
@@ -94,7 +94,7 @@
REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT)
master.DefaultCombatKnockdown(60)
master.adjustBruteLoss(master.maxHealth)
playsound(master, 'sound/effects/splat.ogg', 100, 0)
playsound(master, 'sound/effects/splat.ogg', 100, FALSE)
else
master.apply_status_effect(STATUS_EFFECT_HISGRACE)
return
@@ -115,8 +115,8 @@
if(!L.stat)
L.visible_message("<span class='warning'>[src] lunges at [L]!</span>", "<span class='his_grace big bold'>[src] lunges at you!</span>")
do_attack_animation(L, null, src)
playsound(L, 'sound/weapons/smash.ogg', 50, 1)
playsound(L, 'sound/misc/desceration-01.ogg', 50, 1)
playsound(L, 'sound/weapons/smash.ogg', 50, TRUE)
playsound(L, 'sound/misc/desceration-01.ogg', 50, TRUE)
L.adjustBruteLoss(force)
adjust_bloodthirst(-5) //Don't stop attacking they're right there!
else
@@ -137,6 +137,8 @@
move_gracefully()
/obj/item/his_grace/proc/move_gracefully()
SIGNAL_HANDLER
if(!awakened)
return
var/static/list/transforms
@@ -161,7 +163,7 @@
return
var/turf/T = get_turf(src)
T.visible_message("<span class='boldwarning'>[src] slowly stops rattling and falls still, His latch snapping shut.</span>")
playsound(loc, 'sound/weapons/batonextend.ogg', 100, 1)
playsound(loc, 'sound/weapons/batonextend.ogg', 100, TRUE)
name = initial(name)
desc = initial(desc)
icon_state = initial(icon_state)
@@ -178,8 +180,8 @@
var/victims = 0
meal.visible_message("<span class='warning'>[src] swings open and devours [meal]!</span>", "<span class='his_grace big bold'>[src] consumes you!</span>")
meal.adjustBruteLoss(200)
playsound(meal, 'sound/misc/desceration-02.ogg', 75, 1)
playsound(src, 'sound/items/eatfood.ogg', 100, 1)
playsound(meal, 'sound/misc/desceration-02.ogg', 75, TRUE)
playsound(src, 'sound/items/eatfood.ogg', 100, TRUE)
meal.forceMove(src)
force_bonus += HIS_GRACE_FORCE_BONUS
prev_bloodthirst = bloodthirst
@@ -253,3 +255,4 @@
if(istype(master))
master.visible_message("<span class='his_grace big bold'>Gods will be watching.</span>")
name = "[master]'s mythical toolbox of three powers"
master.client?.give_award(/datum/award/achievement/misc/ascension, master)
+1 -2
View File
@@ -3,9 +3,8 @@
/obj/item/melee/proc/check_martial_counter(mob/living/carbon/human/target, mob/living/carbon/human/user)
if(target.check_martial_melee_block())
target.visible_message("<span class='danger'>[target.name] blocks [src] and twists [user]'s arm behind [user.p_their()] back!</span>",
target.visible_message("<span class='danger'>[target.name] blocks your attack!</span>",
"<span class='userdanger'>You block the attack!</span>")
user.Stun(40)
return TRUE
/obj/item/melee/chainofcommand
+3
View File
@@ -328,6 +328,9 @@
REMOVE_TRAIT(occupant, TRAIT_RESISTHIGHPRESSURE, "bluespace_container_resist_high_pressure")
REMOVE_TRAIT(occupant, TRAIT_RESISTLOWPRESSURE, "bluespace_container_resist_low_pressure")
name = initial(name)
if(iscarbon(occupant))
to_chat(occupant, "You pop out of the [src], slightly dazed!")
occupant.Stun(5 SECONDS)
/obj/item/pet_carrier/bluespace/return_air()
if(!occupant_gas_supply)
+1 -1
View File
@@ -14,7 +14,7 @@
grind_results = list(/datum/reagent/cellulose = 10)
var/value = 0
/obj/item/stack/spacecash/Initialize()
/obj/item/stack/spacecash/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
update_desc()
@@ -41,6 +41,8 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
material_type = /datum/material/glass
point_value = 1
tableVariant = /obj/structure/table/glass
matter_amount = 4
cost = 500
shard_type = /obj/item/shard
/obj/item/stack/sheet/glass/suicide_act(mob/living/carbon/user)
@@ -69,12 +71,13 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
if (get_amount() < 1 || CC.get_amount() < 5)
to_chat(user, "<span class='warning>You need five lengths of coil and one sheet of glass to make wired glass!</span>")
return
CC.use_tool(src, user, 0, 5, skill_gain_mult = TRIVIAL_USE_TOOL_MULT)
CC.use(5)
use(1)
to_chat(user, "<span class='notice'>You attach wire to the [name].</span>")
var/obj/item/stack/light_w/new_tile = new(user.loc)
new_tile.add_fingerprint(user)
else if(istype(W, /obj/item/stack/rods))
return
if(istype(W, /obj/item/stack/rods))
var/obj/item/stack/rods/V = W
if (V.get_amount() >= 1 && get_amount() >= 1)
var/obj/item/stack/sheet/rglass/RG = new (get_turf(user))
@@ -86,9 +89,8 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
user.put_in_hands(RG)
else
to_chat(user, "<span class='warning'>You need one rod and one sheet of glass to make reinforced glass!</span>")
return
else
return ..()
return
return ..()
@@ -164,6 +166,7 @@ GLOBAL_LIST_INIT(reinforced_glass_recipes, list ( \
merge_type = /obj/item/stack/sheet/rglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/iron = 10)
point_value = 4
matter_amount = 6
shard_type = /obj/item/shard
/obj/item/stack/sheet/rglass/attackby(obj/item/W, mob/user, params)
@@ -211,6 +214,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \
merge_type = /obj/item/stack/sheet/plasmarglass
grind_results = list(/datum/reagent/silicon = 20, /datum/reagent/toxin/plasma = 10, /datum/reagent/iron = 10)
point_value = 23
matter_amount = 8
shard_type = /obj/item/shard/plasma
/obj/item/stack/sheet/plasmarglass/get_main_recipes()
@@ -19,7 +19,7 @@
///What type of wall does this sheet spawn
var/walltype
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge)
/obj/item/stack/sheet/Initialize(mapload, new_amount, merge = TRUE)
. = ..()
pixel_x = rand(-4, 4)
pixel_y = rand(-4, 4)
+283 -234
View File
@@ -8,15 +8,18 @@
/*
* Stacks
*/
/obj/item/stack
icon = 'icons/obj/stack_objects.dmi'
gender = PLURAL
material_modifier = 0.01
// material_modifier = 0.05 //5%, so that a 50 sheet stack has the effect of 5k materials instead of 100k.
max_integrity = 100
var/list/datum/stack_recipe/recipes
var/singular_name
var/amount = 1
var/max_amount = 50 //also see stack recipes initialisation, param "max_res_amount" must be equal to this max_amount
var/is_cyborg = 0 // It's 1 if module is used by a cyborg, and uses its storage
var/is_cyborg = FALSE // It's TRUE if module is used by a cyborg, and uses its storage
var/datum/robot_energy_storage/source
var/cost = 1 // How much energy from storage it costs
var/merge_type = null // This path and its children should merge with this stack, defaults to src.type
@@ -25,7 +28,6 @@
var/list/mats_per_unit //list that tells you how much is in a single unit.
///Datum material type that this stack is made of
var/material_type
max_integrity = 100
//NOTE: When adding grind_results, the amounts should be for an INDIVIDUAL ITEM - these amounts will be multiplied by the stack size in on_grind()
var/obj/structure/table/tableVariant // we tables now (stores table variant to be built from this stack)
@@ -36,16 +38,8 @@
var/absorption_capacity
/// How quickly we lower the blood flow on a cut wound we're bandaging. Expected lifetime of this bandage in ticks is thus absorption_capacity/absorption_rate, or until the cut heals, whichever comes first
var/absorption_rate
/obj/item/stack/on_grind()
for(var/i in 1 to grind_results.len) //This should only call if it's ground, so no need to check if grind_results exists
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
/obj/item/stack/grind_requirements()
if(is_cyborg)
to_chat(usr, "<span class='danger'>[src] is electronically synthesized in your chassis and can't be ground up!</span>")
return
return TRUE
/// Amount of matter for RCD
var/matter_amount = 0
/obj/item/stack/Initialize(mapload, new_amount, merge = TRUE)
if(new_amount != null)
@@ -55,16 +49,19 @@
new type(loc, max_amount, FALSE)
if(!merge_type)
merge_type = type
if(custom_materials && custom_materials.len)
mats_per_unit = list()
var/in_process_mat_list = custom_materials.Copy()
if(LAZYLEN(mats_per_unit))
set_mats_per_unit(mats_per_unit, 1)
else if(LAZYLEN(custom_materials))
// DO NOT REMOVE! we have to inflate the values first
for(var/i in custom_materials)
mats_per_unit[SSmaterials.GetMaterialRef(i)] = in_process_mat_list[i]
custom_materials[i] *= amount
set_mats_per_unit(custom_materials, amount ? 1/amount : 1)
. = ..()
if(merge)
for(var/obj/item/stack/S in loc)
if(S.merge_type == merge_type)
if(can_merge(S))
INVOKE_ASYNC(src, .proc/merge, S)
var/list/temp_recipes = get_main_recipes()
recipes = temp_recipes.Copy()
@@ -73,12 +70,48 @@
for(var/i in M.categories)
switch(i)
if(MAT_CATEGORY_BASE_RECIPES)
var/list/temp = SSmaterials.base_stack_recipes.Copy()
recipes += temp
if(MAT_CATEGORY_RIGID)
var/list/temp = SSmaterials.rigid_stack_recipes.Copy()
recipes += temp
update_weight()
update_icon()
/** Sets the amount of materials per unit for this stack.
*
* Arguments:
* - [mats][/list]: The value to set the mats per unit to.
* - multiplier: The amount to multiply the mats per unit by. Defaults to 1.
*/
/obj/item/stack/proc/set_mats_per_unit(list/mats, multiplier=1)
mats_per_unit = SSmaterials.FindOrCreateMaterialCombo(mats, multiplier)
update_custom_materials()
/** Updates the custom materials list of this stack.
*/
/obj/item/stack/proc/update_custom_materials()
set_custom_materials(mats_per_unit, amount, is_update=TRUE)
/**
* Override to make things like metalgen accurately set custom materials
*/
/obj/item/stack/set_custom_materials(list/materials, multiplier=1, is_update=FALSE)
return is_update ? ..() : set_mats_per_unit(materials, multiplier / (amount || 1))
/obj/item/stack/on_grind()
. = ..()
for(var/i in 1 to length(grind_results)) //This should only call if it's ground, so no need to check if grind_results exists
grind_results[grind_results[i]] *= get_amount() //Gets the key at position i, then the reagent amount of that key, then multiplies it by stack size
/obj/item/stack/grind_requirements()
if(is_cyborg)
to_chat(usr, "<span class='warning'>[src] is electronically synthesized in your chassis and can't be ground up!</span>")
return
return TRUE
/obj/item/stack/proc/get_main_recipes()
SHOULD_CALL_PARENT(TRUE)
return list()//empty list
/obj/item/stack/proc/update_weight()
@@ -99,12 +132,6 @@
else
icon_state = "[initial(icon_state)]_3"
/obj/item/stack/Destroy()
if (usr && usr.machine==src)
usr << browse(null, "window=stack")
. = ..()
/obj/item/stack/examine(mob/user)
. = ..()
if (is_cyborg)
@@ -126,196 +153,208 @@
/obj/item/stack/proc/get_amount()
if(is_cyborg)
. = round(source.energy / cost)
. = round(source?.energy / cost)
else
. = (amount)
/obj/item/stack/attack_self(mob/user)
interact(user)
/**
* Builds all recipes in a given recipe list and returns an association list containing them
*
* Arguments:
* * recipe_to_iterate - The list of recipes we are using to build recipes
*/
/obj/item/stack/proc/recursively_build_recipes(list/recipe_to_iterate)
var/list/L = list()
for(var/recipe in recipe_to_iterate)
if(istype(recipe, /datum/stack_recipe_list))
var/datum/stack_recipe_list/R = recipe
L["[R.title]"] = recursively_build_recipes(R.recipes)
if(istype(recipe, /datum/stack_recipe))
var/datum/stack_recipe/R = recipe
L["[R.title]"] = build_recipe(R)
return L
/obj/item/stack/interact(mob/user, sublist)
ui_interact(user, sublist)
/**
* Returns a list of properties of a given recipe
*
* Arguments:
* * R - The stack recipe we are using to get a list of properties
*/
/obj/item/stack/proc/build_recipe(datum/stack_recipe/R)
return list(
"res_amount" = R.res_amount,
"max_res_amount" = R.max_res_amount,
"req_amount" = R.req_amount,
"ref" = "\ref[R]",
)
/obj/item/stack/ui_interact(mob/user, recipes_sublist)
/**
* Checks if the recipe is valid to be used
*
* Arguments:
* * R - The stack recipe we are checking if it is valid
* * recipe_list - The list of recipes we are using to check the given recipe
*/
/obj/item/stack/proc/is_valid_recipe(datum/stack_recipe/R, list/recipe_list)
for(var/S in recipe_list)
if(S == R)
return TRUE
if(istype(S, /datum/stack_recipe_list))
var/datum/stack_recipe_list/L = S
if(is_valid_recipe(R, L.recipes))
return TRUE
return FALSE
/obj/item/stack/ui_state(mob/user)
return GLOB.hands_state
/obj/item/stack/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Stack", name)
ui.open()
/obj/item/stack/ui_data(mob/user)
var/list/data = list()
data["amount"] = get_amount()
return data
/obj/item/stack/ui_static_data(mob/user)
var/list/data = list()
data["recipes"] = recursively_build_recipes(recipes)
return data
/obj/item/stack/ui_act(action, params)
. = ..()
if (!recipes)
if(.)
return
if (!src || get_amount() <= 0)
user << browse(null, "window=stack")
user.set_machine(src) //for correct work of onclose
var/list/recipe_list = recipes
if (recipes_sublist && recipe_list[recipes_sublist] && istype(recipe_list[recipes_sublist], /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = recipe_list[recipes_sublist]
recipe_list = srl.recipes
var/t1 = "Amount Left: [get_amount()]<br>"
for(var/i in 1 to length(recipe_list))
var/E = recipe_list[i]
if (isnull(E))
t1 += "<hr>"
continue
if (i>1 && !isnull(recipe_list[i-1]))
t1+="<br>"
if (istype(E, /datum/stack_recipe_list))
var/datum/stack_recipe_list/srl = E
t1 += "<a href='?src=[REF(src)];sublist=[i]'>[srl.title]</a>"
if (istype(E, /datum/stack_recipe))
var/datum/stack_recipe/R = E
var/max_multiplier = round(get_amount() / R.req_amount)
var/title
var/can_build = 1
can_build = can_build && (max_multiplier>0)
if (R.res_amount>1)
title+= "[R.res_amount]x [R.title]\s"
else
title+= "[R.title]"
title+= " ([R.req_amount] [singular_name]\s)"
if (can_build)
t1 += text("<A href='?src=[REF(src)];sublist=[recipes_sublist];make=[i];multiplier=1'>[title]</A> ")
else
t1 += text("[]", title)
continue
if (R.max_res_amount>1 && max_multiplier>1)
max_multiplier = min(max_multiplier, round(R.max_res_amount/R.res_amount))
t1 += " |"
var/list/multipliers = list(5,10,25)
for (var/n in multipliers)
if (max_multiplier>=n)
t1 += " <A href='?src=[REF(src)];make=[i];multiplier=[n]'>[n*R.res_amount]x</A>"
if (!(max_multiplier in multipliers))
t1 += " <A href='?src=[REF(src)];make=[i];multiplier=[max_multiplier]'>[max_multiplier*R.res_amount]x</A>"
var/datum/browser/popup = new(user, "stack", name, 400, 400)
popup.set_content(t1)
popup.open(0)
onclose(user, "stack")
/obj/item/stack/Topic(href, href_list)
..()
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
return
if (href_list["sublist"] && !href_list["make"])
interact(usr, text2num(href_list["sublist"]))
if (href_list["make"])
if (get_amount() < 1 && !is_cyborg)
qdel(src)
var/list/recipes_list = recipes
if (href_list["sublist"])
var/datum/stack_recipe_list/srl = recipes_list[text2num(href_list["sublist"])]
recipes_list = srl.recipes
var/datum/stack_recipe/R = recipes_list[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
if (!multiplier ||(multiplier <= 0)) //href protection
return
if(!building_checks(R, multiplier))
return
if (R.time)
var/adjusted_time = 0
usr.visible_message("<span class='notice'>[usr] starts building [R.title].</span>", "<span class='notice'>You start building [R.title]...</span>")
if(HAS_TRAIT(usr, R.trait_booster))
adjusted_time = (R.time * R.trait_modifier)
else
adjusted_time = R.time
if (!do_after(usr, adjusted_time, target = usr))
switch(action)
if("make")
if(get_amount() < 1 && !is_cyborg)
qdel(src)
return
var/datum/stack_recipe/R = locate(params["ref"])
if(!is_valid_recipe(R, recipes)) //href exploit protection
return
var/multiplier = text2num(params["multiplier"])
if(!multiplier || (multiplier <= 0)) //href exploit protection
return
if(!building_checks(R, multiplier))
return
if(R.time)
var/adjusted_time = 0
usr.visible_message("<span class='notice'>[usr] starts building \a [R.title].</span>", "<span class='notice'>You start building \a [R.title]...</span>")
if(HAS_TRAIT(usr, R.trait_booster))
adjusted_time = (R.time * R.trait_modifier)
else
adjusted_time = R.time
if(!do_after(usr, adjusted_time, target = usr))
return
if(!building_checks(R, multiplier))
return
var/obj/O
if(R.max_res_amount > 1) //Is it a stack?
O = new R.result_type(usr.drop_location(), R.res_amount * multiplier)
else if(ispath(R.result_type, /turf))
var/turf/T = usr.drop_location()
if(!isturf(T))
return
T.PlaceOnTop(R.result_type, flags = CHANGETURF_INHERIT_AIR)
var/obj/O
if(R.max_res_amount > 1) //Is it a stack?
O = new R.result_type(usr.drop_location(), R.res_amount * multiplier)
else if(ispath(R.result_type, /turf))
var/turf/T = usr.drop_location()
if(!isturf(T))
return
T.PlaceOnTop(R.result_type, flags = CHANGETURF_INHERIT_AIR)
else
O = new R.result_type(usr.drop_location())
if(O)
O.setDir(usr.dir)
use(R.req_amount * multiplier)
if(R.applies_mats && LAZYLEN(mats_per_unit))
if(isstack(O))
var/obj/item/stack/crafted_stack = O
crafted_stack.set_mats_per_unit(mats_per_unit, R.req_amount / R.res_amount)
else
O.set_custom_materials(mats_per_unit, R.req_amount / R.res_amount)
if(istype(O, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = O
W.ini_dir = W.dir
else if(istype(O, /obj/structure/window))
var/obj/structure/window/W = O
W.ini_dir = W.dir
if(QDELETED(O))
return //It's a stack and has already been merged
if(isitem(O))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if(istype(O, /obj/item/storage))
for (var/obj/item/I in O)
qdel(I)
//BubbleWrap END
return TRUE
/obj/item/stack/vv_edit_var(vname, vval)
if(vname == NAMEOF(src, amount))
add(clamp(vval, 1-amount, max_amount - amount)) //there must always be one.
return TRUE
else if(vname == NAMEOF(src, max_amount))
max_amount = max(vval, 1)
add((max_amount < amount) ? (max_amount - amount) : 0) //update icon, weight, ect
return TRUE
return ..()
/obj/item/stack/proc/building_checks(datum/stack_recipe/recipe, multiplier)
if (get_amount() < recipe.req_amount*multiplier)
if (recipe.req_amount*multiplier>1)
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [recipe.req_amount*multiplier] [recipe.title]\s!</span>")
else
O = new R.result_type(get_turf(usr))
if(O)
O.setDir(usr.dir)
log_craft("[O] crafted by [usr] at [loc_name(O.loc)]")
use(R.req_amount * multiplier)
if(R.applies_mats && custom_materials && custom_materials.len)
var/list/used_materials = list()
for(var/i in custom_materials)
used_materials[SSmaterials.GetMaterialRef(i)] = R.req_amount / R.res_amount * (MINERAL_MATERIAL_AMOUNT / custom_materials.len)
O.set_custom_materials(used_materials)
//START: oh fuck i'm so sorry
if(istype(O, /obj/structure/windoor_assembly))
var/obj/structure/windoor_assembly/W = O
W.ini_dir = W.dir
else if(istype(O, /obj/structure/window))
var/obj/structure/window/W = O
W.ini_dir = W.dir
//END: oh fuck i'm so sorry
else if(istype(O, /obj/item/restraints/handcuffs/cable))
var/obj/item/cuffs = O
cuffs.color = color
if (QDELETED(O))
return //It's a stack and has already been merged
if (isitem(O))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if ( istype(O, /obj/item/storage) )
for (var/obj/item/I in O)
qdel(I)
//BubbleWrap END
/obj/item/stack/proc/building_checks(datum/stack_recipe/R, multiplier)
if (get_amount() < R.req_amount*multiplier)
if (R.req_amount*multiplier>1)
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.req_amount*multiplier] [R.title]\s!</span>")
else
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [R.title]!</span>")
to_chat(usr, "<span class='warning'>You haven't got enough [src] to build \the [recipe.title]!</span>")
return FALSE
var/turf/T = get_turf(usr)
var/turf/dest_turf = get_turf(usr)
var/obj/D = R.result_type
if(R.window_checks && !valid_window_location(T, initial(D.dir) == FULLTILE_WINDOW_DIR ? FULLTILE_WINDOW_DIR : usr.dir))
to_chat(usr, "<span class='warning'>The [R.title] won't fit here!</span>")
return FALSE
if(R.one_per_turf && (locate(R.result_type) in T))
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return FALSE
if(R.on_floor)
if(!isfloorturf(T))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
// If we're making a window, we have some special snowflake window checks to do.
if(ispath(recipe.result_type, /obj/structure/window))
var/obj/structure/window/result_path = recipe.result_type
if(!valid_window_location(dest_turf, usr.dir, is_fulltile = initial(result_path.fulltile)))
to_chat(usr, "<span class='warning'>The [recipe.title] won't fit here!</span>")
return FALSE
for(var/obj/AM in T)
if(istype(AM,/obj/structure/grille))
if(recipe.one_per_turf && (locate(recipe.result_type) in dest_turf))
to_chat(usr, "<span class='warning'>There is another [recipe.title] here!</span>")
return FALSE
if(recipe.on_floor)
if(!isfloorturf(dest_turf))
to_chat(usr, "<span class='warning'>\The [recipe.title] must be constructed on the floor!</span>")
return FALSE
for(var/obj/object in dest_turf)
if(istype(object, /obj/structure/grille))
continue
if(istype(AM,/obj/structure/table))
if(istype(object, /obj/structure/table))
continue
if(istype(AM,/obj/structure/window))
var/obj/structure/window/W = AM
if(!W.fulltile)
if(istype(object, /obj/structure/window))
var/obj/structure/window/window_structure = object
if(!window_structure.fulltile)
continue
if(AM.density)
to_chat(usr, "<span class='warning'>Theres a [AM.name] here. You cant make a [R.title] here!</span>")
if(object.density)
to_chat(usr, "<span class='warning'>There is \a [object.name] here. You cant make \a [recipe.title] here!</span>")
return FALSE
if(R.placement_checks)
switch(R.placement_checks)
if(recipe.placement_checks)
switch(recipe.placement_checks)
if(STACK_CHECK_CARDINALS)
var/turf/step
for(var/direction in GLOB.cardinals)
step = get_step(T, direction)
if(locate(R.result_type) in step)
to_chat(usr, "<span class='warning'>\The [R.title] must not be built directly adjacent to another!</span>")
step = get_step(dest_turf, direction)
if(locate(recipe.result_type) in step)
to_chat(usr, "<span class='warning'>\The [recipe.title] must not be built directly adjacent to another!</span>")
return FALSE
if(STACK_CHECK_ADJACENT)
if(locate(R.result_type) in range(1, T))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed at least one tile away from others of its type!</span>")
if(locate(recipe.result_type) in range(1, dest_turf))
to_chat(usr, "<span class='warning'>\The [recipe.title] must be constructed at least one tile away from others of its type!</span>")
return FALSE
return TRUE
@@ -330,10 +369,7 @@
if(check && zero_amount())
return TRUE
if(length(mats_per_unit))
var/temp_materials = custom_materials.Copy()
for(var/i in mats_per_unit)
temp_materials[i] = mats_per_unit[i] * src.amount
set_custom_materials(temp_materials)
update_custom_materials()
update_icon()
update_weight()
return TRUE
@@ -357,22 +393,36 @@
return source.energy < cost
if(amount < 1)
qdel(src)
return 1
return 0
return TRUE
return FALSE
/obj/item/stack/proc/add(amount)
/** Adds some number of units to this stack.
*
* Arguments:
* - _amount: The number of units to add to this stack.
*/
/obj/item/stack/proc/add(_amount)
if (is_cyborg)
source.add_charge(amount * cost)
source.add_charge(_amount * cost)
else
src.amount += amount
amount += _amount
if(length(mats_per_unit))
var/temp_materials = custom_materials.Copy()
for(var/i in mats_per_unit)
temp_materials[i] = mats_per_unit[i] * src.amount
set_custom_materials(temp_materials)
update_custom_materials()
update_icon()
update_weight()
/** Checks whether this stack can merge itself into another stack.
*
* Arguments:
* - [check][/obj/item/stack]: The stack to check for mergeability.
*/
/obj/item/stack/proc/can_merge(obj/item/stack/check)
if(!istype(check, merge_type))
return FALSE
if(!check.is_cyborg && (mats_per_unit != check.mats_per_unit)) // Cyborg stacks don't have materials. This lets them recycle sheets and floor tiles.
return FALSE
return TRUE
/obj/item/stack/proc/merge(obj/item/stack/S) //Merge src into S, as much as possible
if(QDELETED(S) || QDELETED(src) || S == src) //amusingly this can cause a stack to consume itself, let's not allow that.
return
@@ -388,50 +438,53 @@
S.add(transfer)
return transfer
/obj/item/stack/Crossed(obj/o)
if(istype(o, merge_type) && !o.throwing)
merge(o)
/obj/item/stack/Crossed(atom/movable/crossing)
if(!crossing.throwing && can_merge(crossing))
merge(crossing)
. = ..()
/obj/item/stack/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(istype(AM, merge_type))
merge(AM)
/obj/item/stack/hitby(atom/movable/hitting, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(can_merge(hitting))
merge(hitting)
. = ..()
/obj/item/stack/on_attack_hand(mob/user, act_intent = user.a_intent, unarmed_attack_flags)
//ATTACK HAND IGNORING PARENT RETURN VALUE
/obj/item/stack/on_attack_hand(mob/user)
if(user.get_inactive_held_item() == src)
if(zero_amount())
return
return change_stack(user,1)
return split_stack(user, 1)
else
. = ..()
/obj/item/stack/AltClick(mob/living/user)
. = ..()
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
if(isturf(loc)) // to prevent people that are alt clicking a tile to see its content from getting undesidered pop ups
return
if(is_cyborg)
if(is_cyborg || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE) || zero_amount()) //, !iscyborg(user)
return
else
if(zero_amount())
return
//get amount from user
var/max = get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
max = get_amount()
stackmaterial = min(max, stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
return TRUE
else
change_stack(user, stackmaterial)
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack</span>")
return TRUE
//get amount from user
var/max = get_amount()
var/stackmaterial = round(input(user,"How many sheets do you wish to take out of this stack? (Maximum [max])") as null|num)
max = get_amount()
stackmaterial = min(max, stackmaterial)
if(stackmaterial == null || stackmaterial <= 0 || !user.canUseTopic(src, BE_CLOSE, TRUE, FALSE)) //, !iscyborg(user)
return
split_stack(user, stackmaterial)
to_chat(user, "<span class='notice'>You take [stackmaterial] sheets out of the stack.</span>")
/obj/item/stack/proc/change_stack(mob/user, amount)
/** Splits the stack into two stacks.
*
* Arguments:
* - [user][/mob]: The mob splitting the stack.
* - amount: The number of units to split from this stack.
*/
/obj/item/stack/proc/split_stack(mob/user, amount)
if(!use(amount, TRUE, FALSE))
return FALSE
return null
var/obj/item/stack/F = new type(user? user : drop_location(), amount, FALSE)
. = F
F.set_mats_per_unit(mats_per_unit, 1) // Required for greyscale sheets and tiles.
F.copy_evidences(src)
if(user)
if(!user.put_in_hands(F, merge_stacks = FALSE))
@@ -441,7 +494,7 @@
zero_amount()
/obj/item/stack/attackby(obj/item/W, mob/user, params)
if(istype(W, merge_type))
if(can_merge(W))
var/obj/item/stack/S = W
if(merge(S))
to_chat(user, "<span class='notice'>Your [S.name] stack now contains [S.get_amount()] [S.singular_name]\s.</span>")
@@ -455,8 +508,8 @@
fingerprints = from.fingerprints.Copy()
if(from.fingerprintshidden)
fingerprintshidden = from.fingerprintshidden.Copy()
if(from.fingerprintslast)
fingerprintslast = from.fingerprintslast
fingerprintslast = from.fingerprintslast
//TODO bloody overlay
/obj/item/stack/microwave_act(obj/machinery/microwave/M)
if(istype(M) && M.dirty < 100)
@@ -474,15 +527,12 @@
var/time = 0
var/one_per_turf = FALSE
var/on_floor = FALSE
var/window_checks = FALSE
var/placement_checks = FALSE
var/applies_mats = FALSE
var/trait_booster = null
var/trait_modifier = 1
/datum/stack_recipe/New(title, result_type, req_amount = 1, res_amount = 1, max_res_amount = 1,time = 0, one_per_turf = FALSE, on_floor = FALSE, window_checks = FALSE, placement_checks = FALSE, applies_mats = FALSE, trait_booster = null, trait_modifier = 1)
src.title = title
src.result_type = result_type
src.req_amount = req_amount
@@ -491,7 +541,6 @@
src.time = time
src.one_per_turf = one_per_turf
src.on_floor = on_floor
src.window_checks = window_checks
src.placement_checks = placement_checks
src.applies_mats = applies_mats
src.trait_booster = trait_booster
+2 -2
View File
@@ -1143,9 +1143,9 @@
desc = "A box containing a gift for worthy golems."
/obj/item/storage/box/rndboards/PopulateContents()
new /obj/item/circuitboard/machine/protolathe/offstation(src)
new /obj/item/circuitboard/machine/protolathe(src)
new /obj/item/circuitboard/machine/destructive_analyzer(src)
new /obj/item/circuitboard/machine/circuit_imprinter/offstation(src)
new /obj/item/circuitboard/machine/circuit_imprinter(src)
new /obj/item/circuitboard/computer/rdconsole(src)
/obj/item/storage/box/silver_sulf
@@ -164,11 +164,15 @@
/obj/item/storage/secure/briefcase/hos/mws_pack_hos/PopulateContents()
new /obj/item/gun/ballistic/revolver/mws(src)
new /obj/item/ammo_box/magazine/mws_mag(src)
new /obj/item/ammo_box/magazine/mws_mag(src)
new /obj/item/ammo_casing/mws_batt/lethal(src)
new /obj/item/ammo_casing/mws_batt/lethal(src)
new /obj/item/ammo_casing/mws_batt/lethal(src)
new /obj/item/ammo_casing/mws_batt/stun(src)
new /obj/item/ammo_casing/mws_batt/stun(src)
new /obj/item/ammo_casing/mws_batt/stun(src)
new /obj/item/ammo_casing/mws_batt/ion(src)
new /obj/item/ammo_casing/mws_batt/taser(src)
/obj/item/storage/secure/briefcase/hos/multiphase_box
name = "\improper X-01 Multiphase energy gun box"
@@ -58,7 +58,6 @@
/obj/item/tank/internals/air
name = "air tank"
desc = "Mixed anyone?"
icon_state = "air"
item_state = "air"
force = 10
dog_fashion = /datum/dog_fashion/back
+42 -30
View File
@@ -1,10 +1,12 @@
/obj/item/tank
name = "tank"
icon = 'icons/obj/tank.dmi'
icon_state = "generic"
lefthand_file = 'icons/mob/inhands/equipment/tanks_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/tanks_righthand.dmi'
flags_1 = CONDUCT_1
slot_flags = ITEM_SLOT_BACK
// worn_icon = 'icons/mob/clothing/back.dmi' //since these can also get thrown into suit storage slots. if something goes on the belt, set this to null.
hitsound = 'sound/weapons/smash.ogg'
pressure_resistance = ONE_ATMOSPHERE * 5
force = 5
@@ -18,6 +20,8 @@
var/distribute_pressure = ONE_ATMOSPHERE
var/integrity = 3
var/volume = 70
/// Icon state when in a tank holder. Null makes it incompatible with tank holder.
var/tank_holder_icon_state = "holder_generic"
/obj/item/tank/ui_action_click(mob/user)
toggle_internals(user)
@@ -84,18 +88,23 @@
/obj/item/tank/Destroy()
if(air_contents)
qdel(air_contents)
QDEL_NULL(air_contents)
STOP_PROCESSING(SSobj, src)
. = ..()
// /obj/item/tank/ComponentInitialize()
// . = ..()
// if(tank_holder_icon_state)
// AddComponent(/datum/component/container_item/tank_holder, tank_holder_icon_state)
/obj/item/tank/examine(mob/user)
var/obj/icon = src
. = ..()
if(istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user) && !isobserver(user))
if (icon == src)
if(icon == src)
. += "<span class='notice'>If you want any more information you'll need to get closer.</span>"
return
@@ -140,14 +149,14 @@
if(T)
T.assume_air(air_contents)
air_update_turf()
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
qdel(src)
/obj/item/tank/suicide_act(mob/user)
var/mob/living/carbon/human/H = user
user.visible_message("<span class='suicide'>[user] is putting [src]'s valve to [user.p_their()] lips! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/effects/spray.ogg', 10, 1, -3)
if (!QDELETED(H) && air_contents && air_contents.return_pressure() >= 1000)
playsound(loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
if(!QDELETED(H) && air_contents && air_contents.return_pressure() >= 1000)
for(var/obj/item/W in H)
H.dropItemToGround(W)
if(prob(50))
@@ -159,12 +168,10 @@
H.spawn_gibs()
H.spill_organs()
H.spread_bodyparts()
return (BRUTELOSS)
/obj/item/tank/attack_ghost(mob/dead/observer/O)
. = ..()
atmosanalyzer_scan(air_contents, O, src, FALSE)
return MANUAL_SUICIDE
else
to_chat(user, "<span class='warning'>There isn't enough pressure in [src] to commit suicide with...</span>")
return SHAME
/obj/item/tank/attackby(obj/item/W, mob/user, params)
add_fingerprint(user)
@@ -182,27 +189,30 @@
ui = new(user, src, "Tank", name)
ui.open()
/obj/item/tank/ui_static_data(mob/user)
. = list (
"defaultReleasePressure" = round(TANK_DEFAULT_RELEASE_PRESSURE),
"minReleasePressure" = round(TANK_MIN_RELEASE_PRESSURE),
"maxReleasePressure" = round(TANK_MAX_RELEASE_PRESSURE),
"leakPressure" = round(TANK_LEAK_PRESSURE),
"fragmentPressure" = round(TANK_FRAGMENT_PRESSURE)
)
/obj/item/tank/ui_data(mob/user)
var/list/data = list()
data["tankPressure"] = round(air_contents.return_pressure() ? air_contents.return_pressure() : 0)
data["releasePressure"] = round(distribute_pressure ? distribute_pressure : 0)
data["defaultReleasePressure"] = round(TANK_DEFAULT_RELEASE_PRESSURE)
data["minReleasePressure"] = round(TANK_MIN_RELEASE_PRESSURE)
data["maxReleasePressure"] = round(TANK_MAX_RELEASE_PRESSURE)
. = list(
"tankPressure" = round(air_contents.return_pressure()),
"releasePressure" = round(distribute_pressure)
)
var/mob/living/carbon/C = user
if(!istype(C))
C = loc.loc
if(!istype(C))
return data
if(C.internal == src)
data["connected"] = TRUE
return data
if(istype(C) && C.internal == src)
.["connected"] = TRUE
/obj/item/tank/ui_act(action, params)
if(..())
. = ..()
if(.)
return
switch(action)
if("pressure")
@@ -228,6 +238,9 @@
/obj/item/tank/return_air()
return air_contents
// /obj/item/tank/return_analyzable_air()
// return air_contents
/obj/item/tank/assume_air(datum/gas_mixture/giver)
air_contents.merge(giver)
@@ -239,10 +252,9 @@
return null
var/tank_pressure = air_contents.return_pressure()
if(tank_pressure < distribute_pressure)
distribute_pressure = tank_pressure
var/actual_distribute_pressure = clamp(tank_pressure, 0, distribute_pressure)
var/moles_needed = distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature())
var/moles_needed = actual_distribute_pressure*volume_to_return/(R_IDEAL_GAS_EQUATION*air_contents.return_temperature())
return remove_air(moles_needed)
@@ -267,7 +279,7 @@
//Give the gas a chance to build up more pressure through reacting
air_contents.react(src)
air_contents.react(src)
//Citadel Edit: removing extra react for "balance"
pressure = air_contents.return_pressure()
var/range = (pressure-TANK_FRAGMENT_PRESSURE)/TANK_FRAGMENT_SCALE
var/turf/epicenter = get_turf(loc)
@@ -285,7 +297,7 @@
if(!T)
return
T.assume_air(air_contents)
playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
playsound(src.loc, 'sound/effects/spray.ogg', 10, TRUE, -3)
qdel(src)
else
integrity--
+117 -66
View File
@@ -24,9 +24,9 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
*/
/obj/item/banhammer/attack(mob/M, mob/user)
if(user.zone_selected == BODY_ZONE_HEAD)
M.visible_message("<span class='danger'>[user] are stroking the head of [M] with a bangammer</span>", "<span class='userdanger'>[user] are stroking the head with a bangammer</span>", "you hear a bangammer stroking a head");
M.visible_message("<span class='danger'>[user] are stroking the head of [M] with a bangammer.</span>", "<span class='userdanger'>[user] are stroking your head with a bangammer.</span>", "<span class='hear'>You hear a bangammer stroking a head.</span>") // see above comment
else
M.visible_message("<span class='danger'>[M] has been banned FOR NO REISIN by [user]</span>", "<span class='userdanger'>You have been banned FOR NO REISIN by [user]</span>", "you hear a banhammer banning someone")
M.visible_message("<span class='danger'>[M] has been banned FOR NO REISIN by [user]!</span>", "<span class='userdanger'>You have been banned FOR NO REISIN by [user]!</span>", "<span class='hear'>You hear a banhammer banning someone.</span>")
playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much
if(user.a_intent != INTENT_HELP)
return ..(M, user)
@@ -89,7 +89,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS
desc = "<b><i>THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!</i></b>\nActivate it in your hand to point to the nearest victim."
flags_1 = CONDUCT_1
item_flags = DROPDEL
item_flags = DROPDEL //WOW BRO YOU LOST AN ARM, GUESS WHAT YOU DONT GET YOUR SWORD ANYMORE //I CANT BELIEVE SPOOKYDONUT WOULD BREAK THE REQUIREMENTS
slot_flags = null
block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY
light_range = 3
@@ -130,8 +130,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/dropped(mob/living/user)
. = ..()
user.unignore_slowdown(HIGHLANDER)
if(!QDELETED(src))
qdel(src) //If this ever happens, it's because you lost an arm
/obj/item/claymore/highlander/examine(mob/user)
. = ..()
@@ -141,8 +139,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/attack(mob/living/target, mob/living/user)
. = ..()
if(!QDELETED(target) && iscarbon(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander")
user.fully_heal() //STEAL THE LIFE OF OUR FALLEN FOES
if(!QDELETED(target) && target.stat == DEAD && target.mind && target.mind.special_role == "highlander")
user.fully_heal(admin_revive = FALSE) //STEAL THE LIFE OF OUR FALLEN FOES
add_notch(user)
target.visible_message("<span class='warning'>[target] crumbles to dust beneath [user]'s blows!</span>", "<span class='userdanger'>As you fall, your body crumbles to dust!</span>")
target.dust()
@@ -150,9 +148,13 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/attack_self(mob/living/user)
var/closest_victim
var/closest_distance = 255
for(var/mob/living/carbon/human/H in GLOB.player_list - user)
if(H.client && H.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
closest_victim = H
for(var/mob/living/carbon/human/scot in GLOB.player_list - user)
if(scot.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
closest_victim = scot
for(var/mob/living/silicon/robot/siliscot in GLOB.player_list - user)
if(siliscot.mind.special_role == "highlander" && (!closest_victim || get_dist(user, closest_victim) < closest_distance))
closest_victim = siliscot
if(!closest_victim)
to_chat(user, "<span class='warning'>[src] thrums for a moment and falls dark. Perhaps there's nobody nearby.</span>")
return
@@ -161,7 +163,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/claymore/highlander/run_block(mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
if((attack_type & ATTACK_TYPE_PROJECTILE) && is_energy_reflectable_projectile(object))
return BLOCK_SUCCESS | BLOCK_SHOULD_REDIRECT | BLOCK_PHYSICAL_EXTERNAL | BLOCK_REDIRECTED
return ..()
return ..() //YOU THINK YOUR PUNY LASERS CAN STOP ME?
/obj/item/claymore/highlander/proc/add_notch(mob/living/user) //DYNAMIC CLAYMORE PROGRESSION SYSTEM - THIS IS THE FUTURE
notches++
@@ -214,7 +216,22 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
remove_atom_colour(ADMIN_COLOUR_PRIORITY)
name = new_name
playsound(user, 'sound/items/screwdriver2.ogg', 50, 1)
playsound(user, 'sound/items/screwdriver2.ogg', 50, TRUE)
/obj/item/claymore/highlander/robot //BLOODTHIRSTY BORGS NOW COME IN PLAID
icon = 'icons/obj/items_cyborg.dmi'
icon_state = "claymore_cyborg"
var/mob/living/silicon/robot/robot
/obj/item/claymore/highlander/robot/Initialize()
var/obj/item/robot_module/kiltkit = loc
robot = kiltkit.loc
if(!istype(robot))
qdel(src)
return ..()
/obj/item/claymore/highlander/robot/process()
loc.layer = LARGE_MOB_LAYER
/obj/item/katana
name = "katana"
@@ -227,7 +244,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK
force = 40
throwforce = 10
w_class = WEIGHT_CLASS_BULKY
w_class = WEIGHT_CLASS_HUGE
hitsound = 'sound/weapons/bladeslice.ogg'
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
block_chance = 50
@@ -581,7 +598,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
user.put_in_hands(S)
to_chat(user, "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>")
else if(istype(I, /obj/item/assembly/igniter) && !HAS_TRAIT(I, TRAIT_NODROP))
else if(istype(I, /obj/item/assembly/igniter) && !(HAS_TRAIT(I, TRAIT_NODROP)))
var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod
remove_item_from_storage(user)
@@ -604,13 +621,13 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
lefthand_file = 'icons/mob/inhands/equipment/shields_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/shields_righthand.dmi'
force = 2
throwforce = 10 //This is never used on mobs since this has a 100% embed chance.
throwforce = 10 //10 + 2 (WEIGHT_CLASS_SMALL) * 4 (EMBEDDED_IMPACT_PAIN_MULTIPLIER) = 18 damage on hit due to guaranteed embedding
throw_speed = 4
embedding = list("pain_mult" = 4, "embed_chance" = 100, "fall_chance" = 0, "embed_chance_turf_mod" = 15)
armour_penetration = 40
w_class = WEIGHT_CLASS_SMALL
sharpness = SHARP_EDGED
sharpness = SHARP_POINTY
custom_materials = list(/datum/material/iron=500, /datum/material/glass=500)
resistance_flags = FIRE_PROOF
@@ -645,27 +662,23 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
attack_verb = list("stubbed", "poked")
resistance_flags = FIRE_PROOF
var/extended = 0
var/extended_force = 20
var/extended_throwforce = 23
var/extended_icon_state = "switchblade_ext"
var/retracted_icon_state = "switchblade"
/obj/item/switchblade/attack_self(mob/user)
extended = !extended
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1)
playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, TRUE)
if(extended)
force = extended_force
force = 20
w_class = WEIGHT_CLASS_NORMAL
throwforce = extended_throwforce
icon_state = extended_icon_state
throwforce = 23
icon_state = "switchblade_ext"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = SHARP_EDGED
else
force = initial(force)
force = 3
w_class = WEIGHT_CLASS_SMALL
throwforce = initial(throwforce)
icon_state = retracted_icon_state
throwforce = 5
icon_state = "switchblade"
attack_verb = list("stubbed", "poked")
hitsound = 'sound/weapons/genhit.ogg'
sharpness = SHARP_NONE
@@ -756,6 +769,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
user.visible_message("<span class='suicide'>[user] is inhaling [src]! It looks like [user.p_theyre()] trying to visit the astral plane!</span>")
return (OXYLOSS)
// /obj/item/ectoplasm/angelic
// icon = 'icons/obj/wizard.dmi'
// icon_state = "angelplasm"
/obj/item/mounted_chainsaw
name = "mounted chainsaw"
desc = "A chainsaw that has replaced your arm."
@@ -764,7 +781,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
item_flags = ABSTRACT | DROPDEL
w_class = WEIGHT_CLASS_BULKY
w_class = WEIGHT_CLASS_HUGE
force = 24
throwforce = 0
throw_range = 0
@@ -807,7 +824,13 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/statuebust/Initialize()
. = ..()
AddElement(/datum/element/art, impressiveness)
addtimer(CALLBACK(src, /datum.proc/_AddElement, list(/datum/element/beauty, 1000)), 0)
// AddComponent(/datum/component/beauty, 1000)
// /obj/item/statuebust/hippocratic
// name = "hippocrates bust"
// desc = "A bust of the famous Greek physician Hippocrates of Kos, often referred to as the father of western medicine."
// icon_state = "hippocratic"
// impressiveness = 50
/obj/item/tailclub
name = "tail club"
@@ -831,8 +854,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
icon_state = "catwhip"
/obj/item/melee/skateboard
name = "improvised skateboard"
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a strong weapon."
name = "skateboard"
desc = "A skateboard. It can be placed on its wheels and ridden, or used as a radical weapon."
icon_state = "skateboard"
item_state = "skateboard"
force = 12
@@ -845,17 +868,22 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/melee/skateboard/attack_self(mob/user)
if(!user.canUseTopic(src, TRUE, FALSE, TRUE))
return
var/obj/vehicle/ridden/scooter/skateboard/S = new board_item_type(get_turf(user))
var/obj/vehicle/ridden/scooter/skateboard/S = new board_item_type(get_turf(user))//this probably has fucky interactions with telekinesis but for the record it wasn't my fault
S.buckle_mob(user)
qdel(src)
/obj/item/melee/skateboard/improvised
name = "improvised skateboard"
desc = "A jury-rigged skateboard. It can be placed on its wheels and ridden, or used as a radical weapon."
// board_item_type = /obj/vehicle/ridden/scooter/skateboard/improvised
/obj/item/melee/skateboard/pro
name = "skateboard"
desc = "A RaDSTORMz brand professional skateboard. It looks sturdy and well made."
desc = "An EightO brand professional skateboard. It looks sturdy and well made."
icon_state = "skateboard2"
item_state = "skateboard2"
board_item_type = /obj/vehicle/ridden/scooter/skateboard/pro
custom_premium_price = 500
custom_premium_price = PAYCHECK_HARD * 5
/obj/item/melee/skateboard/hoverboard
name = "hoverboard"
@@ -863,10 +891,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
icon_state = "hoverboard_red"
item_state = "hoverboard_red"
board_item_type = /obj/vehicle/ridden/scooter/skateboard/hoverboard
custom_premium_price = 2015
custom_premium_price = PAYCHECK_COMMAND * 5.4 //If I can't make it a meme I'll make it RAD
/obj/item/melee/skateboard/hoverboard/admin
name = "\improper Board Of Directors"
name = "Board Of Directors"
desc = "The engineering complexity of a spaceship concentrated inside of a board. Just as expensive, too."
icon_state = "hoverboard_nt"
item_state = "hoverboard_nt"
@@ -885,11 +913,19 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
throwforce = 12
attack_verb = list("beat", "smacked")
custom_materials = list(/datum/material/wood = MINERAL_MATERIAL_AMOUNT * 3.5)
w_class = WEIGHT_CLASS_BULKY
w_class = WEIGHT_CLASS_HUGE
var/homerun_ready = 0
var/homerun_able = 0
total_mass = 2.7 //a regular wooden major league baseball bat weighs somewhere between 2 to 3.4 pounds, according to google
/obj/item/melee/baseball_bat/Initialize()
. = ..()
if(prob(1))
name = "cricket bat"
desc = "You've got red on you."
icon_state = "baseball_bat_brit"
item_state = "baseball_bat_brit"
/obj/item/melee/baseball_bat/chaplain
name = "blessed baseball bat"
desc = "There ain't a cult in the league that can withstand a swatter."
@@ -914,11 +950,11 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
..()
return
if(homerun_ready)
to_chat(user, "<span class='notice'>You're already ready to do a home run!</span>")
to_chat(user, "<span class='warning'>You're already ready to do a home run!</span>")
..()
return
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, TRUE)
if(do_after(user, 90, target = src))
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
homerun_ready = 1
@@ -926,12 +962,14 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/melee/baseball_bat/attack(mob/living/target, mob/living/user)
. = ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
return
var/atom/throw_target = get_edge_target_turf(target, user.dir)
if(homerun_ready)
user.visible_message("<span class='userdanger'>It's a home run!</span>")
target.throw_at(throw_target, rand(8,10), 14, user)
target.ex_act(EXPLODE_HEAVY)
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, 1)
playsound(get_turf(src), 'sound/weapons/homerun.ogg', 100, TRUE)
homerun_ready = 0
return
else if(!target.anchored)
@@ -962,7 +1000,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/melee/flyswatter
name = "flyswatter"
desc = "Useful for killing insects of all sizes."
desc = "Useful for killing pests of all sizes."
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "flyswatter"
item_state = "flyswatter"
@@ -975,7 +1013,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
w_class = WEIGHT_CLASS_SMALL
//Things in this list will be instantly splatted. Flyman weakness is handled in the flyman species weakness proc.
var/list/strong_against
var/list/spider_panic
/obj/item/melee/flyswatter/Initialize()
. = ..()
@@ -983,13 +1020,11 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/mob/living/simple_animal/hostile/poison/bees/,
/mob/living/simple_animal/butterfly,
/mob/living/simple_animal/cockroach,
/obj/item/queen_bee
))
spider_panic = typecacheof(list(
/mob/living/simple_animal/banana_spider,
/mob/living/simple_animal/hostile/poison/giant_spider,
/obj/item/queen_bee,
/obj/structure/spider/spiderling
))
/obj/item/melee/flyswatter/afterattack(atom/target, mob/user, proximity_flag)
. = ..()
if(proximity_flag)
@@ -999,11 +1034,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
if(istype(target, /mob/living/))
var/mob/living/bug = target
bug.death(1)
if(is_type_in_typecache(target, spider_panic))
to_chat(user, "<span class='warning'>You easily land a critical blow on the [target].</span>")
if(istype(target, /mob/living/))
var/mob/living/bug = target
bug.adjustBruteLoss(35) //What kinda mad man would go into melee with a spider?!
else
qdel(target)
@@ -1013,7 +1043,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
icon_state = "madeyoulook"
force = 0
throwforce = 0
item_flags = DROPDEL | ABSTRACT
item_flags = DROPDEL | ABSTRACT // | HAND_ITEM
attack_verb = list("bopped")
/obj/item/circlegame/Initialize()
@@ -1036,6 +1066,8 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/// Stage 1: The mistake is made
/obj/item/circlegame/proc/ownerExamined(mob/living/owner, mob/living/sucker)
SIGNAL_HANDLER
if(!istype(sucker) || !in_range(owner, sucker))
return
addtimer(CALLBACK(src, .proc/waitASecond, owner, sucker), 4)
@@ -1082,6 +1114,10 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
to_chat(owner, "<span class='warning'>[sucker] looks down at your [src.name] before trying to avert [sucker.p_their()] eyes, but it's too late!</span>")
to_chat(sucker, "<span class='danger'><b>[owner] sees the fear in your eyes as you try to look away from [owner.p_their()] [src.name]!</b></span>")
owner.face_atom(sucker)
if(owner.client)
owner.client.give_award(/datum/award/achievement/misc/gottem, owner) // then everybody clapped
playsound(get_turf(owner), 'sound/effects/hit_punch.ogg', 50, TRUE, -1)
owner.do_attack_animation(sucker)
@@ -1109,7 +1145,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
item_state = "nothing"
force = 0
throwforce = 0
item_flags = DROPDEL | ABSTRACT
item_flags = DROPDEL | ABSTRACT // | HAND_ITEM
attack_verb = list("slapped")
hitsound = 'sound/effects/snap.ogg'
@@ -1118,16 +1154,12 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
var/mob/living/carbon/human/L = M
if(L && L.dna && L.dna.species)
L.dna.species.stop_wagging_tail(M)
if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD)))
user.do_attack_animation(M)
playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1)
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
"<span class='notice'>You slap [M]!</span>",\
"You hear a slap.")
return
else
..()
user.do_attack_animation(M)
playsound(M, 'sound/weapons/slap.ogg', 50, TRUE, -1)
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
"<span class='notice'>You slap [M]!</span>",\
"<span class='hear'>You hear a slap.</span>")
return
/obj/item/proc/can_trigger_gun(mob/living/user)
if(!user.can_use_guns(src))
return FALSE
@@ -1144,6 +1176,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
force = 0
throwforce = 5
reach = 2
var/min_reach = 2
/obj/item/extendohand/acme
name = "\improper ACME Extendo-Hand"
@@ -1151,13 +1184,26 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/obj/item/extendohand/attack(atom/M, mob/living/carbon/human/user)
var/dist = get_dist(M, user)
if(dist < reach)
if(dist < min_reach)
to_chat(user, "<span class='warning'>[M] is too close to use [src] on.</span>")
return
M.attack_hand(user)
//HF blade
// /obj/item/gohei
// name = "gohei"
// desc = "A wooden stick with white streamers at the end. Originally used by shrine maidens to purify things. Now used by the station's valued weeaboos."
// force = 5
// throwforce = 5
// hitsound = "swing_hit"
// attack_verb_continuous = list("whacks", "thwacks", "wallops", "socks")
// attack_verb_simple = list("whack", "thwack", "wallop", "sock")
// icon = 'icons/obj/items_and_weapons.dmi'
// icon_state = "gohei"
// inhand_icon_state = "gohei"
// lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
// righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
//HF blade
/obj/item/vibro_weapon
icon_state = "hfrequency0"
lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi'
@@ -1166,6 +1212,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
desc = "A potent weapon capable of cutting through nearly anything. Wielding it in two hands will allow you to deflect gunfire."
armour_penetration = 100
block_chance = 40
force = 20
throwforce = 20
throw_speed = 4
sharpness = SHARP_EDGED
@@ -1188,10 +1235,14 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
/// triggered on wield of two handed item
/obj/item/vibro_weapon/proc/on_wield(obj/item/source, mob/user)
SIGNAL_HANDLER
wielded = TRUE
/// triggered on unwield of two handed item
/obj/item/vibro_weapon/proc/on_unwield(obj/item/source, mob/user)
SIGNAL_HANDLER
wielded = FALSE
/obj/item/vibro_weapon/update_icon_state()