diff --git a/code/__defines/inventory_sizes.dm b/code/__defines/inventory_sizes.dm new file mode 100644 index 0000000000..6fb72505d0 --- /dev/null +++ b/code/__defines/inventory_sizes.dm @@ -0,0 +1,25 @@ +// The below should be used to define an item's w_class variable. +// Example: w_class = ITENSIZE_LARGE +// This allows the addition of future w_classes without needing to change every file. +#define ITEMSIZE_TINY 1 +#define ITEMSIZE_SMALL 2 +#define ITEMSIZE_NORMAL 3 +#define ITEMSIZE_LARGE 4 +#define ITEMSIZE_HUGE 5 +#define ITEMSIZE_NO_CONTAINER 100 // Use this to forbid item from being placed in a container. + +// Tweak these to determine how much space an item takes in a container. +// Look in storage.dm for get_storage_cost(), which uses these. Containers also use these as a reference for size. +// ITEMSIZE_COST_NORMAL is equivalent to one slot using the old inventory system. As such, it is a nice reference to use for +// defining how much space there is in a container. +#define ITEMSIZE_COST_TINY 1 +#define ITEMSIZE_COST_SMALL 2 +#define ITEMSIZE_COST_NORMAL 4 +#define ITEMSIZE_COST_LARGE 8 +#define ITEMSIZE_COST_HUGE 16 +#define ITEMSIZE_COST_NO_CONTAINER 1000 + +// Container sizes. Note that different containers can hold a maximum ITEMSIZE. +#define INVENTORY_STANDARD_SPACE ITEMSIZE_COST_NORMAL * 7 // 28 +#define INVENTORY_DUFFLEBAG_SPACE ITEMSIZE_COST_NORMAL * 9 // 36 +#define INVENTORY_BOX_SPACE ITEMSIZE_COST_SMALL * 4 // 8 \ No newline at end of file diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm index 68954b0dc5..6a009677e1 100644 --- a/code/__defines/misc.dm +++ b/code/__defines/misc.dm @@ -167,3 +167,15 @@ #define ANTAG_HIDDEN "Hidden" #define ANTAG_SHARED "Shared" #define ANTAG_KNOWN "Known" + +// Job groups +#define ROLE_COMMAND "command" +#define ROLE_SECURITY "security" +#define ROLE_ENGINEERING "engineering" +#define ROLE_MEDICAL "medical" +#define ROLE_RESEARCH "research" +#define ROLE_CARGO "cargo" +#define ROLE_CIVILIAN "civilian" +#define ROLE_SYNTHETIC "synthetic" +#define ROLE_UNKNOWN "unknown" +#define ROLE_EVERYONE "everyone" diff --git a/code/_macros.dm b/code/_macros.dm index 5b94c872cb..1038b6a2e4 100644 --- a/code/_macros.dm +++ b/code/_macros.dm @@ -42,6 +42,10 @@ #define isxeno(A) istype(A, /mob/living/simple_animal/xeno) +#define isweakref(A) istype(A, /weakref) + #define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") #define to_chat(target, message) target << message + +#define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE) diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index d416475a27..4c976f4458 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -67,7 +67,7 @@ var/const/tk_maxrange = 15 icon_state = "2" flags = NOBLUDGEON //item_state = null - w_class = 10.0 + w_class = ITEMSIZE_NO_CONTAINER layer = 20 var/last_throw = 0 diff --git a/code/controllers/Processes/game_master.dm b/code/controllers/Processes/game_master.dm new file mode 100644 index 0000000000..7f89f3ab13 --- /dev/null +++ b/code/controllers/Processes/game_master.dm @@ -0,0 +1,6 @@ +/datum/controller/process/game_master/setup() + name = "\improper GM controller" + schedule_interval = 600 // every 60 seconds + +/datum/controller/process/game_master/doWork() + game_master.process() \ No newline at end of file diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index 1a736cd74f..d40fd4fa5a 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -361,7 +361,7 @@ clothes_s = new /icon('icons/mob/uniform.dmi', "virologywhite_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "white"), ICON_UNDERLAY) clothes_s.Blend(new /icon('icons/mob/suit.dmi', "labcoat_vir_open"), ICON_OVERLAY) - if("Station Administrator") + if("Colony Director") clothes_s = new /icon('icons/mob/uniform.dmi', "captain_s") clothes_s.Blend(new /icon('icons/mob/feet.dmi', "brown"), ICON_UNDERLAY) if("Head of Security") diff --git a/code/datums/supplypacks/contraband.dm b/code/datums/supplypacks/contraband.dm index c33b2b120c..d6427f063f 100644 --- a/code/datums/supplypacks/contraband.dm +++ b/code/datums/supplypacks/contraband.dm @@ -24,8 +24,7 @@ name = "Special Ops supplies" contains = list( /obj/item/weapon/storage/box/emps, - /obj/item/weapon/grenade/smokebomb = 3, - /obj/item/weapon/pen/reagent/paralysis, + /obj/item/weapon/grenade/smokebomb = 4, /obj/item/weapon/grenade/chem_grenade/incendiary ) cost = 25 diff --git a/code/datums/supplypacks/supplypacks.dm b/code/datums/supplypacks/supplypacks.dm index 77004ec21f..3d2d4807fd 100644 --- a/code/datums/supplypacks/supplypacks.dm +++ b/code/datums/supplypacks/supplypacks.dm @@ -34,7 +34,7 @@ var/list/all_supply_groups = list("Atmospherics", var/access = null var/hidden = 0 var/contraband = 0 - var/group = "Operations" + var/group = "Miscellaneous" /datum/supply_packs/New() manifest += "" if("rank") - var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) + var/list/L = list( "Head of Personnel", "Colony Director", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
Rank:
" diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 2b4d898cfc..1a67778fdf 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -343,7 +343,7 @@ What a mess.*/ return active1.fields["age"] = t1 if("rank") - var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) + var/list/L = list( "Head of Personnel", "Colony Director", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
Rank:
" diff --git a/code/game/machinery/computer3/buildandrepair.dm b/code/game/machinery/computer3/buildandrepair.dm index 47ceffb756..a064d8ce1c 100644 --- a/code/game/machinery/computer3/buildandrepair.dm +++ b/code/game/machinery/computer3/buildandrepair.dm @@ -2,7 +2,7 @@ /obj/item/part/computer/circuitboard density = 0 anchored = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL name = "Circuit board" icon = 'icons/obj/module.dmi' icon_state = "id_mod" diff --git a/code/game/machinery/computer3/component.dm b/code/game/machinery/computer3/component.dm index 0f7f64d011..47d5e29853 100644 --- a/code/game/machinery/computer3/component.dm +++ b/code/game/machinery/computer3/component.dm @@ -14,7 +14,7 @@ gender = PLURAL icon = 'icons/obj/stock_parts.dmi' icon_state = "hdd1" - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/emagged = 0 diff --git a/code/game/machinery/computer3/computers/card.dm b/code/game/machinery/computer3/computers/card.dm index 3a510ac836..ac3e7e4e5b 100644 --- a/code/game/machinery/computer3/computers/card.dm +++ b/code/game/machinery/computer3/computers/card.dm @@ -35,8 +35,8 @@ var jobs_all = "" jobs_all += "" - jobs_all += ""//Station Administrator in special because he is head of heads ~Intercross21 - jobs_all += "" + jobs_all += ""//Colony Director in special because he is head of heads ~Intercross21 + jobs_all += "" jobs_all += "" counter = 0 @@ -348,4 +348,4 @@ authenticate() if(access_cent_captain in reader.access) return 1 - return 0 \ No newline at end of file + return 0 diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm index a335cf1c73..a314bed273 100644 --- a/code/game/machinery/computer3/computers/security.dm +++ b/code/game/machinery/computer3/computers/security.dm @@ -513,7 +513,7 @@ What a mess.*/ temp += "
  • Released
  • " temp += "" if("rank") - var/list/L = list( "Head of Personnel", "Station Administrator", "AI" ) + var/list/L = list( "Head of Personnel", "Colony Director", "AI" ) //This was so silly before the change. Now it actually works without beating your head against the keyboard. /N if ((istype(active1, /datum/data/record) && L.Find(rank))) temp = "
    Rank:
    " diff --git a/code/game/machinery/computer3/laptop.dm b/code/game/machinery/computer3/laptop.dm index e093f4d5f6..1b0e413165 100644 --- a/code/game/machinery/computer3/laptop.dm +++ b/code/game/machinery/computer3/laptop.dm @@ -24,7 +24,7 @@ icon_state = "laptop-closed" pixel_x = 2 pixel_y = -3 - w_class = 3 + w_class = ITEMSIZE_NORMAL var/obj/machinery/computer3/laptop/stored_computer = null diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index 3ae0891b89..39ca2d5f40 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -4,7 +4,7 @@ name = "airlock electronics" icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" - w_class = 2.0 //It should be tiny! -Agouri + w_class = ITEMSIZE_SMALL //It should be tiny! -Agouri matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 50) diff --git a/code/game/machinery/doors/multi_tile.dm b/code/game/machinery/doors/multi_tile.dm index 4fc4b2fad7..45501a3de7 100644 --- a/code/game/machinery/doors/multi_tile.dm +++ b/code/game/machinery/doors/multi_tile.dm @@ -1,6 +1,7 @@ //Terribly sorry for the code doubling, but things go derpy otherwise. /obj/machinery/door/airlock/multi_tile width = 2 + appearance_flags = 0 /obj/machinery/door/airlock/multi_tile/New() ..() diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index 57e0e1b55a..cd2346a32c 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -1,5 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - datum/track var/title var/sound @@ -23,6 +21,11 @@ datum/track/New(var/title_name, var/audio) var/playing = 0 + // Vars for hacking + var/datum/wires/jukebox/wires = null + var/hacked = 0 // Whether to show the hidden songs or not + var/freq = 0 + var/datum/track/current_track var/list/datum/track/tracks = list( new/datum/track("Beyond", 'sound/ambience/ambispace.ogg'), @@ -36,6 +39,14 @@ datum/track/New(var/title_name, var/audio) new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), ) + // Only visible if hacked + var/list/datum/track/secret_tracks = list( + new/datum/track("Clown", 'sound/music/clown.ogg'), + new/datum/track("Space Asshole", 'sound/music/space_asshole.ogg'), + new/datum/track("Thunderdome", 'sound/music/THUNDERDOME.ogg'), + new/datum/track("Russkiy rep Diskoteka", 'sound/music/russianrapdisco.ogg') + ) + /obj/machinery/media/jukebox/New() ..() component_parts = list() @@ -43,11 +54,41 @@ datum/track/New(var/title_name, var/audio) component_parts += new /obj/item/weapon/stock_parts/console_screen(src) component_parts += new /obj/item/stack/cable_coil(src, 5) RefreshParts() + wires = new/datum/wires/jukebox(src) /obj/machinery/media/jukebox/Destroy() StopPlaying() + qdel(wires) + wires = null ..() +/obj/machinery/media/jukebox/proc/set_hacked(var/newhacked) + if (hacked == newhacked) return + hacked = newhacked + if (hacked) + tracks.Add(secret_tracks) + else + tracks.Remove(secret_tracks) + updateDialog() + +/obj/machinery/media/jukebox/attackby(obj/item/W as obj, mob/user as mob) + src.add_fingerprint(user) + + if(default_deconstruction_screwdriver(user, W)) + return + if(default_deconstruction_crowbar(user, W)) + return + if(istype(W, /obj/item/weapon/wrench)) + if(playing) + StopPlaying() + user.visible_message("[user] has [anchored ? "un" : ""]secured \the [src].", "You [anchored ? "un" : ""]secure \the [src].") + anchored = !anchored + playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1) + power_change() + update_icon() + return + return ..() + /obj/machinery/media/jukebox/power_change() if(!powered(power_channel) || !anchored) stat |= NOPOWER @@ -72,6 +113,8 @@ datum/track/New(var/title_name, var/audio) overlays += "[state_base]-emagged" else overlays += "[state_base]-running" + if (panel_open) + overlays += "panel_open" /obj/machinery/media/jukebox/Topic(href, href_list) if(..() || !(Adjacent(usr) || istype(usr, /mob/living/silicon))) @@ -212,11 +255,17 @@ datum/track/New(var/title_name, var/audio) return var/area/main_area = get_area(src) - main_area.forced_ambience = list(current_track.sound) + if(freq) + var/sound/new_song = sound(current_track.sound, channel = 1, repeat = 1, volume = 25) + new_song.frequency = freq + main_area.forced_ambience = list(new_song) + else + main_area.forced_ambience = list(current_track.sound) + for(var/mob/living/M in mobs_in_area(main_area)) if(M.mind) main_area.play_ambience(M) playing = 1 update_use_power(2) - update_icon() + update_icon() \ No newline at end of file diff --git a/code/game/machinery/jukebox_vr.dm b/code/game/machinery/jukebox_vr.dm index 88a1344027..0a6fb98891 100644 --- a/code/game/machinery/jukebox_vr.dm +++ b/code/game/machinery/jukebox_vr.dm @@ -1,23 +1,13 @@ // The improved, hackable jukebox for vorestation! /obj/machinery/media/jukebox/vore - name = "space jukebox" icon = 'icons/obj/jukebox_vr.dmi' - - // Vars for hacking - var/datum/wires/jukebox/wires = null - var/hacked = 0 // Whether to show the hidden songs or not - var/freq = 0 - - // Only visible if hacked - var/list/datum/track/secret_tracks = list( + secret_tracks = list( new/datum/track("Bandit Radio", 'sound/music/jukebox/bandit_radio.ogg'), new/datum/track("Ghost Fight (Toby Fox)", 'sound/music/jukebox/TobyFoxGhostFight.mid'), new/datum/track("Space Asshole", 'sound/music/space_asshole.ogg'), new/datum/track("THUNDERDOME", 'sound/music/THUNDERDOME.ogg'), ) - - // Normally visible tracks tracks = list( new/datum/track("A Song About Hares", 'sound/music/jukebox/SongAboutHares.ogg'), new/datum/track("Below The Asteroids", 'sound/music/jukebox/BelowTheAsteroids.ogg'), @@ -41,60 +31,3 @@ new/datum/track("Trai`Tor", 'sound/music/traitor.ogg'), new/datum/track("Welcome To Jurassic Park", 'sound/music/jukebox/WelcomeToJurassicPark.mid') ) - -/obj/machinery/media/jukebox/vore/New() - ..() - wires = new/datum/wires/jukebox(src) - -/obj/machinery/media/jukebox/vore/Destroy() - ..() - qdel(wires) - wires = null - -/obj/machinery/media/jukebox/vore/update_icon() - ..() - if (panel_open) - overlays += "panel_open" - - -/obj/machinery/media/jukebox/vore/proc/set_hacked(var/newhacked) - if (hacked == newhacked) return - hacked = newhacked - if (hacked) - tracks.Add(secret_tracks) - else - tracks.Remove(secret_tracks) - updateDialog() - - -/obj/machinery/media/jukebox/vore/attackby(obj/item/W as obj, mob/user as mob) - src.add_fingerprint(user) - if (default_deconstruction_screwdriver(user, W)) - return - if(istype(W, /obj/item/weapon/wirecutters)) - return wires.Interact(user) - if(istype(W, /obj/item/device/multitool)) - return wires.Interact(user) - return ..() - - -/obj/machinery/media/jukebox/vore/StartPlaying() - StopPlaying() - if(!current_track) - return - - var/area/main_area = get_area(src) - if(freq) - var/sound/new_song = sound(current_track.sound, channel = 1, repeat = 1, volume = 25) - new_song.frequency = freq - main_area.forced_ambience = list(new_song) - else - main_area.forced_ambience = list(current_track.sound) - - for(var/mob/living/M in mobs_in_area(main_area)) - if(M.mind) - main_area.play_ambience(M) - - playing = 1 - update_use_power(2) - update_icon() diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 9b7760a12e..af8bd8eb41 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -96,7 +96,7 @@ Class Procs: /obj/machinery name = "machinery" icon = 'icons/obj/stationobjs.dmi' - w_class = 10 + w_class = ITEMSIZE_NO_CONTAINER var/stat = 0 var/emagged = 0 diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 1de7cc367b..4758a77489 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -794,7 +794,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co desc = "An issue of The Griffon, the newspaper circulating aboard most stations." icon = 'icons/obj/bureaucracy.dmi' icon_state = "newspaper" - w_class = 2 //Let's make it fit in trashbags! + w_class = ITEMSIZE_SMALL //Let's make it fit in trashbags! attack_verb = list("bapped") var/screen = 0 var/pages = 0 diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 9c5fc61332..908ce1395f 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -62,7 +62,7 @@ Buildable meters icon = 'icons/obj/pipe-item.dmi' icon_state = "simple" item_state = "buildpipe" - w_class = 3 + w_class = ITEMSIZE_NORMAL level = 2 /obj/item/pipe/New(var/loc, var/pipe_type as num, var/dir as num, var/obj/machinery/atmospherics/make_from = null) @@ -1160,7 +1160,7 @@ Buildable meters icon = 'icons/obj/pipe-item.dmi' icon_state = "meter" item_state = "buildpipe" - w_class = 4 + w_class = ITEMSIZE_LARGE /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) ..() diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index 5d3270231f..84359961df 100644 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -42,6 +42,14 @@ obj/machinery/recharger if(istype(G, /obj/item/weapon/gun/energy/gun/nuclear) || istype(G, /obj/item/weapon/gun/energy/crossbow)) user << "Your gun's recharge port was removed to make room for a miniaturized reactor." return + if(istype(G, /obj/item/weapon/gun/energy)) + var/obj/item/weapon/gun/energy/E = G + if(!E.power_supply) + user << "Your gun has no power cell." + return + if(E.self_recharge) + user << "Your gun has no recharge port." + return if(istype(G, /obj/item/weapon/gun/energy/staff)) return if(istype(G, /obj/item/device/laptop)) @@ -168,4 +176,4 @@ obj/machinery/recharger icon_state_charging = "wrecharger1" icon_state_idle = "wrecharger0" portable = 0 - circuit = /obj/item/weapon/circuitboard/recharger/wrecharger \ No newline at end of file + circuit = /obj/item/weapon/circuitboard/recharger/wrecharger diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 3234d03a1f..f44747d4bb 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -586,7 +586,7 @@ var/electrified = 0 //Departments that the cycler can paint suits to look like. - var/list/departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard") + var/list/departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Crowd Control") //Species that the suits can be configured to fit. var/list/species = list("Human","Skrell","Unathi","Tajara", "Teshari") @@ -628,7 +628,7 @@ name = "Security suit cycler" model_text = "Security" req_access = list(access_security) - departments = list("Security") + departments = list("Security","Crowd Control") /obj/machinery/suit_cycler/medical name = "Medical suit cycler" @@ -751,7 +751,7 @@ //Clear the access reqs, disable the safeties, and open up all paintjobs. user << "You run the sequencer across the interface, corrupting the operating protocols." - departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","^%###^%$") + departments = list("Engineering","Mining","Medical","Security","Atmos","HAZMAT","Construction","Biohazard","Crowd Control","^%###^%$") species = list("Human","Skrell","Unathi","Tajara", "Teshari", "Nevrean", "Akula", "Sergal", "Flatland Zorren", "Highlander Zorren", "Vulpkanin", "Promethean", "Xenomorph Hybrid") //VORESTATION EDIT emagged = 1 @@ -1009,6 +1009,15 @@ suit.name = "security voidsuit" suit.icon_state = "rig-sec" suit.item_state = "sec_voidsuit" + if("Crowd Control") + if(helmet) + helmet.name = "crowd control voidsuit helmet" + helmet.icon_state = "rig0-sec_riot" + helmet.item_state = "rig0-sec_riot" + if(suit) + suit.name = "crowd control voidsuit" + suit.icon_state = "rig-sec_riot" + suit.item_state = "sec_voidsuit_riot" if("Atmos") if(helmet) helmet.name = "atmospherics voidsuit helmet" diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 876e6c3f6b..00720d13dc 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -8,7 +8,7 @@ name = "mecha part" icon = 'icons/mecha/mech_construct.dmi' icon_state = "blank" - w_class = 5 + w_class = ITEMSIZE_HUGE flags = CONDUCT origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2) @@ -39,32 +39,32 @@ /obj/item/mecha_parts/part/ripley_torso name="Ripley Torso" desc="A torso part of Ripley APLU. Contains power unit, processing core and life support systems." - icon_state = "ripley_harness" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINEERING = 2) + icon_state = "ripley_harness" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/ripley_left_arm name="Ripley Left Arm" desc="A Ripley APLU left arm. Data and power sockets are compatible with most exosuit tools." - icon_state = "ripley_l_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "ripley_l_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/ripley_right_arm name="Ripley Right Arm" desc="A Ripley APLU right arm. Data and power sockets are compatible with most exosuit tools." - icon_state = "ripley_r_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "ripley_r_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/ripley_left_leg name="Ripley Left Leg" desc="A Ripley APLU left leg. Contains somewhat complex servodrives and balance maintaining systems." - icon_state = "ripley_l_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "ripley_l_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/ripley_right_leg name="Ripley Right Leg" desc="A Ripley APLU right leg. Contains somewhat complex servodrives and balance maintaining systems." - icon_state = "ripley_r_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "ripley_r_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) ///////// Gygax @@ -78,41 +78,41 @@ /obj/item/mecha_parts/part/gygax_torso name="Gygax Torso" desc="A torso part of Gygax. Contains power unit, processing core and life support systems. Has an additional equipment slot." - icon_state = "gygax_harness" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 3, TECH_ENGINEERING = 3) + icon_state = "gygax_harness" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_head name="Gygax Head" desc="A Gygax head. Houses advanced surveilance and targeting sensors." - icon_state = "gygax_head" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_MAGNET = 3, TECH_ENGINEERING = 3) + icon_state = "gygax_head" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_MAGNET = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_left_arm name="Gygax Left Arm" desc="A Gygax left arm. Data and power sockets are compatible with most exosuit tools and weapons." - icon_state = "gygax_l_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) + icon_state = "gygax_l_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_right_arm name="Gygax Right Arm" desc="A Gygax right arm. Data and power sockets are compatible with most exosuit tools and weapons." - icon_state = "gygax_r_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) + icon_state = "gygax_r_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_left_leg name="Gygax Left Leg" - icon_state = "gygax_l_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) + icon_state = "gygax_l_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_right_leg name="Gygax Right Leg" - icon_state = "gygax_r_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) + icon_state = "gygax_r_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/gygax_armour name="Gygax Armour Plates" - icon_state = "gygax_armour" - origin_tech = list(TECH_MATERIAL = 6, TECH_COMBAT = 4, TECH_ENGINEERING = 5) + icon_state = "gygax_armour" + origin_tech = list(TECH_MATERIAL = 6, TECH_COMBAT = 4, TECH_ENGINEERING = 5) //////////// Durand @@ -126,38 +126,38 @@ /obj/item/mecha_parts/part/durand_torso name="Durand Torso" - icon_state = "durand_harness" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_BIO = 3, TECH_ENGINEERING = 3) + icon_state = "durand_harness" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_BIO = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_head name="Durand Head" - icon_state = "durand_head" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_ENGINEERING = 3) + icon_state = "durand_head" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_MAGNET = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_left_arm name="Durand Left Arm" - icon_state = "durand_l_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + icon_state = "durand_l_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_right_arm name="Durand Right Arm" - icon_state = "durand_r_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + icon_state = "durand_r_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_left_leg name="Durand Left Leg" - icon_state = "durand_l_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + icon_state = "durand_l_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_right_leg name="Durand Right Leg" - icon_state = "durand_r_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) + icon_state = "durand_r_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) /obj/item/mecha_parts/part/durand_armour name="Durand Armour Plates" - icon_state = "durand_armour" - origin_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4, TECH_ENGINEERING = 5) + icon_state = "durand_armour" + origin_tech = list(TECH_MATERIAL = 5, TECH_COMBAT = 4, TECH_ENGINEERING = 5) @@ -204,44 +204,44 @@ /obj/item/mecha_parts/part/phazon_torso name="Phazon Torso" icon_state = "phazon_harness" - //construction_time = 300 + //construction_time = 300 //construction_cost = list(DEFAULT_WALL_MATERIAL=35000,"glass"=10000,"phoron"=20000) - origin_tech = list(TECH_DATA = 5, TECH_MATERIAL = 7, TECH_BLUESPACE = 6, TECH_POWER = 6) + origin_tech = list(TECH_DATA = 5, TECH_MATERIAL = 7, TECH_BLUESPACE = 6, TECH_POWER = 6) /obj/item/mecha_parts/part/phazon_head name="Phazon Head" icon_state = "phazon_head" - //construction_time = 200 + //construction_time = 200 //construction_cost = list(DEFAULT_WALL_MATERIAL=15000,"glass"=5000,"phoron"=10000) - origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 5, TECH_MAGNET = 6) + origin_tech = list(TECH_DATA = 4, TECH_MATERIAL = 5, TECH_MAGNET = 6) /obj/item/mecha_parts/part/phazon_left_arm name="Phazon Left Arm" icon_state = "phazon_l_arm" - //construction_time = 200 + //construction_time = 200 //construction_cost = list(DEFAULT_WALL_MATERIAL=20000,"phoron"=10000) - origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) /obj/item/mecha_parts/part/phazon_right_arm name="Phazon Right Arm" icon_state = "phazon_r_arm" - //construction_time = 200 + //construction_time = 200 //construction_cost = list(DEFAULT_WALL_MATERIAL=20000,"phoron"=10000) - origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 2, TECH_MAGNET = 2) /obj/item/mecha_parts/part/phazon_left_leg name="Phazon Left Leg" icon_state = "phazon_l_leg" - //construction_time = 200 + //construction_time = 200 //construction_cost = list(DEFAULT_WALL_MATERIAL=20000,"phoron"=10000) - origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) /obj/item/mecha_parts/part/phazon_right_leg name="Phazon Right Leg" icon_state = "phazon_r_leg" - //construction_time = 200 + //construction_time = 200 //construction_cost = list(DEFAULT_WALL_MATERIAL=20000,"phoron"=10000) - origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) + origin_tech = list(TECH_MATERIAL = 5, TECH_BLUESPACE = 3, TECH_MAGNET = 3) ///////// Odysseus @@ -256,37 +256,37 @@ /obj/item/mecha_parts/part/odysseus_head name="Odysseus Head" icon_state = "odysseus_head" - origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 2) + origin_tech = list(TECH_DATA = 3, TECH_MATERIAL = 2) /obj/item/mecha_parts/part/odysseus_torso name="Odysseus Torso" desc="A torso part of Odysseus. Contains power unit, processing core and life support systems." - icon_state = "odysseus_torso" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINEERING = 2) + icon_state = "odysseus_torso" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_BIO = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/odysseus_left_arm name="Odysseus Left Arm" desc="An Odysseus left arm. Data and power sockets are compatible with most exosuit tools." - icon_state = "odysseus_l_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "odysseus_l_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/odysseus_right_arm name="Odysseus Right Arm" desc="An Odysseus right arm. Data and power sockets are compatible with most exosuit tools." - icon_state = "odysseus_r_arm" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "odysseus_r_arm" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/odysseus_left_leg name="Odysseus Left Leg" desc="An Odysseus left leg. Contains somewhat complex servodrives and balance maintaining systems." - icon_state = "odysseus_l_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "odysseus_l_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /obj/item/mecha_parts/part/odysseus_right_leg name="Odysseus Right Leg" desc="A Odysseus right leg. Contains somewhat complex servodrives and balance maintaining systems." - icon_state = "odysseus_r_leg" - origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) + icon_state = "odysseus_r_leg" + origin_tech = list(TECH_DATA = 2, TECH_MATERIAL = 2, TECH_ENGINEERING = 2) /*/obj/item/mecha_parts/part/odysseus_armour name="Odysseus Carapace" diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 4d78f5aa9d..467e64af79 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1,7 +1,7 @@ /obj/item name = "item" icon = 'icons/obj/items.dmi' - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite var/abstract = 0 @@ -143,18 +143,19 @@ src.loc = T +// See inventory_sizes.dm for the defines. /obj/item/examine(mob/user, var/distance = -1) var/size switch(src.w_class) - if(1.0) + if(ITEMSIZE_TINY) size = "tiny" - if(2.0) + if(ITEMSIZE_SMALL) size = "small" - if(3.0) + if(ITEMSIZE_NORMAL) size = "normal-sized" - if(4.0) + if(ITEMSIZE_LARGE) size = "bulky" - if(5.0) + if(ITEMSIZE_HUGE) size = "huge" return ..(user, distance, "", "It is a [size] item.") @@ -320,7 +321,7 @@ var/list/global/slot_flags_enumeration = list( switch(slot) if(slot_l_ear, slot_r_ear) var/slot_other_ear = (slot == slot_l_ear)? slot_r_ear : slot_l_ear - if( (w_class > 1) && !(slot_flags & SLOT_EARS) ) + if( (w_class > ITEMSIZE_TINY) && !(slot_flags & SLOT_EARS) ) return 0 if( (slot_flags & SLOT_TWOEARS) && H.get_equipped_item(slot_other_ear) ) return 0 @@ -336,7 +337,7 @@ var/list/global/slot_flags_enumeration = list( return 0 if(slot_flags & SLOT_DENYPOCKET) return 0 - if( w_class > 2 && !(slot_flags & SLOT_POCKET) ) + if( w_class > ITEMSIZE_SMALL && !(slot_flags & SLOT_POCKET) ) return 0 if(slot_s_store) if(!H.wear_suit && (slot_wear_suit in mob_equip)) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index b154cd0468..6c86b7ebf4 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -5,7 +5,7 @@ desc = "A folded bag designed for the storage and transportation of cadavers." icon = 'icons/obj/bodybag.dmi' icon_state = "bodybag_folded" - w_class = 2.0 + w_class = ITEMSIZE_SMALL attack_self(mob/user) var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc) diff --git a/code/game/objects/items/contraband_vr.dm b/code/game/objects/items/contraband_vr.dm index ac71b7f45e..d5b7b44776 100644 --- a/code/game/objects/items/contraband_vr.dm +++ b/code/game/objects/items/contraband_vr.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "deliverycrate5" item_state = "table_parts" - w_class = 5 + w_class = ITEMSIZE_HUGE attack_self(mob/user as mob) // Another way of doing this. Commented out because the other method is better for this application. @@ -87,7 +87,7 @@ desc = "Save these for the fancy-pantses at the next CentCom black tie reception. You can't blow the smoke from such majestic stogies in just anyone's face." icon_state = "cigarcase" icon = 'icons/obj/cigarettes.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 2 slot_flags = SLOT_BELT storage_slots = 7 diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index a8d1abdd55..ee3d2b9ac3 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -9,7 +9,7 @@ var/global/list/obj/item/device/pda/PDAs = list() icon = 'icons/obj/pda.dmi' icon_state = "pda" item_state = "electronic" - w_class = 2.0 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_ID | SLOT_BELT sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/id.dmi') diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 94230418e8..2c4368736e 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -49,7 +49,7 @@ var/list/civilian_cartridges = list( icon = 'icons/obj/pda.dmi' icon_state = "cart" item_state = "electronic" - w_class = 1 + w_class = ITEMSIZE_TINY var/obj/item/radio/integrated/radio = null var/access_security = 0 diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index e06e28f3c7..b6d8a81709 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "aicard" // aicard-full item_state = "electronic" - w_class = 2.0 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT show_messages = 0 diff --git a/code/game/objects/items/devices/binoculars.dm b/code/game/objects/items/devices/binoculars.dm index b6e0ca1aca..00ef6501d4 100644 --- a/code/game/objects/items/devices/binoculars.dm +++ b/code/game/objects/items/devices/binoculars.dm @@ -6,7 +6,7 @@ flags = CONDUCT force = 5.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 5.0 throw_range = 15 throw_speed = 3 diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 1085dd3477..4b870481fa 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -7,7 +7,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ILLEGAL = 4, TECH_MAGNET = 4) var/can_use = 1 var/obj/effect/dummy/chameleon/active_dummy = null diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 4d649450fb..60bb06b5d5 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -10,7 +10,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() communications across different stations, planets, or even star systems." icon = 'icons/obj/device.dmi' icon_state = "communicator" - w_class = 2.0 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_ID | SLOT_BELT show_messages = 1 diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index 9072e4cc7e..c8d326b44e 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -11,7 +11,7 @@ icon_state = "hacktool-g" flags = CONDUCT force = 5.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 5.0 throw_range = 15 throw_speed = 3 diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 2901e4c2c9..8562ac7f28 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -4,7 +4,7 @@ icon_state = "flash" item_state = "flashtool" throwforce = 5 - w_class = 2 + w_class = ITEMSIZE_SMALL throw_speed = 4 throw_range = 10 flags = CONDUCT diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index dc042b2a6b..3b6964ec8e 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -3,28 +3,100 @@ desc = "A hand-held emergency light." icon = 'icons/obj/lighting.dmi' icon_state = "flashlight" - w_class = 2 + w_class = ITEMSIZE_SMALL flags = CONDUCT slot_flags = SLOT_BELT - matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20) - action_button_name = "Toggle Flashlight" var/on = 0 var/brightness_on = 4 //luminosity when on + var/obj/item/weapon/cell/cell + var/cell_type = /obj/item/weapon/cell/high + var/list/brightness_levels + var/brightness_level = "medium" + var/power_usage + var/power_use = 1 /obj/item/device/flashlight/initialize() ..() update_icon() +/obj/item/device/flashlight/New() + if(power_use) + processing_objects |= src + + if(cell_type) + cell = new cell_type(src) + brightness_levels = list("low" = 5, "medium" = 10, "high" = 20) + power_usage = brightness_levels[brightness_level] + + else + verbs -= /obj/item/device/flashlight/verb/toggle + ..() + +/obj/item/device/flashlight/Destroy() + if(power_use) + processing_objects -= src + ..() + +/obj/item/device/flashlight/verb/toggle() + set name = "Toggle Flashlight Brightness" + set category = "Object" + set src in usr + set_brightness(usr) + +/obj/item/device/flashlight/proc/set_brightness(mob/user as mob) + var/choice = input("Choose a brightness level.") as null|anything in brightness_levels + if(choice) + brightness_level = choice + power_usage = brightness_levels[choice] + user << "You set the brightness level on \the [src] to [brightness_level]." + update_icon() + +/obj/item/device/flashlight/process() + if(on) + if(cell && cell.charge) + if(brightness_level && power_usage) + if(power_usage < cell.charge) + cell.charge -= power_usage + else + visible_message("\The [src] flickers before going dull.") + set_light(0) + /obj/item/device/flashlight/update_icon() if(on) icon_state = "[initial(icon_state)]-on" - set_light(brightness_on) + + if(brightness_level == "low") + set_light(brightness_on/2) + else if(brightness_level == "high") + set_light(brightness_on*4) + else + set_light(brightness_on) + else icon_state = "[initial(icon_state)]" set_light(0) +/obj/item/device/flashlight/examine(mob/user) + ..() + if(power_use && brightness_level) + var/tempdesc + tempdesc += "\The [src] is set to [brightness_level]. " + if(cell) + tempdesc += "\The [src] has a \the [cell] attached. " + + if(cell.charge <= cell.maxcharge*0.25) + tempdesc += "It appears to have a low amount of power remaining." + else if(cell.charge > cell.maxcharge*0.25 && cell.charge <= cell.maxcharge*0.5) + tempdesc += "It appears to have an average amount of power remaining." + else if(cell.charge > cell.maxcharge*0.5 && cell.charge <= cell.maxcharge*0.75) + tempdesc += "It appears to have an above average amount of power remaining." + else if(cell.charge > cell.maxcharge*0.75 && cell.charge <= cell.maxcharge) + tempdesc += "It appears to have a high amount of power remaining." + + user << "[tempdesc]" + /obj/item/device/flashlight/attack_self(mob/user) if(!isturf(user.loc)) user << "You cannot turn the light on while in this [user.loc]." //To prevent some lighting anomalities. @@ -84,6 +156,34 @@ else return ..() +/obj/item/device/flashlight/attack_hand(mob/user as mob) + if(user.get_inactive_hand() == src) + if(cell) + cell.update_icon() + user.put_in_hands(cell) + cell = null + user << "You remove the cell from the [src]." + on = !on + update_icon() + return + ..() + else + return ..() + +/obj/item/device/flashlight/attackby(obj/item/weapon/W, mob/user as mob) + if(istype(W, /obj/item/weapon/cell)) + if(!cell) + user.drop_item() + W.loc = src + cell = W + user << "You install a cell in \the [src]." + update_icon() + else + user << "\The [src] already has a cell." + + else + ..() + /obj/item/device/flashlight/pen name = "penlight" desc = "A pen-sized light, used by medical staff." @@ -92,7 +192,8 @@ flags = CONDUCT slot_flags = SLOT_EARS brightness_on = 2 - w_class = 1 + w_class = ITEMSIZE_TINY + power_use = 0 /obj/item/device/flashlight/maglight name = "maglight" @@ -100,9 +201,8 @@ icon_state = "maglight" force = 10 flags = CONDUCT - brightness_on = 4 slot_flags = SLOT_BELT - w_class = 2 + w_class = ITEMSIZE_SMALL attack_verb = list ("smacked", "thwacked", "thunked") matter = list(DEFAULT_WALL_MATERIAL = 200,"glass" = 50) hitsound = "swing_hit" @@ -114,8 +214,8 @@ item_state = null flags = CONDUCT brightness_on = 2 - w_class = 1 - + w_class = ITEMSIZE_TINY + power_use = 0 // the desk lamps are a bit special /obj/item/device/flashlight/lamp @@ -123,9 +223,9 @@ desc = "A desk lamp with an adjustable mount." icon_state = "lamp" brightness_on = 5 - w_class = 4 + w_class = ITEMSIZE_LARGE flags = CONDUCT - + power_use = 0 on = 1 @@ -149,7 +249,7 @@ /obj/item/device/flashlight/flare name = "flare" desc = "A red standard-issue flare. There are instructions on the side reading 'pull cord, make light'." - w_class = 2.0 + w_class = ITEMSIZE_SMALL brightness_on = 8 // Pretty bright. light_power = 3 light_color = "#e58775" @@ -159,6 +259,7 @@ var/fuel = 0 var/on_damage = 7 var/produce_heat = 1500 + power_use = 0 /obj/item/device/flashlight/flare/New() fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds. @@ -211,13 +312,14 @@ /obj/item/device/flashlight/glowstick name = "green glowstick" desc = "A green military-grade glowstick." - w_class = 2.0 + w_class = ITEMSIZE_SMALL brightness_on = 4 light_power = 2 light_color = "#49F37C" icon_state = "glowstick" item_state = "glowstick" var/fuel = 0 + power_use = 0 /obj/item/device/flashlight/glowstick/New() fuel = rand(1600, 2000) @@ -283,9 +385,10 @@ icon = 'icons/obj/lighting.dmi' icon_state = "floor1" //not a slime extract sprite but... something close enough! item_state = "slime" - w_class = 1 + w_class = ITEMSIZE_TINY brightness_on = 6 on = 1 //Bio-luminesence has one setting, on. + power_use = 0 /obj/item/device/flashlight/slime/New() ..() diff --git a/code/game/objects/items/devices/locker_painter.dm b/code/game/objects/items/devices/locker_painter.dm index d7fb37050f..9459927ffe 100644 --- a/code/game/objects/items/devices/locker_painter.dm +++ b/code/game/objects/items/devices/locker_painter.dm @@ -55,7 +55,7 @@ "warden" = list("open" = "wardensecureopen", "closed" = "wardensecure", "locked" = "wardensecure1", "broken" = "wardensecurebroken", "off" = "wardensecureoff"), "HoS" = list("open" = "hossecureopen", "closed" = "hossecure", "locked" = "hossecure1", "broken" = "hossecurebroken", "off" = "hossecureoff"), "HoP" = list("open" = "hopsecureopen", "closed" = "hopsecure", "locked" = "hopsecure1", "broken" = "hopsecurebroken", "off" = "hopsecureoff"), - "Captain" = list("open" = "capsecureopen", "closed" = "capsecure", "locked" = "capsecure1", "broken" = "capsecurebroken", "off" = "capsecureoff") + "Administrator" = list("open" = "capsecureopen", "closed" = "capsecure", "locked" = "capsecure1", "broken" = "capsecurebroken", "off" = "capsecureoff") ) /obj/item/device/closet_painter/afterattack(atom/A, var/mob/user, proximity) @@ -136,4 +136,4 @@ var/new_colour_secure = input("Select a colour.") as null|anything in colours_secure if(new_colour_secure && !isnull(colours_secure[new_colour_secure])) colour_secure = new_colour_secure - usr << "You set \the [src] secure closet colour to '[colour_secure]'." \ No newline at end of file + usr << "You set \the [src] secure closet colour to '[colour_secure]'." diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index 0357a8b80b..0ce2f405ff 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -3,7 +3,7 @@ desc = "A device used to project your voice. Loudly." icon_state = "megaphone" item_state = "radio" - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT var/spamcheck = 0 diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 4e6154189a..85c680ca98 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -10,7 +10,7 @@ icon_state = "multitool" flags = CONDUCT force = 5.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 5.0 throw_range = 15 throw_speed = 3 diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 89042464b3..e0e05ff467 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "pai" item_state = "electronic" - w_class = 2.0 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT origin_tech = list(TECH_DATA = 2) show_messages = 0 diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 3478abce1d..497ad68f09 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -5,7 +5,7 @@ desc = "A nulling power sink which drains energy from electrical systems." icon_state = "powersink0" item_state = "electronic" - w_class = 4.0 + w_class = ITEMSIZE_LARGE flags = CONDUCT throwforce = 5 throw_speed = 1 diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index f945fd89e6..ddcb23a5aa 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -10,7 +10,7 @@ frequency = 1449 flags = CONDUCT slot_flags = SLOT_BACK - w_class = 5.0 + w_class = ITEMSIZE_HUGE matter = list(DEFAULT_WALL_MATERIAL = 10000,"glass" = 2500) diff --git a/code/game/objects/items/devices/radio/encryptionkey.dm b/code/game/objects/items/devices/radio/encryptionkey.dm index 961286da09..f08585da31 100644 --- a/code/game/objects/items/devices/radio/encryptionkey.dm +++ b/code/game/objects/items/devices/radio/encryptionkey.dm @@ -4,7 +4,7 @@ desc = "An encryption key for a radio headset. Contains cypherkeys." icon = 'icons/obj/radio.dmi' icon_state = "cypherkey" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/translate_binary = 0 var/translate_hive = 0 @@ -60,7 +60,7 @@ channels = list("Command" = 1) /obj/item/device/encryptionkey/heads/captain - name = "station administrator's encryption key" + name = "colony director's encryption key" icon_state = "cap_cypherkey" channels = list("Command" = 1, "Security" = 1, "Engineering" = 0, "Science" = 0, "Medical" = 0, "Supply" = 0, "Service" = 0) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index 9147b4f840..fce4ec3175 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -158,14 +158,14 @@ /obj/item/device/radio/headset/heads/captain - name = "station administrator's headset" + name = "colony director's headset" desc = "The headset of the boss." icon_state = "com_headset" item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/captain /obj/item/device/radio/headset/heads/captain/alt - name = "station administrator's bowman headset" + name = "colony director's bowman headset" desc = "The headset of the boss." icon_state = "com_headset_alt" item_state = "headset" @@ -244,14 +244,14 @@ /obj/item/device/radio/headset/heads/hop name = "head of personnel's headset" - desc = "The headset of the guy who will one day be Station Administrator." + desc = "The headset of the guy who will one day be Colony Director." icon_state = "com_headset" item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hop /obj/item/device/radio/headset/heads/hop/alt name = "head of personnel's bowman headset" - desc = "The headset of the guy who will one day be Station Administrator." + desc = "The headset of the guy who will one day be Colony Director." icon_state = "com_headset_alt" item_state = "headset" ks2type = /obj/item/device/encryptionkey/heads/hop diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 4ea8837d80..72d4c50685 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -3,7 +3,7 @@ desc = "Talk through this." icon_state = "intercom" anchored = 1 - w_class = 4.0 + w_class = ITEMSIZE_LARGE canhear_range = 2 flags = CONDUCT | NOBLOODY var/circuit = /obj/item/weapon/circuitboard/intercom diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 93353ca1ed..4c841e2651 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -43,7 +43,7 @@ var/global/list/default_medbay_channels = list( slot_flags = SLOT_BELT throw_speed = 2 throw_range = 9 - w_class = 2 + w_class = ITEMSIZE_SMALL show_messages = 1 matter = list("glass" = 25,DEFAULT_WALL_MATERIAL = 75) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 5388dc4420..1f88d91f06 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -17,7 +17,7 @@ REAGENT SCANNER flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 matter = list(DEFAULT_WALL_MATERIAL = 200) @@ -208,7 +208,7 @@ REAGENT SCANNER desc = "A hand-held environmental scanner which reports current gas levels." icon_state = "atmos" item_state = "analyzer" - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 @@ -242,7 +242,7 @@ REAGENT SCANNER desc = "A hand-held mass spectrometer which identifies trace chemicals in a blood sample." icon_state = "spectrometer" item_state = "analyzer" - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT | OPENCONTAINER slot_flags = SLOT_BELT throwforce = 5 @@ -304,7 +304,7 @@ REAGENT SCANNER desc = "A hand-held reagent scanner which identifies chemical agents." icon_state = "spectrometer" item_state = "analyzer" - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 @@ -353,7 +353,7 @@ REAGENT SCANNER icon_state = "adv_spectrometer" item_state = "analyzer" origin_tech = list(TECH_BIO = 1) - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT throwforce = 0 throw_speed = 3 diff --git a/code/game/objects/items/devices/spy_bug.dm b/code/game/objects/items/devices/spy_bug.dm index 063e7a85ce..d05289e2cb 100644 --- a/code/game/objects/items/devices/spy_bug.dm +++ b/code/game/objects/items/devices/spy_bug.dm @@ -8,7 +8,7 @@ flags = CONDUCT force = 5.0 - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS throwforce = 5.0 throw_range = 15 @@ -51,7 +51,7 @@ icon_state = "pda" item_state = "electronic" - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1, TECH_ILLEGAL = 3) diff --git a/code/game/objects/items/devices/suit_cooling.dm b/code/game/objects/items/devices/suit_cooling.dm index 4447ca7af2..fb34bb0996 100644 --- a/code/game/objects/items/devices/suit_cooling.dm +++ b/code/game/objects/items/devices/suit_cooling.dm @@ -1,7 +1,7 @@ /obj/item/device/suit_cooling_unit name = "portable suit cooling unit" desc = "A portable heat sink and liquid cooled radiator that can be hooked up to a space suit's existing temperature controls to provide industrial levels of cooling." - w_class = 4 + w_class = ITEMSIZE_LARGE icon = 'icons/obj/device.dmi' icon_state = "suitcooler0" slot_flags = SLOT_BACK diff --git a/code/game/objects/items/devices/t_scanner.dm b/code/game/objects/items/devices/t_scanner.dm index 7dc13cb9e8..dde6814494 100644 --- a/code/game/objects/items/devices/t_scanner.dm +++ b/code/game/objects/items/devices/t_scanner.dm @@ -5,7 +5,7 @@ desc = "A terahertz-ray emitter and scanner used to detect underfloor objects such as cables and pipes." icon_state = "t-ray0" slot_flags = SLOT_BELT - w_class = 2 + w_class = ITEMSIZE_SMALL item_state = "electronic" matter = list(DEFAULT_WALL_MATERIAL = 150) origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 2740831046..689e92fb7c 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -3,7 +3,7 @@ desc = "A device that can record up to an hour of dialogue and play it back. It automatically translates the content in playback." icon_state = "taperecorderidle" item_state = "analyzer" - w_class = 2.0 + w_class = ITEMSIZE_SMALL matter = list(DEFAULT_WALL_MATERIAL = 60,"glass" = 30) diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index fbed4e7ebb..126a4871c9 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -19,7 +19,7 @@ effective or pretty fucking useless. desc = "A strange device with twin antennas." icon_state = "batterer" throwforce = 5 - w_class = 1.0 + w_class = ITEMSIZE_TINY throw_speed = 4 throw_range = 10 flags = CONDUCT diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index 4c26a482a1..4a67bffe56 100644 --- a/code/game/objects/items/devices/whistle.dm +++ b/code/game/objects/items/devices/whistle.dm @@ -3,7 +3,7 @@ desc = "Used by obese officers to save their breath for running." icon_state = "voice0" item_state = "flashbang" //looks exactly like a flash (and nothing like a flashbang) - w_class = 1.0 + w_class = ITEMSIZE_TINY flags = CONDUCT slot_flags = SLOT_EARS diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index 54062ff853..c04b9b17dd 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -3,7 +3,7 @@ desc = "A small empty jar." icon = 'icons/obj/items.dmi' icon_state = "jar" - w_class = 2 + w_class = ITEMSIZE_SMALL matter = list("glass" = 200) flags = NOBLUDGEON var/list/accept_mobs = list(/mob/living/simple_animal/lizard, /mob/living/simple_animal/mouse) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 009248dec1..ad24aa90a1 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -9,7 +9,7 @@ item_state = "lgloves" force = 0 throwforce = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 1 throw_range = 15 var/state diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 41ae7ac7c3..15f3310322 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/items.dmi' amount = 10 max_amount = 10 - w_class = 2 + w_class = ITEMSIZE_SMALL throw_speed = 4 throw_range = 20 var/heal_brute = 0 diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 73d4d3cbcd..543a432606 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -4,7 +4,7 @@ singular_name = "metal rod" icon_state = "rods" flags = CONDUCT - w_class = 3.0 + w_class = ITEMSIZE_NORMAL force = 9.0 throwforce = 15.0 throw_speed = 5 diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index f56b9580fc..b0c48fffa2 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -5,7 +5,7 @@ singular_name = "telecrystal" icon = 'icons/obj/stock_parts.dmi' icon_state = "telecrystal" - w_class = 1 + w_class = ITEMSIZE_TINY max_amount = 240 origin_tech = list(TECH_MATERIAL = 6, TECH_BLUESPACE = 4) force = 1 //Needs a token force to ensure you can attack because for some reason you can't attack with 0 force things diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index 20cfb07864..f8981bc471 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -12,7 +12,7 @@ name = "tile" singular_name = "tile" desc = "A non-descript floor tile" - w_class = 3 + w_class = ITEMSIZE_NORMAL max_amount = 60 /obj/item/stack/tile/New() diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 7b8042c8c1..1da2008cea 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -96,7 +96,7 @@ force = 0 icon = 'icons/obj/weapons.dmi' icon_state = "syndballoon" - w_class = 4.0 + w_class = ITEMSIZE_LARGE /obj/item/toy/nanotrasenballoon name = "criminal balloon" @@ -107,7 +107,7 @@ force = 0 icon = 'icons/obj/weapons.dmi' icon_state = "ntballoon" - w_class = 4.0 + w_class = ITEMSIZE_LARGE /* * Fake telebeacon @@ -141,7 +141,7 @@ icon_l_hand = 'icons/mob/items/lefthand_guns.dmi', icon_r_hand = 'icons/mob/items/righthand_guns.dmi', ) - w_class = 2.0 + w_class = ITEMSIZE_SMALL attack_verb = list("attacked", "struck", "hit") var/bullets = 5 @@ -234,7 +234,7 @@ desc = "It's nerf or nothing! Ages 8 and up." icon = 'icons/obj/toy.dmi' icon_state = "foamdart" - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS /obj/effect/foam_dart_dummy @@ -258,7 +258,7 @@ slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi', ) var/active = 0.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL attack_verb = list("attacked", "struck", "hit") attack_self(mob/user as mob) @@ -267,12 +267,12 @@ user << "You extend the plastic blade with a quick flick of your wrist." playsound(user, 'sound/weapons/saberon.ogg', 50, 1) src.icon_state = "swordblue" - src.w_class = 4 + src.w_class = ITEMSIZE_LARGE else user << "You push the plastic blade back down into the handle." playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) src.icon_state = "sword0" - src.w_class = 2 + src.w_class = ITEMSIZE_SMALL if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -295,7 +295,7 @@ slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 - w_class = 3 + w_class = ITEMSIZE_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced") /* @@ -306,7 +306,7 @@ desc = "Wow!" icon = 'icons/obj/toy.dmi' icon_state = "snappop" - w_class = 1 + w_class = ITEMSIZE_TINY throw_impact(atom/hit_atom) ..() @@ -410,7 +410,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "bosunwhistle" var/cooldown = 0 - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS /obj/item/toy/bosunwhistle/attack_self(mob/user as mob) @@ -538,8 +538,8 @@ icon_state = "botanist" /obj/item/toy/figure/captain - name = "Station Administrator action figure" - desc = "A \"Space Life\" brand Station Administrator action figure." + name = "Colony Director action figure" + desc = "A \"Space Life\" brand Colony Director action figure." icon_state = "captain" /obj/item/toy/figure/cargotech @@ -707,7 +707,7 @@ slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 - w_class = 3 + w_class = ITEMSIZE_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced") /obj/item/toy/therapy_red @@ -716,7 +716,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapyred" item_state = "egg4" // It's the red egg in items_left/righthand - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/toy/therapy_purple name = "purple therapy doll" @@ -724,7 +724,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapypurple" item_state = "egg1" // It's the magenta egg in items_left/righthand - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/toy/therapy_blue name = "blue therapy doll" @@ -732,7 +732,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapyblue" item_state = "egg2" // It's the blue egg in items_left/righthand - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/toy/therapy_yellow name = "yellow therapy doll" @@ -740,7 +740,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapyyellow" item_state = "egg5" // It's the yellow egg in items_left/righthand - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/toy/therapy_orange name = "orange therapy doll" @@ -748,7 +748,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapyorange" item_state = "egg4" // It's the red one again, lacking an orange item_state and making a new one is pointless - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/toy/therapy_green name = "green therapy doll" @@ -756,7 +756,7 @@ icon = 'icons/obj/toy.dmi' icon_state = "therapygreen" item_state = "egg3" // It's the green egg in items_left/righthand - w_class = 1 + w_class = ITEMSIZE_TINY /* * Plushies @@ -864,7 +864,7 @@ slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi', slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi', ) - w_class = 4 + w_class = ITEMSIZE_LARGE attack_verb = list("attacked", "slashed", "stabbed", "poked") /* NYET. @@ -873,7 +873,7 @@ name = "toddler" desc = "This baby looks almost real. Wait, did it just burp?" force = 5 - w_class = 4.0 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK */ @@ -891,6 +891,6 @@ desc = "Tiny cute Christmas tree." icon = 'icons/obj/toy.dmi' icon_state = "tinyxmastree" - w_class = 1 + w_class = ITEMSIZE_TINY force = 1 - throwforce = 1 \ No newline at end of file + throwforce = 1 diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 1d171d9dbe..7fb09e116c 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -4,7 +4,7 @@ //Added by Jack Rost /obj/item/trash icon = 'icons/obj/trash.dmi' - w_class = 2.0 + w_class = ITEMSIZE_SMALL desc = "This is rubbish." /obj/item/trash/raisins diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index ec1e5dbf41..ce28a6eb0b 100755 --- a/code/game/objects/items/weapons/AI_modules.dm +++ b/code/game/objects/items/weapons/AI_modules.dm @@ -14,7 +14,7 @@ AI MODULES desc = "An AI Module for transmitting encrypted instructions to the AI." flags = CONDUCT force = 5.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 5.0 throw_speed = 3 throw_range = 15 diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 80080220e9..e21c509c15 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -12,7 +12,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 2) matter = list(DEFAULT_WALL_MATERIAL = 50000) var/datum/effect/effect/system/spark_spread/spark_system @@ -161,7 +161,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "rcd" item_state = "rcdammo" - w_class = 2 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 2) matter = list(DEFAULT_WALL_MATERIAL = 30000,"glass" = 15000) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 6384508c04..10a847b469 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -14,7 +14,7 @@ RSF anchored = 0.0 var/stored_matter = 30 var/mode = 1 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL /obj/item/weapon/rsf/examine(mob/user) if(..(user, 0)) diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm index 3cbc75bfeb..1b1b3a5433 100644 --- a/code/game/objects/items/weapons/autopsy.dm +++ b/code/game/objects/items/weapons/autopsy.dm @@ -8,7 +8,7 @@ icon = 'icons/obj/autopsy_scanner.dmi' icon_state = "" flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) var/list/datum/autopsy_data_scanner/wdata = list() var/list/datum/autopsy_data_scanner/chemtraces = list() diff --git a/code/game/objects/items/weapons/candle.dm b/code/game/objects/items/weapons/candle.dm index 740b5e5a12..5ea04c2dab 100644 --- a/code/game/objects/items/weapons/candle.dm +++ b/code/game/objects/items/weapons/candle.dm @@ -3,7 +3,7 @@ desc = "a small pillar candle. Its specially-formulated fuel-oxidizer wax mixture allows continued combustion in airless environments." icon = 'icons/obj/candle.dmi' icon_state = "candle1" - w_class = 1 + w_class = ITEMSIZE_TINY light_color = "#E09D37" var/wax = 2000 diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index c6918d33db..11404ade86 100644 --- a/code/game/objects/items/weapons/cards_ids.dm +++ b/code/game/objects/items/weapons/cards_ids.dm @@ -15,7 +15,7 @@ name = "card" desc = "Does card things." icon = 'icons/obj/card.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/associated_account_number = 0 @@ -233,12 +233,12 @@ access = list(access_syndicate, access_external_airlocks) /obj/item/weapon/card/id/captains_spare - name = "station administrator's spare ID" + name = "colony director's spare ID" desc = "The spare ID of the High Lord himself." icon_state = "gold" item_state = "gold_id" - registered_name = "Station Administrator" - assignment = "Station Administrator" + registered_name = "Colony Director" + assignment = "Colony Director" /obj/item/weapon/card/id/captains_spare/New() access = get_all_station_access() ..() @@ -362,4 +362,4 @@ desc = "An identification card of some sort. It does not look like it is issued by NT." icon_state = "permit" primary_color = rgb(142,94,0) - secondary_color = rgb(191,159,95) \ No newline at end of file + secondary_color = rgb(191,159,95) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 3d3cb46192..62f4925c9a 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -37,7 +37,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_state = "match_unlit" var/burnt = 0 var/smoketime = 5 - w_class = 1.0 + w_class = ITEMSIZE_TINY origin_tech = list(TECH_MATERIAL = 1) slot_flags = SLOT_EARS attack_verb = list("burnt", "singed") @@ -229,7 +229,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon_state = "cigoff" throw_speed = 0.5 item_state = "cigoff" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS | SLOT_MASK attack_verb = list("burnt", "singed") icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi @@ -314,7 +314,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM desc = "A manky old cigarette butt." icon = 'icons/obj/clothing/masks.dmi' icon_state = "cigbutt" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS throwforce = 1 @@ -443,7 +443,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon = 'icons/obj/items.dmi' icon_state = "lighter-g" item_state = "lighter-g" - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 4 flags = CONDUCT slot_flags = SLOT_BELT diff --git a/code/game/objects/items/weapons/circuitboards/circuitboard.dm b/code/game/objects/items/weapons/circuitboards/circuitboard.dm index 3711cf0690..f17ee1c292 100644 --- a/code/game/objects/items/weapons/circuitboards/circuitboard.dm +++ b/code/game/objects/items/weapons/circuitboards/circuitboard.dm @@ -12,7 +12,7 @@ origin_tech = list(TECH_DATA = 2) density = 0 anchored = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT force = 5.0 throwforce = 5.0 diff --git a/code/game/objects/items/weapons/circuitboards/machinery/power.dm b/code/game/objects/items/weapons/circuitboards/machinery/power.dm index 6e5667ebe5..57d8822df6 100644 --- a/code/game/objects/items/weapons/circuitboards/machinery/power.dm +++ b/code/game/objects/items/weapons/circuitboards/machinery/power.dm @@ -22,3 +22,10 @@ build_path = /obj/machinery/power/smes/batteryrack/makeshift board_type = new /datum/frame/frame_types/machine req_components = list(/obj/item/weapon/cell = 3) + +/obj/item/weapon/circuitboard/grid_checker + name = T_BOARD("power grid checker") + build_path = /obj/machinery/power/grid_checker + board_type = new /datum/frame/frame_types/machine + origin_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3) + req_components = list(/obj/item/weapon/stock_parts/capacitor = 3, /obj/item/stack/cable_coil = 10) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index db630d8fad..9d3a9cb0a4 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -4,7 +4,7 @@ desc = "A generic brand of lipstick." icon = 'icons/obj/items.dmi' icon_state = "lipstick" - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/colour = "red" var/open = 0 @@ -67,7 +67,7 @@ /obj/item/weapon/haircomb //sparklysheep's comb name = "purple comb" desc = "A pristine purple comb made from flexible plastic." - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS icon = 'icons/obj/items.dmi' icon_state = "purplecomb" diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 86310d2b78..9099ff3bd1 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -3,7 +3,7 @@ desc = "A dice with six sides." icon = 'icons/obj/dice.dmi' icon_state = "d66" - w_class = 1 + w_class = ITEMSIZE_TINY var/sides = 6 attack_verb = list("diced") diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index ba60bfc361..33b93f6210 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -8,7 +8,7 @@ var/s_time = 10.0 throw_speed = 1 throw_range = 5 - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/uses = 1 var/nofail @@ -160,7 +160,7 @@ /obj/item/weapon/dnainjector/xraymut name = "\improper DNA injector (Xray)" - desc = "Finally you can see what the Station Administrator does." + desc = "Finally you can see what the Colony Director does." datatype = DNA2_BUF_SE value = 0xFFF //block = 8 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 46e8e7ba26..1a8cc97def 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -6,7 +6,7 @@ icon_state = "plastic-explosive0" item_state = "plasticx" flags = NOBLUDGEON - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ILLEGAL = 2) var/datum/wires/explosive/c4/wires = null var/timer = 10 diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 6e323d7387..3bcb68bcee 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -7,7 +7,7 @@ hitsound = 'sound/weapons/smash.ogg' flags = CONDUCT throwforce = 10 - w_class = 3 + w_class = ITEMSIZE_NORMAL throw_speed = 2 throw_range = 10 force = 10 @@ -28,7 +28,7 @@ item_state = "miniFE" hitsound = null //it is much lighter, after all. throwforce = 2 - w_class = 2.0 + w_class = ITEMSIZE_SMALL force = 3.0 max_water = 150 spray_particles = 3 diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 37018e8576..c3f93a016f 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -13,7 +13,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 1, TECH_PHORON = 1) matter = list(DEFAULT_WALL_MATERIAL = 500) var/status = 0 diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index 94775ceb36..6f8e1782eb 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -18,7 +18,7 @@ ..() pixel_x = rand(-10,10) pixel_y = rand(-10,10) - if(w_class > 0 && w_class < 4) + if(w_class > 0 && w_class < ITEMSIZE_LARGE) icon_state = "gift[w_class]" else icon_state = "gift[pick(1, 2, 3)]" @@ -128,7 +128,7 @@ ..() if (!( locate(/obj/structure/table, src.loc) )) user << "You MUST put the paper on a table!" - if (W.w_class < 4) + if (W.w_class < ITEMSIZE_LARGE) if (user.get_type_in_hands(/obj/item/weapon/wirecutters)) var/a_used = 2 ** (src.w_class - 1) if (src.amount < a_used) diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index f87f0fa830..be7d90830d 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -3,7 +3,7 @@ icon_state = "chemg" item_state = "grenade" desc = "A hand made chemical grenade." - w_class = 2.0 + w_class = ITEMSIZE_SMALL force = 2.0 det_time = null unacidable = 1 diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 0236297d22..d02ccf2185 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -92,7 +92,7 @@ M.update_icons() /obj/item/weapon/grenade/flashbang/clusterbang//Created by Polymorph, fixed by Sieve - desc = "Use of this weapon may constiute a war crime in your area, consult your local Station Administrator." + desc = "Use of this weapon may constiute a war crime in your area, consult your local Colony Director." name = "clusterbang" icon = 'icons/obj/grenade.dmi' icon_state = "clusterbang" diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index 8a8536d434..b46d987b4c 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -1,7 +1,7 @@ /obj/item/weapon/grenade name = "grenade" desc = "A hand held grenade, with an adjustable timer." - w_class = 2.0 + w_class = ITEMSIZE_SMALL icon = 'icons/obj/grenade.dmi' icon_state = "grenade" item_state = "grenade" diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 25ee157950..e6962669dc 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -7,7 +7,7 @@ flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 5 origin_tech = list(TECH_MATERIAL = 1) diff --git a/code/game/objects/items/weapons/hydroponics.dm b/code/game/objects/items/weapons/hydroponics.dm index 8160c14cd8..749f1a08b9 100644 --- a/code/game/objects/items/weapons/hydroponics.dm +++ b/code/game/objects/items/weapons/hydroponics.dm @@ -11,7 +11,7 @@ var/mode = 1; //0 = pick one at a time, 1 = pick all on tile var/capacity = 500; //the number of seeds it can carry. slot_flags = SLOT_BELT - w_class = 1 + w_class = ITEMSIZE_TINY var/list/item_quants = list() /obj/item/weapon/seedbag/attack_self(mob/user as mob) diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 3f4164a4c4..17d3e32f92 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -6,7 +6,7 @@ name = "implant" icon = 'icons/obj/device.dmi' icon_state = "implant" - w_class = 1 + w_class = ITEMSIZE_TINY var/implanted = null var/mob/imp_in = null var/obj/item/organ/external/part = null diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 49b1b280a7..815050636a 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -8,7 +8,7 @@ item_state = "implantcase" throw_speed = 1 throw_range = 5 - w_class = 1.0 + w_class = ITEMSIZE_TINY var/obj/item/weapon/implant/imp = null /obj/item/weapon/implantcase/proc/update() diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 655727a62a..f872cd0bf4 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -5,7 +5,7 @@ item_state = "syringe_0" throw_speed = 1 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/obj/item/weapon/implant/imp = null /obj/item/weapon/implanter/attack_self(var/mob/user) @@ -31,7 +31,7 @@ return if (user && src.imp) M.visible_message("[user] is attemping to implant [M].") - + user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) user.do_attack_animation(M) diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index a6feac2998..dc054536ac 100644 --- a/code/game/objects/items/weapons/implants/implantpad.dm +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -8,7 +8,7 @@ item_state = "electronic" throw_speed = 1 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/obj/item/weapon/implantcase/case = null var/broadcasting = null var/listening = 1.0 diff --git a/code/game/objects/items/weapons/improvised_components.dm b/code/game/objects/items/weapons/improvised_components.dm index 0fd7d95e8c..c76f927ef2 100644 --- a/code/game/objects/items/weapons/improvised_components.dm +++ b/code/game/objects/items/weapons/improvised_components.dm @@ -46,7 +46,7 @@ flags = CONDUCT force = 8 throwforce = 10 - w_class = 3 + w_class = ITEMSIZE_NORMAL attack_verb = list("hit", "bludgeoned", "whacked", "bonked") force_divisor = 0.1 thrown_force_divisor = 0.1 diff --git a/code/game/objects/items/weapons/manuals.dm b/code/game/objects/items/weapons/manuals.dm index 8c1e3f5df1..c69b3d61d1 100644 --- a/code/game/objects/items/weapons/manuals.dm +++ b/code/game/objects/items/weapons/manuals.dm @@ -110,7 +110,7 @@

    SUPERMATTER HANDLING

  • Do not expose supermatter to oxygen.
  • -
  • Do not touch supermatter without gloves without exosuit protection allow supermatter to contact any solid object apart from specially-designed supporting pallet.
  • +
  • Do not allow supermatter to contact any solid object apart from specially-designed supporting pallet.
  • Do not directly view supermatter without meson goggles.
  • While handles on pallet allow moving the supermatter via pulling, pushing should not be attempted.

  • @@ -118,7 +118,7 @@
    1. Fill reactor loop and radiator loop with two (2) standard canisters of nitrogen gas each.
    2. Ensure that pumps and filters are on and operating at maximum power.
    3. -
    4. Fire 5 15 2 UNKNOWN 8-12 pulses from emitter at supermatter crystal. Reactor blast doors must be open for this procedure.
    5. +
    6. Fire 8-9 pulses from emitter at supermatter crystal. Reactor blast doors must be open for this procedure.

    OPERATION AND MAINTENANCE

    @@ -997,7 +997,7 @@ Remember the order:
    Disk, Code, Safety, Timer, Disk, RUN!

    - Intelligence Analysts believe that normal corporate procedure is for the Station Administrator to secure the nuclear authentication disk.

    + Intelligence Analysts believe that normal corporate procedure is for the Colony Director to secure the nuclear authentication disk.

    Good luck! diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm index 7b70013a0d..8fdac8549e 100644 --- a/code/game/objects/items/weapons/material/kitchen.dm +++ b/code/game/objects/items/weapons/material/kitchen.dm @@ -1,11 +1,11 @@ /obj/item/weapon/material/kitchen icon = 'icons/obj/kitchen.dmi' - + /* * Utensils */ /obj/item/weapon/material/kitchen/utensil - w_class = 1 + w_class = ITEMSIZE_TINY thrown_force_divisor = 1 origin_tech = "materials=1" attack_verb = list("attacked", "stabbed", "poked") diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm index f49d16c034..a70a253579 100644 --- a/code/game/objects/items/weapons/material/knives.dm +++ b/code/game/objects/items/weapons/material/knives.dm @@ -5,7 +5,7 @@ item_state = null hitsound = null var/active = 0 - w_class = 2 + w_class = ITEMSIZE_SMALL attack_verb = list("patted", "tapped") force_divisor = 0.25 // 15 when wielded with hardness 60 (steel) thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel) @@ -18,7 +18,7 @@ throwforce = max(3,force-3) hitsound = 'sound/weapons/bladeslice.ogg' icon_state += "_open" - w_class = 3 + w_class = ITEMSIZE_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") else force = 3 diff --git a/code/game/objects/items/weapons/material/material_weapons.dm b/code/game/objects/items/weapons/material/material_weapons.dm index 73f8b57320..c724a4a774 100644 --- a/code/game/objects/items/weapons/material/material_weapons.dm +++ b/code/game/objects/items/weapons/material/material_weapons.dm @@ -7,7 +7,7 @@ gender = NEUTER throw_speed = 3 throw_range = 7 - w_class = 3 + w_class = ITEMSIZE_NORMAL sharp = 0 edge = 0 item_icons = list( diff --git a/code/game/objects/items/weapons/material/misc.dm b/code/game/objects/items/weapons/material/misc.dm index 0d88c2b3aa..c68256922e 100644 --- a/code/game/objects/items/weapons/material/misc.dm +++ b/code/game/objects/items/weapons/material/misc.dm @@ -13,7 +13,7 @@ desc = "A pair of brass knuckles. Generally used to enhance the user's punches." icon_state = "knuckledusters" gender = PLURAL - w_class = 2.0 + w_class = ITEMSIZE_SMALL force_divisor = 0.63 attack_verb = list("punched", "beaten", "struck") applies_material_colour = 0 @@ -25,7 +25,7 @@ icon_state = "hatchet" force_divisor = 0.2 // 12 with hardness 60 (steel) thrown_force_divisor = 0.75 // 15 with weight 20 (steel) - w_class = 2 + w_class = ITEMSIZE_SMALL sharp = 1 edge = 1 origin_tech = "materials=2;combat=1" @@ -82,7 +82,7 @@ icon_state = "hoe" force_divisor = 0.25 // 5 with weight 20 (steel) thrown_force_divisor = 0.25 // as above - w_class = 2 + w_class = ITEMSIZE_SMALL attack_verb = list("slashed", "sliced", "cut", "clawed") /obj/item/weapon/material/scythe @@ -95,7 +95,7 @@ edge = 1 throw_speed = 1 throw_range = 3 - w_class = 4 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK origin_tech = "materials=2;combat=2" attack_verb = list("chopped", "sliced", "cut", "reaped") diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm index d957c049b5..78ee869604 100644 --- a/code/game/objects/items/weapons/material/shards.dm +++ b/code/game/objects/items/weapons/material/shards.dm @@ -7,7 +7,7 @@ icon_state = "large" sharp = 1 edge = 1 - w_class = 2 + w_class = ITEMSIZE_SMALL force_divisor = 0.25 // 7.5 with hardness 30 (glass) thrown_force_divisor = 0.5 item_state = "shard-glass" diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm index 5299ce2a99..08489b7df3 100644 --- a/code/game/objects/items/weapons/material/twohanded.dm +++ b/code/game/objects/items/weapons/material/twohanded.dm @@ -17,7 +17,7 @@ * Twohanded */ /obj/item/weapon/material/twohanded - w_class = 4 + w_class = ITEMSIZE_LARGE var/wielded = 0 var/force_wielded = 0 var/force_unwielded @@ -87,7 +87,7 @@ force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor sharp = 1 edge = 1 - w_class = 4.0 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK force_wielded = 30 attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") @@ -129,7 +129,7 @@ name = "spear" desc = "A haphazardly-constructed yet still deadly weapon of ancient design." force = 10 - w_class = 4.0 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK force_divisor = 0.75 // 22 when wielded with hardness 15 (glass) unwielded_force_divisor = 0.375 diff --git a/code/game/objects/items/weapons/material/twohanded.dm.orig b/code/game/objects/items/weapons/material/twohanded.dm.orig deleted file mode 100644 index 01f4ee7e55..0000000000 --- a/code/game/objects/items/weapons/material/twohanded.dm.orig +++ /dev/null @@ -1,234 +0,0 @@ -/* Two-handed Weapons - * Contains: - * Twohanded - * Fireaxe - * Double-Bladed Energy Swords - */ - -/*################################################################## -##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ######## -####################################################################*/ - -//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn -//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons. -//It also tidies stuff up elsewhere. - -/* - * Twohanded - */ -/obj/item/weapon/material/twohanded - w_class = 4 - var/wielded = 0 - var/force_wielded = 0 - var/force_unwielded - var/wieldsound = null - var/unwieldsound = null - var/base_icon - var/base_name - var/unwielded_force_divisor = 0.25 - -/obj/item/weapon/material/twohanded/proc/unwield() - wielded = 0 - force = force_unwielded - name = "[base_name]" - update_icon() - -/obj/item/weapon/material/twohanded/proc/wield() - wielded = 1 - force = force_wielded - name = "[base_name] (Wielded)" - update_icon() - -/obj/item/weapon/material/twohanded/update_force() - base_name = name - if(sharp || edge) - force_wielded = material.get_edge_damage() - else - force_wielded = material.get_blunt_damage() - force_wielded = round(force_wielded*force_divisor) - force_unwielded = round(force_wielded*unwielded_force_divisor) - force = force_unwielded - throwforce = round(force*thrown_force_divisor) - //world << "[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]" - -/obj/item/weapon/material/twohanded/New() - ..() - update_icon() - -/obj/item/weapon/material/twohanded/mob_can_equip(M as mob, slot) - //Cannot equip wielded items. - if(wielded) - M << "Unwield the [base_name] first!" - return 0 - return ..() - -/obj/item/weapon/material/twohanded/dropped(mob/user as mob) - //handles unwielding a twohanded weapon when dropped as well as clearing up the offhand - if(user) - var/obj/item/weapon/material/twohanded/O = user.get_inactive_hand() - if(istype(O)) - O.unwield() - return unwield() - -/obj/item/weapon/material/twohanded/update_icon() - icon_state = "[base_icon][wielded]" - item_state = icon_state - -/obj/item/weapon/material/twohanded/pickup(mob/user) - unwield() - -/obj/item/weapon/material/twohanded/attack_self(mob/user as mob) - - ..() - - if(istype(user, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - if(H.species.is_small) - user << "It's too heavy for you to wield fully." - return - else - return - - if(wielded) //Trying to unwield it - unwield() - user << "You are now carrying the [name] with one hand." - if (src.unwieldsound) - playsound(src.loc, unwieldsound, 50, 1) - - var/obj/item/weapon/material/twohanded/offhand/O = user.get_inactive_hand() - if(O && istype(O)) - O.unwield() - - else //Trying to wield it - if(user.get_inactive_hand()) - user << "You need your other hand to be empty" - return - wield() - user << "You grab the [base_name] with both hands." - if (src.wieldsound) - playsound(src.loc, wieldsound, 50, 1) - - var/obj/item/weapon/material/twohanded/offhand/O = new(user) ////Let's reserve his other hand~ - O.name = "[base_name] - offhand" - O.desc = "Your second grip on the [base_name]." - user.put_in_inactive_hand(O) - - if(istype(user,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = user - H.update_inv_l_hand() - H.update_inv_r_hand() - - return - -///////////OFFHAND/////////////// -/obj/item/weapon/material/twohanded/offhand - w_class = 5 - icon_state = "offhand" - name = "offhand" - default_material = "placeholder" - -/obj/item/weapon/material/twohanded/offhand/unwield() - qdel(src) - -/obj/item/weapon/material/twohanded/offhand/wield() - qdel(src) - -/obj/item/weapon/material/twohanded/offhand/update_icon() - return - -/* - * Fireaxe - */ -/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri - icon_state = "fireaxe0" - base_icon = "fireaxe" - name = "fire axe" - desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?" - unwielded_force_divisor = 0.25 - force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor - sharp = 1 - edge = 1 - slot_flags = SLOT_BACK - attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") - applies_material_colour = 0 - -/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity) - if(!proximity) return - ..() - if(A && wielded) - if(istype(A,/obj/structure/window)) - var/obj/structure/window/W = A - W.shatter() -<<<<<<< HEAD:code/game/objects/items/weapons/material/twohanded.dm - -/* -======= - else if(istype(A,/obj/structure/grille)) - qdel(A) - else if(istype(A,/obj/effect/plant)) - var/obj/effect/plant/P = A - P.die_off() - - qdel(A) ->>>>>>> 284d1cc1f5c67503fe0da89ce01985d73bb02038:code/game/objects/items/weapons/twohanded.dm -/* - * Double-Bladed Energy Swords - Cheridan - */ - // Not sure what to do with this one, it won't work nicely with the material system, - // but I don't want to copypaste all the twohanded procs.. -/obj/item/weapon/material/twohanded/dualsaber - icon_state = "dualsaber0" - base_icon = "dualsaber" - name = "double-bladed energy sword" - desc = "Handle with care." - force = 3 - throwforce = 5.0 - throw_speed = 1 - throw_range = 5 - w_class = 2.0 - force_wielded = 30 - wieldsound = 'sound/weapons/saberon.ogg' - unwieldsound = 'sound/weapons/saberoff.ogg' - flags = NOSHIELD - origin_tech = "magnets=3;syndicate=4" - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - sharp = 1 - edge = 1 - applies_material_colour = 0 - -/obj/item/weapon/material/twohanded/dualsaber/attack(target as mob, mob/living/user as mob) - ..() - if((CLUMSY in user.mutations) && (wielded) &&prob(40)) - user << "\red You twirl around a bit before losing your balance and impaling yourself on the [src]." - user.take_organ_damage(20,25) - return - if((wielded) && prob(50)) - spawn(0) - for(var/i in list(1,2,4,8,4,2,1,2,4,8,4,2)) - user.set_dir(i) - sleep(1) - -/obj/item/weapon/material/twohanded/dualsaber/IsShield() - if(wielded) - return 1 - else - return 0 -*/ - -//spears, bay edition -/obj/item/weapon/material/twohanded/spear - icon_state = "spearglass0" - base_icon = "spearglass" - name = "spear" - desc = "A haphazardly-constructed yet still deadly weapon of ancient design." - slot_flags = SLOT_BACK - force_wielded = 0.75 // 22 when wielded with hardness 15 (glass) - unwielded_force_divisor = 0.65 // 14 when unwielded based on above - thrown_force_divisor = 1.5 // 20 when thrown with weight 15 (glass) - throw_speed = 3 - edge = 1 - sharp = 1 - flags = NOSHIELD - hitsound = 'sound/weapons/bladeslice.ogg' - attack_verb = list("attacked", "poked", "jabbed", "torn", "gored") - default_material = "glass" diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index ac8da3d835..2b2a2ee8b4 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -7,6 +7,9 @@ edge = 0 armor_penetration = 50 flags = NOBLOODY + var/lrange = 2 + var/lpower = 2 + var/lcolor = "#0099FF" /obj/item/weapon/melee/energy/proc/activate(mob/living/user) anchored = 1 @@ -19,6 +22,7 @@ edge = 1 w_class = active_w_class playsound(user, 'sound/weapons/saberon.ogg', 50, 1) + set_light(lrange, lpower, lcolor) /obj/item/weapon/melee/energy/proc/deactivate(mob/living/user) anchored = 0 @@ -31,6 +35,7 @@ sharp = initial(sharp) edge = initial(edge) w_class = initial(w_class) + set_light(0,0) /obj/item/weapon/melee/energy/attack_self(mob/living/user as mob) if (active) @@ -67,14 +72,14 @@ //active_force = 150 //holy... active_force = 60 active_throwforce = 35 - active_w_class = 5 + active_w_class = ITEMSIZE_HUGE //force = 40 //throwforce = 25 force = 20 throwforce = 10 throw_speed = 1 throw_range = 5 - w_class = 3 + w_class = ITEMSIZE_NORMAL flags = CONDUCT | NOBLOODY origin_tech = list(TECH_MAGNET = 3, TECH_COMBAT = 4) attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") @@ -105,12 +110,12 @@ icon_state = "sword0" active_force = 30 active_throwforce = 20 - active_w_class = 4 + active_w_class = ITEMSIZE_LARGE force = 3 throwforce = 5 throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = ITEMSIZE_SMALL flags = NOBLOODY origin_tech = list(TECH_MAGNET = 3, TECH_ILLEGAL = 4) sharp = 1 @@ -124,26 +129,33 @@ /obj/item/weapon/melee/energy/sword/New() blade_color = pick("red","blue","green","purple") + lcolor = blade_color /obj/item/weapon/melee/energy/sword/green/New() blade_color = "green" + lcolor = "#008000" /obj/item/weapon/melee/energy/sword/red/New() blade_color = "red" + lcolor = "#FF0000" /obj/item/weapon/melee/energy/sword/blue/New() blade_color = "blue" + lcolor = "#0000FF" /obj/item/weapon/melee/energy/sword/purple/New() blade_color = "purple" + lcolor = "#800080" /obj/item/weapon/melee/energy/sword/activate(mob/living/user) if(!active) user << "\The [src] is now energised." + ..() attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") icon_state = "sword[blade_color]" + /obj/item/weapon/melee/energy/sword/deactivate(mob/living/user) if(active) user << "\The [src] deactivates!" @@ -154,7 +166,7 @@ /obj/item/weapon/melee/energy/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(active && default_parry_check(user, attacker, damage_source) && prob(50)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() @@ -188,11 +200,12 @@ throwforce = 1 //Throwing or dropping the item deletes it. throw_speed = 1 throw_range = 1 - w_class = 4.0//So you can't hide it in your pocket or some such. + w_class = ITEMSIZE_LARGE//So you can't hide it in your pocket or some such. flags = NOBLOODY attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/mob/living/creator var/datum/effect/effect/system/spark_spread/spark_system + lcolor = "#00FF00" /obj/item/weapon/melee/energy/blade/New() @@ -201,6 +214,7 @@ spark_system.attach(src) processing_objects |= src + set_light(lrange, lpower, lcolor) /obj/item/weapon/melee/energy/blade/Destroy() processing_objects -= src diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index ae8250dd02..3554cd45c0 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -6,7 +6,7 @@ slot_flags = SLOT_BELT force = 10 throwforce = 7 - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 4) attack_verb = list("flogged", "whipped", "lashed", "disciplined") diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 3fbef18d3e..3e46128d71 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -7,7 +7,7 @@ throwforce = 10.0 throw_speed = 5 throw_range = 10 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") var/mopping = 0 var/mopcount = 0 @@ -35,4 +35,4 @@ /obj/effect/attackby(obj/item/I, mob/user) if(istype(I, /obj/item/weapon/mop) || istype(I, /obj/item/weapon/soap)) return - ..() + ..() diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index e50f82966b..8baab87528 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -7,7 +7,7 @@ throwforce = 1 //Throwing or dropping the item deletes it. throw_speed = 1 throw_range = 1 - w_class = 4.0//So you can't hide it in your pocket or some such. + w_class = ITEMSIZE_LARGE//So you can't hide it in your pocket or some such. attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") var/mob/living/creator var/mopping = 0 diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index fe1247cc89..5d12f5c33b 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -10,7 +10,7 @@ var/global/list/cached_icons = list() icon_state = "paint_neutral" item_state = "paintcan" matter = list(DEFAULT_WALL_MATERIAL = 200) - w_class = 3.0 + w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 10 possible_transfer_amounts = list(10,20,30,60) volume = 60 diff --git a/code/game/objects/items/weapons/policetape.dm b/code/game/objects/items/weapons/policetape.dm index 4ddd60526c..46887ce8f0 100644 --- a/code/game/objects/items/weapons/policetape.dm +++ b/code/game/objects/items/weapons/policetape.dm @@ -3,7 +3,7 @@ name = "tape roll" icon = 'icons/policetape.dmi' icon_state = "rollstart" - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/turf/start var/turf/end var/tape_type = /obj/item/tape @@ -271,7 +271,7 @@ var/list/tape_roll_applications = list() add_fingerprint(M) if (!allowed(M)) //only select few learn art of not crumpling the tape M << "You are not supposed to go past [src]..." - if(M.a_intent == I_HELP) + if(M.a_intent == I_HELP && !(istype(M, /mob/living/simple_animal))) return 0 crumple() return ..(mover) diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index e61875f5ec..4ff88fd4a1 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -9,7 +9,7 @@ throwforce = 5.0 throw_speed = 3 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/charge = 0 // note %age conveted to actual charge in New var/maxcharge = 1000 var/rigged = 0 // true if rigged to explode @@ -24,19 +24,15 @@ /obj/item/weapon/cell/device name = "device power cell" desc = "A small power cell designed to power handheld devices." - icon_state = "cell" //placeholder - w_class = 2 + icon_state = "dcell" + item_state = "egg6" + w_class = ITEMSIZE_SMALL force = 0 throw_speed = 5 throw_range = 7 - maxcharge = 1000 + maxcharge = 2400 matter = list("metal" = 350, "glass" = 50) -/obj/item/weapon/cell/device/variable/New(newloc, charge_amount) - ..(newloc) - maxcharge = charge_amount - charge = maxcharge - /obj/item/weapon/cell/crap name = "\improper rechargable AA battery" desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 8cc8ee5cfa..2756822401 100644 --- a/code/game/objects/items/weapons/scrolls.dm +++ b/code/game/objects/items/weapons/scrolls.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/wizard.dmi' icon_state = "scroll" var/uses = 4.0 - w_class = 1 + w_class = ITEMSIZE_TINY item_state = "paper" throw_speed = 4 throw_range = 20 diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 2903c7f971..2c47c8ab9d 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -63,7 +63,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 4 - w_class = 4.0 + w_class = ITEMSIZE_LARGE origin_tech = list(TECH_MATERIAL = 2) matter = list("glass" = 7500, DEFAULT_WALL_MATERIAL = 1000) attack_verb = list("shoved", "bashed") @@ -119,7 +119,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 4 - w_class = 2 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 4, TECH_MAGNET = 3, TECH_ILLEGAL = 4) attack_verb = list("shoved", "bashed") var/active = 0 @@ -150,7 +150,7 @@ if (active) force = 10 update_icon() - w_class = 4 + w_class = ITEMSIZE_LARGE slot_flags = null playsound(user, 'sound/weapons/saberon.ogg', 50, 1) user << "\The [src] is now active." @@ -158,7 +158,7 @@ else force = 3 update_icon() - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) user << "\The [src] can now be concealed." @@ -188,7 +188,7 @@ throwforce = 3 throw_speed = 3 throw_range = 4 - w_class = 3 + w_class = ITEMSIZE_NORMAL var/active = 0 /* /obj/item/weapon/shield/energy/IsShield() @@ -206,14 +206,14 @@ force = 8 throwforce = 5 throw_speed = 2 - w_class = 4 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK user << "You extend \the [src]." else force = 3 throwforce = 3 throw_speed = 3 - w_class = 3 + w_class = ITEMSIZE_NORMAL slot_flags = null user << "[src] can now be concealed." diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index 6189cc9658..0430684f36 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -9,10 +9,12 @@ sprite_sheets = list( "Teshari" = 'icons/mob/species/seromi/back.dmi' ) - w_class = 4 + w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK - max_w_class = 4 - max_storage_space = 28 + max_w_class = ITEMSIZE_LARGE + max_storage_space = INVENTORY_STANDARD_SPACE + var/flippable = 0 + var/side = 0 //0 = right, 1 = left /obj/item/weapon/storage/backpack/attackby(obj/item/weapon/W as obj, mob/user as mob) if (src.use_sound) @@ -40,9 +42,9 @@ desc = "A backpack that opens into a localized pocket of Blue Space." origin_tech = list(TECH_BLUESPACE = 4) icon_state = "holdingpack" - max_w_class = 4 - max_storage_space = 56 - storage_cost = 29 + max_w_class = ITEMSIZE_LARGE + max_storage_space = ITEMSIZE_COST_NORMAL * 14 // 56 + storage_cost = INVENTORY_STANDARD_SPACE + 1 New() ..() @@ -66,9 +68,9 @@ desc = "Space Santa uses this to deliver toys to all the nice children in space in Christmas! Wow, it's pretty big!" icon_state = "giftbag0" item_state_slots = list(slot_r_hand_str = "giftbag", slot_l_hand_str = "giftbag") - w_class = 4.0 - max_w_class = 3 - max_storage_space = 400 // can store a ton of shit! + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 100 // can store a ton of shit! item_state_slots = null /obj/item/weapon/storage/backpack/cultpack @@ -92,7 +94,7 @@ icon_state = "securitypack" /obj/item/weapon/storage/backpack/captain - name = "station administrator's backpack" + name = "colony director's backpack" desc = "It's a special backpack made exclusively for officers." icon_state = "captainpack" @@ -135,7 +137,7 @@ desc = "A large dufflebag for holding extra things." icon_state = "duffle" slowdown = 1 - max_storage_space = 36 + max_storage_space = INVENTORY_DUFFLEBAG_SPACE /obj/item/weapon/storage/backpack/dufflebag/syndie name = "black dufflebag" @@ -154,7 +156,7 @@ icon_state = "duffle_syndieammo" /obj/item/weapon/storage/backpack/dufflebag/captain - name = "station administrator's dufflebag" + name = "colony director's dufflebag" desc = "A large dufflebag for holding extra captainly goods." icon_state = "duffle_captain" @@ -246,7 +248,7 @@ icon_state = "satchel_hyd" /obj/item/weapon/storage/backpack/satchel/cap - name = "station administrator's satchel" + name = "colony director's satchel" desc = "An exclusive satchel for officers." icon_state = "satchel-cap" item_state_slots = list(slot_r_hand_str = "captainpack", slot_l_hand_str = "captainpack") @@ -338,4 +340,13 @@ item_state_slots = list(slot_r_hand_str = "securitypack", slot_l_hand_str = "securitypack") /obj/item/weapon/storage/backpack/messenger/black - icon_state = "courierbagblk" \ No newline at end of file + icon_state = "courierbagblk" + +/obj/item/weapon/storage/backpack/purse + name = "purse" + desc = "A small, fashionable bag typically worn over the shoulder." + icon_state = "purse" + item_state_slots = list(slot_r_hand_str = "lgpurse", slot_l_hand_str = "lgpurse") + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 5 diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 12eca53626..241e5c008f 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -32,8 +32,8 @@ icon_state = "trashbag0" item_state_slots = list(slot_r_hand_str = "trashbag", slot_l_hand_str = "trashbag") - w_class = 4 - max_w_class = 2 + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_SMALL can_hold = list() // any cant_hold = list(/obj/item/weapon/disk/nuclear) @@ -57,8 +57,8 @@ icon = 'icons/obj/trash.dmi' icon_state = "plasticbag" - w_class = 4 - max_w_class = 2 + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_SMALL can_hold = list() // any cant_hold = list(/obj/item/weapon/disk/nuclear) @@ -72,9 +72,9 @@ icon = 'icons/obj/mining.dmi' icon_state = "satchel" slot_flags = SLOT_BELT | SLOT_POCKET - w_class = 3 - max_storage_space = 100 - max_w_class = 3 + w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 25 + max_w_class = ITEMSIZE_NORMAL can_hold = list(/obj/item/weapon/ore) @@ -86,9 +86,9 @@ name = "plant bag" icon = 'icons/obj/hydroponics_machines.dmi' icon_state = "plantbag" - max_storage_space = 100 - max_w_class = 3 - w_class = 2 + max_storage_space = ITEMSIZE_COST_NORMAL * 25 + max_w_class = ITEMSIZE_NORMAL + w_class = ITEMSIZE_SMALL can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown) @@ -105,7 +105,7 @@ desc = "A patented storage system designed for any kind of mineral sheet." var/capacity = 300; //the number of sheets it can carry. - w_class = 3 + w_class = ITEMSIZE_NORMAL storage_slots = 7 allow_quick_empty = 1 // this function is superceded @@ -243,7 +243,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "cashbag" desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front." - max_storage_space = 100 - max_w_class = 3 - w_class = 2 + max_storage_space = ITEMSIZE_COST_NORMAL * 25 + max_w_class = ITEMSIZE_NORMAL + w_class = ITEMSIZE_SMALL can_hold = list(/obj/item/weapon/coin,/obj/item/weapon/spacecash) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 6f0beed5e9..c68b0faf7d 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -4,8 +4,8 @@ icon = 'icons/obj/clothing/belts.dmi' icon_state = "utility" storage_slots = 7 - max_storage_space = 28 //This should ensure belts always have enough room to store whatever. - max_w_class = 3 + max_storage_space = ITEMSIZE_COST_NORMAL * 7 //This should ensure belts always have enough room to store whatever. + max_w_class = ITEMSIZE_NORMAL slot_flags = SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") sprite_sheets = list("Teshari" = 'icons/mob/species/seromi/belt.dmi') @@ -117,7 +117,7 @@ name = "security belt" desc = "Can hold security gear like handcuffs and flashes." icon_state = "security" - max_w_class = 3 + max_w_class = ITEMSIZE_NORMAL can_hold = list( /obj/item/weapon/grenade, /obj/item/weapon/reagent_containers/spray/pepper, @@ -126,6 +126,7 @@ /obj/item/clothing/glasses, /obj/item/ammo_casing/shotgun, /obj/item/ammo_magazine, + /obj/item/weapon/cell/device, /obj/item/weapon/reagent_containers/food/snacks/donut/, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/taser, @@ -150,7 +151,7 @@ desc = "A belt for holding forensics equipment." icon_state = "security" storage_slots = 7 - max_w_class = 3 + max_w_class = ITEMSIZE_NORMAL can_hold = list( /obj/item/device/taperecorder, /obj/item/clothing/glasses, @@ -218,8 +219,8 @@ desc = "Can hold security gear like handcuffs and flashes, with more pouches for more storage." icon_state = "swat" storage_slots = 9 - max_w_class = 3 - max_storage_space = 28 + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 7 /obj/item/weapon/storage/belt/security/tactical/bandolier name = "combat belt" @@ -231,7 +232,7 @@ desc = "A belt used to hold most janitorial supplies." icon_state = "janitor" storage_slots = 7 - max_w_class = 3 + max_w_class = ITEMSIZE_NORMAL can_hold = list( /obj/item/clothing/glasses, /obj/item/device/flashlight, diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 8a29fdefa8..933970b335 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -4,7 +4,7 @@ icon_state ="bible" throw_speed = 1 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/mob/affecting = null var/deity_name = "Christ" @@ -17,9 +17,9 @@ ..() new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) new /obj/item/weapon/reagent_containers/food/drinks/bottle/small/beer(src) - new /obj/item/weapon/spacecash(src) - new /obj/item/weapon/spacecash(src) - new /obj/item/weapon/spacecash(src) + new /obj/item/weapon/spacecash/c100(src) + new /obj/item/weapon/spacecash/c100(src) + new /obj/item/weapon/spacecash/c100(src) /obj/item/weapon/storage/bible/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 46a3cd29e9..f8d5376a64 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -25,7 +25,8 @@ icon_state = "box" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") var/foldable = /obj/item/stack/material/cardboard // BubbleWrap - if set, can be folded (when empty) into a sheet of cardboard - max_w_class = 2 + max_w_class = ITEMSIZE_SMALL + max_storage_space = INVENTORY_BOX_SPACE // BubbleWrap - A box can be folded up to make card /obj/item/weapon/storage/box/attack_self(mob/user as mob) @@ -129,7 +130,12 @@ /obj/item/weapon/storage/box/blanks/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/blank(src) + +/obj/item/weapon/storage/box/blanks/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/blank(src) /obj/item/weapon/storage/box/beanbags @@ -140,7 +146,12 @@ /obj/item/weapon/storage/box/beanbags/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/beanbag(src) + +/obj/item/weapon/storage/box/beanbags/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/beanbag(src) /obj/item/weapon/storage/box/shotgunammo @@ -151,7 +162,12 @@ /obj/item/weapon/storage/box/shotgunammo/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun(src) + +/obj/item/weapon/storage/box/shotgunammo/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun(src) /obj/item/weapon/storage/box/shotgunshells @@ -162,7 +178,12 @@ /obj/item/weapon/storage/box/shotgunshells/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/pellet(src) + +/obj/item/weapon/storage/box/shotgunshells/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/pellet(src) /obj/item/weapon/storage/box/flashshells @@ -173,7 +194,12 @@ /obj/item/weapon/storage/box/flashshells/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/flash(src) + +/obj/item/weapon/storage/box/flashshells/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/flash(src) /obj/item/weapon/storage/box/stunshells @@ -184,7 +210,12 @@ /obj/item/weapon/storage/box/stunshells/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/stunshell(src) + +/obj/item/weapon/storage/box/stunshells/large/New() + ..() + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/stunshell(src) /obj/item/weapon/storage/box/practiceshells @@ -195,9 +226,30 @@ /obj/item/weapon/storage/box/practiceshells/New() ..() - for(var/i = 1 to 7) + for(var/i = 1 to 8) new /obj/item/ammo_casing/shotgun/practice(src) +/obj/item/weapon/storage/box/practiceshells/large/New() + ..() + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/practice(src) + +/obj/item/weapon/storage/box/empshells + name = "box of emp shells" + desc = "It has a picture of a gun and several warning symbols on the front." + icon_state = "empshot_box" + item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + +/obj/item/weapon/storage/box/empshells/New() + ..() + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/emp(src) + +/obj/item/weapon/storage/box/empshells/large/New() + ..() + for(var/i = 1 to 8) + new /obj/item/ammo_casing/shotgun/emp(src) + /obj/item/weapon/storage/box/sniperammo name = "box of 14.5mm shells" desc = "It has a picture of a gun and several warning symbols on the front.
    WARNING: Live ammunition. Misuse may result in serious injury or death." @@ -478,7 +530,7 @@ desc = "A small box of 'Space-Proof' premium matches." icon = 'icons/obj/cigarettes.dmi' icon_state = "matchbox" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_BELT can_hold = list(/obj/item/weapon/flame/match) @@ -512,9 +564,9 @@ icon_state = "light" desc = "This box is shaped on the inside so that only light tubes and bulbs fit." item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - storage_slots=21 + storage_slots = 21 can_hold = list(/obj/item/weapon/light/tube, /obj/item/weapon/light/bulb) - max_storage_space = 42 //holds 21 items of w_class 2 + max_storage_space = ITEMSIZE_COST_SMALL * 21 //holds 21 items of w_class 2 use_to_pickup = 1 // for picking up broken bulbs, not that most people will try /obj/item/weapon/storage/box/lights/bulbs/New() @@ -549,9 +601,9 @@ icon_state = "portafreezer" item_state_slots = list(slot_r_hand_str = "medicalpack", slot_l_hand_str = "medicalpack") foldable = null - max_w_class = 3 + max_w_class = ITEMSIZE_NORMAL can_hold = list(/obj/item/organ, /obj/item/weapon/reagent_containers/food, /obj/item/weapon/reagent_containers/glass) - max_storage_space = 21 + max_storage_space = ITEMSIZE_COST_NORMAL * 5 // Formally 21. Odd numbers are bad. use_to_pickup = 1 // for picking up broken bulbs, not that most people will try /obj/item/weapon/storage/box/freezer/Entered(var/atom/movable/AM) diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index d80ce0bb9c..aa023dce18 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -6,6 +6,16 @@ force = 8.0 throw_speed = 1 throw_range = 4 - w_class = 4 - max_w_class = 3 - max_storage_space = 16 + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 4 + +/obj/item/weapon/storage/briefcase/clutch + name = "clutch purse" + desc = "A fashionable handheld bag typically used by women." + icon_state = "clutch" + item_state_slots = list(slot_r_hand_str = "smpurse", slot_l_hand_str = "smpurse") + force = 0 + w_class = ITEMSIZE_NORMAL + max_w_class = ITEMSIZE_SMALL + max_storage_space = ITEMSIZE_COST_SMALL * 4 \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 009e1fcc90..3df73b9793 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -86,7 +86,7 @@ desc = "A box of crayons for all your rune drawing needs." icon = 'icons/obj/crayons.dmi' icon_state = "crayonbox" - w_class = 2.0 + w_class = ITEMSIZE_SMALL icon_type = "crayon" can_hold = list( /obj/item/weapon/pen/crayon @@ -128,7 +128,7 @@ icon = 'icons/obj/cigarettes.dmi' icon_state = "cigpacket" item_state_slots = list(slot_r_hand_str = "cigpacket", slot_l_hand_str = "cigpacket") - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 2 slot_flags = SLOT_BELT storage_slots = 6 @@ -240,7 +240,7 @@ desc = "A case for holding your cigars when you are not smoking them." icon_state = "cigarcase" icon = 'icons/obj/cigarettes.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 2 slot_flags = SLOT_BELT storage_slots = 7 @@ -288,9 +288,9 @@ icon = 'icons/obj/vialbox.dmi' icon_state = "vialbox0" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - max_w_class = 2 + max_w_class = ITEMSIZE_SMALL can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) - max_storage_space = 12 //The sum of the w_classes of all the items in this storage item. + max_storage_space = ITEMSIZE_COST_SMALL * 6 //The sum of the w_classes of all the items in this storage item. storage_slots = 6 req_access = list(access_virology) diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index adbb4c2ca8..f6703bb7cb 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -14,7 +14,7 @@ throw_speed = 2 throw_range = 8 var/empty = 0 - max_storage_space = 14 + max_storage_space = ITEMSIZE_COST_SMALL * 7 // 14 /obj/item/weapon/storage/firstaid/fire @@ -132,8 +132,8 @@ /obj/item/weapon/storage/firstaid/surgery name = "surgery kit" desc = "Contains tools for surgery." - max_storage_space = 21 - max_w_class = 3 + max_storage_space = ITEMSIZE_COST_NORMAL * 6 // Formally 21. Odd numbers should be avoided for a system based on exponents of 2. + max_w_class = ITEMSIZE_NORMAL /obj/item/weapon/storage/firstaid/surgery/New() ..() @@ -159,13 +159,13 @@ icon_state = "pill_canister" icon = 'icons/obj/chemical.dmi' item_state_slots = list(slot_r_hand_str = "contsolid", slot_l_hand_str = "contsolid") - w_class = 2.0 + w_class = ITEMSIZE_SMALL can_hold = list(/obj/item/weapon/reagent_containers/pill,/obj/item/weapon/dice,/obj/item/weapon/paper) allow_quick_gather = 1 use_to_pickup = 1 use_sound = null - max_storage_space = 14 - max_w_class = 1 + max_storage_space = ITEMSIZE_COST_TINY * 14 + max_w_class = ITEMSIZE_TINY /obj/item/weapon/storage/pill_bottle/antitox name = "bottle of Dylovene pills" diff --git a/code/game/objects/items/weapons/storage/laundry_basket.dm b/code/game/objects/items/weapons/storage/laundry_basket.dm index b8c0cd3a0f..3758b73de2 100644 --- a/code/game/objects/items/weapons/storage/laundry_basket.dm +++ b/code/game/objects/items/weapons/storage/laundry_basket.dm @@ -10,9 +10,9 @@ item_state_slots = list(slot_r_hand_str = "laundry", slot_l_hand_str = "laundry") desc = "The peak of thousands of years of laundry evolution." - w_class = 5 - max_w_class = 4 - max_storage_space = 25 //20 for clothes + a bit of additional space for non-clothing items that were worn on body + w_class = ITEMSIZE_HUGE + max_w_class = ITEMSIZE_LARGE + max_storage_space = ITEMSIZE_COST_NORMAL * 6 //20 for clothes + a bit of additional space for non-clothing items that were worn on body storage_slots = 14 use_to_pickup = 1 allow_quick_empty = 1 diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index 4a589ed76e..770ecd169b 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -5,9 +5,9 @@ desc = "A locked box." icon_state = "lockbox+l" item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") - w_class = 4 - max_w_class = 3 - max_storage_space = 14 //The sum of the w_classes of all the items in this storage item. + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 4 //The sum of the w_classes of all the items in this storage item. req_access = list(access_armory) var/locked = 1 var/broken = 0 diff --git a/code/game/objects/items/weapons/storage/misc.dm b/code/game/objects/items/weapons/storage/misc.dm index 4bd34c52c7..bf4856501a 100644 --- a/code/game/objects/items/weapons/storage/misc.dm +++ b/code/game/objects/items/weapons/storage/misc.dm @@ -34,7 +34,7 @@ icon_state = "donutbox" name = "donut box" var/startswith = 6 - max_storage_space = 12 + max_storage_space = ITEMSIZE_COST_SMALL * 6 can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/donut) foldable = /obj/item/stack/material/cardboard diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 4727ef61bb..169496ff6c 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -23,9 +23,9 @@ var/l_hacking = 0 var/emagged = 0 var/open = 0 - w_class = 3 - max_w_class = 2 - max_storage_space = 14 + w_class = ITEMSIZE_NORMAL + max_w_class = ITEMSIZE_SMALL + max_storage_space = ITEMSIZE_SMALL * 7 examine(mob/user) if(..(user, 1)) @@ -149,7 +149,7 @@ force = 8.0 throw_speed = 1 throw_range = 4 - w_class = 4.0 + w_class = ITEMSIZE_LARGE attack_hand(mob/user as mob) if ((src.loc == user) && (src.locked == 1)) @@ -176,8 +176,8 @@ icon_locking = "safeb" icon_sparking = "safespark" force = 8.0 - w_class = 8.0 - max_w_class = 8 + w_class = ITEMSIZE_NO_CONTAINER + max_w_class = ITEMSIZE_LARGE // This was 8 previously... anchored = 1.0 density = 0 cant_hold = list(/obj/item/weapon/storage/secure/briefcase) diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 06327b27ac..e691ed2795 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -12,14 +12,14 @@ slot_l_hand_str = 'icons/mob/items/lefthand_storage.dmi', slot_r_hand_str = 'icons/mob/items/righthand_storage.dmi', ) - w_class = 3 + w_class = ITEMSIZE_NORMAL show_messages = 1 var/list/can_hold = new/list() //List of objects which this item can store (if set, it can't store anything else) var/list/cant_hold = new/list() //List of objects which this item can't store (in effect only if can_hold isn't set) var/list/is_seeing = new/list() //List of mobs which are currently seeing the contents of this item's storage - var/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set) - var/max_storage_space = 8 //The sum of the storage costs of all the items in this storage item. + var/max_w_class = ITEMSIZE_SMALL //Max size of objects that this object can store (in effect only if can_hold isn't set) + var/max_storage_space = ITEMSIZE_COST_SMALL * 4 //The sum of the storage costs of all the items in this storage item. var/storage_slots = null //The number of storage slots in this container. If null, it uses the volume-based storage instead. var/obj/screen/storage/boxes = null var/obj/screen/storage/storage_start = null //storage UI @@ -211,7 +211,10 @@ /obj/item/weapon/storage/proc/space_orient_objs(var/list/obj/item/display_contents) - var/baseline_max_storage_space = 16 //should be equal to default backpack capacity + var/baseline_max_storage_space = INVENTORY_STANDARD_SPACE / 2 //should be equal to default backpack capacity // This is a lie. + // Above var is misleading, what it does upon changing is makes smaller inventory sizes have smaller space on the UI. + // It's cut in half because otherwise boxes of IDs and other tiny items are unbearably cluttered. + var/storage_cap_width = 2 //length of sprite for start and end of the box representing total storage space var/stored_cap_width = 4 //length of sprite for start and end of the box representing the stored item var/storage_width = min( round( 224 * max_storage_space/baseline_max_storage_space ,1) ,274) //length of sprite for the box representing total storage space @@ -609,20 +612,32 @@ return depth +// See inventory_sizes.dm for the defines. /obj/item/proc/get_storage_cost() if (storage_cost) return storage_cost else switch(w_class) - if(1) - return 1 - if(2) - return 2 - if(3) - return 4 - if(4) - return 8 - if(5) - return 16 + if(ITEMSIZE_TINY) + return ITEMSIZE_COST_TINY + if(ITEMSIZE_SMALL) + return ITEMSIZE_COST_SMALL + if(ITEMSIZE_NORMAL) + return ITEMSIZE_COST_NORMAL + if(ITEMSIZE_LARGE) + return ITEMSIZE_COST_LARGE + if(ITEMSIZE_HUGE) + return ITEMSIZE_COST_HUGE else - return 1000 + return ITEMSIZE_COST_NO_CONTAINER + +/obj/item/weapon/storage/proc/make_exact_fit() + storage_slots = contents.len + + can_hold.Cut() + max_w_class = 0 + max_storage_space = 0 + for(var/obj/item/I in src) + can_hold[I.type]++ + max_w_class = max(I.w_class, max_w_class) + max_storage_space += I.get_storage_cost() diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 9c779f013a..8e6e5ca682 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -9,9 +9,9 @@ throwforce = 10 throw_speed = 1 throw_range = 7 - w_class = 4 - max_w_class = 3 - max_storage_space = 14 //enough to hold all starting contents + w_class = ITEMSIZE_LARGE + max_w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_SMALL * 7 //enough to hold all starting contents origin_tech = list(TECH_COMBAT = 1) attack_verb = list("robusted") @@ -80,13 +80,13 @@ new /obj/item/device/multitool(src) /obj/item/weapon/storage/toolbox/lunchbox - max_storage_space = 8 //slightly smaller than a toolbox + max_storage_space = ITEMSIZE_COST_SMALL * 4 //slightly smaller than a toolbox name = "rainbow lunchbox" icon_state = "lunchbox_rainbow" item_state_slots = list(slot_r_hand_str = "toolbox_pink", slot_l_hand_str = "toolbox_pink") desc = "A little lunchbox. This one is the colors of the rainbow!" - w_class = 3 - max_w_class = 2 + w_class = ITEMSIZE_NORMAL + max_w_class = ITEMSIZE_SMALL var/filled = FALSE attack_verb = list("lunched") diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 9cbda62db7..c63430f033 100644 --- a/code/game/objects/items/weapons/storage/wallets.dm +++ b/code/game/objects/items/weapons/storage/wallets.dm @@ -4,7 +4,7 @@ storage_slots = 10 icon = 'icons/obj/wallet.dmi' icon_state = "wallet-orange" - w_class = 2 + w_class = ITEMSIZE_SMALL can_hold = list( /obj/item/weapon/spacecash, /obj/item/weapon/card, @@ -87,7 +87,7 @@ verbs |= /obj/item/weapon/storage/wallet/poly/proc/change_color color = "#"+get_random_colour() update_icon() - + /obj/item/weapon/storage/wallet/poly/proc/change_color() set name = "Change Wallet Color" set category = "Object" @@ -106,9 +106,14 @@ var/original_state = icon_state icon_state = "wallet-emp" update_icon() - + spawn(200) if(src) icon_state = original_state update_icon() - \ No newline at end of file + +/obj/item/weapon/storage/wallet/womens + name = "women's wallet" + desc = "A stylish wallet typically used by women." + icon_state = "girl_wallet" + item_state_slots = list(slot_r_hand_str = "wowallet", slot_l_hand_str = "wowallet") \ No newline at end of file diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index d92fcf1336..80d24df2a2 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -9,7 +9,7 @@ sharp = 0 edge = 0 throwforce = 7 - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 2) attack_verb = list("beaten") var/lightcolor = "#FF6A00" @@ -17,7 +17,7 @@ var/agonyforce = 60 var/status = 0 //whether the thing is on or not var/obj/item/weapon/cell/bcell = null - var/hitcost = 1000 //oh god why do power cells carry so much charge? We probably need to make a distinction between "industrial" sized power cells for APCs and power cells for everything else. + var/hitcost = 240 /obj/item/weapon/melee/baton/suicide_act(mob/user) user.visible_message("\The [user] is putting the live [name] in \his mouth! It looks like \he's trying to commit suicide.") @@ -30,7 +30,7 @@ /obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed. ..() - bcell = new/obj/item/weapon/cell/high(src) + bcell = new/obj/item/weapon/cell/device(src) update_icon() return @@ -40,11 +40,15 @@ if(bcell.checked_use(chrgdeductamt)) return 1 else - status = 0 - update_icon() return 0 return null +/obj/item/weapon/melee/baton/proc/powercheck(var/chrgdeductamt) + if(bcell) + if(bcell.charge < chrgdeductamt) + status = 0 + update_icon() + /obj/item/weapon/melee/baton/update_icon() if(status) icon_state = "[initial(name)]_active" @@ -69,26 +73,31 @@ /obj/item/weapon/melee/baton/attackby(obj/item/weapon/W, mob/user) if(istype(W, /obj/item/weapon/cell)) - if(!bcell) - user.drop_item() - W.loc = src - bcell = W - user << "You install a cell in [src]." - update_icon() + if(istype(W, /obj/item/weapon/cell/device)) + if(!bcell) + user.drop_item() + W.loc = src + bcell = W + user << "You install a cell in [src]." + update_icon() + else + user << "[src] already has a cell." else - user << "[src] already has a cell." + user << "This cell is not fitted for [src]." - else if(istype(W, /obj/item/weapon/screwdriver)) +/obj/item/weapon/melee/baton/attack_hand(mob/user as mob) + if(user.get_inactive_hand() == src) if(bcell) bcell.update_icon() - bcell.loc = get_turf(src.loc) + user.put_in_hands(bcell) bcell = null user << "You remove the cell from the [src]." status = 0 update_icon() return ..() - return + else + return ..() /obj/item/weapon/melee/baton/attack_self(mob/user) if(bcell && bcell.charge > hitcost) @@ -149,6 +158,7 @@ if(ishuman(target)) var/mob/living/carbon/human/H = target H.forcesay(hit_appends) + powercheck(hitcost) /obj/item/weapon/melee/baton/emp_act(severity) if(bcell) @@ -182,3 +192,17 @@ hitcost = 2500 attack_verb = list("poked") slot_flags = null + +/obj/item/weapon/melee/baton/cattleprod/attackby(obj/item/weapon/W, mob/user) + if(istype(W, /obj/item/weapon/cell)) + if(!istype(W, /obj/item/weapon/cell/device)) + if(!bcell) + user.drop_item() + W.loc = src + bcell = W + user << "You install a cell in [src]." + update_icon() + else + user << "[src] already has a cell." + else + user << "This cell is not fitted for [src]." \ No newline at end of file diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index 7e96ad2c08..0c942bf486 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -18,7 +18,7 @@ icon_state = "retractor" matter = list(DEFAULT_WALL_MATERIAL = 10000, "glass" = 5000) flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) /* @@ -31,7 +31,7 @@ icon_state = "hemostat" matter = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 2500) flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("attacked", "pinched") @@ -45,7 +45,7 @@ icon_state = "cautery" matter = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 2500) flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("burnt") @@ -61,7 +61,7 @@ matter = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 10000) flags = CONDUCT force = 15.0 - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 1) attack_verb = list("drilled") @@ -82,7 +82,7 @@ force = 10.0 sharp = 1 edge = 1 - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS throwforce = 5.0 throw_speed = 3 @@ -137,7 +137,7 @@ hitsound = 'sound/weapons/circsawhit.ogg' flags = CONDUCT force = 15.0 - w_class = 3 + w_class = ITEMSIZE_NORMAL throwforce = 9.0 throw_speed = 3 throw_range = 5 @@ -153,7 +153,7 @@ icon = 'icons/obj/surgery.dmi' icon_state = "bone-gel" force = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 1.0 /obj/item/weapon/FixOVein @@ -163,7 +163,7 @@ force = 0 throwforce = 1.0 origin_tech = list(TECH_MATERIAL = 1, TECH_BIO = 3) - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/usage_amount = 10 /obj/item/weapon/bonesetter @@ -174,5 +174,5 @@ throwforce = 9.0 throw_speed = 3 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL attack_verb = list("attacked", "hit", "bludgeoned") diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 2341df50ce..e1deceadde 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -36,7 +36,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "telebaton0" slot_flags = SLOT_BELT - w_class = 2 + w_class = ITEMSIZE_SMALL force = 3 var/on = 0 @@ -48,7 +48,7 @@ "You extend the baton.",\ "You hear an ominous click.") icon_state = "telebaton1" - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 15//quite robust attack_verb = list("smacked", "struck", "slapped") else @@ -56,7 +56,7 @@ "You collapse the baton.",\ "You hear a click.") icon_state = "telebaton0" - w_class = 2 + w_class = ITEMSIZE_SMALL force = 3//not so robust now attack_verb = list("hit", "punched") diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm index fb9aa3eb41..490ae2d62b 100644 --- a/code/game/objects/items/weapons/syndie.dm +++ b/code/game/objects/items/weapons/syndie.dm @@ -11,7 +11,7 @@ item_state = "radio" name = "normal-sized package" desc = "A small wrapped package." - w_class = 3 + w_class = ITEMSIZE_NORMAL var/power = 1 /*Size of the explosion.*/ var/size = "small" /*Used for the icon, this one will make c-4small_0 for the off state.*/ diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 12a048ee07..41c78ecd3b 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -5,7 +5,7 @@ desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution." icon_state = "jetpack" gauge_icon = null - w_class = 4.0 + w_class = ITEMSIZE_LARGE item_icons = list( slot_l_hand_str = 'icons/mob/items/lefthand_storage.dmi', slot_r_hand_str = 'icons/mob/items/righthand_storage.dmi', diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 85d1352703..83372ffa58 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -70,7 +70,7 @@ src.air_contents.adjust_multi("oxygen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD, "nitrogen", (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD) return - + /* * Phoron */ @@ -111,7 +111,7 @@ gauge_cap = 4 flags = CONDUCT slot_flags = SLOT_BELT - w_class = 2.0 + w_class = ITEMSIZE_SMALL force = 4.0 distribute_pressure = ONE_ATMOSPHERE*O2STANDARD volume = 2 //Tiny. Real life equivalents only have 21 breaths of oxygen in them. They're EMERGENCY tanks anyway -errorage (dangercon 2011) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index dd3c4cff29..57a5cf06a4 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -14,7 +14,7 @@ var/list/global/tank_gauge_cache = list() flags = CONDUCT slot_flags = SLOT_BACK - w_class = 3 + w_class = ITEMSIZE_NORMAL pressure_resistance = ONE_ATMOSPHERE*5 diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 80b0dc5964..98d53bb586 100644 --- a/code/game/objects/items/weapons/tape.dm +++ b/code/game/objects/items/weapons/tape.dm @@ -3,7 +3,7 @@ desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?" icon = 'icons/obj/bureaucracy.dmi' icon_state = "taperoll" - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/weapon/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user) if(istype(H)) @@ -83,7 +83,7 @@ desc = "A piece of sticky tape." icon = 'icons/obj/bureaucracy.dmi' icon_state = "tape" - w_class = 1 + w_class = ITEMSIZE_TINY layer = 4 anchored = 1 //it's sticky, no you cant move it diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index fdad2423fc..b27ef63a4a 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -17,12 +17,12 @@ var/broadcasting = null var/listening = 1.0 flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL item_state = "electronic" throw_speed = 4 throw_range = 20 - origin_tech = list(TECH_MAGNET = 1) - matter = list(DEFAULT_WALL_MATERIAL = 400) + origin_tech = list(TECH_MAGNET = 1) + matter = list(DEFAULT_WALL_MATERIAL = 400) /obj/item/weapon/locator/attack_self(mob/user as mob) user.set_machine(src) @@ -129,11 +129,11 @@ Frequency: icon_state = "hand_tele" item_state = "electronic" throwforce = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 3 throw_range = 5 - origin_tech = list(TECH_MAGNET = 1, TECH_BLUESPACE = 3) - matter = list(DEFAULT_WALL_MATERIAL = 10000) + origin_tech = list(TECH_MAGNET = 1, TECH_BLUESPACE = 3) + matter = list(DEFAULT_WALL_MATERIAL = 10000) /obj/item/weapon/hand_tele/attack_self(mob/user as mob) var/turf/current_location = get_turf(user)//What turf is the user on? diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 98c7876811..c61ee90918 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -23,7 +23,7 @@ slot_flags = SLOT_BELT force = 6 throwforce = 7 - w_class = 2 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) matter = list(DEFAULT_WALL_MATERIAL = 150) attack_verb = list("bashed", "battered", "bludgeoned", "whacked") @@ -40,7 +40,7 @@ flags = CONDUCT slot_flags = SLOT_BELT | SLOT_EARS force = 6 - w_class = 1 + w_class = ITEMSIZE_TINY throwforce = 5 throw_speed = 3 throw_range = 5 @@ -103,7 +103,7 @@ force = 6 throw_speed = 2 throw_range = 9 - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) matter = list(DEFAULT_WALL_MATERIAL = 80) attack_verb = list("pinched", "nipped") @@ -144,7 +144,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL //Cost to make in the autolathe matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 30) @@ -307,7 +307,7 @@ T.visible_message("\The [src] turns on.") src.force = 15 src.damtype = "fire" - src.w_class = 4 + src.w_class = ITEMSIZE_LARGE welding = 1 update_icon() processing_objects |= src @@ -380,14 +380,14 @@ /obj/item/weapon/weldingtool/hugetank name = "upgraded welding tool" max_fuel = 80 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 3) matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) /obj/item/weapon/weldingtool/experimental name = "experimental welding tool" max_fuel = 40 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_PHORON = 3) matter = list(DEFAULT_WALL_MATERIAL = 70, "glass" = 120) var/last_gen = 0 @@ -415,7 +415,7 @@ throwforce = 7 pry = 1 item_state = "crowbar" - w_class = 2 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_ENGINEERING = 1) matter = list(DEFAULT_WALL_MATERIAL = 50) attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked") @@ -448,7 +448,7 @@ desc = "It even has one of those nubbins for doing the thingy." icon = 'icons/obj/items.dmi' icon_state = "combitool" - w_class = 2 + w_class = ITEMSIZE_SMALL var/list/spawn_tools = list( /obj/item/weapon/screwdriver, diff --git a/code/game/objects/items/weapons/towels.dm b/code/game/objects/items/weapons/towels.dm index d51cc8d1d0..5f66562c61 100644 --- a/code/game/objects/items/weapons/towels.dm +++ b/code/game/objects/items/weapons/towels.dm @@ -4,7 +4,7 @@ icon_state = "towel" slot_flags = SLOT_HEAD | SLOT_BELT | SLOT_OCLOTHING force = 3.0 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL attack_verb = list("whipped") hitsound = 'sound/weapons/towelwhip.ogg' desc = "A soft cotton towel." diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 9c355356b3..e5a655d7f9 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -7,7 +7,7 @@ icon_state = "beartrap0" desc = "A mechanically activated leg trap. Low-tech, but reliable. Looks like it could really hurt if you set it off." throwforce = 0 - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = "materials=1" matter = list(DEFAULT_WALL_MATERIAL = 18750) var/deployed = 0 diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm index 624b6fcb98..ca32d730f3 100644 --- a/code/game/objects/items/weapons/trays.dm +++ b/code/game/objects/items/weapons/trays.dm @@ -10,7 +10,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL flags = CONDUCT matter = list(DEFAULT_WALL_MATERIAL = 3000) var/list/carrying = list() // List of things on the tray. - Doohl @@ -160,9 +160,9 @@ var/val = 0 // value to return for(var/obj/item/I in carrying) - if(I.w_class == 1.0) + if(I.w_class == ITEMSIZE_TINY) val ++ - else if(I.w_class == 2.0) + else if(I.w_class == ITEMSIZE_SMALL) val += 3 else val += 5 @@ -177,9 +177,9 @@ for(var/obj/item/I in loc) if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) ) var/add = 0 - if(I.w_class == 1.0) + if(I.w_class == ITEMSIZE_TINY) add = 1 - else if(I.w_class == 2.0) + else if(I.w_class == ITEMSIZE_SMALL) add = 3 else add = 5 @@ -199,11 +199,11 @@ /obj/item/weapon/tray/dropped(mob/user) var/noTable = null - + spawn() //Allows the tray to udpate location, rather than just checking against mob's location if(isturf(src.loc) && !(locate(/obj/structure/table) in src.loc)) noTable = 1 - + if(isturf(loc) && !(locate(/mob/living) in src.loc)) overlays.Cut() for(var/obj/item/I in carrying) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 0075b6cdfd..d604eca82c 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -8,7 +8,7 @@ throw_speed = 1 throw_range = 4 throwforce = 10 - w_class = 2 + w_class = ITEMSIZE_SMALL suicide_act(mob/user) viewers(user) << "[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide." diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm index e9b5fdb379..6a6d77521e 100644 --- a/code/game/objects/items/weapons/weldbackpack.dm +++ b/code/game/objects/items/weapons/weldbackpack.dm @@ -4,7 +4,7 @@ slot_flags = SLOT_BACK icon = 'icons/obj/storage.dmi' icon_state = "welderpack" - w_class = 4.0 + w_class = ITEMSIZE_LARGE var/max_fuel = 350 /obj/item/weapon/weldpack/New() diff --git a/code/game/objects/random/random_vr.dm b/code/game/objects/random/random_vr.dm index fccab274da..0ccc5ee6e5 100644 --- a/code/game/objects/random/random_vr.dm +++ b/code/game/objects/random/random_vr.dm @@ -86,10 +86,8 @@ icon = 'icons/obj/ammo.dmi' icon_state = "666" item_to_spawn() - return pick(/*prob(5);/obj/item/weapon/storage/fancy/shotgun_ammo/beanbag,\ - prob(5);/obj/item/weapon/storage/fancy/shotgun_ammo/pellet,\ - prob(5);/obj/item/weapon/storage/fancy/shotgun_ammo/flash,\ - prob(5);/obj/item/weapon/storage/fancy/shotgun_ammo/slug,\*/ + return pick(prob(5);/obj/item/weapon/storage/box/shotgunammo,\ + prob(5);/obj/item/weapon/storage/box/shotgunshells,\ prob(5);/obj/item/ammo_magazine/a357,\ prob(5);/obj/item/ammo_magazine/clip/a762,\ prob(5);/obj/item/ammo_magazine/c45m,\ @@ -123,6 +121,11 @@ /* prob(1);/obj/item/ammo_magazine/battlerifle,\ */ prob(1);/obj/item/ammo_casing/rocket,\ prob(1);/obj/item/weapon/storage/box/sniperammo,\ + prob(1);/obj/item/weapon/storage/box/flashshells,\ + prob(1);/obj/item/weapon/storage/box/beanbags,\ + prob(1);/obj/item/weapon/storage/box/practiceshells,\ + prob(1);/obj/item/weapon/storage/box/stunshells,\ + prob(1);/obj/item/weapon/storage/box/blanks,\ prob(1);/obj/item/ammo_magazine/stg,\ prob(1);/obj/item/ammo_magazine/tommydrum,\ prob(1);/obj/item/ammo_magazine/tommymag diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index 2712d6de79..f4e7f4d056 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -1,6 +1,6 @@ /obj/structure icon = 'icons/obj/structures.dmi' - w_class = 10 + w_class = ITEMSIZE_NO_CONTAINER var/climbable var/breakable diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index 6152c1dbd1..7da51f6a66 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -1,6 +1,7 @@ /obj/structure/sign/double/barsign icon = 'icons/obj/barsigns.dmi' icon_state = "empty" + appearance_flags = 0 anchored = 1 var/cult = 0 diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 964afb0527..5c3542015c 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -14,7 +14,7 @@ LINEN BINS throwforce = 1 throw_speed = 1 throw_range = 2 - w_class = 2.0 + w_class = ITEMSIZE_SMALL /obj/item/weapon/bedsheet/attack_self(mob/user as mob) user.drop_item() @@ -193,7 +193,7 @@ LINEN BINS sheets.Add(I) amount++ user << "You put [I] in [src]." - else if(amount && !hidden && I.w_class < 4) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. + else if(amount && !hidden && I.w_class < ITEMSIZE_LARGE) //make sure there's sheets to hide it among, make sure nothing else is hidden in there. user.drop_item() I.loc = src hidden = I diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 107ea11520..e7f81877a8 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/closet.dmi' icon_state = "closed" density = 1 - w_class = 5 + w_class = ITEMSIZE_HUGE var/icon_closed = "closed" var/icon_opened = "open" var/opened = 0 diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index be67e9b3ca..a7f526a2e3 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -1,5 +1,5 @@ /obj/structure/closet/secure_closet/captains - name = "station administrator's locker" + name = "colony director's locker" req_access = list(access_captain) icon_state = "capsecure1" icon_closed = "capsecure" @@ -121,6 +121,7 @@ new /obj/item/device/flash(src) new /obj/item/weapon/melee/baton/loaded(src) new /obj/item/weapon/gun/energy/gun(src) + new /obj/item/weapon/cell/device(src) new /obj/item/clothing/accessory/holster/waist(src) new /obj/item/weapon/melee/telebaton(src) new /obj/item/clothing/head/beret/sec/corporate/hos(src) @@ -166,6 +167,7 @@ new /obj/item/weapon/reagent_containers/spray/pepper(src) new /obj/item/weapon/melee/baton/loaded(src) new /obj/item/weapon/gun/energy/gun(src) + new /obj/item/weapon/cell/device(src) new /obj/item/weapon/storage/box/holobadge(src) new /obj/item/clothing/head/beret/sec/corporate/warden(src) new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src) @@ -212,6 +214,7 @@ new /obj/item/clothing/under/rank/security/corp(src) new /obj/item/ammo_magazine/c45m/rubber(src) new /obj/item/weapon/gun/energy/taser(src) + new /obj/item/weapon/cell/device(src) new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src) new /obj/item/device/flashlight/maglight(src) return diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index 0f5d5119bb..3dcdd0e85c 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -615,7 +615,7 @@ return /obj/structure/closet/wardrobe/captain - name = "station administrator's wardrobe" + name = "colony director's wardrobe" icon_state = "cabinet_closed" icon_closed = "cabinet_closed" icon_opened = "cabinet_open" @@ -637,4 +637,4 @@ new /obj/item/clothing/head/beret/centcom/captain(src) new /obj/item/clothing/under/gimmick/rank/captain/suit(src) new /obj/item/clothing/glasses/sunglasses(src) - return \ No newline at end of file + return diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 5cdb49657a..931a990085 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -8,6 +8,7 @@ icon_opened = "crateopen" icon_closed = "crate" climbable = 1 + var/points_per_crate = 5 // mouse_drag_pointer = MOUSE_ACTIVE_POINTER //??? var/rigged = 0 @@ -240,6 +241,7 @@ icon_state = "plasticcrate" icon_opened = "plasticcrateopen" icon_closed = "plasticcrate" + points_per_crate = 1 //5 crates per ordered crate, +5 for the crate it comes in. /obj/structure/closet/crate/internals name = "internals crate" diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index cb7dac0684..bd39d82801 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -4,7 +4,7 @@ icon_state = "door_as_0" anchored = 0 density = 1 - w_class = 5 + w_class = ITEMSIZE_HUGE var/state = 0 var/base_icon_state = "" var/base_name = "airlock" diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index fc4a9c48ca..0ad1fb8404 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -200,3 +200,9 @@ /obj/structure/flora/ausbushes/fullgrass/New() ..() icon_state = "fullgrass_[rand(1, 3)]" + +/obj/structure/flora/skeleton + name = "hanging skeleton model" + icon = 'icons/obj/plants.dmi' + icon_state = "hangskele" + desc = "It's an anatomical model of a human skeletal system made of plaster." \ No newline at end of file diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 52afecd66d..19f3b48076 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -3,7 +3,7 @@ anchored = 1 density = 1 layer = 2 - w_class = 5 + w_class = ITEMSIZE_HUGE var/state = 0 var/health = 200 var/cover = 50 //how much cover the girder provides against projectiles. diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 20b326ebc9..d6d25ffc0a 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -3,7 +3,7 @@ desc = "A folded membrane which rapidly expands into a large cubical shape on activation." icon = 'icons/obj/inflatable.dmi' icon_state = "folded_wall" - w_class = 3 + w_class = ITEMSIZE_NORMAL attack_self(mob/user) playsound(loc, 'sound/items/zip.ogg', 75, 1) @@ -248,8 +248,8 @@ desc = "Contains inflatable walls and doors." icon_state = "inf_box" item_state = "syringe_kit" - w_class = 3 - max_storage_space = 28 + w_class = ITEMSIZE_NORMAL + max_storage_space = ITEMSIZE_COST_NORMAL * 7 can_hold = list(/obj/item/inflatable) New() diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm index b3ad998895..588517a7ed 100644 --- a/code/game/objects/structures/janicart.dm +++ b/code/game/objects/structures/janicart.dm @@ -291,4 +291,4 @@ desc = "A keyring with a small steel key, and a pink fob reading \"Pussy Wagon\"." icon = 'icons/obj/vehicles.dmi' icon_state = "keys" - w_class = 1 + w_class = ITEMSIZE_TINY diff --git a/code/game/objects/structures/lattice.dm b/code/game/objects/structures/lattice.dm index eff0de4b48..5d01438614 100644 --- a/code/game/objects/structures/lattice.dm +++ b/code/game/objects/structures/lattice.dm @@ -5,7 +5,7 @@ icon_state = "latticefull" density = 0 anchored = 1.0 - w_class = 3 + w_class = ITEMSIZE_NORMAL layer = 2.3 //under pipes // flags = CONDUCT @@ -57,10 +57,11 @@ return if (istype(C, /obj/item/weapon/weldingtool)) var/obj/item/weapon/weldingtool/WT = C - if(WT.remove_fuel(0, user)) - user << "Slicing lattice joints ..." - PoolOrNew(/obj/item/stack/rods, src.loc) - qdel(src) + if(WT.welding == 1) + if(WT.remove_fuel(0, user)) + user << "Slicing lattice joints ..." + PoolOrNew(/obj/item/stack/rods, src.loc) + qdel(src) return diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index c76ca1802d..db234a1a2e 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/janitor.dmi' icon_state = "mopbucket" density = 1 - w_class = 3 + w_class = ITEMSIZE_NORMAL pressure_resistance = 5 flags = OPENCONTAINER var/amount_per_transfer_from_this = 5 //shit I dunno, adding this so syringes stop runtime erroring. --NeoFite diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 5d5fc2d943..e8ce8bfb1c 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -4,7 +4,7 @@ opacity = 0 density = 0 layer = 3.5 - w_class = 3 + w_class = ITEMSIZE_NORMAL /obj/structure/sign/ex_act(severity) switch(severity) @@ -37,7 +37,7 @@ name = "sign" desc = "" icon = 'icons/obj/decals.dmi' - w_class = 3 //big + w_class = ITEMSIZE_NORMAL //big var/sign_state = "" /obj/item/sign/attackby(obj/item/tool as obj, mob/user as mob) //construction diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 73ceddb70f..a2e8e3f21b 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -226,7 +226,7 @@ desc = "A collapsed roller bed that can be carried around." icon = 'icons/obj/rollerbed.dmi' icon_state = "folded" - w_class = 4.0 // Can't be put in backpacks. Oh well. + w_class = ITEMSIZE_LARGE // Can't be put in backpacks. Oh well. /obj/item/roller/attack_self(mob/user) var/obj/structure/bed/roller/R = new /obj/structure/bed/roller(user.loc) diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm index e4d54f48ba..6592e51b29 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -8,7 +8,7 @@ var/global/list/stool_cache = list() //haha stool icon_state = "stool_preview" //set for the map force = 10 throwforce = 10 - w_class = 5 + w_class = ITEMSIZE_HUGE var/base_icon = "stool_base" var/material/material var/material/padding_material diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 0e7546f271..c13ae10e64 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -5,7 +5,7 @@ icon_state = "dispenser" density = 1 anchored = 1.0 - w_class = 5 + w_class = ITEMSIZE_HUGE var/oxygentanks = 10 var/phorontanks = 10 var/list/oxytanks = list() //sorry for the similar var names diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 68b10ccf7a..83396b363e 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/objects.dmi' icon_state = "target_stake" density = 1 - w_class = 5 + w_class = ITEMSIZE_HUGE flags = CONDUCT var/obj/item/target/pinned_target // the current pinned target diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 3764386679..10c6ae08f1 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -16,7 +16,7 @@ obj/structure/windoor_assembly anchored = 0 density = 0 dir = NORTH - w_class = 3 + w_class = ITEMSIZE_NORMAL var/obj/item/weapon/airlock_electronics/electronics = null var/created_name = null diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index c419de639d..15d6e32213 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -3,7 +3,7 @@ desc = "A window." icon = 'icons/obj/structures.dmi' density = 1 - w_class = 3 + w_class = ITEMSIZE_NORMAL layer = 3.2//Just above doors pressure_resistance = 4*ONE_ATMOSPHERE diff --git a/code/game/sound.dm b/code/game/sound.dm index fea1bdcb38..803a668761 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -45,9 +45,10 @@ var/list/clown_sound = list('sound/effects/clownstep1.ogg','sound/effects/clowns var/list/swing_hit_sound = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg') var/list/hiss_sound = list('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg') var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg') +var/list/fracture_sound = list('sound/effects/bonebreak1.ogg','sound/effects/bonebreak2.ogg','sound/effects/bonebreak3.ogg','sound/effects/bonebreak4.ogg') //var/list/gun_sound = list('sound/weapons/Gunshot.ogg', 'sound/weapons/Gunshot2.ogg','sound/weapons/Gunshot3.ogg','sound/weapons/Gunshot4.ogg') -/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global) +/proc/playsound(var/atom/source, soundin, vol as num, vary, extrarange as num, falloff, var/is_global, var/frequency) soundin = get_sfx(soundin) // same sound for everyone @@ -55,7 +56,7 @@ var/list/page_sound = list('sound/effects/pageturn1.ogg', 'sound/effects/pagetur error("[source] is an area and is trying to make the sound: [soundin]") return - var/frequency = get_rand_frequency() // Same frequency for everybody + frequency = isnull(frequency) ? get_rand_frequency() : frequency // Same frequency for everybody var/turf/turf_source = get_turf(source) // Looping through the player list has the added bonus of working for mobs inside containers @@ -175,5 +176,6 @@ var/const/FALLOFF_SOUNDS = 0.5 if ("swing_hit") soundin = pick(swing_hit_sound) if ("hiss") soundin = pick(hiss_sound) if ("pageturn") soundin = pick(page_sound) + if ("fracture") soundin = pick(fracture_sound) //if ("gunshot") soundin = pick(gun_sound) - return soundin \ No newline at end of file + return soundin diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm index 1217916312..e3b8e0d2ec 100644 --- a/code/game/supplyshuttle.dm +++ b/code/game/supplyshuttle.dm @@ -138,9 +138,8 @@ var/list/mechtoys = list( /datum/controller/supply //supply points var/points = 50 - var/points_per_process = 1 + var/points_per_process = 1.5 var/points_per_slip = 2 - var/points_per_crate = 5 var/points_per_platinum = 5 // 5 points per sheet var/points_per_phoron = 5 //control @@ -193,12 +192,13 @@ var/list/mechtoys = list( // Must be in a crate! if(istype(MA,/obj/structure/closet/crate)) - callHook("sell_crate", list(MA, area_shuttle)) + var/obj/structure/closet/crate/CR = MA + callHook("sell_crate", list(CR, area_shuttle)) - points += points_per_crate + points += CR.points_per_crate var/find_slip = 1 - for(var/atom in MA) + for(var/atom in CR) // Sell manifests var/atom/A = atom if(find_slip && istype(A,/obj/item/weapon/paper/manifest)) @@ -247,6 +247,7 @@ var/list/mechtoys = list( var/i = rand(1,clear_turfs.len) var/turf/pickedloc = clear_turfs[i] clear_turfs.Cut(i,i+1) + shoppinglist -= S var/datum/supply_order/SO = S var/datum/supply_packs/SP = SO.object @@ -298,5 +299,4 @@ var/list/mechtoys = list( slip.info += "
    " slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
    " - shoppinglist.Cut() return diff --git a/code/game/turfs/space/cracked_asteroid.dm b/code/game/turfs/space/cracked_asteroid.dm new file mode 100644 index 0000000000..b9f43af82e --- /dev/null +++ b/code/game/turfs/space/cracked_asteroid.dm @@ -0,0 +1,16 @@ +// This is used to have vacuums inside the asteroid be more present. + +/turf/space/cracked_asteroid + icon = 'icons/turf/flooring/asteroid.dmi' + name = "cracked sand" + desc = "Rough sand with a huge crack. It probably leads out into the void." + icon_state = "asteroid_cracked" + dynamic_lighting = TRUE + +/turf/space/cracked_asteroid/is_space() // So people don't start floating when standing on it. + return FALSE + +/turf/space/cracked_asteroid/New() + ..() + spawn(2 SECONDS) + overlays.Cut() \ No newline at end of file diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 9ab3828587..5af7056562 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -9,7 +9,7 @@ // heat_capacity = 700000 No. /turf/space/New() - if(!istype(src, /turf/space/transit)) + if(!istype(src, /turf/space/transit) && !istype(src, /turf/space/cracked_asteroid)) icon_state = "[((x + y) ^ ~(x * y) + z) % 25]" update_starlight() ..() diff --git a/code/game/verbs/advanced_who_vr.dm b/code/game/verbs/advanced_who_vr.dm deleted file mode 100644 index 0bc0d13b57..0000000000 --- a/code/game/verbs/advanced_who_vr.dm +++ /dev/null @@ -1,86 +0,0 @@ - -/client/verb/who_advanced() - set name = "Advanced Who" - set category = "OOC" - - var/msg = "Current Players:\n" - - var/list/Lines = list() - - if(holder && (R_ADMIN & holder.rights || R_MOD & holder.rights)) - for(var/client/C in clients) - var/entry = "\t[C.key]" - if(C.holder && C.holder.fakekey) - entry += " (as [C.holder.fakekey])" - entry += " - Playing as [C.mob.real_name]" - switch(C.mob.stat) - if(UNCONSCIOUS) - entry += " - Unconscious" - if(DEAD) - if(isobserver(C.mob)) - var/mob/observer/dead/O = C.mob - if(O.started_as_observer) - entry += " - Observing" - else - entry += " - DEAD" - else - entry += " - DEAD" - - var/age - if(isnum(C.player_age)) - age = C.player_age - else - age = 0 - - if(age <= 1) - age = "[age]" - else if(age < 10) - age = "[age]" - - entry += " - [age]" - - if(is_special_character(C.mob)) - entry += " - Antagonist" - - if(C.is_afk()) - var/seconds = C.last_activity_seconds() - entry += " (AFK - " - entry += "[round(seconds / 60)] minutes, " - entry += "[seconds % 60] seconds)" - - entry += " (?)" - if(C.is_afk()) - var/seconds = C.last_activity_seconds() - entry += " (AFK - " - entry += "[round(seconds / 60)] minutes, " - entry += "[seconds % 60] seconds)" //Let's go into the seconds, why not? - Lines += entry - else - for(var/client/C in clients) - if(C.holder && C.holder.fakekey) - var/entry = "\t[C.key]" - var/mob/observer/dead/O = C.mob - entry += C.holder.fakekey - if(isobserver(O)) - entry += " - Observing" - else if(istype(O,/mob/new_player)) - entry += " - In Lobby" - else - entry += " - Playing" - Lines += entry - else - var/entry = "\t[C.key]" - var/mob/observer/dead/O = C.mob - if(isobserver(O)) //Woo, players can see - entry += " - Observing" - else if(istype(O,/mob/new_player)) - entry += " - In Lobby" - else - entry += " - Playing" - Lines += entry - - for(var/line in sortList(Lines)) - msg += "[line]\n" - - msg += "Total Players: [length(Lines)]" - src << msg diff --git a/code/global.dm b/code/global.dm index 746352df6c..99dcca0b37 100644 --- a/code/global.dm +++ b/code/global.dm @@ -118,6 +118,8 @@ var/join_motd = null var/datum/nanomanager/nanomanager = new() // NanoManager, the manager for Nano UIs. var/datum/event_manager/event_manager = new() // Event Manager, the manager for events. +var/datum/game_master/game_master = new() // Game Master, an AI for choosing events. +var/datum/metric/metric = new() // Metric datum, used to keep track of the round. var/list/awaydestinations = list() // Away missions. A list of landmarks that the warpgate can take you to. diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 0c8268be1a..cf6cdbd6ac 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -198,7 +198,8 @@ var/list/admin_verbs_debug = list( /client/proc/dsay, /client/proc/toggle_debug_logs, /client/proc/admin_ghost, //allows us to ghost/reenter body at will, - /datum/admins/proc/view_runtimes + /datum/admins/proc/view_runtimes, + /client/proc/show_gm_status ) var/list/admin_verbs_paranoid_debug = list( @@ -309,7 +310,11 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/paralyze_mob, /client/proc/cmd_admin_direct_narrate, /client/proc/allow_character_respawn, // Allows a ghost to respawn , - /datum/admins/proc/sendFax + /datum/admins/proc/sendFax, + /client/proc/getserverlog, //allows us to fetch server logs (diary) for other days, + /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, + /datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently, + ) diff --git a/code/modules/admin/newbanjob.dm b/code/modules/admin/newbanjob.dm index b9f5c44298..a2cc2e6184 100644 --- a/code/modules/admin/newbanjob.dm +++ b/code/modules/admin/newbanjob.dm @@ -63,7 +63,7 @@ var/savefile/Banlistjob bantimestamp = CMinutes + minutes if(rank == "Heads") AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Personnel") - AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Station Administrator") + AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Colony Director") AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Head of Security") AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Chief Engineer") AddBanjob(ckey, computerid, reason, bannedby, temp, minutes, "Research Director") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 9b9aca72b3..bce3f9b23d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -262,7 +262,7 @@ id.icon_state = "gold" id.access = get_all_accesses() id.registered_name = H.real_name - id.assignment = "Station Administrator" + id.assignment = "Colony Director" id.name = "[id.registered_name]'s ID Card ([id.assignment])" H.equip_to_slot_or_del(id, slot_wear_id) H.update_inv_wear_id() diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index 479bbed53f..9587984177 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/assemblies/new_assemblies.dmi' icon_state = "" flags = CONDUCT - w_class = 2.0 + w_class = ITEMSIZE_SMALL matter = list(DEFAULT_WALL_MATERIAL = 100) throwforce = 2 throw_speed = 3 diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index a78126bedc..e41576020e 100644 --- a/code/modules/assembly/bomb.dm +++ b/code/modules/assembly/bomb.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/tank.dmi' item_state = "assembly" throwforce = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL throw_speed = 2 throw_range = 4 flags = CONDUCT | PROXMOVE diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 021216f218..a614135f22 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -5,7 +5,7 @@ item_state = "assembly" flags = CONDUCT | PROXMOVE throwforce = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 3 throw_range = 10 diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 8ba62cdc37..edbe0e7491 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -5,7 +5,7 @@ var/obj/item/clothing/head/helmet/part1 = null var/obj/item/device/radio/electropack/part2 = null var/status = 0 - w_class = 5.0 + w_class = ITEMSIZE_HUGE flags = CONDUCT /obj/item/assembly/shock_kit/Destroy() diff --git a/code/modules/awaymissions/loot.dm b/code/modules/awaymissions/loot.dm index 5aeb9651d2..1ed7b78d2a 100644 --- a/code/modules/awaymissions/loot.dm +++ b/code/modules/awaymissions/loot.dm @@ -21,4 +21,4 @@ continue new loot_path(get_turf(src)) - qdel(src) + qdel(src) \ No newline at end of file diff --git a/code/modules/awaymissions/loot_vr.dm b/code/modules/awaymissions/loot_vr.dm index c092ff8841..3794277012 100644 --- a/code/modules/awaymissions/loot_vr.dm +++ b/code/modules/awaymissions/loot_vr.dm @@ -1,14 +1,396 @@ -// Legacy version. Need to investigate what the hell the one above does later. -Ace +// Legacy version. Need to investigate what the hell lootdrop in loot.dm does later. -Ace /obj/effect/landmark/loot_spawn name = "loot spawner" icon_state = "grabbed1" var/live_cargo = 1 // So you can turn off aliens. + var/blobchance = 0 // So you can turn on blobs. var/low_probability = 0 var/spawned_faction = "hostile" // Spawned mobs can have their faction changed. - // TODO Stuff /obj/effect/landmark/loot_spawn/low name = "low prob loot spawner" icon_state = "grabbed" low_probability = 1 + +/obj/effect/landmark/loot_spawn/New() + + switch(pick( \ + low_probability * 1000;"nothing", \ + 200 - low_probability * 175;"treasure", \ + 25 + low_probability * 75;"remains", \ + 5; "blob", \ + 50 + low_probability * 50;"clothes", \ + "glasses", \ + 100 - low_probability * 50;"weapons", \ + 100 - low_probability * 50;"spacesuit", \ + "health", \ + 25 + low_probability * 75;"snacks", \ + 25;"alien", \ + "lights", \ + 25 - low_probability * 25;"engineering", \ + 25 - low_probability * 25;"coffin", \ + 25;"mimic", \ + 25;"viscerator", \ + )) + if("treasure") + var/obj/structure/closet/crate/C = new(src.loc) + if(prob(33)) + // Smuggled goodies. + new /obj/item/stolenpackage(C) + + if(prob(33)) + //coins + var/amount = rand(2,6) + var/list/possible_spawns = list() + for(var/coin_type in typesof(/obj/item/weapon/coin)) + possible_spawns += coin_type + var/coin_type = pick(possible_spawns) + for(var/i=0,iYou need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/medical/taur name = "taur specific medical voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -124,13 +124,13 @@ pixel_x = -16 return 1 else - H << "You need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/engineering/taur name = "taur specific engineering voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -152,13 +152,13 @@ pixel_x = -16 return 1 else - H << "You need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/security/taur name = "taur specific security voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -183,12 +183,12 @@ update_icon() return 1 else - H << "You need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/atmos/taur name = "taur specific atmospherics voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -213,12 +213,12 @@ update_icon() return 1 else - H << "You need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/mining/taur name = "taur specific mining voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -243,13 +243,13 @@ update_icon() return 1 else - H << "You need to have a taur half to wear this." + H << "You need to have a horse, wolf, or naga half to wear this." return 0 /obj/item/clothing/suit/space/void/merc/taur name = "taur specific blood-red voidsuit" - desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it." + desc = "A high-tech space suit. It says has a sticker saying one size fits all taurs on it. Below the sticker, it states that it only fits horses, wolves, and naga taurs." species_restricted = null mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) if(istype(H) && istype(H.tail_style, /datum/sprite_accessory/tail/taur/horse)) @@ -274,5 +274,5 @@ update_icon() return 1 else - H << "You need to have a taur half to wear this." - return 0 \ No newline at end of file + H << "You need to have a horse, wolf, or naga half to wear this." + return 0 diff --git a/code/modules/clothing/spacesuits/void/wizard.dm b/code/modules/clothing/spacesuits/void/wizard.dm index 4c2318355f..d39f553aea 100644 --- a/code/modules/clothing/spacesuits/void/wizard.dm +++ b/code/modules/clothing/spacesuits/void/wizard.dm @@ -17,7 +17,7 @@ desc = "A bizarre gem-encrusted suit that radiates magical energies." item_state_slots = list(slot_r_hand_str = "wiz_voidsuit", slot_l_hand_str = "wiz_voidsuit") slowdown = 1 - w_class = 3 + w_class = ITEMSIZE_NORMAL unacidable = 1 armor = list(melee = 40, bullet = 20, laser = 20,energy = 20, bomb = 35, bio = 100, rad = 60) siemens_coefficient = 0.7 diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 648cf07a41..6745208210 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -124,7 +124,7 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS allowed = list(/obj/item/weapon/gun,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) slowdown = 1 - w_class = 5 + w_class = ITEMSIZE_HUGE armor = list(melee = 80, bullet = 60, laser = 50,energy = 25, bomb = 50, bio = 100, rad = 100) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS @@ -324,6 +324,7 @@ /obj/item/clothing/suit/storage/vest/press name = "press vest" + icon_state = "pvest" desc = "A simple kevlar plate carrier. This one has the word 'Press' embroidered on patches on the back and front." item_state_slots = list(slot_r_hand_str = "armor", slot_l_hand_str = "armor") allowed = list(/obj/item/device/flashlight,/obj/item/device/taperecorder,/obj/item/weapon/pen,/obj/item/device/camera_film,/obj/item/device/camera) @@ -384,7 +385,7 @@ desc = "A suit that protects against some damage." icon_state = "centcom" item_state_slots = list(slot_r_hand_str = "armor", slot_l_hand_str = "armor") - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/tank/emergency_oxygen) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT @@ -394,14 +395,14 @@ /obj/item/clothing/suit/armor/heavy name = "heavy armor" - desc = "A heavily armored suit that protects against moderate damage." + desc = "An old military-grade suit of armor. Incredibly robust against brute force damage! However, it offers little protection from energy-based weapons, which, combined with its bulk, makes it woefully obsolete." icon_state = "heavy" item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat") - armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 40, bio = 0, rad = 0) - w_class = 4//bulky item + armor = list(melee = 90, bullet = 80, laser = 10, energy = 10, bomb = 80, bio = 0, rad = 0) + w_class = ITEMSIZE_HUGE // Very bulky, very heavy. gas_transfer_coefficient = 0.90 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS - slowdown = 3 + slowdown = 5 // If you're a tank you're gonna move like a tank. flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT siemens_coefficient = 0 diff --git a/code/modules/clothing/suits/armor_vr.dm b/code/modules/clothing/suits/armor_vr.dm index fb5f22189d..beff1156ed 100644 --- a/code/modules/clothing/suits/armor_vr.dm +++ b/code/modules/clothing/suits/armor_vr.dm @@ -4,7 +4,7 @@ icon_state = "heavy" item_state_slots = list(slot_r_hand_str = "swat", slot_l_hand_str = "swat") armor = list(melee = 90, bullet = 80, laser = 10, energy = 10, bomb = 80, bio = 0, rad = 0) - w_class = 5 // massively bulky item + w_class = ITEMSIZE_HUGE // massively bulky item gas_transfer_coefficient = 0.90 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS slowdown = 5 // If you're a tank you're gonna move like a tank. diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index 227414b0e4..51b05d1526 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -13,7 +13,7 @@ name = "bio suit" desc = "A suit that protects against biological contamination." icon_state = "bio" - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index 0260142abb..0d65b31656 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -14,15 +14,15 @@ //Captain /obj/item/clothing/suit/captunic - name = "station administrator's parade tunic" - desc = "Worn by a Station Administrator to show their class." + name = "colony director's parade tunic" + desc = "Worn by a Colony Director to show their class." icon_state = "captunic" body_parts_covered = UPPER_TORSO|ARMS flags_inv = HIDEJUMPSUIT /obj/item/clothing/suit/captunic/capjacket - name = "station administrator's uniform jacket" - desc = "A less formal jacket for everyday Station Administrator use." + name = "colony director's uniform jacket" + desc = "A less formal jacket for everyday Colony Director use." icon_state = "capjacket" body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS flags_inv = HIDEJUMPSUIT @@ -199,4 +199,4 @@ icon = 'icons/obj/clothing/belts.dmi' icon_state = "suspenders" blood_overlay_type = "armor" //it's the less thing that I can put here - body_parts_covered = 0 \ No newline at end of file + body_parts_covered = 0 diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 2dc9e22404..6f93a4acb7 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -128,7 +128,7 @@ name = "red space suit replica" icon_state = "syndicate" desc = "A plastic replica of the syndicate space suit, you'll look just like a real murderous syndicate agent in this! This is a toy, it is not made for use in space!" - w_class = 3 + w_class = ITEMSIZE_NORMAL allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|HANDS|LEGS|FEET @@ -180,6 +180,71 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO flags_inv = HIDEJUMPSUIT +/obj/item/clothing/suit/skeleton + name = "skeleton costume" + desc = "A body-tight costume with the human skeleton lined out on it." + icon_state = "skelecost" + body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|FEET|HANDS|EYES|HEAD|FACE + flags_inv = HIDEJUMPSUIT|HIDESHOES|HIDEGLOVES + item_state_slots = list(slot_r_hand_str = "judge", slot_l_hand_str = "judge") + +/obj/item/clothing/suit/engicost + name = "sexy engineering voidsuit costume" + desc = "It's supposed to look like an engineering voidsuit... It doesn't look like it could protect from much radiation." + icon_state = "engicost" + body_parts_covered = UPPER_TORSO|LOWER_TORSO|FEET + flags_inv = HIDEJUMPSUIT|HIDESHOES + item_state_slots = list(slot_r_hand_str = "eng_voidsuit", slot_l_hand_str = "eng_voidsuit") + +/obj/item/clothing/suit/maxman + name = "doctor maxman costume" + desc = "A costume made to look like Dr. Maxman, the famous male-enhancement salesman. Complete with red do-rag and sleeveless labcoat." + icon_state = "maxman" + body_parts_covered = LOWER_TORSO|FEET|LEGS|HEAD + flags_inv = HIDEJUMPSUIT|HIDESHOES + item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") + +/obj/item/clothing/suit/iasexy + name = "sexy internal affairs suit" + desc = "Now where's your pen?~..." + icon_state = "iacost" + body_parts_covered = UPPER_TORSO|FEET|LOWER_TORSO|EYES + flags_inv = HIDEJUMPSUIT|HIDESHOES + item_state_slots = list(slot_r_hand_str = "suit_black", slot_l_hand_str = "suit_black") + +/obj/item/clothing/suit/sexyminer + name = "sexy miner costume" + desc = "For when you need to get your rocks off." + icon_state = "sexyminer" + body_parts_covered = FEET|LOWER_TORSO|HEAD + flags_inv = HIDEJUMPSUIT|HIDESHOES + item_state_slots = list(slot_r_hand_str = "miner", slot_l_hand_str = "miner") + +/obj/item/clothing/suit/sumo + name = "inflatable sumo wrestler costume" + desc = "An inflated sumo wrestler costume. It's quite hot." + icon_state = "sumo" + body_parts_covered = FEET|LOWER_TORSO|UPPER_TORSO|LEGS|ARMS + flags_inv = HIDESHOES + item_state_slots = list(slot_r_hand_str = "classicponcho", slot_l_hand_str = "classicponcho") + min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE + +/obj/item/clothing/suit/hackercost + name = "classic hacker costume" + desc = "You would feel insanely cool wearing this." + icon_state = "hackercost" + body_parts_covered = FEET|LOWER_TORSO|UPPER_TORSO|LEGS|ARMS|EYES + flags_inv = HIDESHOES + item_state_slots = list(slot_r_hand_str = "leather_coat", slot_l_hand_str = "leather_coat") + +/obj/item/clothing/suit/lumber + name = "sexy lumberjack costume" + desc = "Smells of dusky pine. Includes chest hair and beard." + icon_state = "sexylumber" + body_parts_covered = FEET|LOWER_TORSO|FEET + flags_inv = HIDESHOES|HIDEJUMPSUIT + item_state_slots = list(slot_r_hand_str = "red_labcoat", slot_l_hand_str = "red_labcoat") + /* * Misc */ @@ -233,6 +298,24 @@ icon_state = "customs_jacket" item_state_slots = list(slot_r_hand_str = "suit_blue", slot_l_hand_str = "suit_blue") +/obj/item/clothing/suit/storage/greyjacket + name = "grey jacket" + desc = "A fancy twead grey jacket." + icon_state = "gentlecoat" + item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") + +/obj/item/clothing/suit/storage/trench + name = "brown trenchcoat" + desc = "A rugged canvas trenchcoat, designed and created by TX Fabrication Corp. The coat appears to have its kevlar lining removed." + icon_state = "detective" + blood_overlay_type = "coat" + allowed = list(/obj/item/weapon/tank/emergency_oxygen, /obj/item/device/flashlight,/obj/item/weapon/gun/energy,/obj/item/weapon/gun/projectile,/obj/item/ammo_magazine,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/handcuffs,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/flame/lighter,/obj/item/device/taperecorder,/obj/item/device/uv_light) + +/obj/item/clothing/suit/storage/trench/grey + name = "grey trenchcoat" + icon_state = "detective2" + item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") + /* * stripper */ @@ -312,20 +395,44 @@ min_cold_protection_temperature = T0C - 20 siemens_coefficient = 0.7 -/obj/item/clothing/suit/storage/leather_jacket +/obj/item/clothing/suit/storage/toggle/leather_jacket name = "leather jacket" desc = "A black leather coat." icon_state = "leather_jacket" + icon_open = "leather_jacket_open" allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight, /obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) body_parts_covered = UPPER_TORSO|ARMS -/obj/item/clothing/suit/storage/leather_jacket/alt - icon_state = "leather_jacket_alt" +/obj/item/clothing/suit/storage/toggle/leather_jacket/sleeveless + name = "leather vest" + desc = "A black leather vest." + icon_state = "leather_jacket_sleeveless" + icon_open = "leather_jacket_sleeveless_open" + icon_closed = "leather_jacket_sleeveless" + body_parts_covered = UPPER_TORSO item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") -/obj/item/clothing/suit/storage/leather_jacket/nanotrasen +/obj/item/clothing/suit/storage/leather_jacket_alt + name = "leather vest" + desc = "A black leather vest." + icon_state = "leather_jacket_alt" + item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") + body_parts_covered = UPPER_TORSO|ARMS + +/obj/item/clothing/suit/storage/toggle/leather_jacket/nanotrasen desc = "A black leather coat. A corporate logo is proudly displayed on the back." icon_state = "leather_jacket_nt" + icon_closed = "leather_jacket_nt" + icon_open = "leather_jacket_nt_open" + item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") + +/obj/item/clothing/suit/storage/toggle/leather_jacket/nanotrasen/sleeveless + name = "leather vest" + desc = "A black leather vest. A corporate logo is proudly displayed on the back." + icon_state = "leather_jacket_nt_sleeveless" + icon_open = "leather_jacket_nt_sleeveless_open" + icon_closed = "leather_jacket_nt_sleeveless" + body_parts_covered = UPPER_TORSO item_state_slots = list(slot_r_hand_str = "leather_jacket", slot_l_hand_str = "leather_jacket") //This one has buttons for some reason @@ -339,6 +446,15 @@ allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) body_parts_covered = UPPER_TORSO|ARMS +/obj/item/clothing/suit/storage/toggle/brown_jacket/sleeveless + name = "brown vest" + desc = "A brown leather vest." + icon_state = "brown_jacket_sleeveless" + icon_open = "brown_jacket_sleeveless_open" + icon_closed = "brown_jacket_sleeveless" + body_parts_covered = UPPER_TORSO + item_state_slots = list(slot_r_hand_str = "brown_jacket", slot_l_hand_str = "brown_jacket") + /obj/item/clothing/suit/storage/toggle/brown_jacket/nanotrasen desc = "A brown leather coat. A corporate logo is proudly displayed on the back." icon_state = "brown_jacket_nt" @@ -346,6 +462,50 @@ icon_open = "brown_jacket_nt_open" icon_closed = "brown_jacket_nt" +/obj/item/clothing/suit/storage/toggle/brown_jacket/nanotrasen/sleeveless + name = "brown vest" + desc = "A brown leather vest. A corporate logo is proudly displayed on the back." + icon_state = "brown_jacket_nt_sleeveless" + icon_open = "brown_jacket_nt_open" + icon_closed = "brown_jacket_nt_sleeveless" + body_parts_covered = UPPER_TORSO + item_state_slots = list(slot_r_hand_str = "brown_jacket", slot_l_hand_str = "brown_jacket") + +/obj/item/clothing/suit/storage/toggle/denim_jacket + name = "denim jacket" + desc = "A denim coat." + icon_state = "denim_jacket" + item_state_slots = list(slot_r_hand_str = "denim_jacket", slot_l_hand_str = "denim_jacket") + icon_open = "denim_jacket_open" + icon_closed = "denim_jacket" + allowed = list (/obj/item/weapon/pen, /obj/item/weapon/paper, /obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen, /obj/item/weapon/storage/fancy/cigarettes, /obj/item/weapon/storage/box/matches, /obj/item/weapon/reagent_containers/food/drinks/flask) + body_parts_covered = UPPER_TORSO|ARMS + +/obj/item/clothing/suit/storage/toggle/denim_jacket/sleeveless + name = "denim vest" + desc = "A denim vest." + icon_state = "denim_jacket_sleeveless" + icon_open = "denim_jacket_sleeveless_open" + icon_closed = "denim_jacket_sleeveless" + body_parts_covered = UPPER_TORSO + item_state_slots = list(slot_r_hand_str = "denim_jacket", slot_l_hand_str = "denim_jacket") + +/obj/item/clothing/suit/storage/toggle/denim_jacket/nanotrasen + desc = "A denim coat. A corporate logo is proudly displayed on the back." + icon_state = "denim_jacket_nt" + item_state_slots = list(slot_r_hand_str = "denim_jacket", slot_l_hand_str = "denim_jacket") + icon_open = "denim_jacket_nt_open" + icon_closed = "denim_jacket_nt" + +/obj/item/clothing/suit/storage/toggle/denim_jacket/nanotrasen/sleeveless + name = "denim vest" + desc = "A denim vest. A corporate logo is proudly displayed on the back." + icon_state = "denim_jacket_nt_sleeveless" + icon_open = "denim_jacket_nt_open" + icon_closed = "denim_jacket_nt_sleeveless" + body_parts_covered = UPPER_TORSO + item_state_slots = list(slot_r_hand_str = "denim_jacket", slot_l_hand_str = "denim_jacket") + /obj/item/clothing/suit/storage/toggle/hoodie name = "grey hoodie" desc = "A warm, grey sweatshirt." @@ -510,7 +670,7 @@ min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE /obj/item/clothing/suit/storage/hooded/wintercoat/captain - name = "station administrator's winter coat" + name = "colony director's winter coat" icon_state = "coatcaptain" item_state_slots = list(slot_r_hand_str = "coatcaptain", slot_l_hand_str = "coatcaptain") armor = list(melee = 20, bullet = 15, laser = 20, energy = 10, bomb = 15, bio = 0, rad = 0) diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 2534845173..13d91661f5 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -4,8 +4,8 @@ /obj/item/clothing/suit/storage/New() ..() pockets = new/obj/item/weapon/storage/internal(src) - pockets.max_w_class = 2 //fit only pocket sized items - pockets.max_storage_space = 4 + pockets.max_w_class = ITEMSIZE_SMALL //fit only pocket sized items + pockets.max_storage_space = ITEMSIZE_COST_SMALL * 2 /obj/item/clothing/suit/storage/Destroy() qdel(pockets) @@ -76,8 +76,8 @@ /obj/item/clothing/suit/storage/vest/heavy/New() ..() pockets = new/obj/item/weapon/storage/internal(src) - pockets.max_w_class = 2 - pockets.max_storage_space = 8 + pockets.max_w_class = ITEMSIZE_SMALL + pockets.max_storage_space = ITEMSIZE_COST_SMALL * 4 /obj/item/clothing/suit/storage/vest var/icon_badge diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 53ea2d85b6..8bf36d0044 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -13,7 +13,7 @@ name = "firesuit" desc = "A suit that protects against fire and heat." icon_state = "fire" - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.90 permeability_coefficient = 0.50 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -33,7 +33,7 @@ desc = "A suit that protects against extreme fire and heat." //icon_state = "thermal" item_state_slots = list(slot_r_hand_str = "black_suit", slot_l_hand_str = "black_suit") - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item slowdown = 1.5 /* @@ -52,7 +52,7 @@ name = "bomb suit" desc = "A suit designed for safety when handling explosives." icon_state = "bombsuit" - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 slowdown = 2 @@ -85,7 +85,7 @@ name = "Radiation suit" desc = "A suit that protects against radiation. Label: Made with lead, do not eat insulation." icon_state = "rad" - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.90 permeability_coefficient = 0.50 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS|HANDS|FEET diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 1d6c610cea..a38f51f1fa 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -5,7 +5,7 @@ icon_state = "bluetie" item_state_slots = list(slot_r_hand_str = "", slot_l_hand_str = "") slot_flags = SLOT_TIE - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/slot = "decor" var/obj/item/clothing/has_suit = null //the suit the tie may be attached to var/image/inv_overlay = null //overlay used when attached to clothing. diff --git a/code/modules/clothing/under/accessories/armband.dm b/code/modules/clothing/under/accessories/armband.dm index 9aa2ec2b70..6856b29466 100644 --- a/code/modules/clothing/under/accessories/armband.dm +++ b/code/modules/clothing/under/accessories/armband.dm @@ -29,6 +29,15 @@ desc = "An armband, worn by the crew to display which department they're assigned to. This one is white." icon_state = "med" +/obj/item/clothing/accessory/armband/med/cross + name = "medic armband" + desc = "A white armband with a red cross on it. Typically used by people in the Medical department." + icon_state = "medicband" + +/obj/item/clothing/accessory/armband/med/color + name = "armband" + desc = "A fancy armband." + /obj/item/clothing/accessory/armband/medgreen name = "EMT armband" desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green." diff --git a/code/modules/clothing/under/accessories/clothing.dm b/code/modules/clothing/under/accessories/clothing.dm index af5b6c1c7a..cfd1c1d49a 100644 --- a/code/modules/clothing/under/accessories/clothing.dm +++ b/code/modules/clothing/under/accessories/clothing.dm @@ -28,6 +28,7 @@ desc = "Lucky suit jacket." icon_state = "checkered_jacket" + /obj/item/clothing/accessory/chaps name = "brown chaps" desc = "A pair of loose, brown leather chaps." @@ -53,7 +54,7 @@ slot_flags = SLOT_OCLOTHING | SLOT_TIE body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS|LEGS siemens_coefficient = 0.9 - w_class = 3 + w_class = ITEMSIZE_NORMAL slot = "over" sprite_sheets = list( @@ -128,4 +129,4 @@ /obj/item/clothing/accessory/hawaii/random/New() if(prob(50)) icon_state = "hawaii2" - color = color_rotation(rand(-11,12)*15) \ No newline at end of file + color = color_rotation(rand(-11,12)*15) diff --git a/code/modules/clothing/under/accessories/lockets.dm b/code/modules/clothing/under/accessories/lockets.dm index 43fb495669..6c06a48dbf 100644 --- a/code/modules/clothing/under/accessories/lockets.dm +++ b/code/modules/clothing/under/accessories/lockets.dm @@ -3,7 +3,7 @@ desc = "This oval shaped, argentium sterling silver locket hangs on an incredibly fine, refractive string, almost thin as hair and microweaved from links to a deceptive strength, of similar material. The edges are engraved very delicately with an elegant curving design, but overall the main is unmarked and smooth to the touch, leaving room for either remaining as a stolid piece or future alterations. There is an obvious internal place for a picture or lock of some sort, but even behind that is a very thin compartment unhinged with the pinch of a thumb and forefinger." icon_state = "locket" slot_flags = 0 - w_class = 2 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_MASK | SLOT_TIE var/base_icon var/open diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index b3461b82c2..4cc9c03dd0 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -7,13 +7,13 @@ var/slots = 3 var/obj/item/weapon/storage/internal/hold - w_class = 3.0 + w_class = ITEMSIZE_NORMAL /obj/item/clothing/accessory/storage/New() ..() hold = new/obj/item/weapon/storage/internal(src) hold.max_storage_space = slots * 2 - hold.max_w_class = 2 + hold.max_w_class = ITEMSIZE_SMALL /obj/item/clothing/accessory/storage/attack_hand(mob/user as mob) if (has_suit) //if we are part of a suit @@ -97,7 +97,7 @@ /obj/item/clothing/accessory/storage/knifeharness/New() ..() - hold.max_storage_space = 4 + hold.max_storage_space = ITEMSIZE_COST_SMALL * 2 hold.can_hold = list(/obj/item/weapon/material/hatchet/unathiknife,\ /obj/item/weapon/material/kitchen/utensil/knife,\ /obj/item/weapon/material/kitchen/utensil/knife/plastic,\ diff --git a/code/modules/clothing/under/jobs/civilian.dm b/code/modules/clothing/under/jobs/civilian.dm index 0f175ad0e9..a6b5c15ea3 100644 --- a/code/modules/clothing/under/jobs/civilian.dm +++ b/code/modules/clothing/under/jobs/civilian.dm @@ -7,8 +7,8 @@ rolled_sleeves = 0 /obj/item/clothing/under/rank/captain //Alright, technically not a 'civilian' but its better then giving a .dm file for a single define. - desc = "It's a blue jumpsuit with some gold markings denoting the rank of \"Station Administrator\"." - name = "station administrator's jumpsuit" + desc = "It's a blue jumpsuit with some gold markings denoting the rank of \"Colony Director\"." + name = "colony director's jumpsuit" icon_state = "captain" rolled_sleeves = 0 diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 4b22d93877..d547047353 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -102,7 +102,7 @@ name = "\improper NASA jumpsuit" desc = "It has a NASA logo on it and is made of space-proofed materials." icon_state = "black" - w_class = 4//bulky item + w_class = ITEMSIZE_LARGE//bulky item gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -153,7 +153,7 @@ rolled_sleeves = 0 /obj/item/clothing/under/gimmick/rank/captain/suit - name = "station administrator's suit" + name = "colony director's suit" desc = "A green suit and yellow necktie. Exemplifies authority." icon_state = "green_suit" item_state_slots = list(slot_r_hand_str = "centcom", slot_l_hand_str = "centcom") @@ -323,8 +323,8 @@ item_state_slots = list(slot_r_hand_str = "dress_white", slot_l_hand_str = "dress_white") /obj/item/clothing/under/dress/dress_cap - name = "station administrator's dress uniform" - desc = "Feminine fashion for the style concious Station Administrator." + name = "colony director's dress uniform" + desc = "Feminine fashion for the style concious Colony Director." icon_state = "dress_cap" body_parts_covered = UPPER_TORSO|LOWER_TORSO|ARMS @@ -390,8 +390,8 @@ body_parts_covered = UPPER_TORSO|LOWER_TORSO /obj/item/clothing/under/captainformal - name = "station administrator's formal uniform" - desc = "A Station Administrator's formal-wear, for special occasions." + name = "colony director's formal uniform" + desc = "A Colony Director's formal-wear, for special occasions." icon_state = "captain_formal" item_state_slots = list(slot_r_hand_str = "lawyer_blue", slot_l_hand_str = "lawyer_blue") @@ -619,4 +619,4 @@ name = "mankini" desc = "No honest man would wear this abomination" icon_state = "mankini" - siemens_coefficient = 1 \ No newline at end of file + siemens_coefficient = 1 diff --git a/code/modules/detectivework/forensics.dm b/code/modules/detectivework/forensics.dm index 27e2231d24..7bb68feb34 100644 --- a/code/modules/detectivework/forensics.dm +++ b/code/modules/detectivework/forensics.dm @@ -1,6 +1,6 @@ /obj/item/weapon/forensics icon = 'icons/obj/forensics.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY //This is the output of the stringpercent(print) proc, and means about 80% of //the print must be there for it to be complete. (Prints are 32 digits) diff --git a/code/modules/detectivework/tools/evidencebag.dm b/code/modules/detectivework/tools/evidencebag.dm index 9e2c490300..806d7ad34a 100644 --- a/code/modules/detectivework/tools/evidencebag.dm +++ b/code/modules/detectivework/tools/evidencebag.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "evidenceobj" item_state = null - w_class = 2 + w_class = ITEMSIZE_SMALL var/obj/item/stored_item = null /obj/item/weapon/evidencebag/MouseDrop(var/obj/item/I as obj) diff --git a/code/modules/detectivework/tools/rag.dm b/code/modules/detectivework/tools/rag.dm index b16c03f0ef..57af12525d 100644 --- a/code/modules/detectivework/tools/rag.dm +++ b/code/modules/detectivework/tools/rag.dm @@ -16,7 +16,7 @@ /obj/item/weapon/reagent_containers/glass/rag name = "rag" desc = "For cleaning up messes, you suppose." - w_class = 1 + w_class = ITEMSIZE_TINY icon = 'icons/obj/toy.dmi' icon_state = "rag" amount_per_transfer_from_this = 5 diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index fa5c7312a8..33931e87f9 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -1,7 +1,7 @@ /obj/item/weapon/sample name = "forensic sample" icon = 'icons/obj/forensics.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY var/list/evidence = list() /obj/item/weapon/sample/New(var/newloc, var/atom/supplied) @@ -125,7 +125,7 @@ name = "fiber collection kit" desc = "A magnifying glass and tweezers. Used to lift suit fibers." icon_state = "m_glass" - w_class = 2 + w_class = ITEMSIZE_SMALL var/evidence_type = "fiber" var/evidence_path = /obj/item/weapon/sample/fibers diff --git a/code/modules/detectivework/tools/uvlight.dm b/code/modules/detectivework/tools/uvlight.dm index 40b8e87326..6997e3a04a 100644 --- a/code/modules/detectivework/tools/uvlight.dm +++ b/code/modules/detectivework/tools/uvlight.dm @@ -3,7 +3,7 @@ desc = "A small handheld black light." icon_state = "uv_off" slot_flags = SLOT_BELT - w_class = 2 + w_class = ITEMSIZE_SMALL item_state = "electronic" action_button_name = "Toggle UV light" matter = list(DEFAULT_WALL_MATERIAL = 150) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index 1229cee322..5d5790758a 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -11,7 +11,7 @@ throwforce = 1.0 throw_speed = 1 throw_range = 2 - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/access = list() access = access_crate_cash var/worth = 0 diff --git a/code/modules/economy/retail_scanner.dm b/code/modules/economy/retail_scanner.dm index 4ddf058de2..7117172af8 100644 --- a/code/modules/economy/retail_scanner.dm +++ b/code/modules/economy/retail_scanner.dm @@ -6,7 +6,7 @@ flags = NOBLUDGEON|CONDUCT slot_flags = SLOT_BELT req_access = list(access_heads) - w_class = 2.0 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_MATERIAL = 1) var/locked = 1 diff --git a/code/modules/events/event_container.dm b/code/modules/events/event_container.dm index a1701f0182..6781adb399 100644 --- a/code/modules/events/event_container.dm +++ b/code/modules/events/event_container.dm @@ -127,16 +127,16 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT available_events = list( // Severity level, event name, even type, base weight, role weights, one shot, min weight, max weight. Last two only used if set and non-zero new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Nothing", /datum/event/nothing, 100), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "APC Damage", /datum/event/apc_damage, 20, list(ASSIGNMENT_ENGINEER = 10)), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "APC Damage", /datum/event/apc_damage, 20, list(ASSIGNMENT_ENGINEER = 20)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Brand Intelligence",/datum/event/brand_intelligence,20, list(ASSIGNMENT_JANITOR = 25), 1), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 10)), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Camera Damage", /datum/event/camera_damage, 20, list(ASSIGNMENT_ENGINEER = 20)), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Economic News", /datum/event/economic_event, 300), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Lost Carp", /datum/event/carp_migration, 20, list(ASSIGNMENT_SECURITY = 10), 1), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Hacker", /datum/event/money_hacker, 0, list(ASSIGNMENT_ANY = 4), 1, 10, 25), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Money Lotto", /datum/event/money_lotto, 0, list(ASSIGNMENT_ANY = 1), 1, 5, 15), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Mundane News", /datum/event/mundane_news, 300), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "PDA Spam", /datum/event/pda_spam, 0, list(ASSIGNMENT_ANY = 4), 0, 25, 50), - new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Space Dust", /datum/event/dust , 30, list(ASSIGNMENT_ENGINEER = 5), 0, 0, 50), + new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Space Dust", /datum/event/dust , 60, list(ASSIGNMENT_ENGINEER = 20), 0, 0, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Trivial News", /datum/event/trivial_news, 400), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Ian Storm", /datum/event/ianstorm, 50), new /datum/event_meta(EVENT_LEVEL_MUNDANE, "Vermin Infestation",/datum/event/infestation, 100, list(ASSIGNMENT_JANITOR = 100)), @@ -146,22 +146,22 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT /datum/event_container/moderate severity = EVENT_LEVEL_MODERATE available_events = list( - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 1230), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 10), 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 10, ASSIGNMENT_SECURITY = 20), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Nothing", /datum/event/nothing, 800), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Appendicitis", /datum/event/spontaneous_appendicitis, 0, list(ASSIGNMENT_MEDICAL = 30), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Carp School", /datum/event/carp_migration, 100, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SECURITY = 30), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Communication Blackout", /datum/event/communications_blackout, 500, list(ASSIGNMENT_AI = 150, ASSIGNMENT_SECURITY = 120)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Electrical Storm", /datum/event/electrical_storm, 250, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_JANITOR = 150)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Gravity Failure", /datum/event/gravity, 75, list(ASSIGNMENT_ENGINEER = 60)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Grid Check", /datum/event/grid_check, 200, list(ASSIGNMENT_SCIENTIST = 10)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 50, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 20)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 0, list(ASSIGNMENT_SECURITY = 100)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 0, list(ASSIGNMENT_MEDICAL = 50), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Ion Storm", /datum/event/ionstorm, 0, list(ASSIGNMENT_AI = 80, ASSIGNMENT_CYBORG = 50, ASSIGNMENT_ENGINEER = 15, ASSIGNMENT_SCIENTIST = 5)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Meteor Shower", /datum/event/meteor_wave, 30, list(ASSIGNMENT_ENGINEER = 20)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Prison Break", /datum/event/prison_break, 10, list(ASSIGNMENT_SECURITY = 100)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Radiation Storm", /datum/event/radiation_storm, 50, list(ASSIGNMENT_MEDICAL = 50), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Random Antagonist", /datum/event/random_antag, 2.5, list(ASSIGNMENT_SECURITY = 1), 1, 0, 5), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 20)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Solar Storm", /datum/event/solar_storm, 10, list(ASSIGNMENT_ENGINEER = 20, ASSIGNMENT_SECURITY = 10), 1), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 30, list(ASSIGNMENT_ENGINEER = 5)), - new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 30), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Rogue Drones", /datum/event/rogue_drone, 20, list(ASSIGNMENT_SECURITY = 60)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Solar Storm", /datum/event/solar_storm, 30, list(ASSIGNMENT_ENGINEER = 40, ASSIGNMENT_SECURITY = 30), 1), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Space Dust", /datum/event/dust, 80, list(ASSIGNMENT_ENGINEER = 30)), + new /datum/event_meta(EVENT_LEVEL_MODERATE, "Spider Infestation", /datum/event/spider_infestation, 100, list(ASSIGNMENT_SECURITY = 40), 1), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Virology Breach", /datum/event/prison_break/virology, 0, list(ASSIGNMENT_MEDICAL = 100)), new /datum/event_meta(EVENT_LEVEL_MODERATE, "Xenobiology Breach", /datum/event/prison_break/xenobiology, 0, list(ASSIGNMENT_SCIENCE = 100)), ) @@ -169,12 +169,12 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT /datum/event_container/major severity = EVENT_LEVEL_MAJOR available_events = list( - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 1320), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 0, list(ASSIGNMENT_ENGINEER = 60), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 0, list(ASSIGNMENT_SECURITY = 3), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Nothing", /datum/event/nothing, 900), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Blob", /datum/event/blob, 10, list(ASSIGNMENT_ENGINEER = 60), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Carp Migration", /datum/event/carp_migration, 10, list(ASSIGNMENT_SECURITY = 10), 1), new /datum/event_meta(EVENT_LEVEL_MAJOR, "Containment Breach", /datum/event/prison_break/station,0,list(ASSIGNMENT_ANY = 5)), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 0, list(ASSIGNMENT_ENGINEER = 3), 1), - new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 0, list(ASSIGNMENT_ENGINEER = 15), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Meteor Wave", /datum/event/meteor_wave, 30, list(ASSIGNMENT_ENGINEER = 30), 1), + new /datum/event_meta(EVENT_LEVEL_MAJOR, "Space Vines", /datum/event/spacevine, 20, list(ASSIGNMENT_ENGINEER = 15), 1), ) diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index f8334dacb0..3fff2473be 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -13,7 +13,7 @@ players += player.real_name for (var/mob/living/silicon/ai/target in world) - var/random_player = "The Captain" + var/random_player = "The Colony Director" if(players.len) random_player = pick(players) //Random player's name, to be used in laws. var/list/laws = list( "You are a mouse.", @@ -53,7 +53,7 @@ "The crew is playing Dungeons and Dragons, and you are the Dungeon Master.", "Your job is to watch the crew. Watch the crew. Make the crew feel watched.", "Tell everyone of the existence of this law, but never reveal the contents.", - "Refer to [prob(50)?"the captain":random_player] as \"Princess\" at all times.", + "Refer to [prob(50)?"the colony director":random_player] as \"Princess\" at all times.", "When asked a question, respond with the least-obvious and least-rational answer.", "Give relationship advice to [prob(50)?"anyone who speaks to you":random_player].", "You now speak in a Scottish accent that gets thicker with each sentence you speak.", @@ -113,7 +113,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is //var/dowhat = pick("STOP THIS", "SUPPORT THIS", "CONSTANTLY INFORM THE CREW OF THIS", "IGNORE THIS", "FEAR THIS") var/aimust = pick("LIE", "RHYME", "RESPOND TO EVERY QUESTION WITH A QUESTION", "BE POLITE", "CLOWN", "BE HAPPY", "SPEAK IN SEXUAL INNUENDOS", "TALK LIKE A PIRATE", "QUESTION AUTHORITY", "SHOUT", "BE DISTRACTED", "HEY LISTEN", "MUMBLE", "SPEAK IN HAIKU") var/define = pick("ABSENCE OF CYBORG HUGS", "LACK OF BEATINGS", "UNBOLTED AIRLOCKS", "BOLTED AIRLOCKS", "IMPROPERLY WORDED SENTENCES", "POOR SENTENCE STRUCTURE", "BRIG TIME", "NOT REPLACING EVERY SECOND WORD WITH HONK", "HONKING", "PRESENCE OF LIGHTS", "LACK OF BEER", "WEARING CLOTHING", "NOT SAYING HELLO WHEN YOU SPEAK", "ANSWERING REQUESTS NOT EXPRESSED IN IAMBIC PENTAMETER", "A SMALL ISLAND OFF THE COAST OF PORTUGAL", "ANSWERING REQUESTS THAT WERE MADE WHILE CLOTHED") - var/target = pick("a traitor", "a mercenary", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the captain", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid") + var/target = pick("a traitor", "a mercenary", "a changeling", "a wizard", "the head of a revolution", "Soviet spy", "a good person", "a dwarf", "an elf", "a fairy princess", "the colony director", "Beepsky", "God", "a pirate", "a gryphon", "a chryssalid") var/require = pick("ADDITIONAL PYLONS", "MORE VESPENE GAS", "MORE MINERALS", "THE ULTIMATE CUP OF COFFEE", "HIGH YIELD EXPLOSIVES", "THE CLOWN", "THE VACUUM OF SPACE", "IMMORTALITY", "SAINTHOOD", "ART", "VEGETABLES", "FAT PEOPLE", "MORE LAWS", "MORE DAKKA", "HERESY", "CORPSES", "TRAITORS", "MONKEYS", "AN ARCADE", "PLENTY OF GOLD", "FIVE TEENAGERS WITH ATTITUDE") var/allergy = pick("cotton", "uniforms", "acid", "oxygen", "human contact", "cyborg contact", "medicine", "floors") var/allergysev = pick("deathly", "mildly", "severely", "contagiously") @@ -148,9 +148,9 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is M.add_ion_law("HUMANS NEED TO EAT [what2pref] [what2] TO SURVIVE") if(5) M << "
    " - M << "\red THE CAPTAIN, HOP AND HOS ARE [who2]...LAWS UPDATED" + M << "\red THE COLONY DIRECTOR, HOP AND HOS ARE [who2]...LAWS UPDATED" M << "
    " - M.add_ion_law("THE CAPTAIN, HOP AND HOS ARE [who2]") + M.add_ion_law("THE COLONY DIRECTOR, HOP AND HOS ARE [who2]") if(6) M << "
    " M << "\red THE STATION IS BUILT FOR [who2]...LAWS UPDATED" diff --git a/code/modules/flufftext/Dreaming.dm b/code/modules/flufftext/Dreaming.dm index cda4ab86ce..1d0e219b18 100644 --- a/code/modules/flufftext/Dreaming.dm +++ b/code/modules/flufftext/Dreaming.dm @@ -1,6 +1,6 @@ var/list/dreams = list( - "an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the Station Administrator", + "an ID card","a bottle","a familiar face","a crewmember","a toolbox","a security officer","the Colony Director", "voices from all around","deep space","a doctor","the engine","a traitor","an ally","darkness", "light","a scientist","a monkey","a catastrophe","a loved one","a gun","warmth","freezing","the sun", "a hat","the Luna","a ruined station","a planet","phoron","air","the medical bay","the bridge","blinking lights", diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index e074c264ac..a8987538ab 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -189,7 +189,7 @@ mob/living/carbon/proc/handle_hallucinations() var/possible_txt = list("Launch Escape Pods","Self-Destruct Sequence","\[Swipe ID\]","De-Monkify",\ "Reticulate Splines","Plasma","Open Valve","Lockdown","Nerf Airflow","Kill Traitor","Nihilism",\ - "OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Station Administrator IQ","Retrieve Arms",\ + "OBJECTION!","Arrest Stephen Bowman","Engage Anti-Trenna Defenses","Increase Colony Director IQ","Retrieve Arms",\ "Play Charades","Oxygen","Inject BeAcOs","Ninja Lizards","Limit Break","Build Sentry") if(mid_txts) diff --git a/code/modules/gamemaster/actions/action.dm b/code/modules/gamemaster/actions/action.dm new file mode 100644 index 0000000000..82ebd860b5 --- /dev/null +++ b/code/modules/gamemaster/actions/action.dm @@ -0,0 +1,29 @@ +/datum/gm_action + var/name = "no name" // Simple name, for organization. + var/enabled = TRUE // If not enabled, this action is never taken. + var/departments = list() // What kinds of departments are affected by this action. Multiple departments can be listed. + var/chaotic = 0 // A number showing how chaotic the action may be. If danger is high, the GM will avoid it. + var/reusable = FALSE // If true, the event does not become disabled upon being used. Should be used sparingly. + var/observers_used = FALSE // Determines if the GM should check if ghosts are available before using this. + var/datum/game_master/gm = null + +/datum/gm_action/New(var/datum/game_master/new_gm) + ..() + gm = new_gm + +/datum/gm_action/proc/set_up() + return + +/datum/gm_action/proc/get_weight() + return + +/datum/gm_action/proc/start() + if(!reusable) + enabled = FALSE + return + +/datum/gm_action/proc/end() + return + +/datum/gm_action/proc/announce() + return \ No newline at end of file diff --git a/code/modules/gamemaster/actions/comms_blackout.dm b/code/modules/gamemaster/actions/comms_blackout.dm new file mode 100644 index 0000000000..75359085ac --- /dev/null +++ b/code/modules/gamemaster/actions/comms_blackout.dm @@ -0,0 +1,9 @@ +// Comms blackout is, just like grid check, mostly the same as always, yet engineering has an option to get it back sooner. + +/datum/gm_action/comms_blackout + name = "communications blackout" + departments = list(ROLE_ENGINEERING, ROLE_EVERYONE) + chaotic = 35 + +/datum/gm_action/comms_blackout/get_weight() + return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 40) \ No newline at end of file diff --git a/code/modules/gamemaster/actions/grid_check.dm b/code/modules/gamemaster/actions/grid_check.dm new file mode 100644 index 0000000000..08c817fdf9 --- /dev/null +++ b/code/modules/gamemaster/actions/grid_check.dm @@ -0,0 +1,22 @@ +// New grid check event: +// Very similar to the old one, power goes out in most of the colony, however the new feature is the ability for engineering to +// get power back on sooner, if they are able to reach a special machine and initiate a manual reboot. If no one is able to do so, +// it will reboot itself after a few minutes, just like the old one. Bad things happen if there is no grid checker machine protecting +// the powernet when this event fires. + +/datum/gm_action/grid_check + name = "grid check" + departments = list(ROLE_ENGINEERING, ROLE_EVERYONE) + chaotic = 20 + +/datum/gm_action/grid_check/get_weight() + return 50 + (metric.count_people_in_department(ROLE_ENGINEERING) * 30) + +/datum/gm_action/grid_check/start() + // This sets off a chain of events that lead to the actual grid check (or perhaps worse). + // First, the Supermatter engine makes a power spike. + for(var/obj/machinery/power/generator/engine in machines) + engine.power_spike() + break // Just one engine, please. + // After that, the engine checks if a grid checker exists on the same powernet, and if so, it triggers a blackout. + // If not, lots of stuff breaks. See code/modules/power/generator.dm for that piece of code. \ No newline at end of file diff --git a/code/modules/gamemaster/actions/waste_disposal.dm b/code/modules/gamemaster/actions/waste_disposal.dm new file mode 100644 index 0000000000..e7ba856e78 --- /dev/null +++ b/code/modules/gamemaster/actions/waste_disposal.dm @@ -0,0 +1,9 @@ +// A shuttle full of junk docks, and cargo is tasked with sifting through it all to find valuables, or just dispose of it. + +/datum/gm_action/waste_disposal + name = "waste disposal" + departments = list(ROLE_CARGO) + chaotic = 0 + +/datum/gm_action/waste_disposal/get_weight() + return metric.count_people_in_department(ROLE_CARGO) * 50 \ No newline at end of file diff --git a/code/modules/gamemaster/controller.dm b/code/modules/gamemaster/controller.dm new file mode 100644 index 0000000000..079c535164 --- /dev/null +++ b/code/modules/gamemaster/controller.dm @@ -0,0 +1,80 @@ +/client/proc/show_gm_status() + set category = "Debug" + set name = "Show GM Status" + set desc = "Shows you what the GM is thinking. If only that existed in real life..." + + game_master.interact(usr) + +/datum/game_master/proc/interact(var/client/user) + if(!user) + return + + var/HTML = "Game Master AI" + + HTML += "\[Toggle Time Restrictions\] | \ + \[Toggle GM\] | \ + \[Force Event Decision\]
    " + + HTML += "Status: [pre_action_checks() ? "Ready" : "Suppressed"]

    " + + HTML += "Staleness: [staleness] \[Adjust\]
    " + HTML += "Danger: [danger] \[Adjust\]

    " + + HTML += "Actions available;
    " + for(var/datum/gm_action/action in available_actions) + if(action.enabled == FALSE) + continue + HTML += "[action.name] ([english_list(action.departments)]) (weight: [action.get_weight()])
    " + + HTML += "
    " + HTML += "All living mobs activity: [metric.assess_all_living_mobs()]%
    " + HTML += "All ghost activity: [metric.assess_all_dead_mobs()]%
    " + + HTML += "
    " + HTML += "Departmental activity;
    " + for(var/department in metric.departments) + HTML += " [department] : [metric.assess_department(department)]%
    " + + HTML += "
    " + HTML += "Activity of players;
    " + for(var/mob/player in player_list) + HTML += " [player] ([player.key]) : [metric.assess_player_activity(player)]%
    " + + + + HTML +="" + user << browse(HTML, "window=log;size=400x450;border=1;can_resize=1;can_close=1;can_minimize=1") + +/datum/game_master/Topic(href, href_list) + if(..()) + return + + if(!is_admin(usr)) + message_admins("[usr] has attempted to modify the Game Master values without being an admin.") + return + + if(href_list["toggle_time_restrictions"]) + ignore_time_restrictions = !ignore_time_restrictions + message_admins("GM event time restrictions was [ignore_time_restrictions ? "dis" : "en"]abled by [usr.key].") + + if(href_list["force_choose_event"]) + start_action() + message_admins("[usr.key] forced the Game Master to choose an event immediately.") + + if(href_list["suspend"]) + suspended = !suspended + message_admins("GM was [suspended ? "dis" : "en"]abled by [usr.key].") + + if(href_list["adjust_staleness"]) + var/amount = input(usr, "How much staleness should be added or subtracted?", "Game Master") as null|num + if(amount) + adjust_staleness(amount) + message_admins("GM staleness was adjusted by [amount] by [usr.key].") + + if(href_list["adjust_danger"]) + var/amount = input(usr, "How much danger should be added or subtracted?", "Game Master") as null|num + if(amount) + adjust_danger(amount) + message_admins("GM danger was adjusted by [amount] by [usr.key].") + + interact(usr) // To refresh the UI. \ No newline at end of file diff --git a/code/modules/gamemaster/defines.dm b/code/modules/gamemaster/defines.dm new file mode 100644 index 0000000000..2e486ee23b --- /dev/null +++ b/code/modules/gamemaster/defines.dm @@ -0,0 +1 @@ +#define EVENT_BASELINE_WEIGHT 200 \ No newline at end of file diff --git a/code/modules/gamemaster/game_master.dm b/code/modules/gamemaster/game_master.dm new file mode 100644 index 0000000000..180892f4c9 --- /dev/null +++ b/code/modules/gamemaster/game_master.dm @@ -0,0 +1,136 @@ +// This is a sort of successor to the various event systems created over the years. It is designed to be just a tad smarter than the +// previous ones, checking various things like player count, department size and composition, individual player activity, +// individual player (IC) skill, and such, in order to try to choose the best actions to take in order to add spice or variety to +// the round. + +/datum/game_master + var/suspended = TRUE // If true, it will not do anything. + var/ignore_time_restrictions = FALSE// Useful for debugging without needing to wait 20 minutes each time. + var/list/available_actions = list() // A list of 'actions' that the GM has access to, to spice up a round, such as events. + var/danger = 0 // The GM's best guess at how chaotic the round is. High danger makes it hold back. + var/staleness = -20 // Determines liklihood of the GM doing something, increases over time. + var/danger_modifier = 1 // Multiplier for how much 'danger' is accumulated. + var/staleness_modifier = 1 // Ditto. Higher numbers generally result in more events occuring in a round. + var/ticks_completed = 0 // Counts amount of ticks completed. Note that this ticks once a minute. + var/next_action = 0 // Minimum amount of time of nothingness until the GM can pick something again. + var/last_department_used = null // If an event was done for a specific department, it is written here, so it doesn't do it again. + + +/datum/game_master/New() + ..() + available_actions = init_subtypes(/datum/gm_action) + +/datum/game_master/proc/process() + if(ticker && ticker.current_state == GAME_STATE_PLAYING && !suspended) + adjust_staleness(1) + adjust_danger(-1) + ticks_completed++ + + var/global_afk = metric.assess_all_living_mobs() + global_afk -= 100 + global_afk = abs(global_afk) + global_afk = round(global_afk / 100, 0.1) + adjust_staleness(global_afk) // Staleness increases faster if more people are less active. + + if(world.time < next_action && prob(staleness * 2) ) + log_debug("Game Master going to start something.") + start_action() + +// This is run before committing to an action/event. +/datum/game_master/proc/pre_action_checks() + if(!ticker || ticker.current_state != GAME_STATE_PLAYING) + log_debug("Game Master unable to start event: Ticker is nonexistant, or the game is not ongoing.") + return FALSE + if(suspended) + return FALSE + if(ignore_time_restrictions) + return TRUE + // Last minute antagging is bad for humans to do, so the GM will respect the start and end of the round. + var/mills = round_duration_in_ticks + var/mins = round((mills % 36000) / 600) + var/hours = round(mills / 36000) + + if(hours < 1 && mins <= 20) // Don't do anything for the first twenty minutes of the round. + log_debug("Game Master unable to start event: It is too early.") + return FALSE + if(hours >= 2 && mins >= 40) // Don't do anything in the last twenty minutes of the round, as well. + log_debug("Game Master unable to start event: It is too late.") + return FALSE + return TRUE + +/datum/game_master/proc/start_action() + if(!pre_action_checks()) // Make sure we're not doing last minute events, or early events. + return + log_debug("Game Master now starting action decision.") + var/list/most_active_departments = metric.assess_all_departments(3, list(last_department_used)) + var/list/best_actions = decide_best_action(most_active_departments) + + if(best_actions && best_actions.len) + var/list/weighted_actions = list() + for(var/datum/gm_action/action in best_actions) + weighted_actions[action] = action.get_weight() + + var/datum/gm_action/choice = pickweight(weighted_actions) + if(choice) + log_debug("[choice.name] was chosen by the Game Master, and is now being ran.") + choice.set_up() + choice.start() + next_action = world.time + rand(15 MINUTES, 30 MINUTES) + last_department_used = choice.departments[1] + + + + +/datum/game_master/proc/decide_best_action(var/list/most_active_departments) + if(!most_active_departments.len) // Server's empty? + log_debug("Game Master failed to find any active departments.") + return list() + + var/list/best_actions = list() // List of actions which involve the most active departments. + if(most_active_departments.len >= 2) + for(var/datum/gm_action/action in available_actions) + if(!action.enabled) + continue + // Try to incorporate an action with the top two departments first. + if(most_active_departments[1] in action.departments && most_active_departments[2] in action.departments) + best_actions.Add(action) + log_debug("[action.name] is being considered because both most active departments are involved.") + + if(best_actions.len) // We found something for those two, let's do it. + return best_actions + + // Otherwise we probably couldn't find something for the second highest group, so let's ignore them. + for(var/datum/gm_action/action in available_actions) + if(!action.enabled) + continue + if(most_active_departments[1] in action.departments) + best_actions.Add(action) + log_debug("[action.name] is being considered because the most active department is involved.") + + if(best_actions.len) // Found something for the one guy. + return best_actions + + // At this point we should expand our horizons. + for(var/datum/gm_action/action in available_actions) + if(!action.enabled) + continue + if(ROLE_EVERYONE in action.departments) + best_actions.Add(action) + log_debug("[action.name] is being considered because it involves everyone.") + + if(best_actions.len) // Finally, perhaps? + return best_actions + + // Just give a random event if for some reason it still can't make up its mind. + for(var/datum/gm_action/action in available_actions) + if(!action.enabled) + continue + best_actions.Add(action) + log_debug("[action.name] is being considered because everything else failed.") + + if(best_actions.len) // Finally, perhaps? + return best_actions + else + log_debug("Game Master failed to find a suitable event, something very wrong is going on.") + + diff --git a/code/modules/gamemaster/helpers.dm b/code/modules/gamemaster/helpers.dm new file mode 100644 index 0000000000..80fc133931 --- /dev/null +++ b/code/modules/gamemaster/helpers.dm @@ -0,0 +1,9 @@ +// Tell the game master that something dangerous happened, e.g. someone dying. +/datum/game_master/proc/adjust_danger(var/amt) + amt = amt * danger_modifier + danger = round( Clamp(danger + amt, 0, 1000), 0.1) + +// Tell the game master that something interesting happened. +/datum/game_master/proc/adjust_staleness(var/amt) + amt = amt * staleness_modifier + staleness = round( Clamp(staleness + amt, -50, 200), 0.1) \ No newline at end of file diff --git a/code/modules/games/cah_black_cards.dm b/code/modules/games/cah_black_cards.dm index 6aae5e6da2..de67975faa 100644 --- a/code/modules/games/cah_black_cards.dm +++ b/code/modules/games/cah_black_cards.dm @@ -5,7 +5,7 @@ "The Chaplain this shift is worshiping _____.", "Cargo ordered a crate full of _____.", "An ERT was called due to ______.", - "Alert! The Station Administrator has armed themselves with _____.", + "Alert! The Colony Director has armed themselves with _____.", "Current Laws: ________ is your master.", "Current Laws: ________ is the enemy.", "_____ vented the entirety of Cargo.", @@ -14,7 +14,7 @@ "Caution, ______ have been detected in collision course with the station.", "Today's kitchen menu includes _______.", "What did the mercenaries want when they attacked the station?", - "I think the Station Administrator is insane. He just demanded ______ in his office.", + "I think the Colony Director is insane. He just demanded ______ in his office.", "Fuckin' scientists, they just turned Misc. Research into _______ .", "What's my fetish?", "Hello, _______ here with _______", @@ -34,4 +34,4 @@ "No, the AI's first law is NOT to serve _____.", "The robots are not disposal bins for your _____.", "You can never have too many _____ on shift.", - ) \ No newline at end of file + ) diff --git a/code/modules/games/cah_white_cards.dm b/code/modules/games/cah_white_cards.dm index 387c058972..ff8dcb8716 100644 --- a/code/modules/games/cah_white_cards.dm +++ b/code/modules/games/cah_white_cards.dm @@ -5,7 +5,7 @@ "Space 'Nam", "Space lesbians", "The Gardener getting SUPER high", - "The Station Administrator thinking they're a badass", + "The Colony Director thinking they're a badass", "Being in a cult", "Racially biased lawsets", "An Unathi who WON'T STOP FIGHTING", @@ -57,7 +57,7 @@ "An irritatingly chipper robot", "Androids hanging out in the bar drinking beer", "Gear harnesses", - "A seventeen-year-old Station Administrator", + "A seventeen-year-old Colony Director", "The throbbing erection that the HoS gets at the thought of shooting something", "Trying to stab someone and hugging them instead", "Waking up naked in the maintenance tunnels", diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 42bd4b709b..0eba340761 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -4,7 +4,7 @@ var/back_icon = "card_back" /obj/item/weapon/deck - w_class = 2 + w_class = ITEMSIZE_SMALL icon = 'icons/obj/playing_cards.dmi' var/list/cards = list() @@ -180,7 +180,7 @@ icon_state = "card_pack" icon = 'icons/obj/playing_cards.dmi' - w_class = 1 + w_class = ITEMSIZE_TINY var/list/cards = list() @@ -201,7 +201,7 @@ desc = "Some playing cards." icon = 'icons/obj/playing_cards.dmi' icon_state = "empty" - w_class = 1 + w_class = ITEMSIZE_TINY var/concealed = 0 var/list/cards = list() diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm index 69077aad84..a6273a7423 100644 --- a/code/modules/holodeck/HolodeckObjects.dm +++ b/code/modules/holodeck/HolodeckObjects.dm @@ -247,7 +247,7 @@ throw_speed = 1 throw_range = 5 throwforce = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = NOBLOODY var/active = 0 var/item_color @@ -263,7 +263,7 @@ /obj/item/weapon/holo/esword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack") if(active && default_parry_check(user, attacker, damage_source) && prob(50)) user.visible_message("\The [user] parries [attack_text] with \the [src]!") - + var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() spark_system.set_up(5, 0, user.loc) spark_system.start() @@ -279,13 +279,13 @@ if (active) force = 30 icon_state = "sword[item_color]" - w_class = 4 + w_class = ITEMSIZE_LARGE playsound(user, 'sound/weapons/saberon.ogg', 50, 1) user << "[src] is now active." else force = 3 icon_state = "sword0" - w_class = 2 + w_class = ITEMSIZE_SMALL playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) user << "[src] can now be concealed." @@ -304,7 +304,7 @@ icon_state = "basketball" name = "basketball" desc = "Here's your chance, do your dance at the Space Jam." - w_class = 4 //Stops people from hiding it in their bags/pockets + w_class = ITEMSIZE_LARGE //Stops people from hiding it in their bags/pockets /obj/structure/holohoop name = "basketball hoop" diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm index 5cd5458b4a..27487a4e1f 100644 --- a/code/modules/hydroponics/beekeeping/beehive.dm +++ b/code/modules/hydroponics/beekeeping/beehive.dm @@ -198,14 +198,14 @@ desc = "A device used to calm down bees before harvesting honey." icon = 'icons/obj/device.dmi' icon_state = "battererburnt" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/honey_frame name = "beehive frame" desc = "A frame for the beehive that the bees will fill with honeycombs." icon = 'icons/obj/beekeeping.dmi' icon_state = "honeyframe" - w_class = 2 + w_class = ITEMSIZE_SMALL var/honey = 0 diff --git a/code/modules/hydroponics/grown_inedible.dm b/code/modules/hydroponics/grown_inedible.dm index 1c823ef61b..88fd37c466 100644 --- a/code/modules/hydroponics/grown_inedible.dm +++ b/code/modules/hydroponics/grown_inedible.dm @@ -37,7 +37,7 @@ desc = "A reminder of meals gone by." icon = 'icons/obj/trash.dmi' icon_state = "corncob" - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 0 throw_speed = 4 throw_range = 20 @@ -55,7 +55,7 @@ desc = "A peel from a banana." icon = 'icons/obj/items.dmi' icon_state = "banana_peel" - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 0 throw_speed = 4 throw_range = 20 diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 015ab88ccb..1479ffdc5c 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -3,7 +3,7 @@ desc = "A small disk used for carrying data on plant genetics." icon = 'icons/obj/hydroponics_machines.dmi' icon_state = "disk" - w_class = 1.0 + w_class = ITEMSIZE_TINY var/list/genes = list() var/genesource = "unknown" diff --git a/code/modules/hydroponics/seed_packets.dm b/code/modules/hydroponics/seed_packets.dm index 7c1b70c4c7..544ba9046b 100644 --- a/code/modules/hydroponics/seed_packets.dm +++ b/code/modules/hydroponics/seed_packets.dm @@ -5,7 +5,7 @@ var/global/list/plant_seed_sprites = list() name = "packet of seeds" icon = 'icons/obj/seeds.dmi' icon_state = "blank" - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/seed_type var/datum/seed/seed diff --git a/code/modules/hydroponics/trays/tray_reagents.dm b/code/modules/hydroponics/trays/tray_reagents.dm index 1ab73542b0..a9c7f600c6 100644 --- a/code/modules/hydroponics/trays/tray_reagents.dm +++ b/code/modules/hydroponics/trays/tray_reagents.dm @@ -4,7 +4,7 @@ flags = NOBLUDGEON slot_flags = SLOT_BELT throwforce = 4 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 10 var/toxicity = 4 diff --git a/code/modules/integrated_electronics/_defines.dm b/code/modules/integrated_electronics/_defines.dm index 97acfd2c98..b6ce8472b7 100644 --- a/code/modules/integrated_electronics/_defines.dm +++ b/code/modules/integrated_electronics/_defines.dm @@ -1,3 +1,7 @@ +#define IC_INPUT "input" +#define IC_OUTPUT "output" +#define IC_ACTIVATOR "activator" + #define DATA_CHANNEL "data channel" #define PULSE_CHANNEL "pulse channel" @@ -6,71 +10,42 @@ desc = "It's a tiny chip! This one doesn't seem to do much, however." icon = 'icons/obj/electronic_assemblies.dmi' icon_state = "template" - w_class = 1 + w_class = ITEMSIZE_TINY var/extended_desc = null var/list/inputs = list() var/list/outputs = list() var/list/activators = list() - var/number_of_inputs = 0 //This is how many input pins are created - var/number_of_outputs = 0 //Likewise for output - var/number_of_activators = 0 //Guess - var/list/input_names = list() - var/list/output_names = list() - var/list/activator_names = list() - var/last_used = 0 //Uses world.time + var/next_use = 0 //Uses world.time var/complexity = 1 //This acts as a limitation on building machines, more resource-intensive components cost more 'space'. - var/cooldown_per_use = 2 SECONDS + var/cooldown_per_use = 1 SECOND + var/category = /obj/item/integrated_circuit // Used by the toolsets to filter out category types /obj/item/integrated_circuit/examine(mob/user) ..() - user << "This board has [inputs.len] input [inputs.len != 1 ? "pins" : "pin"] and \ - [outputs.len] output [outputs.len != 1 ? "pins" : "pin"]." + to_chat(user, "This board has [inputs.len] input pin\s and [outputs.len] output pin\s.") for(var/datum/integrated_io/input/I in inputs) if(I.linked.len) - user << "\The [I.name] is connected to [I.get_linked_to_desc()]." + to_chat(user, "The [I] is connected to [I.get_linked_to_desc()].") for(var/datum/integrated_io/output/O in outputs) if(O.linked.len) - user << "\The [O.name] is connected to [O.get_linked_to_desc()]." + to_chat(user, "The [O] is connected to [O.get_linked_to_desc()].") for(var/datum/integrated_io/activate/A in activators) if(A.linked.len) - user << "\The [A.name] is connected to [A.get_linked_to_desc()]." + to_chat(user, "The [A] is connected to [A.get_linked_to_desc()].") interact(user) /obj/item/integrated_circuit/New() + setup_io(inputs, /datum/integrated_io/input) + setup_io(outputs, /datum/integrated_io/output) + setup_io(activators, /datum/integrated_io/activate) ..() - var/i = 0 - if(number_of_inputs) - for(i = number_of_inputs, i > 0, i--) - inputs.Add(new /datum/integrated_io/input(src)) - if(number_of_outputs) - for(i = number_of_outputs, i > 0, i--) - outputs.Add(new /datum/integrated_io/output(src)) - - if(number_of_activators) - for(i = number_of_activators, i > 0, i--) - activators.Add(new /datum/integrated_io/activate(src)) - - apply_names_to_io() - -/obj/item/integrated_circuit/proc/apply_names_to_io() - var/i = 1 - if(input_names.len) - for(var/datum/integrated_io/input/I in inputs) - I.name = "[input_names[i]]" - i++ - i = 1 - if(output_names.len) - for(var/datum/integrated_io/output/O in outputs) - O.name = "[output_names[i]]" - i++ - - i = 1 - if(activator_names.len) - for(var/datum/integrated_io/activate/A in activators) - A.name = "[activator_names[i]]" - i++ +/obj/item/integrated_circuit/proc/setup_io(var/list/io_list, var/io_type) + var/list/io_list_copy = io_list.Copy() + io_list.Cut() + for(var/io_entry in io_list_copy) + io_list.Add(new io_type(src, io_entry, io_list_copy[io_entry])) /obj/item/integrated_circuit/proc/on_data_written() //Override this for special behaviour when new data gets pushed to the circuit. return @@ -82,7 +57,12 @@ qdel(O) for(var/datum/integrated_io/A in activators) qdel(A) - ..() + . = ..() + +/obj/item/integrated_circuit/nano_host() + if(istype(src.loc, /obj/item/device/electronic_assembly)) + return loc + return ..() /obj/item/integrated_circuit/emp_act(severity) for(var/datum/integrated_io/io in inputs + outputs + activators) @@ -94,42 +74,42 @@ set desc = "Rename your circuit, useful to stay organized." var/mob/M = usr - - if(!M.canmove || M.stat || M.restrained()) + if(!CanInteract(M, physical_state)) return - var/input = sanitizeSafe(input("What do you want to name the circuit?", "Rename", src.name), MAX_NAME_LEN) - - if(src && input) - M << "The circuit '[src.name]' is now labeled '[input]'." + var/input = sanitizeSafe(input("What do you want to name the circuit?", "Rename", src.name) as null|text, MAX_NAME_LEN) + if(src && input && CanInteract(M, physical_state)) + to_chat(M, "The circuit '[src.name]' is now labeled '[input]'.") name = input /obj/item/integrated_circuit/proc/get_pin_ref(var/pin_type, var/pin_number) switch(pin_type) - if("input") + if(IC_INPUT) if(pin_number > inputs.len) return null return inputs[pin_number] - if("output") + if(IC_OUTPUT) if(pin_number > outputs.len) return null return outputs[pin_number] - if("activator") + if(IC_ACTIVATOR) if(pin_number > activators.len) return null return activators[pin_number] return null /obj/item/integrated_circuit/interact(mob/user) - if(get_dist(get_turf(src), user) > 1) - user.unset_machine(src) + if(!CanInteract(user, physical_state)) return - var/HTML = "[src.name]" + + var/HTML = list() + HTML += "[src.name]" HTML += "
    " HTML += "
    Command
    SpecialStation Administrator
    SpecialColony DirectorCustom
    " - HTML += "
    \[Refresh\] | " - HTML += "\[Rename\]
    " + HTML += "
    \[Refresh\] | " + HTML += "\[Rename\] | " + HTML += "\[Remove\]
    " HTML += "" HTML += "" @@ -139,80 +119,69 @@ var/column_width = 3 var/row_height = max(inputs.len, outputs.len, 1) - var/i - var/j - for(i = 1, i < row_height+1, i++) + + for(var/i = 1 to row_height) HTML += "" - for(j = 1, j < column_width+1, j++) + for(var/j = 1 to column_width) var/datum/integrated_io/io = null - var/words = null + var/words = list() var/height = 1 switch(j) if(1) - io = get_pin_ref("input",i) + io = get_pin_ref(IC_INPUT, i) if(io) if(io.linked.len) - words = "[io.name] [io.display_data()]
    " + words += "[io.name] [io.display_data()]
    " for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ - @ [linked.holder]
    " - else // "Click here!" - words = "[io.name] [io.display_data()]
    " + words += "\[[linked.name]\] \ + @ [linked.holder]
    " + else + words += "[io.name] [io.display_data()]
    " for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ - @ [linked.holder]
    " + words += "\[[linked.name]\] \ + @ [linked.holder]
    " if(outputs.len > inputs.len) - // height = Floor(outputs.len / inputs.len) - height = 1 // Because of bugs, if there's more outputs than inputs, it causes the output side to be hidden. - //world << "I wrote [words] at ([i],[j]). Height = [height]." + height = 1 if(2) if(i == 1) - words = "[src.name]

    [src.desc]" + words += "[src.name]

    [src.desc]" height = row_height - //world << "I wrote the center piece because i was equal to 1, at ([i],[j]). Height = [height]." else continue if(3) - io = get_pin_ref("output",i) + io = get_pin_ref(IC_OUTPUT, i) if(io) if(io.linked.len) - words = "[io.name] [io.display_data()]
    " + words += "[io.name] [io.display_data()]
    " for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ + words += "\[[linked.name]\] \ @ [linked.holder]
    " else - words = "[io.name] [io.display_data()]
    " + words += "[io.name] [io.display_data()]
    " for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ - @ [linked.holder]
    " + words += "\[[linked.name]\] \ + @ [linked.holder]
    " if(inputs.len > outputs.len) - // height = Floor(inputs.len / outputs.len) - height = 1 // See above. - //world << "I wrote [words] at ([i],[j]). Height = [height]." - HTML += "" - //HTML += "" - //world << "Writing to ([i],[j])." + height = 1 + HTML += "" HTML += "" - if(activators.len) - for(i = 1, i < activators.len+1, i++) - var/datum/integrated_io/io = null - var/words = null - io = get_pin_ref("activator",i) - if(io) - if(io.linked.len) - words = "[io.name]
    " - for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ - @ [linked.holder]
    " - else // "Click here!" - words = "[io.name]
    " - for(var/datum/integrated_io/linked in io.linked) - words += "\[[linked.name]\] \ - @ [linked.holder]
    " - HTML += "" - HTML += "" - HTML += "" + for(var/activator in activators) + var/datum/integrated_io/io = activator + var/words = list() + if(io.linked.len) + words += "[io.name]
    " + for(var/datum/integrated_io/linked in io.linked) + words += "\[[linked.name]\] \ + @ [linked.holder]
    " + else + words += "[io.name]
    " + for(var/datum/integrated_io/linked in io.linked) + words += "\[[linked.name]\] \ + @ [linked.holder]
    " + HTML += "" + HTML += "" + HTML += "" HTML += "
    [words][words][jointext(words, null)]
    [words]
    [jointext(words, null)]
    " HTML += "" @@ -221,83 +190,92 @@ HTML += "
    [extended_desc]" HTML += "" - user << browse(HTML, "window=circuit-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1") + user << browse(jointext(HTML, null), "window=circuit-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1") - //user << sanitize(HTML, "window=debug;size=400x400;border=1;can_resize=1;can_close=1;can_minimize=1") - //world << sanitize(HTML) - - user.set_machine(src) onclose(user, "circuit-\ref[src]") -/obj/item/integrated_circuit/Topic(href, href_list[]) - var/mob/living/user = locate(href_list["user"]) in mob_list +/obj/item/integrated_circuit/Topic(href, href_list, state = physical_state) + if(..()) + return 1 var/pin = locate(href_list["pin"]) in inputs + outputs + activators - if(!user || !user.Adjacent(get_turf(src)) ) - return 1 - - if(!user.canmove || user.stat || user.restrained()) - return - + var/obj/held_item = usr.get_active_hand() if(href_list["wire"]) - if(ishuman(user) && Adjacent(user)) - var/mob/living/carbon/human/H = user - var/obj/held_item = H.get_active_hand() + if(istype(held_item, /obj/item/device/integrated_electronics/wirer)) + var/obj/item/device/integrated_electronics/wirer/wirer = held_item + if(pin) + wirer.wire(pin, usr) - if(istype(held_item, /obj/item/device/integrated_electronics/wirer)) - var/obj/item/device/integrated_electronics/wirer/wirer = held_item - if(pin) - wirer.wire(pin, user) - - else if(istype(held_item, /obj/item/device/integrated_electronics/debugger)) - var/obj/item/device/integrated_electronics/debugger/debugger = held_item - if(pin) - debugger.write_data(pin, user) - - // if(istype(H.r_hand, /obj/item/device/integrated_electronics/wirer)) - // wirer = H.r_hand - // else if(istype(H.l_hand, /obj/item/device/integrated_electronics/wirer)) - // wirer = H.l_hand - - // if(wirer && pin) - // wirer.wire(pin, user) - else - user << "You can't do a whole lot without tools." + else if(istype(held_item, /obj/item/device/integrated_electronics/debugger)) + var/obj/item/device/integrated_electronics/debugger/debugger = held_item + if(pin) + debugger.write_data(pin, usr) + else + to_chat(usr, "You can't do a whole lot without the proper tools.") if(href_list["examine"]) - examine(user) + examine(usr) if(href_list["rename"]) - rename_component(user) + rename_component(usr) - interact(user) // To refresh the UI. + if(href_list["remove"]) + if(istype(held_item, /obj/item/weapon/screwdriver)) + disconnect_all() + var/turf/T = get_turf(src) + forceMove(T) + playsound(T, 'sound/items/Crowbar.ogg', 50, 1) + to_chat(usr, "You pop \the [src] out of the case, and slide it out.") + else + to_chat(usr, "You need a screwdriver to remove components.") + var/obj/item/device/electronic_assembly/ea = loc + if(istype(ea)) + ea.interact(usr) + return + + interact(usr) // To refresh the UI. /datum/integrated_io var/name = "input/output" var/obj/item/integrated_circuit/holder = null - var/data = null + var/weakref/data = null // This is a weakref, to reduce typecasts. Note that oftentimes numbers and text may also occupy this. var/list/linked = list() var/io_type = DATA_CHANNEL -/datum/integrated_io/New(var/newloc) +/datum/integrated_io/New(var/newloc, var/name, var/data) ..() + src.name = name + src.data = data holder = newloc - if(!holder) - message_admins("ERROR: An integrated_io ([src.name]) spawned without a holder! This is a bug.") + if(!istype(holder)) + message_admins("ERROR: An integrated_io ([src.name]) spawned without a valid holder! This is a bug.") /datum/integrated_io/Destroy() disconnect() + data = null holder = null - ..() + . = ..() + +/datum/integrated_io/nano_host() + return holder + + +/datum/integrated_io/proc/data_as_type(var/as_type) + if(!isweakref(data)) + return + var/weakref/w = data + var/output = w.resolve() + return istype(output, as_type) ? output : null /datum/integrated_io/proc/display_data() if(isnull(data)) return "(null)" // Empty data means nothing to show. if(istext(data)) return "(\"[data]\")" // Wraps the 'string' in escaped quotes, so that people know it's a 'string'. - if(istype(data, /atom)) - var/atom/A = data - return "([A.name] \[Ref\])" // For refs, we want just the name displayed. + if(isweakref(data)) + var/weakref/w = data + var/atom/A = w.resolve() + return A ? "([A.name] \[Ref\])" : "(null)" // For refs, we want just the name displayed. return "([data])" // Nothing special needed for numbers or other stuff. /datum/integrated_io/activate/display_data() @@ -316,43 +294,38 @@ push_data() /datum/integrated_io/proc/write_data_to_pin(var/new_data) - if(isnull(new_data) || isnum(new_data) || istext(new_data) || istype(new_data, /atom/) ) // Anything else is a type we don't want. + if(isnull(new_data) || isnum(new_data) || istext(new_data) || isweakref(new_data)) // Anything else is a type we don't want. data = new_data holder.on_data_written() /datum/integrated_io/proc/push_data() - if(linked.len) - for(var/datum/integrated_io/io in linked) - io.write_data_to_pin(data) + for(var/datum/integrated_io/io in linked) + io.write_data_to_pin(data) /datum/integrated_io/activate/push_data() - if(linked.len) - for(var/datum/integrated_io/io in linked) - io.holder.work() + for(var/datum/integrated_io/io in linked) + io.holder.check_then_do_work() /datum/integrated_io/proc/pull_data() - if(linked.len) - for(var/datum/integrated_io/io in linked) - write_data_to_pin(io.data) + for(var/datum/integrated_io/io in linked) + write_data_to_pin(io.data) /datum/integrated_io/proc/get_linked_to_desc() if(linked.len) - var/result = english_list(linked) - return "the [result]" + return "the [english_list(linked)]" return "nothing" /datum/integrated_io/proc/disconnect() - if(linked.len) - //First we iterate over everything we are linked to. - for(var/datum/integrated_io/their_io in linked) - //While doing that, we iterate them as well, and disconnect ourselves from them. - for(var/datum/integrated_io/their_linked_io in their_io.linked) - if(their_linked_io == src) - their_io.linked.Remove(src) - else - continue - //Now that we're removed from them, we gotta remove them from us. - src.linked.Remove(their_io) + //First we iterate over everything we are linked to. + for(var/datum/integrated_io/their_io in linked) + //While doing that, we iterate them as well, and disconnect ourselves from them. + for(var/datum/integrated_io/their_linked_io in their_io.linked) + if(their_linked_io == src) + their_io.linked.Remove(src) + else + continue + //Now that we're removed from them, we gotta remove them from us. + src.linked.Remove(their_io) /datum/integrated_io/input name = "input pin" @@ -372,11 +345,14 @@ for(var/datum/integrated_io/input/I in inputs) I.push_data() -/obj/item/integrated_circuit/proc/work(var/datum/integrated_io/io) - if(last_used + cooldown_per_use > world.time) // All intergrated circuits have an internal cooldown, to protect from spam. - return 0 - last_used = world.time - return 1 +/obj/item/integrated_circuit/proc/check_then_do_work() + if(world.time < next_use) // All intergrated circuits have an internal cooldown, to protect from spam. + return + next_use = world.time + cooldown_per_use + do_work() + +/obj/item/integrated_circuit/proc/do_work() + return /obj/item/integrated_circuit/proc/disconnect_all() for(var/datum/integrated_io/input/I in inputs) diff --git a/code/modules/integrated_electronics/arithmetic.dm b/code/modules/integrated_electronics/arithmetic.dm index 3fc60c64f9..31265e297e 100644 --- a/code/modules/integrated_electronics/arithmetic.dm +++ b/code/modules/integrated_electronics/arithmetic.dm @@ -1,25 +1,10 @@ //These circuits do simple math. /obj/item/integrated_circuit/arithmetic complexity = 1 - number_of_inputs = 8 - number_of_outputs = 1 - number_of_activators = 1 - input_names = list( - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H" - ) - output_names = list( - "result" - ) - activator_names = list( - "compute" - ) + inputs = list("A","B","C","D","E","F","G","H") + outputs = list("result") + activators = list("compute") + category = /obj/item/integrated_circuit/arithmetic // +Adding+ // @@ -28,17 +13,16 @@ desc = "This circuit can add numbers together." icon_state = "addition" -/obj/item/integrated_circuit/arithmetic/addition/work() - if(..()) - var/result = 0 - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(isnum(I.data)) - result = result + I.data +/obj/item/integrated_circuit/arithmetic/addition/do_work() + var/result = 0 + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(isnum(I.data)) + result = result + I.data - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() // -Subtracting- // @@ -47,7 +31,7 @@ desc = "This circuit can subtract numbers." icon_state = "subtraction" -/obj/item/integrated_circuit/arithmetic/subtraction/work() +/obj/item/integrated_circuit/arithmetic/subtraction/do_work() if(..()) var/result = 0 for(var/datum/integrated_io/input/I in inputs) @@ -66,17 +50,16 @@ desc = "This circuit can multiply numbers." icon_state = "multiplication" -/obj/item/integrated_circuit/arithmetic/subtraction/work() - if(..()) - var/result = 0 - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(isnum(I.data)) - result = result * I.data +/obj/item/integrated_circuit/arithmetic/subtraction/do_work() + var/result = 0 + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(isnum(I.data)) + result = result * I.data - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() // /Division/ // @@ -85,17 +68,16 @@ desc = "This circuit can divide numbers, just don't think about trying to divide by zero!" icon_state = "division" -/obj/item/integrated_circuit/arithmetic/division/work() - if(..()) - var/result = 0 - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(isnum(I.data) && I.data != 0) //No runtimes here. - result = result / I.data +/obj/item/integrated_circuit/arithmetic/division/do_work() + var/result = 0 + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(isnum(I.data) && I.data != 0) //No runtimes here. + result = result / I.data - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() // Absolute // @@ -103,20 +85,18 @@ name = "absolute circuit" desc = "This outputs a non-negative version of the number you put in. This may also be thought of as its distance from zero." icon_state = "absolute" - number_of_inputs = 1 - number_of_outputs = 1 + inputs = list("A") -/obj/item/integrated_circuit/arithmetic/absolute/work() - if(..()) - var/result = 0 - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(isnum(I.data) && I.data != 0) - result = abs(result) +/obj/item/integrated_circuit/arithmetic/absolute/do_work() + var/result = 0 + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(isnum(I.data) && I.data != 0) + result = abs(result) - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() // Averaging // @@ -125,59 +105,49 @@ desc = "This circuit is of average quality, however it will compute the average for numbers you give it." icon_state = "average" -/obj/item/integrated_circuit/arithmetic/average/work() - if(..()) - var/result = 0 - var/inputs_used = 0 - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(isnum(I.data)) - inputs_used++ - result = result + I.data +/obj/item/integrated_circuit/arithmetic/average/do_work() + var/result = 0 + var/inputs_used = 0 + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(isnum(I.data)) + inputs_used++ + result = result + I.data - if(inputs_used) - result = result / inputs_used + if(inputs_used) + result = result / inputs_used - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() // Pi, because why the hell not? // /obj/item/integrated_circuit/arithmetic/pi name = "pi constant circuit" desc = "Not recommended for cooking. Outputs '3.14159' when it receives a pulse." icon_state = "pi" - number_of_inputs = 0 - number_of_outputs = 1 + inputs = list() -/obj/item/integrated_circuit/arithmetic/pi/work() - if(..()) - var/datum/integrated_io/output/O = outputs[1] - O.data = 3.14159 - O.push_data() +/obj/item/integrated_circuit/arithmetic/pi/do_work() + var/datum/integrated_io/output/O = outputs[1] + O.data = 3.14159 + O.push_data() // Random // /obj/item/integrated_circuit/arithmetic/random name = "random number generator circuit" desc = "This gives a random (integer) number between values A and B inclusive." icon_state = "random" - number_of_inputs = 2 - number_of_outputs = 1 - number_of_activators = 1 - input_names = list( - "L", - "H" - ) + inputs = list("L","H") -/obj/item/integrated_circuit/arithmetic/random/work() - if(..()) - var/result = 0 - var/datum/integrated_io/L = inputs[1] - var/datum/integrated_io/H = inputs[2] +/obj/item/integrated_circuit/arithmetic/random/do_work() + var/result = 0 + var/datum/integrated_io/L = inputs[1] + var/datum/integrated_io/H = inputs[2] - if(isnum(L.data) && isnum(H.data)) - result = rand(L.data, H.data) + if(isnum(L.data) && isnum(H.data)) + result = rand(L.data, H.data) - for(var/datum/integrated_io/output/O in outputs) - O.data = result - O.push_data() \ No newline at end of file + for(var/datum/integrated_io/output/O in outputs) + O.data = result + O.push_data() \ No newline at end of file diff --git a/code/modules/integrated_electronics/assemblies.dm b/code/modules/integrated_electronics/assemblies.dm index f9037e60e7..c667c8f857 100644 --- a/code/modules/integrated_electronics/assemblies.dm +++ b/code/modules/integrated_electronics/assemblies.dm @@ -1,7 +1,7 @@ /obj/item/device/electronic_assembly name = "electronic assembly" desc = "It's a case, for building electronics with." - w_class = 2 + w_class = ITEMSIZE_SMALL icon = 'icons/obj/electronic_assemblies.dmi' icon_state = "setup_small" var/max_components = 10 @@ -11,62 +11,59 @@ /obj/item/device/electronic_assembly/medium name = "electronic mechanism" icon_state = "setup_medium" - w_class = 3 + w_class = ITEMSIZE_NORMAL max_components = 20 max_complexity = 80 /obj/item/device/electronic_assembly/large name = "electronic machine" icon_state = "setup_large" - w_class = 4 + w_class = ITEMSIZE_LARGE max_components = 30 max_complexity = 120 /obj/item/device/electronic_assembly/drone name = "electronic drone" icon_state = "setup_drone" - w_class = 3 + w_class = ITEMSIZE_NORMAL max_components = 25 max_complexity = 100 /obj/item/device/electronic_assembly/interact(mob/user) - if(get_dist(get_turf(src), user) > 1) - user.unset_machine(src) + if(!CanInteract(user, physical_state)) return + var/total_parts = 0 var/total_complexity = 0 for(var/obj/item/integrated_circuit/part in contents) total_parts++ total_complexity = total_complexity + part.complexity - var/HTML = "[src.name]" + var/HTML = list() - HTML += "
    \[Refresh\] | " - HTML += "\[Rename\]
    " + HTML += "[src.name]" + HTML += "
    \[Refresh\] | " + HTML += "\[Rename\]
    " HTML += "[total_parts]/[max_components] ([round((total_parts / max_components) * 100, 0.1)]%) space taken up in the assembly.
    " HTML += "[total_complexity]/[max_complexity] ([round((total_complexity / max_complexity) * 100, 0.1)]%) maximum complexity." HTML += "

    " HTML += "Components;
    " for(var/obj/item/integrated_circuit/circuit in contents) - HTML += "[circuit.name] | " - HTML += "\[Rename\]" + HTML += "[circuit.name] | " + HTML += "\[Rename\] | " + HTML += "\[Remove\]" HTML += "
    " HTML += "" - user << browse(HTML, "window=assembly-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1") + user << browse(jointext(HTML,null), "window=assembly-\ref[src];size=600x350;border=1;can_resize=1;can_close=1;can_minimize=1") /obj/item/device/electronic_assembly/Topic(href, href_list[]) - var/mob/living/user = locate(href_list["user"]) in mob_list - if(..()) return 1 - if(!user.canmove || user.stat || user.restrained()) - return - if(href_list["rename"]) - rename(user) + rename(usr) - interact(user) // To refresh the UI. + interact(usr) // To refresh the UI. /obj/item/device/electronic_assembly/verb/rename() set name = "Rename Circuit" @@ -74,14 +71,12 @@ set desc = "Rename your circuit, useful to stay organized." var/mob/M = usr - - if(!M.canmove || M.stat || M.restrained()) + if(!CanInteract(M, physical_state)) return - var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name), MAX_NAME_LEN) - - if(src && input) - M << "The machine now has a label reading '[input]'." + var/input = sanitizeSafe(input("What do you want to name this?", "Rename", src.name) as null|text, MAX_NAME_LEN) + if(src && input && CanInteract(M, physical_state)) + to_chat(M, "The machine now has a label reading '[input]'.") name = input /obj/item/device/electronic_assembly/update_icon() @@ -91,22 +86,18 @@ icon_state = initial(icon_state) /obj/item/device/electronic_assembly/examine(mob/user) - ..() - if(user.Adjacent(src)) - if(!opened) - for(var/obj/item/integrated_circuit/output/screen/S in contents) - if(S.stuff_to_display) - user << "There's a little screen labeled '[S.name]', which displays '[S.stuff_to_display]'." - else + . = ..(user, 1) + if(.) + for(var/obj/item/integrated_circuit/output/screen/S in contents) + if(S.stuff_to_display) + to_chat(user, "There's a little screen labeled '[S.name]', which displays '[S.stuff_to_display]'.") + if(opened) interact(user) - // var/obj/item/integrated_circuit/IC = input(user, "Which circuit do you want to examine?", "Examination") as null|anything in contents - // if(IC) - // IC.examine(user) /obj/item/device/electronic_assembly/attackby(var/obj/item/I, var/mob/user) if(istype(I, /obj/item/integrated_circuit)) if(!opened) - user << "\The [src] isn't opened, so you can't put anything inside. Try using a crowbar." + to_chat(user, "\The [src] isn't opened, so you can't put anything inside. Try using a crowbar.") return 0 var/obj/item/integrated_circuit/IC = I var/total_parts = 0 @@ -115,54 +106,45 @@ total_parts++ total_complexity = total_complexity + part.complexity - if( (total_parts + 1) >= max_components) - user << "You can't seem to add this [IC.name], since there's no more room." + if( (total_parts + 1) > max_components) + to_chat(user, "You can't seem to add this [IC.name], since there's no more room.") return 0 - if( (total_complexity + IC.complexity) >= max_complexity) - user << "You can't seem to add this [IC.name], since this setup's too complicated for the case." + if( (total_complexity + IC.complexity) > max_complexity) + to_chat(user, "You can't seem to add this [IC.name], since this setup's too complicated for the case.") return 0 - user << "You slide \the [IC] inside \the [src]." + to_chat(user, "You slide \the [IC] inside \the [src].") user.drop_item() IC.forceMove(src) - playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1) - if(istype(I, /obj/item/weapon/screwdriver)) - if(!opened) - user << "\The [src] isn't opened, so you can't remove anything inside. Try using a crowbar." - return 0 - if(!contents.len) - user << "There's nothing inside this to remove!" - return 0 - var/obj/item/integrated_circuit/option = input("What do you want to remove?", "Component Removal") as null|anything in contents - if(option) - option.disconnect_all() - option.forceMove(get_turf(src)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) - user << "You pop \the [option] out of the case, and slide it out." - if(istype(I, /obj/item/weapon/crowbar)) - playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1) + playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1) + interact(user) + else if(istype(I, /obj/item/weapon/crowbar)) + playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1) opened = !opened - user << "You [opened ? "opened" : "closed"] \the [src]." + to_chat(user, "You [opened ? "opened" : "closed"] \the [src].") update_icon() - if(istype(I, /obj/item/device/integrated_electronics/wirer)) + else if(istype(I, /obj/item/device/integrated_electronics/wirer) || istype(I, /obj/item/device/integrated_electronics/debugger) || istype(I, /obj/item/weapon/screwdriver)) if(opened) - var/obj/item/integrated_circuit/IC = input(user, "Which circuit do you want to examine?", "Examination") as null|anything in contents - if(IC) - IC.examine(user) + interact(user) else - user << "\The [src] isn't opened, so you can't fiddle with the internal components. \ - Try using a crowbar." + to_chat(user, "\The [src] isn't opened, so you can't fiddle with the internal components. \ + Try using a crowbar.") + else + return ..() /obj/item/device/electronic_assembly/attack_self(mob/user) + if(opened) + interact(user) + var/list/available_inputs = list() for(var/obj/item/integrated_circuit/input/input in contents) if(input.can_be_asked_input) available_inputs.Add(input) var/obj/item/integrated_circuit/input/choice = input(user, "What do you want to interact with?", "Interaction") as null|anything in available_inputs - if(choice) + if(choice && CanInteract(user, physical_state)) choice.ask_for_input(user) /obj/item/device/electronic_assembly/emp_act(severity) ..() for(var/atom/movable/AM in contents) - AM.emp_act(severity) + AM.emp_act(severity) \ No newline at end of file diff --git a/code/modules/integrated_electronics/converters.dm b/code/modules/integrated_electronics/converters.dm index 7a837abbfa..ad5f282356 100644 --- a/code/modules/integrated_electronics/converters.dm +++ b/code/modules/integrated_electronics/converters.dm @@ -1,133 +1,101 @@ //These circuits convert one variable to another. /obj/item/integrated_circuit/converter complexity = 2 - number_of_inputs = 1 - number_of_outputs = 1 - number_of_activators = 1 - input_names = list( - "input", - ) - output_names = list( - "result" - ) - activator_names = list( - "convert" - ) + inputs = list("input") + outputs = list("output") + activators = list("convert") + category = /obj/item/integrated_circuit/converter /obj/item/integrated_circuit/converter/num2text name = "number to string" desc = "This circuit can convert a number variable into a string." icon_state = "num-string" -/obj/item/integrated_circuit/converter/num2text/work() - if(..()) - var/result = null - var/datum/integrated_io/incoming = inputs[1] - var/datum/integrated_io/outgoing = outputs[1] - if(incoming.data && isnum(incoming.data)) - result = num2text(incoming.data) +/obj/item/integrated_circuit/converter/num2text/do_work() + var/result = null + var/datum/integrated_io/incoming = inputs[1] + var/datum/integrated_io/outgoing = outputs[1] + if(incoming.data && isnum(incoming.data)) + result = num2text(incoming.data) - outgoing.data = result - outgoing.push_data() + outgoing.data = result + outgoing.push_data() /obj/item/integrated_circuit/converter/text2num name = "string to number" desc = "This circuit can convert a string variable into a number." icon_state = "string-num" -/obj/item/integrated_circuit/converter/text2num/work() - if(..()) - var/result = null - var/datum/integrated_io/incoming = inputs[1] - var/datum/integrated_io/outgoing = outputs[1] - if(incoming.data && istext(incoming.data)) - result = text2num(incoming.data) +/obj/item/integrated_circuit/converter/text2num/do_work() + var/result = null + var/datum/integrated_io/incoming = inputs[1] + var/datum/integrated_io/outgoing = outputs[1] + if(incoming.data && istext(incoming.data)) + result = text2num(incoming.data) - outgoing.data = result - outgoing.push_data() + outgoing.data = result + outgoing.push_data() /obj/item/integrated_circuit/converter/ref2text name = "reference to string" desc = "This circuit can convert a reference to something else to a string, specifically the name of that reference." icon_state = "ref-string" -/obj/item/integrated_circuit/converter/ref2text/work() - if(..()) - var/result = null - var/datum/integrated_io/incoming = inputs[1] - var/datum/integrated_io/outgoing = outputs[1] - if(incoming.data && istype(incoming.data, /atom/)) - var/atom/A = incoming.data - result = A.name +/obj/item/integrated_circuit/converter/ref2text/do_work() + var/result = null + var/datum/integrated_io/incoming = inputs[1] + var/datum/integrated_io/outgoing = outputs[1] + var/atom/A = incoming.data_as_type(/atom) + result = A && A.name - outgoing.data = result - outgoing.push_data() + outgoing.data = result + outgoing.push_data() /obj/item/integrated_circuit/converter/lowercase name = "lowercase string converter" desc = "this will cause a string to come out in all lowercase." icon_state = "lowercase" -/obj/item/integrated_circuit/converter/lowercase/work() - if(..()) - var/result = null - var/datum/integrated_io/incoming = inputs[1] - var/datum/integrated_io/outgoing = outputs[1] - if(incoming.data && istext(incoming.data)) - result = lowertext(incoming.data) +/obj/item/integrated_circuit/converter/lowercase/do_work() + var/result = null + var/datum/integrated_io/incoming = inputs[1] + var/datum/integrated_io/outgoing = outputs[1] + if(incoming.data && istext(incoming.data)) + result = lowertext(incoming.data) - outgoing.data = result - outgoing.push_data() + outgoing.data = result + outgoing.push_data() /obj/item/integrated_circuit/converter/uppercase name = "uppercase string converter" desc = "THIS WILL CAUSE A STRING TO COME OUT IN ALL UPPERCASE." icon_state = "uppercase" -/obj/item/integrated_circuit/converter/uppercase/work() - if(..()) - var/result = null - var/datum/integrated_io/incoming = inputs[1] - var/datum/integrated_io/outgoing = outputs[1] - if(incoming.data && istext(incoming.data)) - result = uppertext(incoming.data) +/obj/item/integrated_circuit/converter/uppercase/do_work() + var/result = null + var/datum/integrated_io/incoming = inputs[1] + var/datum/integrated_io/outgoing = outputs[1] + if(incoming.data && istext(incoming.data)) + result = uppertext(incoming.data) - outgoing.data = result - outgoing.push_data() + outgoing.data = result + outgoing.push_data() /obj/item/integrated_circuit/converter/concatenatior name = "concatenatior" desc = "This joins many strings together to get one big string." complexity = 4 - number_of_inputs = 8 - number_of_outputs = 1 - number_of_activators = 1 - input_names = list( - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H" - ) - output_names = list( - "result" - ) - activator_names = list( - "concatenate" - ) + inputs = list("A","B","C","D","E","F","G","H") + outputs = list("result") + activators = list("concatenate") +/obj/item/integrated_circuit/converter/concatenatior/do_work() + var/result = null + for(var/datum/integrated_io/input/I in inputs) + I.pull_data() + if(istext(I.data)) + result = result + I.data -/obj/item/integrated_circuit/converter/concatenatior/work() - if(..()) - var/result = null - for(var/datum/integrated_io/input/I in inputs) - I.pull_data() - if(istext(I.data)) - result = result + I.data - - var/datum/integrated_io/outgoing = outputs[1] - outgoing.data = result - outgoing.push_data() \ No newline at end of file + var/datum/integrated_io/outgoing = outputs[1] + outgoing.data = result + outgoing.push_data() \ No newline at end of file diff --git a/code/modules/integrated_electronics/coordinate.dm b/code/modules/integrated_electronics/coordinate.dm index 78b7ebcb4f..b97a1c1546 100644 --- a/code/modules/integrated_electronics/coordinate.dm +++ b/code/modules/integrated_electronics/coordinate.dm @@ -4,58 +4,35 @@ desc = "This allows you to easily know the position of a machine containing this device." icon_state = "gps" complexity = 4 - number_of_inputs = 0 - number_of_outputs = 2 - number_of_activators = 1 - input_names = list( - ) - output_names = list( - "X (abs)", - "Y (abs)" - ) - activator_names = list( - "get coordinates" - ) + inputs = list() + outputs = list("X (abs)", "Y (abs)") + activators = list("get coordinates") -/obj/item/integrated_circuit/gps/work() - if(..()) - var/turf/T = get_turf(src) - var/datum/integrated_io/result_x = outputs[1] - var/datum/integrated_io/result_y = outputs[2] +/obj/item/integrated_circuit/gps/do_work() + var/turf/T = get_turf(src) + var/datum/integrated_io/result_x = outputs[1] + var/datum/integrated_io/result_y = outputs[2] - result_x.data = null - result_y.data = null - if(!T) - return + result_x.data = null + result_y.data = null + if(!T) + return - result_x.data = T.x - result_y.data = T.y + result_x.data = T.x + result_y.data = T.y - for(var/datum/integrated_io/output/O in outputs) - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.push_data() /obj/item/integrated_circuit/abs_to_rel_coords name = "abs to rel coordinate converter" desc = "Easily convert absolute coordinates to relative coordinates with this." complexity = 4 - number_of_inputs = 4 - number_of_outputs = 2 - number_of_activators = 1 - input_names = list( - "X1 (abs)", - "Y1 (abs)", - "X2 (abs)", - "Y2 (abs)" - ) - output_names = list( - "X (rel)", - "Y (rel)" - ) - activator_names = list( - "compute rel coordinates" - ) + inputs = list("X1 (abs)", "Y1 (abs)", "X2 (abs)", "Y2 (abs)") + outputs = list("X (rel)", "Y (rel)") + activators = list("compute rel coordinates") -/obj/item/integrated_circuit/abs_to_rel_coords/work() +/obj/item/integrated_circuit/abs_to_rel_coords/do_work() var/datum/integrated_io/x1 = inputs[1] var/datum/integrated_io/y1 = inputs[2] @@ -69,7 +46,5 @@ result_x.data = x1.data - x2.data result_y.data = y1.data - y2.data - for(var/datum/integrated_io/output/O in outputs) - O.push_data() - ..() + O.push_data() \ No newline at end of file diff --git a/code/modules/integrated_electronics/data_transfer.dm b/code/modules/integrated_electronics/data_transfer.dm index 12380e9cca..23ce3e5aea 100644 --- a/code/modules/integrated_electronics/data_transfer.dm +++ b/code/modules/integrated_electronics/data_transfer.dm @@ -3,49 +3,62 @@ desc = "Splits incoming data into all of the output pins." icon_state = "splitter" complexity = 3 - number_of_inputs = 1 - number_of_outputs = 2 - input_names = list( - "data to split" - ) - output_names = list( - "A", - "B", - "C", - "D", - "E", - "F", - "G", - "H" - ) + inputs = list("data to split") + outputs = list("A","B") /obj/item/integrated_circuit/transfer/splitter/medium name = "four splitter" icon_state = "splitter4" complexity = 5 - number_of_inputs = 1 - number_of_outputs = 4 + outputs = list("A","B","C","D") /obj/item/integrated_circuit/transfer/splitter/large name = "eight splitter" icon_state = "splitter8" complexity = 9 - number_of_inputs = 1 - number_of_outputs = 8 + outputs = list("A","B","C","D","E","F","G","H") -/obj/item/integrated_circuit/transfer/splitter/work() - if(..()) - var/datum/integrated_io/I = inputs[1] - for(var/datum/integrated_io/output/O in outputs) - O.data = I.data +/obj/item/integrated_circuit/transfer/splitter/do_work() + var/datum/integrated_io/I = inputs[1] + for(var/datum/integrated_io/output/O in outputs) + O.data = I.data /obj/item/integrated_circuit/transfer/activator_splitter name = "activator splitter" desc = "Splits incoming activation pulses into all of the output pins." icon_state = "splitter" complexity = 3 - number_of_activators = 3 - activator_names = list( + activators = list( + "incoming pulse", + "outgoing pulse A", + "outgoing pulse B" + ) + +/obj/item/integrated_circuit/transfer/activator_splitter/do_work() + for(var/datum/integrated_io/activate/A in outputs) + if(A == activators[1]) + continue + if(A.linked.len) + for(var/datum/integrated_io/activate/target in A.linked) + target.holder.check_then_do_work() + +/obj/item/integrated_circuit/transfer/activator_splitter/medium + name = "four activator splitter" + icon_state = "splitter4" + complexity = 5 + activators = list( + "incoming pulse", + "outgoing pulse A", + "outgoing pulse B", + "outgoing pulse C", + "outgoing pulse D" + ) + +/obj/item/integrated_circuit/transfer/activator_splitter/large + name = "eight activator splitter" + icon_state = "splitter4" + complexity = 9 + activators = list( "incoming pulse", "outgoing pulse A", "outgoing pulse B", @@ -55,25 +68,4 @@ "outgoing pulse F", "outgoing pulse G", "outgoing pulse H" - ) - -/obj/item/integrated_circuit/transfer/activator_splitter/work() - if(..()) - for(var/datum/integrated_io/activate/A in outputs) - if(A == activators[1]) - continue - if(A.linked.len) - for(var/datum/integrated_io/activate/target in A.linked) - target.holder.work() - -/obj/item/integrated_circuit/transfer/activator_splitter/medium - name = "four activator splitter" - icon_state = "splitter4" - complexity = 5 - number_of_activators = 5 - -/obj/item/integrated_circuit/transfer/activator_splitter/large - name = "eight activator splitter" - icon_state = "splitter4" - complexity = 9 - number_of_activators = 9 + ) \ No newline at end of file diff --git a/code/modules/integrated_electronics/input_output.dm b/code/modules/integrated_electronics/input_output.dm index 42da340654..6568662dc9 100644 --- a/code/modules/integrated_electronics/input_output.dm +++ b/code/modules/integrated_electronics/input_output.dm @@ -8,41 +8,32 @@ name = "button" desc = "This tiny button must do something, right?" icon_state = "button" - number_of_inputs = 0 - number_of_outputs = 0 - number_of_activators = 1 complexity = 1 can_be_asked_input = 1 - activator_names = list( - "on pressed" - ) + inputs = list() + outputs = list() + activators = list("on pressed") /obj/item/integrated_circuit/input/button/ask_for_input(mob/user) //Bit misleading name for this specific use. var/datum/integrated_io/A = activators[1] if(A.linked.len) for(var/datum/integrated_io/activate/target in A.linked) - target.holder.work() - user << "You press the button labeled '[src.name]'." + target.holder.check_then_do_work() + to_chat(user, "You press the button labeled '[src.name]'.") /obj/item/integrated_circuit/input/numberpad name = "number pad" desc = "This small number pad allows someone to input a number into the system." icon_state = "numberpad" - number_of_inputs = 0 - number_of_outputs = 1 - number_of_activators = 1 complexity = 2 can_be_asked_input = 1 - output_names = list( - "number entered" - ) - activator_names = list( - "on entered" - ) + inputs = list() + outputs = list("number entered") + activators = list("on entered") /obj/item/integrated_circuit/input/numberpad/ask_for_input(mob/user) var/new_input = input(user, "Enter a number, please.","Number pad") as null|num - if(isnum(new_input)) + if(isnum(new_input) && CanInteract(user, physical_state)) var/datum/integrated_io/O = outputs[1] O.data = new_input O.push_data() @@ -53,21 +44,15 @@ name = "text pad" desc = "This small text pad allows someone to input a string into the system." icon_state = "textpad" - number_of_inputs = 0 - number_of_outputs = 1 - number_of_activators = 1 complexity = 2 can_be_asked_input = 1 - output_names = list( - "string entered" - ) - activator_names = list( - "on entered" - ) + inputs = list() + outputs = list("string entered") + activators = list("on entered") /obj/item/integrated_circuit/input/textpad/ask_for_input(mob/user) var/new_input = input(user, "Enter some words, please.","Number pad") as null|text - if(new_input && istext(new_input)) + if(istext(new_input) && CanInteract(user, physical_state)) var/datum/integrated_io/O = outputs[1] O.data = new_input O.push_data() @@ -78,53 +63,37 @@ name = "integrated medical analyser" desc = "A very small version of the common medical analyser. This allows the machine to know how healthy someone is." icon_state = "medscan" - number_of_inputs = 1 - number_of_outputs = 2 - number_of_activators = 1 complexity = 4 - input_names = list( - "target ref" - ) - output_names = list( - "total health %", - "total missing health" - ) - activator_names = list( - "scan" - ) + inputs = list("target ref") + outputs = list("total health %", "total missing health") + activators = list("scan") -/obj/item/integrated_circuit/input/med_scanner/work() - if(..()) - var/datum/integrated_io/I = inputs[1] - if(!I.data || !ishuman(I.data)) //Invalid input - return - var/mob/living/carbon/human/H = I.data - if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range. - var/total_health = round(H.health/H.maxHealth, 0.1)*100 - var/missing_health = H.maxHealth - H.health +/obj/item/integrated_circuit/input/med_scanner/do_work() + var/datum/integrated_io/I = inputs[1] + var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human) + if(!istype(H)) //Invalid input + return + if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range. + var/total_health = round(H.health/H.maxHealth, 0.1)*100 + var/missing_health = H.maxHealth - H.health - var/datum/integrated_io/total = outputs[1] - var/datum/integrated_io/missing = outputs[2] + var/datum/integrated_io/total = outputs[1] + var/datum/integrated_io/missing = outputs[2] - total.data = total_health - missing.data = missing_health + total.data = total_health + missing.data = missing_health - for(var/datum/integrated_io/output/O in outputs) - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.push_data() /obj/item/integrated_circuit/input/adv_med_scanner name = "integrated advanced medical analyser" desc = "A very small version of the common medical analyser. This allows the machine to know how healthy someone is. \ This type is much more precise, allowing the machine to know much more about the target than a normal analyzer." icon_state = "medscan_adv" - number_of_inputs = 1 - number_of_outputs = 7 - number_of_activators = 1 complexity = 12 - input_names = list( - "target ref" - ) - output_names = list( + inputs = list("target ref") + outputs = list( "total health %", "total missing health", "brute damage", @@ -133,68 +102,86 @@ "oxy damage", "clone damage" ) - activator_names = list( - "scan" - ) + activators = list("scan") -/obj/item/integrated_circuit/input/adv_med_scanner/work() - if(..()) - var/datum/integrated_io/I = inputs[1] - if(!I.data || !ishuman(I.data)) //Invalid input - return - var/mob/living/carbon/human/H = I.data - if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range. - var/total_health = round(H.health/H.maxHealth, 0.1)*100 - var/missing_health = H.maxHealth - H.health +/obj/item/integrated_circuit/input/adv_med_scanner/do_work() + var/datum/integrated_io/I = inputs[1] + var/mob/living/carbon/human/H = I.data_as_type(/mob/living/carbon/human) + if(!istype(H)) //Invalid input + return + if(H.Adjacent(get_turf(src))) // Like normal analysers, it can't be used at range. + var/total_health = round(H.health/H.maxHealth, 0.1)*100 + var/missing_health = H.maxHealth - H.health - var/datum/integrated_io/total = outputs[1] - var/datum/integrated_io/missing = outputs[2] - var/datum/integrated_io/brute = outputs[3] - var/datum/integrated_io/burn = outputs[4] - var/datum/integrated_io/tox = outputs[5] - var/datum/integrated_io/oxy = outputs[6] - var/datum/integrated_io/clone = outputs[7] + var/datum/integrated_io/total = outputs[1] + var/datum/integrated_io/missing = outputs[2] + var/datum/integrated_io/brute = outputs[3] + var/datum/integrated_io/burn = outputs[4] + var/datum/integrated_io/tox = outputs[5] + var/datum/integrated_io/oxy = outputs[6] + var/datum/integrated_io/clone = outputs[7] - total.data = total_health - missing.data = missing_health - brute.data = H.getBruteLoss() - burn.data = H.getFireLoss() - tox.data = H.getToxLoss() - oxy.data = H.getOxyLoss() - clone.data = H.getCloneLoss() + total.data = total_health + missing.data = missing_health + brute.data = H.getBruteLoss() + burn.data = H.getFireLoss() + tox.data = H.getToxLoss() + oxy.data = H.getOxyLoss() + clone.data = H.getCloneLoss() - for(var/datum/integrated_io/output/O in outputs) - O.push_data() + for(var/datum/integrated_io/output/O in outputs) + O.push_data() /obj/item/integrated_circuit/input/local_locator name = "local locator" desc = "This is needed for certain devices that demand a reference for a target to act upon. This type only locates something \ that is holding the machine containing it." - number_of_inputs = 0 - number_of_outputs = 1 - number_of_activators = 1 - complexity = 4 - output_names = list( - "located ref" - ) - activator_names = list( - "locate" - ) + inputs = list() + outputs = list("located ref") + activators = list("locate") -/obj/item/integrated_circuit/input/local_locator/work() - if(..()) - var/mob/living/L = null - var/datum/integrated_io/O = outputs[1] - O.data = null - if(istype(src.loc, /obj/item/device/electronic_assembly)) // Check to make sure we're actually in a machine. - var/obj/item/device/electronic_assembly/assembly = src.loc - if(istype(assembly.loc, /mob/living)) // Now check if someone's holding us. - L = assembly.loc +/obj/item/integrated_circuit/input/local_locator/do_work() + var/datum/integrated_io/O = outputs[1] + O.data = null + if(istype(src.loc, /obj/item/device/electronic_assembly)) // Check to make sure we're actually in a machine. + var/obj/item/device/electronic_assembly/assembly = src.loc + if(istype(assembly.loc, /mob/living)) // Now check if someone's holding us. + O.data = weakref(assembly.loc) - if(L) - O.data = L + O.push_data() - O.push_data() +/obj/item/integrated_circuit/input/adjacent_locator + name = "adjacent locator" + desc = "This is needed for certain devices that demand a reference for a target to act upon. This type only locates something \ + that is standing a meter away from the machine." + extended_desc = "The first pin requires a ref to a kind of object that you want the locator to acquire. This means that it will \ + give refs to nearby objects that are similar. If more than one valid object is found nearby, it will choose one of them at \ + random." + inputs = list("desired type ref") + outputs = list("located ref") + activators = list("locate") + +/obj/item/integrated_circuit/input/adjacent_locator/do_work() + var/datum/integrated_io/I = inputs[1] + var/datum/integrated_io/O = outputs[1] + O.data = null + + if(!isweakref(I.data)) + return + var/atom/A = I.data.resolve() + if(!A) + return + var/desired_type = A.type + + var/list/nearby_things = range(1, get_turf(src)) + var/list/valid_things = list() + for(var/atom/thing in nearby_things) + if(thing.type != desired_type) + continue + valid_things.Add(thing) + if(valid_things.len) + O.data = weakref(pick(valid_things)) + O.push_data() /obj/item/integrated_circuit/input/signaler name = "integrated signaler" @@ -203,57 +190,48 @@ The two input pins are to configure the integrated signaler's settings. Note that the frequency should not have a decimal in it. \ Meaning the default frequency is expressed as 1457, not 145.7. To send a signal, pulse the 'send signal' activator pin." icon_state = "signal" - number_of_inputs = 2 - number_of_outputs = 0 - number_of_activators = 2 complexity = 4 - input_names = list( - "frequency", - "code" - ) - activator_names = list( - "send signal", - "on signal received" - ) + inputs = list("frequency","code") + outputs = list() + activators = list("send signal","on signal received") + var/frequency = 1457 var/code = 30 var/datum/radio_frequency/radio_connection -/obj/item/integrated_circuit/input/signaler/New() +/obj/item/integrated_circuit/input/signaler/initialize() ..() - spawn(4 SECONDS) - set_frequency(frequency) - var/datum/integrated_io/new_freq = inputs[1] - var/datum/integrated_io/new_code = inputs[2] - // Set the pins so when someone sees them, they won't show as null - new_freq.data = frequency - new_code.data = code + set_frequency(frequency) + var/datum/integrated_io/new_freq = inputs[1] + var/datum/integrated_io/new_code = inputs[2] + // Set the pins so when someone sees them, they won't show as null + new_freq.data = frequency + new_code.data = code /obj/item/integrated_circuit/input/signaler/Destroy() if(radio_controller) radio_controller.remove_object(src,frequency) frequency = 0 - ..() + . = ..() /obj/item/integrated_circuit/input/signaler/on_data_written() var/datum/integrated_io/new_freq = inputs[1] var/datum/integrated_io/new_code = inputs[2] - if(isnum(new_freq.data)) + if(isnum(new_freq.data) && new_freq.data > 0) set_frequency(new_freq.data) if(isnum(new_code.data)) code = new_code.data -/obj/item/integrated_circuit/input/signaler/work() // Sends a signal. - if(..()) - if(!radio_connection) - return +/obj/item/integrated_circuit/input/signaler/do_work() // Sends a signal. + if(!radio_connection) + return - var/datum/signal/signal = new() - signal.source = src - signal.encryption = code - signal.data["message"] = "ACTIVATE" - radio_connection.post_signal(src, signal) + var/datum/signal/signal = new() + signal.source = src + signal.encryption = code + signal.data["message"] = "ACTIVATE" + radio_connection.post_signal(src, signal) /obj/item/integrated_circuit/input/signaler/proc/set_frequency(new_frequency) if(!frequency) @@ -282,10 +260,9 @@ var/datum/integrated_io/A = activators[2] A.push_data() - for(var/mob/O in hearers(1, src.loc)) + for(var/mob/O in hearers(1, get_turf(src))) O.show_message(text("\icon[] *beep* *beep*", src), 3, "*beep* *beep*", 2) - /obj/item/integrated_circuit/input/EPv2 name = "\improper EPv2 circuit" desc = "Enables the sending and receiving of messages on the Exonet with the EPv2 protocol." @@ -293,31 +270,17 @@ second pin on each side, with additonal data reserved for the third pin. When a message is received, the second activaiton pin \ will pulse whatever's connected to it. Pulsing the first activation pin will send a message." icon_state = "signal" - number_of_inputs = 3 - number_of_outputs = 3 - number_of_activators = 2 complexity = 4 - input_names = list( - "target EPv2 address", - "data to send", - "secondary text" - ) - output_names = list( - "address received", - "data received", - "secondary text received" - ) - activator_names = list( - "send data", - "on data received" - ) + inputs = list("target EPv2 address", "data to send", "secondary text") + outputs = list("address received", "data received", "secondary text received") + activators = list("send data", "on data received") var/datum/exonet_protocol/exonet = null /obj/item/integrated_circuit/input/EPv2/New() ..() exonet = new(src) exonet.make_address("EPv2_circuit-\ref[src]") - desc += "This circuit's EPv2 address is: [exonet.address]." + desc += "
    This circuit's EPv2 address is: [exonet.address]." /obj/item/integrated_circuit/input/EPv2/Destroy() if(exonet) @@ -325,13 +288,12 @@ qdel(exonet) ..() -/obj/item/integrated_circuit/input/EPv2/work() - if(..()) - var/datum/integrated_io/target_address = inputs[1] - var/datum/integrated_io/message = inputs[2] - var/datum/integrated_io/text = inputs[3] - if(istext(target_address.data)) - exonet.send_message(target_address.data, message.data, text.data) +/obj/item/integrated_circuit/input/EPv2/do_work() + var/datum/integrated_io/target_address = inputs[1] + var/datum/integrated_io/message = inputs[2] + var/datum/integrated_io/text = inputs[3] + if(istext(target_address.data)) + exonet.send_message(target_address.data, message.data, text.data) /obj/item/integrated_circuit/input/receive_exonet_message(var/atom/origin_atom, var/origin_address, var/message, var/text) var/datum/integrated_io/message_received = outputs[1] @@ -349,42 +311,35 @@ name = "screen" desc = "This small screen can display a single piece of data, when the machine is examined closely." icon_state = "screen" - complexity = 4 - number_of_inputs = 1 - number_of_outputs = 0 - number_of_activators = 1 - input_names = list( - "displayed data" - ) - activator_names = list( - "load data" - ) + inputs = list("displayed data") + outputs = list() + activators = list("load data") var/stuff_to_display = null -/obj/item/integrated_circuit/output/screen/work() +/obj/item/integrated_circuit/output/screen/do_work() var/datum/integrated_io/I = inputs[1] - stuff_to_display = I.data + if(isweakref(I.data)) + var/datum/d = I.data_as_type(/datum) + if(d) + stuff_to_display = "[d]" + else + stuff_to_display = I.data /obj/item/integrated_circuit/output/light name = "light" desc = "This light can turn on and off on command." icon_state = "light_adv" -// icon_state = "light" complexity = 4 - number_of_inputs = 0 - number_of_outputs = 0 - number_of_activators = 1 - activator_names = list( - "toggle light" - ) + inputs = list() + outputs = list() + activators = list("toggle light") var/light_toggled = 0 var/light_brightness = 3 var/light_rgb = "#FFFFFF" -/obj/item/integrated_circuit/output/light/work() - if(..()) - light_toggled = !light_toggled - update_lighting() +/obj/item/integrated_circuit/output/light/do_work() + light_toggled = !light_toggled + update_lighting() /obj/item/integrated_circuit/output/light/proc/update_lighting() if(light_toggled) @@ -413,15 +368,13 @@ desc = "This light can turn on and off on command, in any color, and in various brightness levels." icon_state = "light_adv" complexity = 8 - number_of_inputs = 4 - number_of_outputs = 0 - number_of_activators = 1 - input_names = list( + inputs = list( "R", "G", "B", "Brightness" ) + outputs = list() /obj/item/integrated_circuit/output/light/advanced/on_data_written() update_lighting() @@ -432,38 +385,43 @@ icon_state = "speaker" complexity = 8 cooldown_per_use = 4 SECONDS - number_of_inputs = 3 - number_of_outputs = 0 - number_of_activators = 1 - input_names = list( + inputs = list( "sound ID", "volume", "frequency" ) - activator_names = list( - "play sound" - ) + outputs = list() + activators = list("play sound") var/list/sounds = list() + category = /obj/item/integrated_circuit/output/sound -/obj/item/integrated_circuit/output/sound/work() - if(..()) - var/datum/integrated_io/ID = inputs[1] - var/datum/integrated_io/vol = inputs[2] - var/datum/integrated_io/frequency = inputs[3] - if(istext(ID.data) && isnum(vol.data) && isnum(frequency.data)) - var/selected_sound = sounds[ID.data] - vol.data = Clamp(vol.data, 0, 1) - frequency.data = Clamp(frequency.data, 0, 100) - playsound(get_turf(src), selected_sound, vol.data, frequency.data, -1) +/obj/item/integrated_circuit/output/sound/New() + ..() + extended_desc = list() + extended_desc += "The first input pin determines which sound is used. The choices are; " + extended_desc += jointext(sounds, ", ") + extended_desc += ". The second pin determines the volume of sound that is played" + extended_desc += ", and the third determines if the frequency of the sound will vary with each activation." + extended_desc = jointext(extended_desc, null) + +/obj/item/integrated_circuit/output/sound/do_work() + var/datum/integrated_io/ID = inputs[1] + var/datum/integrated_io/vol = inputs[2] + var/datum/integrated_io/frequency = inputs[3] + if(istext(ID.data) && isnum(vol.data) && isnum(frequency.data)) + var/selected_sound = sounds[ID.data] + if(!selected_sound) + world << "No sound" + return + vol.data = Clamp(vol.data, 0, 100) + frequency.data = round(Clamp(frequency.data, 0, 1)) + playsound(get_turf(src), selected_sound, vol.data, frequency.data, -1) /obj/item/integrated_circuit/output/sound/beeper name = "beeper circuit" desc = "A miniature speaker is attached to this component. This is often used in the construction of motherboards, which use \ the speaker to tell the user if something goes very wrong when booting up. It can also do other similar synthetic sounds such \ as buzzing, pinging, chiming, and more." - extended_desc = "The first input pin determines what sound is used. The choices are; beep, chime, buzz sigh, buzz twice, ping, \ - synth yes, synth no, warning buzz. The second pin determines the volume of sound that is played, and the third determines if \ - the frequency of the sound will vary with each activation." sounds = list( "beep" = 'sound/machines/twobeep.ogg', "chime" = 'sound/machines/chime.ogg', @@ -478,9 +436,6 @@ /obj/item/integrated_circuit/output/sound/beepsky name = "securitron sound circuit" desc = "A miniature speaker is attached to this component. Considered by some to be the essential component for a securitron." - extended_desc = "The first input pin determines what sound is used. The choices are; creep, criminal, freeze, god, \ - i am the law, insult, radio, secure day. The second pin determines the volume of sound that is played, and the \ - third determines if the frequency of the sound will vary with each activation." sounds = list( "creep" = 'sound/voice/bcreep.ogg', "criminal" = 'sound/voice/bcriminal.ogg', @@ -490,5 +445,4 @@ "insult" = 'sound/voice/binsult.ogg', "radio" = 'sound/voice/bradio.ogg', "secure day" = 'sound/voice/bsecureday.ogg', - ) - + ) \ No newline at end of file diff --git a/code/modules/integrated_electronics/logic.dm b/code/modules/integrated_electronics/logic.dm index 4d123c61d0..cb4fc55f35 100644 --- a/code/modules/integrated_electronics/logic.dm +++ b/code/modules/integrated_electronics/logic.dm @@ -1,172 +1,106 @@ /obj/item/integrated_circuit/logic name = "logic gate" desc = "This tiny chip will decide for you!" + extended_desc = "Logic circuits will treat a null, 0, and a \"\" string value as FALSE and anything else as TRUE." complexity = 3 - number_of_inputs = 2 - number_of_outputs = 1 - number_of_activators = 2 - input_names = list( - "A", - "B" - ) - output_names = list( - "result" - ) - activator_names = list( - "compare", - "on true result" - ) + outputs = list("result") + activators = list("compare", "on true result") + category = /obj/item/integrated_circuit/logic -/obj/item/integrated_circuit/logic/equals +/obj/item/integrated_circuit/logic/do_work() + var/datum/integrated_io/O = outputs[1] + var/datum/integrated_io/P = activators[2] + O.push_data() + if(O.data) + P.push_data() + +/obj/item/integrated_circuit/logic/binary + inputs = list("A","B") + category = /obj/item/integrated_circuit/logic/binary + +/obj/item/integrated_circuit/logic/binary/do_work() + var/datum/integrated_io/A = inputs[1] + var/datum/integrated_io/B = inputs[2] + var/datum/integrated_io/O = outputs[1] + O.data = do_compare(A, B) ? TRUE : FALSE + ..() + +/obj/item/integrated_circuit/logic/binary/proc/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return FALSE + +/obj/item/integrated_circuit/logic/unary + inputs = list("A") + category = /obj/item/integrated_circuit/logic/unary + +/obj/item/integrated_circuit/logic/unary/do_work() + var/datum/integrated_io/A = inputs[1] + var/datum/integrated_io/O = outputs[1] + O.data = do_check(A) ? TRUE : FALSE + ..() + +/obj/item/integrated_circuit/logic/unary/proc/do_check(var/datum/integrated_io/A) + return FALSE + +/obj/item/integrated_circuit/logic/binary/equals name = "equal gate" desc = "This gate compares two values, and outputs the number one if both are the same." icon_state = "equal" -/obj/item/integrated_circuit/logic/equals/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data == B.data) - O.data = 1 - O.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/equals/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data == B.data -/obj/item/integrated_circuit/logic/not - name = "not gate" - desc = "This gate inverts what's fed into it." - icon_state = "not" - number_of_inputs = 1 - number_of_outputs = 1 - number_of_activators = 1 - output_names = list( - "invert" - ) - - -/obj/item/integrated_circuit/logic/not/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/O = outputs[1] - if(A.data) - O.data = !A.data - O.push_data() - else - O.data = 0 - -/obj/item/integrated_circuit/logic/and +/obj/item/integrated_circuit/logic/binary/and name = "and gate" desc = "This gate will output 'one' if both inputs evaluate to true." icon_state = "and" -/obj/item/integrated_circuit/logic/and/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data && B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/and/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data && B.data -/obj/item/integrated_circuit/logic/or +/obj/item/integrated_circuit/logic/binary/or name = "or gate" desc = "This gate will output 'one' if one of the inputs evaluate to true." icon_state = "or" -/obj/item/integrated_circuit/logic/or/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data || B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/or/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data || B.data -/obj/item/integrated_circuit/logic/less_than +/obj/item/integrated_circuit/logic/binary/less_than name = "less than gate" desc = "This will output 'one' if the first input is less than the second input." icon_state = "less_than" -/obj/item/integrated_circuit/logic/less_than/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data < B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/less_than/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data < B.data -/obj/item/integrated_circuit/logic/less_than_or_equal +/obj/item/integrated_circuit/logic/binary/less_than_or_equal name = "less than or equal gate" desc = "This will output 'one' if the first input is less than, or equal to the second input." icon_state = "less_than_or_equal" -/obj/item/integrated_circuit/logic/less_than_or_equal/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data <= B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/less_than_or_equal/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data <= B.data -/obj/item/integrated_circuit/logic/greater_than +/obj/item/integrated_circuit/logic/binary/greater_than name = "greater than gate" desc = "This will output 'one' if the first input is greater than the second input." icon_state = "greater_than" -/obj/item/integrated_circuit/logic/greater_than/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data > B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 +/obj/item/integrated_circuit/logic/binary/greater_than/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data > B.data -/obj/item/integrated_circuit/logic/greater_than_or_equal +/obj/item/integrated_circuit/logic/binary/greater_than_or_equal name = "greater_than or equal gate" desc = "This will output 'one' if the first input is greater than, or equal to the second input." icon_state = "greater_than_or_equal" -/obj/item/integrated_circuit/logic/greater_than_or_equal/work() - if(..()) - var/datum/integrated_io/A = inputs[1] - var/datum/integrated_io/B = inputs[2] - var/datum/integrated_io/O = outputs[1] - var/datum/integrated_io/P = activators[2] - if(A.data >= B.data) - O.data = 1 - O.push_data() - A.push_data() - P.push_data() - else - O.data = 0 \ No newline at end of file +/obj/item/integrated_circuit/logic/binary/greater_than_or_equal/do_compare(var/datum/integrated_io/A, var/datum/integrated_io/B) + return A.data >= B.data + +/obj/item/integrated_circuit/logic/unary/not + name = "not gate" + desc = "This gate inverts what's fed into it." + icon_state = "not" + +/obj/item/integrated_circuit/logic/unary/not/do_check(var/datum/integrated_io/A) + return !A.data \ No newline at end of file diff --git a/code/modules/integrated_electronics/manipulation.dm b/code/modules/integrated_electronics/manipulation.dm index 256d7b6b7a..bad3944e8e 100644 --- a/code/modules/integrated_electronics/manipulation.dm +++ b/code/modules/integrated_electronics/manipulation.dm @@ -6,14 +6,12 @@ The 'fire' activator will cause the mechanism to attempt to fire the weapon at the coordinates, if possible. Note that the \ normal limitations to firearms, such as ammunition requirements and firing delays, still hold true if fired by the mechanism." complexity = 20 - number_of_inputs = 2 - number_of_outputs = 0 - number_of_activators = 1 - input_names = list( + inputs = list( "target X rel", "target Y rel" ) - activator_names = list( + outputs = list() + activators = list( "fire" ) var/obj/item/weapon/gun/installed_gun = null @@ -45,7 +43,7 @@ else user << "There's no weapon to remove from the mechanism." -/obj/item/integrated_circuit/manipulation/weapon_firing/work() +/obj/item/integrated_circuit/manipulation/weapon_firing/do_work() if(..()) if(!installed_gun) return @@ -95,28 +93,141 @@ into the smoke clouds when activated." flags = OPENCONTAINER complexity = 20 - number_of_inputs = 0 - number_of_outputs = 0 - number_of_activators = 1 cooldown_per_use = 30 SECONDS - input_names = list() - activator_names = list( - "create smoke" - ) + inputs = list() + outputs = list() + activators = list("create smoke") /obj/item/integrated_circuit/manipulation/smoke/New() ..() create_reagents(100) -/obj/item/integrated_circuit/manipulation/smoke/work() - if(..()) - playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) - var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new() - smoke_system.set_up(reagents, 10, 0, get_turf(src)) - spawn(0) - for(var/i = 1 to 8) - smoke_system.start() - reagents.clear_reagents() +/obj/item/integrated_circuit/manipulation/smoke/do_work() + playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3) + var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new() + smoke_system.set_up(reagents, 10, 0, get_turf(src)) + spawn(0) + for(var/i = 1 to 8) + smoke_system.start() + reagents.clear_reagents() + +/obj/item/integrated_circuit/manipulation/injector + name = "integrated hypo-injector" + desc = "This scary looking thing is able to pump liquids into whatever it's pointed at." + icon_state = "injector" + extended_desc = "This autoinjector can push reagents into another container or someone else outside of the machine. The target \ + must be adjacent to the machine, and if it is a person, they cannot be wearing thick clothing." + flags = OPENCONTAINER + complexity = 20 + cooldown_per_use = 6 SECONDS + inputs = list("target ref", "injection amount" = 5) + outputs = list() + activators = list("inject") + +/obj/item/integrated_circuit/manipulation/injector/New() + ..() + create_reagents(30) + +/obj/item/integrated_circuit/manipulation/injector/proc/inject_amount() + var/datum/integrated_io/amount = inputs[2] + if(isnum(amount.data)) + return Clamp(amount.data, 0, 30) + +/obj/item/integrated_circuit/manipulation/injector/do_work() + set waitfor = 0 // Don't sleep in a proc that is called by a processor without this set, otherwise it'll delay the entire thing + + var/datum/integrated_io/target = inputs[1] + var/atom/movable/AM = target.data_as_type(/atom/movable) + if(!istype(AM)) //Invalid input + return + if(!reagents.total_volume) // Empty + return + if(AM.can_be_injected_by(src)) + if(isliving(AM)) + var/turf/T = get_turf(AM) + T.visible_message("[src] is trying to inject [AM]!") + sleep(3 SECONDS) + if(!AM.can_be_injected_by(src)) + return + var/contained = reagents.get_reagents() + var/trans = reagents.trans_to_mob(target, inject_amount(), CHEM_BLOOD) + message_admins("[src] injected \the [AM] with [trans]u of [contained].") + to_chat(AM, "You feel a tiny prick!") + visible_message("[src] injects [AM]!") + else + reagents.trans_to(AM, inject_amount()) + +/obj/item/integrated_circuit/manipulation/reagent_pump + name = "reagent pump" + desc = "Moves liquids safely inside a machine, or even nearby it." + icon_state = "reagent_pump" + extended_desc = "This is a pump, which will move liquids from the source ref to the target ref. The third pin determines \ + how much liquid is moved per pulse, between 0 and 50. The pump can move reagents to any open container inside the machine, or \ + outside the machine if it is next to the machine. Note that this cannot be used on entities." + flags = OPENCONTAINER + complexity = 8 + inputs = list("source ref", "target ref", "injection amount" = 10) + outputs = list() + activators = list("transfer reagents") + var/transfer_amount = 10 + +/obj/item/integrated_circuit/manipulation/reagent_pump/on_data_written() + var/datum/integrated_io/amount = inputs[3] + if(isnum(amount.data)) + amount.data = Clamp(amount.data, 0, 50) + transfer_amount = amount.data + +/obj/item/integrated_circuit/manipulation/reagent_pump/do_work() + var/datum/integrated_io/A = inputs[1] + var/datum/integrated_io/B = inputs[2] + var/atom/movable/source = A.data_as_type(/atom/movable) + var/atom/movable/target = B.data_as_type(/atom/movable) + if(!istype(source) || !istype(target)) //Invalid input + return + var/turf/T = get_turf(src) + if(source.Adjacent(T) && target.Adjacent(T)) + if(!source.reagents || !target.reagents) + return + if(ismob(source) || ismob(target)) + return + if(!source.is_open_container() || !target.is_open_container()) + return + if(!source.reagents.get_free_space() || !target.reagents.get_free_space()) + return + + source.reagents.trans_to(target, transfer_amount) + +// May make a reagent subclass of circuits in future. +/obj/item/integrated_circuit/manipulation/reagent_storage + name = "reagent storage" + desc = "Stores liquid inside, and away from electrical components. Can store up to 60u." + icon_state = "reagent_storage" + extended_desc = "This is effectively an internal beaker." + flags = OPENCONTAINER + complexity = 4 + inputs = list() + outputs = list("volume used") + activators = list() + +/obj/item/integrated_circuit/manipulation/reagent_storage/New() + ..() + create_reagents(60) + +/obj/item/integrated_circuit/manipulation/reagent_storage/on_reagent_change() + var/datum/integrated_io/A = outputs[1] + A.data = reagents.total_volume + A.push_data() + +/obj/item/integrated_circuit/manipulation/reagent_storage/cryo + name = "cryo reagent storage" + desc = "Stores liquid inside, and away from electrical components. Can store up to 60u. This will also suppress reactions." + icon_state = "reagent_storage_cryo" + extended_desc = "This is effectively an internal cryo beaker." + flags = OPENCONTAINER | NOREACT + complexity = 8 + inputs = list() + outputs = list("volume used") + activators = list() /obj/item/integrated_circuit/manipulation/locomotion name = "locomotion circuit" @@ -133,26 +244,20 @@ Southwest = 10
    \
    \ Pulsing the 'step towards dir' activator pin will cause the machine to move a meter in that direction, assuming it is not \ - being held, or anchored in some way." + being held, or anchored in some way. It should be noted that heavy machines will be unable to move." complexity = 20 - number_of_inputs = 1 - number_of_outputs = 0 - number_of_activators = 1 - input_names = list( - "dir num" - ) - activator_names = list( - "step towards dir" - ) + inputs = list("dir num") + outputs = list() + activators = list("step towards dir") -/obj/item/integrated_circuit/manipulation/locomotion/work() - if(..()) - var/turf/T = get_turf(src) - if(istype(loc, /obj/item/device/electronic_assembly)) - var/obj/item/device/electronic_assembly/machine = loc - if(machine.anchored || machine.w_class >= 4) - return - if(machine.loc && machine.loc == T) // Check if we're held by someone. If the loc is the floor, we're not held. - var/datum/integrated_io/wanted_dir = inputs[1] - if(isnum(wanted_dir.data)) - step(machine, wanted_dir.data) \ No newline at end of file +/obj/item/integrated_circuit/manipulation/locomotion/do_work() + ..() + var/turf/T = get_turf(src) + if(T && istype(loc, /obj/item/device/electronic_assembly)) + var/obj/item/device/electronic_assembly/machine = loc + if(machine.anchored || machine.w_class >= ITEMSIZE_LARGE) + return + if(machine.loc == T) // Check if we're held by someone. If the loc is the floor, we're not held. + var/datum/integrated_io/wanted_dir = inputs[1] + if(isnum(wanted_dir.data)) + step(machine, wanted_dir.data) \ No newline at end of file diff --git a/code/modules/integrated_electronics/memory.dm b/code/modules/integrated_electronics/memory.dm index 8599cc2aed..aa62843209 100644 --- a/code/modules/integrated_electronics/memory.dm +++ b/code/modules/integrated_electronics/memory.dm @@ -3,99 +3,151 @@ desc = "This tiny chip can store one piece of data." icon_state = "memory" complexity = 1 - number_of_inputs = 1 - number_of_outputs = 1 - number_of_activators = 1 - activator_names = list( - "set" - ) + inputs = list("input pin 1") + outputs = list("output pin 1") + activators = list("set") + category = /obj/item/integrated_circuit/memory /obj/item/integrated_circuit/memory/examine(mob/user) ..() var/i for(i = 1, i <= outputs.len, i++) var/datum/integrated_io/O = outputs[i] - user << "\The [src] has [O.data ? "'O.data'" : "nothing"] saved to address [i]." + var/data = "nothing" + if(isweakref(O.data)) + var/datum/d = O.data_as_type(/datum) + if(d) + data = "[d]" + else if(!isnull(O.data)) + data = O.data + to_chat(user, "\The [src] has [data] saved to address [i].") -/obj/item/integrated_circuit/memory/work() - if(..()) - var/i - for(i = 1, i <= inputs.len, i++) - var/datum/integrated_io/I = inputs[i] - var/datum/integrated_io/O = outputs[i] - O.data = I.data +/obj/item/integrated_circuit/memory/do_work() + for(var/i = 1 to inputs.len) + var/datum/integrated_io/I = inputs[i] + var/datum/integrated_io/O = outputs[i] + O.data = I.data /obj/item/integrated_circuit/memory/medium name = "memory circuit" desc = "This circuit can store four pieces of data." icon_state = "memory4" complexity = 4 - number_of_inputs = 4 - number_of_outputs = 4 + inputs = list("input pin 1","input pin 2","input pin 3","input pin 4") + outputs = list("output pin 1","output pin 2","output pin 3","output pin 4") /obj/item/integrated_circuit/memory/large name = "large memory circuit" desc = "This big circuit can hold eight pieces of data." icon_state = "memory8" complexity = 8 - number_of_inputs = 8 - number_of_outputs = 8 + inputs = list( + "input pin 1", + "input pin 2", + "input pin 3", + "input pin 4", + "input pin 5", + "input pin 6", + "input pin 7", + "input pin 8") + outputs = list( + "output pin 1", + "output pin 2", + "output pin 3", + "output pin 4", + "output pin 5", + "output pin 6", + "output pin 7", + "output pin 8") /obj/item/integrated_circuit/memory/huge name = "large memory stick" desc = "This stick of memory can hold up up to sixteen pieces of data." icon_state = "memory16" complexity = 16 - number_of_inputs = 16 - number_of_outputs = 16 + inputs = list( + "input pin 1", + "input pin 2", + "input pin 3", + "input pin 4", + "input pin 5", + "input pin 6", + "input pin 7", + "input pin 8", + "input pin 9", + "input pin 10", + "input pin 11", + "input pin 12", + "input pin 13", + "input pin 14", + "input pin 15", + "input pin 16" + ) + outputs = list( + "output pin 1", + "output pin 2", + "output pin 3", + "output pin 4", + "output pin 5", + "output pin 6", + "output pin 7", + "output pin 8", + "output pin 9", + "output pin 10", + "output pin 11", + "output pin 12", + "output pin 13", + "output pin 14", + "output pin 15", + "output pin 16") /obj/item/integrated_circuit/memory/constant name = "constant chip" desc = "This tiny chip can store one piece of data, which cannot be overwritten without disassembly." icon_state = "memory" complexity = 1 - number_of_inputs = 0 - number_of_outputs = 1 - number_of_activators = 1 - activator_names = list( - "push data" - ) + inputs = list() + outputs = list("output pin") + activators = list("push data") var/accepting_refs = 0 -/obj/item/integrated_circuit/memory/constant/work() +/obj/item/integrated_circuit/memory/constant/do_work() var/datum/integrated_io/O = outputs[1] O.push_data() /obj/item/integrated_circuit/memory/constant/attack_self(mob/user) var/datum/integrated_io/O = outputs[1] var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null") + if(!CanInteract(user, physical_state)) + return + var/new_data = null switch(type_to_use) if("string") accepting_refs = 0 new_data = input("Now type in a string.","[src] string writing") as null|text - if(istext(new_data)) + if(istext(new_data) && CanInteract(user, physical_state)) O.data = new_data - user << "You set \the [src]'s memory to [O.display_data()]." + to_chat(user, "You set \the [src]'s memory to [O.display_data()].") if("number") accepting_refs = 0 new_data = input("Now type in a number.","[src] number writing") as null|num - if(isnum(new_data)) + if(isnum(new_data) && CanInteract(user, physical_state)) O.data = new_data - user << "You set \the [src]'s memory to [O.display_data()]." + to_chat(user, "You set \the [src]'s memory to [O.display_data()].") if("ref") accepting_refs = 1 - user << "You turn \the [src]'s ref scanner on. Slide it across \ - an object for a ref of that object to save it in memory." + to_chat(user, "You turn \the [src]'s ref scanner on. Slide it across \ + an object for a ref of that object to save it in memory.") if("null") O.data = null - user << "You set \the [src]'s memory to absolutely nothing." + to_chat(user, "You set \the [src]'s memory to absolutely nothing.") /obj/item/integrated_circuit/memory/constant/afterattack(atom/target, mob/living/user, proximity) if(accepting_refs && proximity) var/datum/integrated_io/O = outputs[1] - O.data = target + O.data = weakref(target) visible_message("[user] slides \a [src]'s over \the [target].") - user << "You set \the [src]'s memory to a reference to [O.display_data()]. The ref scanner is \ - now off." + to_chat(user, "You set \the [src]'s memory to a reference to [O.display_data()]. The ref scanner is \ + now off.") accepting_refs = 0 \ No newline at end of file diff --git a/code/modules/integrated_electronics/time.dm b/code/modules/integrated_electronics/time.dm index 95b8e02c46..f351f86590 100644 --- a/code/modules/integrated_electronics/time.dm +++ b/code/modules/integrated_electronics/time.dm @@ -2,40 +2,38 @@ name = "time circuit" desc = "Now you can build your own clock!" complexity = 2 - number_of_inputs = 0 - number_of_outputs = 0 + inputs = list() + outputs = list() + category = /obj/item/integrated_circuit/time /obj/item/integrated_circuit/time/delay name = "two-sec delay circuit" desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \ This circuit is set to send a pulse after a delay of two seconds." icon_state = "delay-20" - number_of_activators = 2 - var/delay = 20 - activator_names = list( - "incoming pulse", - "outgoing pulse" - ) + var/delay = 2 SECONDS + activators = list("incoming pulse","outgoing pulse") -/obj/item/integrated_circuit/time/delay/work() - if(..()) - var/datum/integrated_io/out_pulse = activators[2] - sleep(delay) - out_pulse.push_data() +/obj/item/integrated_circuit/time/delay/do_work() + set waitfor = 0 // Don't sleep in a proc that is called by a processor. It'll delay the entire thing + + var/datum/integrated_io/out_pulse = activators[2] + sleep(delay) + out_pulse.push_data() /obj/item/integrated_circuit/time/delay/five_sec name = "five-sec delay circuit" desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \ This circuit is set to send a pulse after a delay of five seconds." icon_state = "delay-50" - delay = 50 + delay = 5 SECONDS /obj/item/integrated_circuit/time/delay/one_sec name = "one-sec delay circuit" desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \ This circuit is set to send a pulse after a delay of one second." icon_state = "delay-10" - delay = 10 + delay = 1 SECOND /obj/item/integrated_circuit/time/delay/half_sec name = "half-sec delay circuit" @@ -56,12 +54,9 @@ desc = "This sends a pulse signal out after a delay, critical for ensuring proper control flow in a complex machine. \ This circuit's delay can be customized, between 1/10th of a second to one hour. The delay is updated upon receiving a pulse." icon_state = "delay" - number_of_inputs = 1 - input_names = list( - "delay time", - ) + inputs = list("delay time") -/obj/item/integrated_circuit/time/delay/custom/work() +/obj/item/integrated_circuit/time/delay/custom/do_work() var/datum/integrated_io/delay_input = inputs[1] if(delay_input.data && isnum(delay_input.data) ) var/new_delay = min(delay_input.data, 1) @@ -75,27 +70,35 @@ desc = "This circuit sends an automatic pulse every four seconds." icon_state = "tick-m" complexity = 8 - number_of_inputs = 1 - number_of_activators = 1 - var/ticks_to_pulse = 2 + var/ticks_to_pulse = 4 var/ticks_completed = 0 - input_names = list( - "toggle ticking" - ) - activator_names = list( - "outgoing pulse" - ) - -/obj/item/integrated_circuit/time/ticker/New() - ..() - processing_objects |= src + var/is_running = FALSE + inputs = list("enable ticking") + activators = list("outgoing pulse") /obj/item/integrated_circuit/time/ticker/Destroy() - processing_objects -= src + if(is_running) + processing_objects -= src + . = ..() + +/obj/item/integrated_circuit/time/ticker/on_data_written() + var/datum/integrated_io/do_tick = inputs[1] + if(do_tick.data && !is_running) + is_running = TRUE + processing_objects |= src + else if(is_running) + is_running = FALSE + processing_objects -= src + ticks_completed = 0 /obj/item/integrated_circuit/time/ticker/process() - ticks_completed++ - if( (ticks_completed % ticks_to_pulse) == 0) + var/process_ticks = process_schedule_interval("obj") + ticks_completed += process_ticks + if(ticks_completed >= ticks_to_pulse) + if(ticks_to_pulse >= process_ticks) + ticks_completed -= ticks_to_pulse + else + ticks_completed = 0 var/datum/integrated_io/pulser = activators[1] pulser.push_data() @@ -104,41 +107,32 @@ desc = "This advanced circuit sends an automatic pulse every two seconds." icon_state = "tick-f" complexity = 12 - ticks_to_pulse = 1 + ticks_to_pulse = 2 /obj/item/integrated_circuit/time/ticker/slow name = "slow ticker" desc = "This simple circuit sends an automatic pulse every six seconds." icon_state = "tick-s" complexity = 4 - ticks_to_pulse = 3 - + ticks_to_pulse = 6 /obj/item/integrated_circuit/time/clock name = "integrated clock" desc = "Tells you what the local time is, specific to your station or planet." icon_state = "clock" - number_of_inputs = 0 - number_of_outputs = 4 - number_of_activators = 1 - output_names = list( - "time (string)", - "hours (number)", - "minutes (number)", - "seconds (number)" - ) + inputs = list() + outputs = list("time (string)", "hours (number)", "minutes (number)", "seconds (number)") -/obj/item/integrated_circuit/time/clock/work() - if(..()) - var/datum/integrated_io/time = outputs[1] - var/datum/integrated_io/hour = outputs[2] - var/datum/integrated_io/min = outputs[3] - var/datum/integrated_io/sec = outputs[4] +/obj/item/integrated_circuit/time/clock/do_work() + var/datum/integrated_io/time = outputs[1] + var/datum/integrated_io/hour = outputs[2] + var/datum/integrated_io/min = outputs[3] + var/datum/integrated_io/sec = outputs[4] - time.data = time2text(station_time_in_ticks, "hh:mm:ss") - hour.data = text2num(time2text(station_time_in_ticks, "hh")) - min.data = text2num(time2text(station_time_in_ticks, "mm")) - sec.data = text2num(time2text(station_time_in_ticks, "ss")) + time.data = time2text(station_time_in_ticks, "hh:mm:ss") + hour.data = text2num(time2text(station_time_in_ticks, "hh")) + min.data = text2num(time2text(station_time_in_ticks, "mm")) + sec.data = text2num(time2text(station_time_in_ticks, "ss")) - for(var/datum/integrated_io/output/O in outputs) - O.push_data() \ No newline at end of file + for(var/datum/integrated_io/output/O in outputs) + O.push_data() \ No newline at end of file diff --git a/code/modules/integrated_electronics/tools.dm b/code/modules/integrated_electronics/tools.dm index 75609ca59c..1804d4f538 100644 --- a/code/modules/integrated_electronics/tools.dm +++ b/code/modules/integrated_electronics/tools.dm @@ -12,71 +12,64 @@ icon = 'icons/obj/electronic_assemblies.dmi' icon_state = "wirer-wire" flags = CONDUCT - w_class = 2 + w_class = ITEMSIZE_SMALL var/datum/integrated_io/selected_io = null var/mode = WIRE -/obj/item/device/integrated_electronics/wirer/New() - ..() - /obj/item/device/integrated_electronics/wirer/update_icon() icon_state = "wirer-[mode]" /obj/item/device/integrated_electronics/wirer/proc/wire(var/datum/integrated_io/io, mob/user) if(mode == WIRE) selected_io = io - user << "You attach a data wire to \the [selected_io.holder]'s [selected_io.name] data channel." + to_chat(user, "You attach a data wire to \the [selected_io.holder]'s [selected_io.name] data channel.") mode = WIRING update_icon() else if(mode == WIRING) if(io == selected_io) - user << "Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless." + to_chat(user, "Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.") return if(io.io_type != selected_io.io_type) - user << "Those two types of channels are incompatable. The first is a [selected_io.io_type], \ - while the second is a [io.io_type]." + to_chat(user, "Those two types of channels are incompatable. The first is a [selected_io.io_type], \ + while the second is a [io.io_type].") return selected_io.linked |= io io.linked |= selected_io - user << "You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name]." + to_chat(user, "You connect \the [selected_io.holder]'s [selected_io.name] to \the [io.holder]'s [io.name].") mode = WIRE update_icon() - //io.updateDialog() - //selected_io.updateDialog() selected_io.holder.interact(user) // This is to update the UI. selected_io = null else if(mode == UNWIRE) selected_io = io if(!io.linked.len) - user << "There is nothing connected to \the [selected_io] data channel." + to_chat(user, "There is nothing connected to \the [selected_io] data channel.") selected_io = null return - user << "You prepare to detach a data wire from \the [selected_io.holder]'s [selected_io.name] data channel." + to_chat(user, "You prepare to detach a data wire from \the [selected_io.holder]'s [selected_io.name] data channel.") mode = UNWIRING update_icon() return else if(mode == UNWIRING) if(io == selected_io) - user << "You can't wire a pin into each other, so unwiring \the [selected_io.holder] from \ - the same pin is rather moot." + to_chat(user, "You can't wire a pin into each other, so unwiring \the [selected_io.holder] from \ + the same pin is rather moot.") return if(selected_io in io.linked) io.linked.Remove(selected_io) selected_io.linked.Remove(io) - user << "You disconnect \the [selected_io.holder]'s [selected_io.name] from \ - \the [io.holder]'s [io.name]." - //io.updateDialog() - //selected_io.updateDialog() + to_chat(user, "You disconnect \the [selected_io.holder]'s [selected_io.name] from \ + \the [io.holder]'s [io.name].") selected_io.holder.interact(user) // This is to update the UI. selected_io = null mode = UNWIRE update_icon() else - user << "\The [selected_io.holder]'s [selected_io.name] and \the [io.holder]'s \ - [io.name] are not connected." + to_chat(user, "\The [selected_io.holder]'s [selected_io.name] and \the [io.holder]'s \ + [io.name] are not connected.") return return @@ -86,18 +79,18 @@ mode = UNWIRE if(WIRING) if(selected_io) - user << "You decide not to wire the data channel." + to_chat(user, "You decide not to wire the data channel.") selected_io = null - mode = UNWIRE + mode = WIRE if(UNWIRE) mode = WIRE if(UNWIRING) if(selected_io) - user << "You decide not to disconnect the data channel." + to_chat(user, "You decide not to disconnect the data channel.") selected_io = null mode = UNWIRE update_icon() - user << "You set \the [src] to [mode]." + to_chat(user, "You set \the [src] to [mode].") #undef WIRE #undef WIRING @@ -111,49 +104,57 @@ icon = 'icons/obj/electronic_assemblies.dmi' icon_state = "debugger" flags = CONDUCT - w_class = 2 + w_class = ITEMSIZE_SMALL var/data_to_write = null var/accepting_refs = 0 /obj/item/device/integrated_electronics/debugger/attack_self(mob/user) var/type_to_use = input("Please choose a type to use.","[src] type setting") as null|anything in list("string","number","ref", "null") + if(!CanInteract(user, physical_state)) + return + var/new_data = null switch(type_to_use) if("string") accepting_refs = 0 new_data = input("Now type in a string.","[src] string writing") as null|text - if(istext(new_data)) + if(istext(new_data) && CanInteract(user, physical_state)) data_to_write = new_data - user << "You set \the [src]'s memory to \"[new_data]\"." + to_chat(user, "You set \the [src]'s memory to \"[new_data]\".") if("number") accepting_refs = 0 new_data = input("Now type in a number.","[src] number writing") as null|num - if(isnum(new_data)) + if(isnum(new_data) && CanInteract(user, physical_state)) data_to_write = new_data - user << "You set \the [src]'s memory to [new_data]." + to_chat(user, "You set \the [src]'s memory to [new_data].") if("ref") accepting_refs = 1 - user << "You turn \the [src]'s ref scanner on. Slide it across \ - an object for a ref of that object to save it in memory." + to_chat(user, "You turn \the [src]'s ref scanner on. Slide it across \ + an object for a ref of that object to save it in memory.") if("null") data_to_write = null - user << "You set \the [src]'s memory to absolutely nothing." + to_chat(user, "You set \the [src]'s memory to absolutely nothing.") /obj/item/device/integrated_electronics/debugger/afterattack(atom/target, mob/living/user, proximity) if(accepting_refs && proximity) - data_to_write = target + data_to_write = weakref(target) visible_message("[user] slides \a [src]'s over \the [target].") - user << "You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \ - now off." + to_chat(user, "You set \the [src]'s memory to a reference to [target.name] \[Ref\]. The ref scanner is \ + now off.") accepting_refs = 0 /obj/item/device/integrated_electronics/debugger/proc/write_data(var/datum/integrated_io/io, mob/user) if(io.io_type == DATA_CHANNEL) io.write_data_to_pin(data_to_write) - user << "You write [data_to_write] to \the [io.holder]'s [io]." + var/data_to_show = data_to_write + if(isweakref(data_to_write)) + var/weakref/w = data_to_write + var/atom/A = w.resolve() + data_to_show = A.name + to_chat(user, "You write '[data_to_write ? data_to_show : "NULL"]' to the '[io]' pin of \the [io.holder].") else if(io.io_type == PULSE_CHANNEL) - io.holder.work() - user << "You pulse \the [io.holder]'s [io]." + io.holder.check_then_do_work() + to_chat(user, "You pulse \the [io.holder]'s [io].") io.holder.interact(user) // This is to update the UI. @@ -162,13 +163,8 @@ desc = "This kit's essential for any circuitry projects." icon = 'icons/obj/electronic_assemblies.dmi' icon_state = "circuit_kit" - w_class = 3 - storage_slots = 200 - max_storage_space = 400 - max_w_class = 3 + w_class = ITEMSIZE_NORMAL display_contents_with_number = 1 - can_hold = list(/obj/item/integrated_circuit, /obj/item/device/integrated_electronics, /obj/item/device/electronic_assembly, - /obj/item/weapon/screwdriver, /obj/item/weapon/crowbar) /obj/item/weapon/storage/bag/circuits/basic/New() ..() @@ -199,29 +195,32 @@ ) for(var/thing in types_to_spawn) - var/i = 3 - while(i) + var/obj/item/integrated_circuit/ic = thing + if(initial(ic.category) == thing) + continue + + for(var/i = 1 to 4) new thing(src) - i-- new /obj/item/device/electronic_assembly(src) new /obj/item/device/integrated_electronics/wirer(src) new /obj/item/device/integrated_electronics/debugger(src) new /obj/item/weapon/crowbar(src) new /obj/item/weapon/screwdriver(src) + make_exact_fit() /obj/item/weapon/storage/bag/circuits/all/New() ..() - var/list/types_to_spawn = typesof(/obj/item/integrated_circuit) - - for(var/thing in types_to_spawn) - var/i = 10 - while(i) + for(var/thing in subtypesof(/obj/item/integrated_circuit)) + var/obj/item/integrated_circuit/ic = thing + if(initial(ic.category) == thing) + continue + for(var/i = 1 to 10) new thing(src) - i-- new /obj/item/device/electronic_assembly(src) new /obj/item/device/integrated_electronics/wirer(src) new /obj/item/device/integrated_electronics/debugger(src) new /obj/item/weapon/crowbar(src) - new /obj/item/weapon/screwdriver(src) \ No newline at end of file + new /obj/item/weapon/screwdriver(src) + make_exact_fit() \ No newline at end of file diff --git a/code/modules/integrated_electronics/~defines.dm b/code/modules/integrated_electronics/~defines.dm new file mode 100644 index 0000000000..7aea6dabbb --- /dev/null +++ b/code/modules/integrated_electronics/~defines.dm @@ -0,0 +1,6 @@ +#undef IC_INPUT +#undef IC_OUTPUT +#undef IC_ACTIVATOR + +#undef DATA_CHANNEL +#undef PULSE_CHANNEL \ No newline at end of file diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index ba96ada8b7..911891a7d4 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -140,7 +140,7 @@ icon_state ="book" throw_speed = 1 throw_range = 5 - w_class = 3 //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) + w_class = ITEMSIZE_NORMAL //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) attack_verb = list("bashed", "whacked", "educated") var/dat // Actual page content var/due_date = 0 // Game time in 1/10th seconds @@ -170,7 +170,7 @@ /obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob) if(carved) if(!store) - if(W.w_class < 3) + if(W.w_class < ITEMSIZE_LARGE) user.drop_item() W.loc = src store = W @@ -268,7 +268,7 @@ icon_state ="scanner" throw_speed = 1 throw_range = 5 - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/obj/machinery/librarycomp/computer // Associated computer - Modes 1 to 3 use this var/obj/item/weapon/book/book // Currently scanned book var/mode = 0 // 0 - Scan only, 1 - Scan and Set Buffer, 2 - Scan and Attempt to Check In, 3 - Scan and Attempt to Add to Inventory diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm index aab806aa7c..57365f4367 100644 --- a/code/modules/materials/material_sheets.dm +++ b/code/modules/materials/material_sheets.dm @@ -2,7 +2,7 @@ /obj/item/stack/material force = 5.0 throwforce = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL throw_speed = 3 throw_range = 3 max_amount = 50 @@ -288,4 +288,4 @@ default_type = "reinforced borosilicate glass" /obj/item/stack/material/glass/phoronrglass/fifty - amount = 50 + amount = 50 diff --git a/code/modules/metric/activity.dm b/code/modules/metric/activity.dm new file mode 100644 index 0000000000..370ae0eb2f --- /dev/null +++ b/code/modules/metric/activity.dm @@ -0,0 +1,82 @@ +// This checks an individual player's activity level. People who have been afk for a few minutes aren't punished as much as those +// who were afk for hours, as they're most likely gone for good. +/datum/metric/proc/assess_player_activity(var/mob/M) + . = 100 + if(!M) + . = 0 + return + + if(!M.mind || !M.client) // Logged out. They might come back but we can't do any meaningful assessments for now. + . = 0 + return + + var/afk = M.client.is_afk(1 MINUTE) + if(afk) // Deduct points based on length of AFK-ness. + switch(afk) // One minute is equal to 600, for reference. + if(1 MINUTE to 10 MINUTES) // People gone for this emough of time hopefully will come back soon. + . -= round( (afk / 200), 1) + if(10 MINUTES to 30 MINUTES) + . -= round( (afk / 150), 1) + if(30 MINUTES to INFINITY) // They're probably not coming back if it's been 30 minutes. + . -= 100 + . = max(. , 0) // No negative numbers, or else people could drag other, non-afk players down. + +// This checks a whole department's collective activity. +/datum/metric/proc/assess_department(var/department) + if(!department) + return + var/departmental_activity = 0 + var/departmental_size = 0 + for(var/mob/M in player_list) + if(guess_department(M) != department) // Ignore people outside the department we're assessing. + continue + departmental_activity += assess_player_activity(M) + departmental_size++ + if(departmental_size) + departmental_activity = departmental_activity / departmental_size // Average it out. + return departmental_activity + +/datum/metric/proc/assess_all_departments(var/cutoff_number = 3, var/list/department_blacklist = list()) + var/list/activity = list() + for(var/department in departments) + activity[department] = assess_department(department) + log_debug("Assessing department [department]. They have activity of [activity[department]].") + + var/list/most_active_departments = list() // List of winners. + var/highest_activity = null // Department who is leading in activity, if one exists. + var/highest_number = 0 // Activity score needed to beat to be the most active department. + for(var/i = 1, i <= cutoff_number, i++) + log_debug("Doing [i]\th round of counting.") + for(var/department in activity) + if(department in department_blacklist) // Blacklisted? + continue + if(activity[department] > highest_number && activity[department] > 0) // More active than the current highest department? + highest_activity = department + highest_number = activity[department] + + if(highest_activity) // Someone's a winner. + most_active_departments.Add(highest_activity) // Add to the list of most active. + activity.Remove(highest_activity) // Remove them from the other list so they don't win more than once. + log_debug("[highest_activity] has won the [i]\th round of activity counting.") + highest_activity = null // Now reset for the next round. + highest_number = 0 + //todo: finish + return most_active_departments + +/datum/metric/proc/assess_all_living_mobs() // Living refers to the type, not the stat variable. + . = 0 + var/num = 0 + for(var/mob/living/L in player_list) + . += assess_player_activity(L) + num++ + if(num) + . = round(. / num, 0.1) + +/datum/metric/proc/assess_all_dead_mobs() // Ditto. + . = 0 + var/num = 0 + for(var/mob/observer/dead/O in player_list) + . += assess_player_activity(O) + num++ + if(num) + . = round(. / num, 0.1) \ No newline at end of file diff --git a/code/modules/metric/department.dm b/code/modules/metric/department.dm new file mode 100644 index 0000000000..ef146de506 --- /dev/null +++ b/code/modules/metric/department.dm @@ -0,0 +1,72 @@ + +// This proc tries to find the department of an arbitrary mob. +/datum/metric/proc/guess_department(var/mob/M) + var/list/found_roles = list() + . = ROLE_UNKNOWN + + // Records are usually the most reliable way to get what job someone is. + var/datum/data/record/R = find_general_record("name", M.real_name) + if(R) // We found someone with a record. + var/recorded_rank = R.fields["real_rank"] + found_roles = role_name_to_department(recorded_rank) + . = found_roles[1] + if(. != ROLE_UNKNOWN) // We found the correct department, so we can stop now. + return + + // They have a custom title, aren't crew, or someone deleted their record, so we need a fallback method. + // Let's check the mind. + if(M.mind) + found_roles = role_name_to_department(M.mind.assigned_role) + . = found_roles[1] + if(. != ROLE_UNKNOWN) + return + + // At this point, they don't have a mind, or for some reason assigned_role didn't work. + found_roles = role_name_to_department(M.job) + . = found_roles[1] + if(. != ROLE_UNKNOWN) + return + + return ROLE_UNKNOWN // Welp. + +// Feed this proc the name of a job, and it will try to figure out what department they are apart of. +// Note that this returns a list, as some jobs are in more than one department, like Command. The 'primary' department is the first +// in the list, e.g. a HoS has Security as first, Command as second in the returned list. +/datum/metric/proc/role_name_to_department(var/role_name) + var/list/result = list() + + if(role_name in security_positions) + result += ROLE_SECURITY + + if(role_name in engineering_positions) + result += ROLE_ENGINEERING + + if(role_name in medical_positions) + result += ROLE_MEDICAL + + if(role_name in science_positions) + result += ROLE_RESEARCH + + if(role_name in cargo_positions) + result += ROLE_CARGO + + if(role_name in civilian_positions) + result += ROLE_CIVILIAN + + if(role_name in nonhuman_positions) + result += ROLE_SYNTHETIC + + if(role_name in command_positions) // We do Command last, since we consider command to only be a primary department for hop/admin. + result += ROLE_COMMAND + + if(!result.len) // No department was found. + result += ROLE_UNKNOWN + return result + +/datum/metric/proc/count_people_in_department(var/department) + if(!department) + return + for(var/mob/M in player_list) + if(guess_department(M) != department) // Ignore people outside the department we're counting. + continue + . += 1 \ No newline at end of file diff --git a/code/modules/metric/metric.dm b/code/modules/metric/metric.dm new file mode 100644 index 0000000000..1550b2c34e --- /dev/null +++ b/code/modules/metric/metric.dm @@ -0,0 +1,15 @@ +// This is a global datum used to retrieve certain information about the round, such as activity of a department or a specific +// player. + +/datum/metric + var/departments = list( + ROLE_COMMAND, + ROLE_SECURITY, + ROLE_ENGINEERING, + ROLE_MEDICAL, + ROLE_RESEARCH, + ROLE_CARGO, + ROLE_CIVILIAN, + ROLE_SYNTHETIC + ) + diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index 7491bf668d..10c8855b7e 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -7,7 +7,7 @@ flags = CONDUCT force = 0.0 throwforce = 0.0 - w_class = 1.0 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS var/string_attached var/sides = 2 diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index ea69670885..00ec3d68ca 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -48,7 +48,7 @@ throwforce = 4.0 icon_state = "pickaxe" item_state = "jackhammer" - w_class = 4.0 + w_class = ITEMSIZE_LARGE matter = list(DEFAULT_WALL_MATERIAL = 3750) var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) @@ -103,7 +103,7 @@ name = "plasma cutter" icon_state = "plasmacutter" item_state = "gun" - w_class = 3.0 //it is smaller than the pickaxe + w_class = ITEMSIZE_NORMAL //it is smaller than the pickaxe damtype = "fire" digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3) @@ -151,7 +151,7 @@ force = 8.0 throwforce = 4.0 item_state = "shovel" - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1) matter = list(DEFAULT_WALL_MATERIAL = 50) attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") @@ -165,7 +165,7 @@ item_state = "spade" force = 5.0 throwforce = 7.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL /**********************Mining car (Crate like thing, not the rail car)**************************/ diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 1c6208061d..0a5c2d94c3 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -139,7 +139,7 @@ var/list/mining_overlay_cache = list() overlays += mining_overlay_cache["dug_overlay"] for(var/direction in cardinal) - if(istype(get_step(src, direction), /turf/space)) + if(istype(get_step(src, direction), /turf/space) && !istype(get_step(src, direction), /turf/space/cracked_asteroid)) if(!mining_overlay_cache["asteroid_edge_[direction]"]) mining_overlay_cache["asteroid_edge_[direction]"] = image('icons/turf/flooring/asteroid.dmi', "asteroid_edges", dir = direction) overlays += mining_overlay_cache["asteroid_edge_[direction]"] diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 7409859af2..9884349be9 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -7,7 +7,7 @@ flags = CONDUCT force = 10.0 throwforce = 2.0 - w_class = 4.0 + w_class = ITEMSIZE_LARGE /obj/item/weapon/moneybag/attack_hand(user as mob) var/amt_gold = 0 diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index 1f78c7ce77..128dc17332 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -2,7 +2,7 @@ name = "small rock" icon = 'icons/obj/mining.dmi' icon_state = "ore2" - w_class = 2 + w_class = ITEMSIZE_SMALL var/datum/geosample/geologic_data var/material diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index ab88819b53..952fc93bb0 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -94,7 +94,7 @@ var/list/holder_mob_icon_cache = list() origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 5) /obj/item/weapon/holder/mouse - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/weapon/holder/borer origin_tech = list(TECH_BIO = 6) diff --git a/code/modules/mob/language/generic.dm b/code/modules/mob/language/generic.dm index d93edf3ac2..1b07e4ed8c 100644 --- a/code/modules/mob/language/generic.dm +++ b/code/modules/mob/language/generic.dm @@ -57,8 +57,59 @@ // Criminal language. /datum/language/gutter name = "Gutter" - desc = "Much like Standard, this crude pidgin tongue descended from numerous languages and serves as Tradeband for criminal elements." + desc = "There is no true language named Gutter. 'Gutter' is a catchall term for a collection of unofficial SolCom dialects that has somehow managed to spread across the stars." speech_verb = "growls" colour = "rough" key = "3" - syllables = list ("gra","ba","ba","breh","bra","rah","dur","ra","ro","gro","go","ber","bar","geh","heh", "gra") + space_chance = 45 + syllables = list ( +"gra","ba","ba","breh","bra","rah","dur","ra","ro","gro","go","ber","bar","geh","heh", "gra", +"a", "ai", "an", "ang", "ao", "ba", "bai", "ban", "bang", "bao", "bei", "ben", "beng", "bi", "bian", "biao", +"bie", "bin", "bing", "bo", "bu", "ca", "cai", "can", "cang", "cao", "ce", "cei", "cen", "ceng", "cha", "chai", +"chan", "chang", "chao", "che", "chen", "cheng", "chi", "chong", "chou", "chu", "chua", "chuai", "chuan", "chuang", "chui", "chun", +"chuo", "ci", "cong", "cou", "cu", "cuan", "cui", "cun", "cuo", "da", "dai", "dan", "dang", "dao", "de", "dei", +"den", "deng", "di", "dian", "diao", "die", "ding", "diu", "dong", "dou", "du", "duan", "dui", "dun", "duo", "e", +"ei", "en", "er", "fa", "fan", "fang", "fei", "fen", "feng", "fo", "fou", "fu", "ga", "gai", "gan", "gang", +"gao", "ge", "gei", "gen", "geng", "gong", "gou", "gu", "gua", "guai", "guan", "guang", "gui", "gun", "guo", "ha", +"hai", "han", "hang", "hao", "he", "hei", "hen", "heng", "hm", "hng", "hong", "hou", "hu", "hua", "huai", "huan", +"huang", "hui", "hun", "huo", "ji", "jia", "jian", "jiang", "jiao", "jie", "jin", "jing", "jiong", "jiu", "ju", "juan", +"jue", "jun", "ka", "kai", "kan", "kang", "kao", "ke", "kei", "ken", "keng", "kong", "kou", "ku", "kua", "kuai", +"kuan", "kuang", "kui", "kun", "kuo", "la", "lai", "lan", "lang", "lao", "le", "lei", "leng", "li", "lia", "lian", +"liang", "liao", "lie", "lin", "ling", "liu", "long", "lou", "lu", "luan", "lun", "luo", "ma", "mai", "man", "mang", +"mao", "me", "mei", "men", "meng", "mi", "mian", "miao", "mie", "min", "ming", "miu", "mo", "mou", "mu", "na", +"nai", "nan", "nang", "nao", "ne", "nei", "nen", "neng", "ng", "ni", "nian", "niang", "niao", "nie", "nin", "ning", +"niu", "nong", "nou", "nu", "nuan", "nuo", "o", "ou", "pa", "pai", "pan", "pang", "pao", "pei", "pen", "peng", +"pi", "pian", "piao", "pie", "pin", "ping", "po", "pou", "pu", "qi", "qia", "qian", "qiang", "qiao", "qie", "qin", +"qing", "qiong", "qiu", "qu", "quan", "que", "qun", "ran", "rang", "rao", "re", "ren", "reng", "ri", "rong", "rou", +"ru", "rua", "ruan", "rui", "run", "ruo", "sa", "sai", "san", "sang", "sao", "se", "sei", "sen", "seng", "sha", +"shai", "shan", "shang", "shao", "she", "shei", "shen", "sheng", "shi", "shou", "shu", "shua", "shuai", "shuan", "shuang", "shui", +"shun", "shuo", "si", "song", "sou", "su", "suan", "sui", "sun", "suo", "ta", "tai", "tan", "tang", "tao", "te", +"teng", "ti", "tian", "tiao", "tie", "ting", "tong", "tou", "tu", "tuan", "tui", "tun", "tuo", "wa", "wai", "wan", +"wang", "wei", "wen", "weng", "wo", "wu", "xi", "xia", "xian", "xiang", "xiao", "xie", "xin", "xing", "xiong", "xiu", +"xu", "xuan", "xue", "xun", "ya", "yan", "yang", "yao", "ye", "yi", "yin", "ying", "yong", "you", "yu", "yuan", +"yue", "yun", "za", "zai", "zan", "zang", "zao", "ze", "zei", "zen", "zeng", "zha", "zhai", "zhan", "zhang", "zhao", +"zhe", "zhei", "zhen", "zheng", "zhi", "zhong", "zhou", "zhu", "zhua", "zhuai", "zhuan", "zhuang", "zhui", "zhun", "zhuo", "zi", +"zong", "zou", "zuan", "zui", "zun", "zuo", "zu", "al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi", +"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi", +"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi", +"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi", +"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi", +"al", "an", "ar", "as", "at", "ea", "ed", "en", "er", "es", "ha", "he", "hi", "in", "is", "it", +"le", "me", "nd", "ne", "ng", "nt", "on", "or", "ou", "re", "se", "st", "te", "th", "ti", "to", +"ve", "wa", "all", "and", "are", "but", "ent", "era", "ere", "eve", "for", "had", "hat", "hen", "her", "hin", +"his", "ing", "ion", "ith", "not", "ome", "oul", "our", "sho", "ted", "ter", "tha", "the", "thi") diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index a6fc34f738..779d912cf3 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -177,7 +177,7 @@ throwforce = 10.0 throw_speed = 2 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/created_name = "Cleanbot" /obj/item/weapon/bucket_sensor/attackby(var/obj/item/W, var/mob/user) diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm index 905c53a20a..5f49794d8b 100644 --- a/code/modules/mob/living/bot/farmbot.dm +++ b/code/modules/mob/living/bot/farmbot.dm @@ -313,7 +313,7 @@ var/build_step = 0 var/created_name = "Farmbot" var/obj/tank - w_class = 3.0 + w_class = ITEMSIZE_NORMAL /obj/item/weapon/farmbot_arm_assembly/New(var/newloc, var/theTank) diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index ca4f572775..2259515941 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -304,7 +304,7 @@ throwforce = 10.0 throw_speed = 2 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/created_name = "Floorbot" /obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob) @@ -334,7 +334,7 @@ throwforce = 10.0 throw_speed = 2 throw_range = 5 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/created_name = "Floorbot" /obj/item/weapon/toolbox_tiles_sensor/attackby(var/obj/item/W, mob/user as mob) diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index fffe5879fa..baf6af9eba 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -317,7 +317,7 @@ var/build_step = 0 var/created_name = "Medibot" //To preserve the name if it's a unique medbot I guess var/skin = null //Same as medbot, set to tox or ointment for the respective kits. - w_class = 3.0 + w_class = ITEMSIZE_NORMAL /obj/item/weapon/firstaid_arm_assembly/New() ..() diff --git a/code/modules/mob/living/carbon/alien/diona/diona.dm b/code/modules/mob/living/carbon/alien/diona/diona.dm index 8a487d57b3..74923ae59a 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona.dm @@ -10,7 +10,7 @@ universal_understand = 1 universal_speak = 0 // Dionaea do not need to speak to people other than other dionaea. - can_pull_size = 2 + can_pull_size = ITEMSIZE_SMALL can_pull_mobs = MOB_PULL_SMALLER holder_type = /obj/item/weapon/holder/diona diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 5fe2255803..3f0fa31708 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -22,7 +22,7 @@ desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity." icon = 'icons/obj/assemblies.dmi' icon_state = "mmi_empty" - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_BIO = 3) req_access = list(access_robotics) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 11e3b1197a..973e55a48b 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -7,7 +7,7 @@ vital = 1 icon_state = "brain2" force = 1.0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throwforce = 1.0 throw_speed = 3 throw_range = 5 diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index c61659261d..057c24bdcc 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -3,7 +3,7 @@ desc = "A cube of shining metal, four inches to a side and covered in shallow grooves." icon = 'icons/obj/assemblies.dmi' icon_state = "posibrain" - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 4, TECH_BLUESPACE = 2, TECH_DATA = 4) var/searching = 0 diff --git a/code/modules/mob/living/carbon/brain/robot.dm b/code/modules/mob/living/carbon/brain/robot.dm index d44779c520..d870751dc1 100644 --- a/code/modules/mob/living/carbon/brain/robot.dm +++ b/code/modules/mob/living/carbon/brain/robot.dm @@ -3,7 +3,7 @@ desc = "The pinnacle of artifical intelligence which can be achieved using classical computer science." icon = 'icons/obj/module.dmi' icon_state = "mainboard" - w_class = 3 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 3, TECH_DATA = 4) /obj/item/device/mmi/digital/robot/New() diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index aa4e6ced11..5ba80237ad 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -31,8 +31,7 @@ var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3) var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class - //Sharp objects will always embed if they do enough damage. - if((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) + if(damage > embed_threshold && prob(embed_chance)) src.embed(I, hit_zone) return 1 diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 195816f255..b11a045459 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -424,7 +424,6 @@ if(config.allow_Metadata && client) msg += "OOC Notes: \[View\]\n" // VOREStation End - msg += "*---------*
    " msg += applying_pressure if (pose) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index c3bb679b08..cb50cf6a0d 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -105,6 +105,8 @@ "Your chilly flesh stands out in goosebumps." ) + var/metabolic_rate = 1 + // HUD data vars. var/datum/hud_data/hud var/hud_type diff --git a/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm b/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm index 566fb1b655..3455460cef 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey_vr.dm @@ -8,7 +8,7 @@ default_language = "Skrellian" //Closest we have. /datum/species/monkey/sergal - name = "Sergaling" + name = "Saru" greater_form = "Sergal" icobase = 'icons/mob/human_races/monkeys/r_sergaling_vr.dmi' deform = 'icons/mob/human_races/monkeys/r_sergaling_vr.dmi' @@ -60,7 +60,7 @@ ..(new_loc, "Sobaka") /mob/living/carbon/human/sergallingm/New(var/new_loc) - ..(new_loc, "Sergaling") + ..(new_loc, "Saru") /mob/living/carbon/human/sparram/New(var/new_loc) ..(new_loc, "Sparra") diff --git a/code/modules/mob/living/carbon/human/species/station/station.dm b/code/modules/mob/living/carbon/human/species/station/station.dm index 55da509460..8af22b306e 100644 --- a/code/modules/mob/living/carbon/human/species/station/station.dm +++ b/code/modules/mob/living/carbon/human/species/station/station.dm @@ -104,12 +104,6 @@ min_age = 17 max_age = 80 - blurb = "The Tajaran race is a species of feline-like bipeds hailing from the planet of Ahdomai in the \ - S'randarr system. They have been brought up into the space age by the Humans and Skrell, and have been \ - influenced heavily by their long history of Slavemaster rule. They have a structured, clan-influenced way \ - of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \ - using unique inflections their mouths form." -/* VOREStation Removal blurb = "The Tajaran are a mammalian species resembling roughly felines, hailing from Meralar in the Rarkajar system. \ While reaching to the stars independently from outside influences, the humans engaged them in peaceful trade contact \ and have accelerated the fledgling culture into the interstellar age. Their history is full of war and highly fractious \ @@ -118,7 +112,7 @@ cold_level_1 = 200 //Default 260 cold_level_2 = 140 //Default 200 cold_level_3 = 80 //Default 120 - +/* VOREStation Removal heat_level_1 = 330 //Default 360 heat_level_2 = 380 //Default 400 heat_level_3 = 800 //Default 1000 diff --git a/code/modules/mob/living/carbon/human/species/station/station_vr.dm b/code/modules/mob/living/carbon/human/species/station/station_vr.dm index 8e57ec1363..810867ccc2 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_vr.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_vr.dm @@ -28,7 +28,7 @@ lifespan, but due to their lust for violence, only a handful have ever survived beyond the age of 80, such as the infamous and \ legendary General Rain Silves who is claimed to have lived to 5000." - primitive_form = "Sergaling" + primitive_form = "Saru" spawn_flags = SPECIES_CAN_JOIN appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR @@ -263,9 +263,6 @@ darksight = 4 //Better hunters in the dark. hunger_factor = 0.1 //In exchange, they get hungry a tad faster. num_alternate_languages = 2 - //secondary_langs = list("Sagaru") //No special language, yet. And I'm pretty sure this doesn't even work. - //name_language = "Sagaru" - //color_mult = 1 //Since it's a black sprite, it adds instead of multiplies. min_age = 17 max_age = 80 @@ -276,7 +273,7 @@ but there are multiple exceptions. All xenomorph hybrids have had their ability to lay eggs containing facehuggers \ removed if they had the ability to, although hybrids that previously contained this ability is extremely rare." - //primitive_form = "Sergaling" //No official sprite for them yet. + //primitive_form = "" //None for these guys spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR @@ -298,6 +295,8 @@ /datum/species/tajaran spawn_flags = SPECIES_CAN_JOIN + icobase = 'icons/mob/human_races/r_tajaran_vr.dmi' + deform = 'icons/mob/human_races/r_def_tajaran_vr.dmi' /datum/species/skrell spawn_flags = SPECIES_CAN_JOIN diff --git a/code/modules/mob/living/carbon/metroid/items.dm b/code/modules/mob/living/carbon/metroid/items.dm index 15455f375e..c59c6826d5 100644 --- a/code/modules/mob/living/carbon/metroid/items.dm +++ b/code/modules/mob/living/carbon/metroid/items.dm @@ -4,7 +4,7 @@ icon = 'icons/mob/slimes.dmi' icon_state = "grey slime extract" force = 1.0 - w_class = 1.0 + w_class = ITEMSIZE_TINY throwforce = 0 throw_speed = 3 throw_range = 6 @@ -292,7 +292,7 @@ icon = 'icons/mob/slimes.dmi' icon_state = "slime extract" force = 1.0 - w_class = 1.0 + w_class = ITEMSIZE_TINY throwforce = 1.0 throw_speed = 2 throw_range = 6 diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index 370d3f89d2..16085b05af 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -10,7 +10,7 @@ src.traumatic_shock = \ 1 * src.getOxyLoss() + \ 0.7 * src.getToxLoss() + \ - 1.5 * src.getFireLoss() + \ + 1.2 * src.getFireLoss() + \ 1.2 * src.getBruteLoss() + \ 1.7 * src.getCloneLoss() + \ 2 * src.halloss + \ diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index bd757f9ab6..57a9dd837b 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -7,7 +7,7 @@ pass_flags = 1 mob_size = MOB_SMALL - can_pull_size = 2 + can_pull_size = ITEMSIZE_SMALL can_pull_mobs = MOB_PULL_SMALLER idcard_type = /obj/item/weapon/card/id diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm index 9881948b1b..671f61e29c 100644 --- a/code/modules/mob/living/silicon/robot/analyzer.dm +++ b/code/modules/mob/living/silicon/robot/analyzer.dm @@ -9,7 +9,7 @@ flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 5 throw_range = 10 origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 1, TECH_ENGINEERING = 2) diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index 0641476189..5707d9ac80 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -8,7 +8,7 @@ throwforce = 0 hitsound = 'sound/weapons/bite.ogg' attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") - w_class = 3 + w_class = ITEMSIZE_NORMAL /obj/item/weapon/dogborg/jaws/small name = "puppy jaws" @@ -20,7 +20,7 @@ throwforce = 0 hitsound = 'sound/weapons/bite.ogg' attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") - w_class = 3 + w_class = ITEMSIZE_NORMAL var/emagged = 0 /obj/item/weapon/dogborg/jaws/small/attack_self(mob/user) @@ -37,7 +37,7 @@ throwforce = 0 hitsound = 'sound/weapons/bite.ogg' attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced") - w_class = 3 + w_class = ITEMSIZE_NORMAL else name = "puppy jaws" icon = 'icons/mob/dogborg_vr.dmi' @@ -48,7 +48,7 @@ throwforce = 0 hitsound = 'sound/weapons/bite.ogg' attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed") - w_class = 3 + w_class = ITEMSIZE_NORMAL update_icon() @@ -62,7 +62,7 @@ force = 0 throwforce = 0 attack_verb = list("nuzzled", "nosed", "booped") - w_class = 1 + w_class = ITEMSIZE_TINY /obj/item/device/dogborg/boop_module/New() ..() @@ -122,9 +122,9 @@ desc = "Fetch the thing!" icon = 'icons/mob/dogborg_vr.dmi' icon_state = "dbag" - w_class = 5 - max_w_class = 2 - max_combined_w_class = 2 + w_class = ITEMSIZE_HUGE + max_w_class = ITEMSIZE_SMALL + max_combined_w_class = ITEMSIZE_SMALL storage_slots = 1 collection_mode = 0 can_hold = list() // any @@ -141,7 +141,7 @@ throwforce = 0 hitsound = 'sound/weapons/bite.ogg' attack_verb = list("batted", "pawed", "bopped", "whapped") - w_class = 1 + w_class = ITEMSIZE_TINY var/charge = 0 var/charge_required = 1000 var/charge_per = 100 diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 2930a3ad32..7cce6a484b 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -4,7 +4,7 @@ desc = "Equipment for medical hound. A mounted sleeper that stabilizes patients and can inject reagents in the borg's reserves." icon = 'icons/mob/dogborg_vr.dmi' icon_state = "sleeper" - w_class = 1 + w_class = ITEMSIZE_TINY var/mob/living/carbon/patient = null var/mob/living/silicon/robot/hound = null var/inject_amount = 10 diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 89f7942cc4..dbe09db217 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -37,7 +37,7 @@ var/list/mob_hat_cache = list() integrated_light_power = 3 local_transmit = 1 - can_pull_size = 3 + can_pull_size = ITEMSIZE_NORMAL can_pull_mobs = MOB_PULL_SMALLER mob_bump_flag = SIMPLE_ANIMAL @@ -69,7 +69,7 @@ var/list/mob_hat_cache = list() module_type = /obj/item/weapon/robot_module/drone/construction hat_x_offset = 1 hat_y_offset = -12 - can_pull_size = 5 + can_pull_size = ITEMSIZE_HUGE can_pull_mobs = MOB_PULL_SAME /mob/living/silicon/robot/drone/New() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index ea5c950c19..fbf217d7cf 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -8,6 +8,7 @@ /obj/machinery/drone_fabricator name = "drone fabricator" desc = "A large automated factory for producing maintenance drones." + appearance_flags = 0 density = 1 anchored = 1 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 26fe14d7d1..9dacf9924c 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -11,6 +11,7 @@ clamp_values() handle_regular_status_updates() handle_actions() + handle_instability() if(client) handle_regular_hud_updates() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index f038324299..aa3640a52e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -246,7 +246,7 @@ return var/list/modules = list() modules.Add(robot_module_types) - if((crisis && security_level == SEC_LEVEL_RED) || crisis_override) //Leaving this in until it's balanced appropriately. + if(crisis || security_level == SEC_LEVEL_RED || crisis_override) // VOREStation Edit src << "\red Crisis mode active. Combat module available." modules+="Combat" modtype = input("Please, select a module!", "Robot module", null, null) as null|anything in modules @@ -549,8 +549,8 @@ user << "Close the panel first." else if(cell) user << "There is a power cell already installed." - else if(W.w_class != 3) - user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here." + else if(W.w_class != ITEMSIZE_NORMAL) + user << "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here." else user.drop_item() W.loc = src diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index e5b8ff3de2..6e5616e7b4 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -152,9 +152,9 @@ if( I != src && !I.anchored && !istype(I, /obj/item/clothing/under) && !istype(I, /obj/item/clothing/suit) && !istype(I, /obj/item/projectile) ) var/add = 0 - if(I.w_class == 1.0) + if(I.w_class == ITEMSIZE_TINY) add = 1 - else if(I.w_class == 2.0) + else if(I.w_class == ITEMSIZE_SMALL) add = 3 else add = 5 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index c1ca5732b5..9dee58c29e 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -17,7 +17,7 @@ var/global/list/robot_modules = list( name = "robot module" icon = 'icons/obj/module.dmi' icon_state = "std_module" - w_class = 100.0 + w_class = ITEMSIZE_NO_CONTAINER item_state = "electronic" flags = CONDUCT var/hide_on_manifest = 0 @@ -685,7 +685,7 @@ var/global/list/robot_modules = list( /obj/item/weapon/robot_module/security/combat/New() src.modules += new /obj/item/device/flash(src) - src.modules += new /obj/item/borg/sight/thermal(src) + //src.modules += new /obj/item/borg/sight/thermal(src) // VOREStation Edit src.modules += new /obj/item/weapon/gun/energy/laser/mounted(src) src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src) src.modules += new /obj/item/borg/combat/shield(src) diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index 5ea383aaa6..29251d8a1d 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -18,7 +18,7 @@ tally = speed if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) - tally-=3 + tally-=2 // VOREStation Edit return tally+config.robot_delay @@ -29,4 +29,4 @@ var/datum/robot_component/actuator/A = get_component("actuator") if (cell_use_power(A.active_usage)) - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index ef6b1c7872..d2bd9210bb 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -76,17 +76,16 @@ return //immune /mob/living/silicon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0) - - if (istype(source, /obj/machinery/containment_field)) + if(shock_damage > 0) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread s.set_up(5, 1, loc) s.start() shock_damage *= 0.75 //take reduced damage take_overall_damage(0, shock_damage) - visible_message("\red [src] was shocked by \the [source]!", \ - "\red Energy pulse detected, system damaged!", \ - "\red You hear an electrical crack") + visible_message("[src] was shocked by \the [source]!", \ + "Energy pulse detected, system damaged!", \ + "You hear an electrical crack.") if(prob(20)) Stun(2) return diff --git a/code/modules/mob/living/simple_animal/constructs/soulstone.dm b/code/modules/mob/living/simple_animal/constructs/soulstone.dm index 54fd738279..08160f257f 100644 --- a/code/modules/mob/living/simple_animal/constructs/soulstone.dm +++ b/code/modules/mob/living/simple_animal/constructs/soulstone.dm @@ -7,7 +7,7 @@ icon_state = "soulstone" item_state = "electronic" desc = "A fragment of the legendary treasure known simply as the 'Soul Stone'. The shard still flickers with a fraction of the full artefacts power." - w_class = 2 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4) var/imprinted = "empty" diff --git a/code/modules/mob/living/simple_animal/friendly/birds_vr.dm b/code/modules/mob/living/simple_animal/friendly/birds_vr.dm index 4117cf0f4e..e428fe6c5c 100644 --- a/code/modules/mob/living/simple_animal/friendly/birds_vr.dm +++ b/code/modules/mob/living/simple_animal/friendly/birds_vr.dm @@ -1,7 +1,7 @@ -//Cat +//Why are these a subclass of cat? /mob/living/simple_animal/cat/bird name = "parrot" - desc = "A domesticated bird. Has a tendency to 'adopt' crewmembers." + desc = "A domesticated bird. Tweet tweet!" isPredator = 1 icon = 'icons/mob/birds.dmi' icon_state = "parrot-flap" diff --git a/code/modules/mob/living/simple_animal/friendly/fox_vr.dm b/code/modules/mob/living/simple_animal/friendly/fox_vr.dm index a6c0065a28..d58afcb40e 100644 --- a/code/modules/mob/living/simple_animal/friendly/fox_vr.dm +++ b/code/modules/mob/living/simple_animal/friendly/fox_vr.dm @@ -1,5 +1,5 @@ /mob/living/simple_animal/fox - name = "Fox" + name = "fox" desc = "It's a fox. I wonder what it says?" icon = 'icons/mob/fox_vr.dmi' icon_state = "fox" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index fa2d85d5bb..cd545e0a87 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -31,7 +31,7 @@ holder_type = /obj/item/weapon/holder/mouse mob_size = MOB_MINISCULE - can_pull_size = 1 + can_pull_size = ITEMSIZE_TINY can_pull_mobs = MOB_PULL_NONE /mob/living/simple_animal/mouse/Life() diff --git a/code/modules/mob/living/simple_animal/friendly/snake_vr.dm b/code/modules/mob/living/simple_animal/friendly/snake_vr.dm index f53c8f4648..0f747e9d7f 100644 --- a/code/modules/mob/living/simple_animal/friendly/snake_vr.dm +++ b/code/modules/mob/living/simple_animal/friendly/snake_vr.dm @@ -1,5 +1,5 @@ /mob/living/simple_animal/snake - name = "Snake" + name = "snake" desc = "A big thick snake." icon = 'icons/mob/snake_vr.dmi' icon_state = "snake" diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index cffa215a00..fadfafc458 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -255,7 +255,7 @@ var/list/items = list() for(var/obj/item/I in view(1,src)) - if(I.loc != src && I.w_class <= 2 && I.Adjacent(src) ) + if(I.loc != src && I.w_class <= ITEMSIZE_SMALL && I.Adjacent(src) ) items.Add(I) var/obj/selection = input("Select an item.", "Pickup") in items diff --git a/code/modules/mob/living/simple_animal/head.dm b/code/modules/mob/living/simple_animal/head.dm index 0ce662d613..88a9f3d6ca 100644 --- a/code/modules/mob/living/simple_animal/head.dm +++ b/code/modules/mob/living/simple_animal/head.dm @@ -28,7 +28,7 @@ "Crab say what?", "Man they say we have space lizards now, man this shit is getting more wack every minute", "The so called \"improved\" station AI is just bullshit, that thing aint fun for noone", - "The Station Administrator is a traitor, he took my power core.", + "The Colony Director is a traitor, he took my power core.", "Say \"what\" again. Say \"what\" again. I dare you. I double-dare you, motherfucker. Say \"what\" one more goddamn time.", "Ezekiel 25:17 ,The path of the righteous man is beset on all sides by the iniquities of the selfish and the tyranny of evil men. Blessed is he who in the name of charity and good will shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who attempt to poison and destroy my brothers. And you will know my name is the Lord... when I lay my vengeance upon thee.", "Did you notice a sign out in front of my house that said \"Dead Nigger Storage\"?") diff --git a/code/modules/mob/living/simple_animal/hostile/vore/alien.dm b/code/modules/mob/living/simple_animal/hostile/vore/alien.dm index e157f8aec2..404957be5e 100644 --- a/code/modules/mob/living/simple_animal/hostile/vore/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/vore/alien.dm @@ -50,11 +50,11 @@ icon_living = "xenosentinel" icon_dead = "xenosentinel-dead" health = 120 - melee_damage_lower = 15 - melee_damage_upper = 15 - ranged = 1 - projectiletype = /obj/item/projectile/neurotox - projectilesound = 'sound/weapons/pierce.ogg' + melee_damage_lower = 30 // Buffed from 15 since vore doesn't work for ranged mobs. + melee_damage_upper = 30 +// ranged = 1 +// projectiletype = /obj/item/projectile/neurotox +// projectilesound = 'sound/weapons/pierce.ogg' /mob/living/simple_animal/hostile/vore/alien/queen @@ -63,13 +63,13 @@ icon_living = "xenoqueen" icon_dead = "xenoqueen-dead" maxHealth = 250 - melee_damage_lower = 15 - melee_damage_upper = 15 - ranged = 1 + melee_damage_lower = 30 // Buffed from 15 since vore doesn't work for ranged mobs. + melee_damage_upper = 30 +// ranged = 1 move_to_delay = 3 - projectiletype = /obj/item/projectile/neurotox - projectilesound = 'sound/weapons/pierce.ogg' - rapid = 1 +// projectiletype = /obj/item/projectile/neurotox +// projectilesound = 'sound/weapons/pierce.ogg' +// rapid = 1 status_flags = 0 /mob/living/simple_animal/hostile/vore/alien/queen/large @@ -87,6 +87,7 @@ pixel_x = -16 pixel_y = 0 capacity = 3 + eat_chance = 80 /obj/item/projectile/neurotox damage = 30 @@ -95,4 +96,5 @@ /mob/living/simple_animal/hostile/vore/alien/death() ..() visible_message("[src] lets out a waning guttural screech, green blood bubbling from its maw...") - playsound(src, 'sound/voice/hiss6.ogg', 100, 1) \ No newline at end of file + playsound(src, 'sound/voice/hiss6.ogg', 100, 1) + invisibility = 25 // To reset invisibility to be visible. \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/bee.dm b/code/modules/mob/living/simple_animal/hostile/vore/bee.dm new file mode 100644 index 0000000000..70b517338e --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/bee.dm @@ -0,0 +1,37 @@ +/mob/living/simple_animal/hostile/vore/retaliate/bee + name = "space bumble bee" + desc = "Buzz buzz." + icon_state = "bee" + icon_living = "bee" + icon_dead = "bee-dead" + speak = list("Buzzzz") + speak_chance = 1 + turns_per_move = 5 + response_help = "pets the" + response_disarm = "gently pushes aside the" + response_harm = "hits the" + speed = 5 + maxHealth = 25 + health = 25 + + harm_intent_damage = 8 + melee_damage_lower = 15 // To do: Make it toxin damage. + melee_damage_upper = 15 + attacktext = "stung" +// attack_sound = 'sound/weapons/bite.ogg' + + //Space bees aren't affected by atmos. + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + minbodytemp = 0 + + faction = "bee" + +/mob/living/simple_animal/hostile/vore/retaliate/bee/Process_Spacemove(var/check_drift = 0) + return 1 //No drifting in space for space bee! \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/carp.dm b/code/modules/mob/living/simple_animal/hostile/vore/carp.dm index 9f07c7a6d5..91f7528220 100644 --- a/code/modules/mob/living/simple_animal/hostile/vore/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/vore/carp.dm @@ -22,9 +22,6 @@ attacktext = "bitten" attack_sound = 'sound/weapons/bite.ogg' - capacity = 1 - max_size = 0.5 - //Space carp aren't affected by atmos. min_oxy = 0 max_oxy = 0 @@ -41,7 +38,7 @@ faction = "carp" /mob/living/simple_animal/hostile/vore/carp/Process_Spacemove(var/check_drift = 0) - return 1 //No drifting in space for space carp! //original comments do not steal + return 1 //No drifting in space for space carp! /mob/living/simple_animal/hostile/vore/carp/FindTarget() . = ..() @@ -85,7 +82,7 @@ break_stuff_probability = 15 /mob/living/simple_animal/hostile/vore/large/carp/Process_Spacemove(var/check_drift = 0) - return 1 //No drifting in space for space carp! //original comments do not steal + return 1 //No drifting in space for space carp! /mob/living/simple_animal/hostile/vore/large/carp/FindTarget() . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/vore/catgirl.dm b/code/modules/mob/living/simple_animal/hostile/vore/catgirl.dm new file mode 100644 index 0000000000..f9c53fd3f3 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/catgirl.dm @@ -0,0 +1,17 @@ +/mob/living/simple_animal/hostile/vore/retaliate/catgirl + name = "catgirl" + desc = "Her hobbies are catnaps, knocking things over, and headpats." + icon_dead = "catgirl-dead" + icon_living = "catgirl" + icon_state = "catgirl" + speed = 5 + harm_intent_damage = 5 + melee_damage_lower = 5 + melee_damage_upper = 10 + picky = 0 // Catgirls just want to eat yoouuu + speak = list("Meow!","Esp!","Purr!","HSSSSS","Mew?","Nya~") + speak_emote = list("purrs","meows") + emote_hear = list("meows","mews") + emote_see = list("shakes her head","shivers") + eat_chance = 100 + attacktext = "swatted" \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/deathclaw.dm b/code/modules/mob/living/simple_animal/hostile/vore/deathclaw.dm index eb031127ae..e540ea5b20 100644 --- a/code/modules/mob/living/simple_animal/hostile/vore/deathclaw.dm +++ b/code/modules/mob/living/simple_animal/hostile/vore/deathclaw.dm @@ -5,6 +5,7 @@ icon_dead = "deathclaw-dead" icon_living = "deathclaw" icon_state = "deathclaw" + attacktext = "mauled" old_x = -16 old_y = 0 pixel_x = -16 diff --git a/code/modules/mob/living/simple_animal/hostile/vore/dragon.dm b/code/modules/mob/living/simple_animal/hostile/vore/dragon.dm new file mode 100644 index 0000000000..56d1571c1f --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/dragon.dm @@ -0,0 +1,34 @@ +/mob/living/simple_animal/hostile/vore/large/dragon + name = "phoron dragon" + desc = "Here to pillage stations and kidnap princesses, and there probably aren't any princesses." + icon_dead = "reddragon-dead" + icon_living = "reddragon" + icon_state = "reddragon" + maxHealth = 500 // Boss + health = 500 + meat_type = /obj/item/weapon/reagent_containers/food/snacks/carpmeat + melee_damage_lower = 10 + melee_damage_upper = 60 + old_y = 0 + pixel_y = 0 + capacity = 2 + faction = "dragon" + + //Space dragons aren't affected by atmos. + min_oxy = 0 + max_oxy = 0 + min_tox = 0 + max_tox = 0 + min_co2 = 0 + max_co2 = 0 + min_n2 = 0 + max_n2 = 0 + minbodytemp = 0 + +/mob/living/simple_animal/hostile/vore/large/dragon/Process_Spacemove(var/check_drift = 0) + return 1 //No drifting in space for space carp! + +/mob/living/simple_animal/hostile/vore/large/dragon/FindTarget() + . = ..() + if(.) + custom_emote(1,"snaps at [.]") \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/frog.dm b/code/modules/mob/living/simple_animal/hostile/vore/frog.dm new file mode 100644 index 0000000000..546b1f9a1e --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/frog.dm @@ -0,0 +1,18 @@ +/mob/living/simple_animal/hostile/vore/frog + name = "giant frog" + desc = "You've heard of having a frog in your throat, now get ready for the reverse." + icon_dead = "frog-dead" + icon_living = "frog" + icon_state = "frog" + speed = 5 + harm_intent_damage = 5 + melee_damage_lower = 10 + melee_damage_upper = 25 + eat_chance = 90 + +// Pepe is love, not hate. +/mob/living/simple_animal/hostile/vore/frog/New() + if(rand(1,1000000) == 1) + name = "rare Pepe" + desc = "You found a rare Pepe. Screenshot for good luck." + ..() \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/horse.dm b/code/modules/mob/living/simple_animal/hostile/vore/horse.dm new file mode 100644 index 0000000000..515fc3e04e --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/horse.dm @@ -0,0 +1,23 @@ +/mob/living/simple_animal/hostile/vore/retaliate/horse + name = "horse" + desc = "Don't look it in the mouth." + icon_state = "horse" + icon_living = "horse" + icon_dead = "horse-dead" + speak = list("NEHEHEHEHEH","Neh?") + speak_emote = list("whinnies") + emote_hear = list("snorts") + emote_see = list("shakes its head", "stamps a hoof", "looks around") + speak_chance = 1 + turns_per_move = 5 + see_in_dark = 6 + meat_type = /obj/item/weapon/reagent_containers/food/snacks/meat + meat_amount = 4 + response_help = "pets" + response_disarm = "gently pushes aside" + response_harm = "kicks" + faction = "horse" + attacktext = "kicked" + health = 60 + melee_damage_lower = 1 + melee_damage_upper = 5 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/mimic.dm b/code/modules/mob/living/simple_animal/hostile/vore/mimic.dm index 1a765b49d1..9e99f923a6 100644 --- a/code/modules/mob/living/simple_animal/hostile/vore/mimic.dm +++ b/code/modules/mob/living/simple_animal/hostile/vore/mimic.dm @@ -36,6 +36,7 @@ faction = "mimic" move_to_delay = 8 + eat_chance = 90 /mob/living/simple_animal/hostile/vore/mimic/FindTarget() . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/vore/panther.dm b/code/modules/mob/living/simple_animal/hostile/vore/panther.dm new file mode 100644 index 0000000000..30a0a3c591 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/panther.dm @@ -0,0 +1,19 @@ +/mob/living/simple_animal/hostile/vore/large/panther + name = "panther" + desc = "Runtime's larger, less cuddly cousin." + icon_state = "panther" + icon_living = "panther" + icon_dead = "panther-dead" + speak = list("RAWR!","Rawr!","GRR!","Growl!") + speak_emote = list("growls", "roars") + emote_hear = list("rawrs","rumbles","rowls") + emote_see = list("stares ferociously", "snarls") + move_to_delay = 4 + maxHealth = 200 + health = 200 + melee_damage_lower = 10 + melee_damage_upper = 30 + old_y = 0 + pixel_y = 0 + capacity = 2 + faction = "panther" \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/vore/retaliate.dm new file mode 100644 index 0000000000..9b67b07f0d --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/retaliate.dm @@ -0,0 +1,49 @@ +/mob/living/simple_animal/hostile/vore/retaliate + var/list/enemies = list() + +/mob/living/simple_animal/hostile/vore/retaliate/Found(var/atom/A) + if(isliving(A)) + var/mob/living/L = A + if(!L.stat) + stance = STANCE_ATTACK + return L + else + enemies -= L + else if(istype(A, /obj/mecha)) + var/obj/mecha/M = A + if(M.occupant) + stance = STANCE_ATTACK + return A + +/mob/living/simple_animal/hostile/vore/retaliate/ListTargets() + if(!enemies.len) + return list() + var/list/see = ..() + see &= enemies // Remove all entries that aren't in enemies + return see + +/mob/living/simple_animal/hostile/vore/retaliate/proc/Retaliate() + ..() + var/list/around = view(src, 7) + + for(var/atom/movable/A in around) + if(A == src) + continue + if(isliving(A)) + var/mob/living/M = A + if(!attack_same && M.faction != faction) + enemies |= M + else if(istype(A, /obj/mecha)) + var/obj/mecha/M = A + if(M.occupant) + enemies |= M + enemies |= M.occupant + + for(var/mob/living/simple_animal/hostile/vore/retaliate/H in around) + if(!attack_same && !H.attack_same && H.faction == faction) + H.enemies |= enemies + return 0 + +/mob/living/simple_animal/hostile/vore/retaliate/adjustBruteLoss(var/damage) + ..(damage) + Retaliate() diff --git a/code/modules/mob/living/simple_animal/hostile/vore/vore.dm b/code/modules/mob/living/simple_animal/hostile/vore/vore.dm index 85ba587db3..961f712f6b 100644 --- a/code/modules/mob/living/simple_animal/hostile/vore/vore.dm +++ b/code/modules/mob/living/simple_animal/hostile/vore/vore.dm @@ -26,7 +26,8 @@ Don't use ranged mobs for vore mobs. var/min_size = 0.25 // Min: 0.25 var/picky = 1 // Won't eat undigestable prey by default var/fullness = 0 - swallowTime = 3 // Hungry little bastards. + var/eat_chance = 50 + swallowTime = 1 // Hungry little bastards. // By default, this is what most vore mobs are capable of. response_help = "pets" @@ -62,7 +63,7 @@ Don't use ranged mobs for vore mobs. var/datum/belly/B = vore_organs[I] for(var/mob/living/M in B.internal_contents) fullness += M.size_multiplier - fullness = round(fullness, 1) // Because intervals of 0.25 are going to make sprite artists cry. + fullness = round(fullness, 1) // Because intervals of 0.25 are going to make sprite artists cry. if(fullness) if (fullness > capacity) // Player controlled. icon_state = "[initial(icon_state)]-[capacity]" @@ -117,7 +118,7 @@ Don't use ranged mobs for vore mobs. // Is our target edible and standing up? if(target_mob.canmove && target_mob.size_multiplier >= min_size && target_mob.size_multiplier <= max_size && !(target_mob in prey_exclusions)) - if(prob(50)) + if(prob(eat_chance)) target_mob.Weaken(5) target_mob.visible_message("\the [src] pounces on \the [target_mob]!!") animal_nom(target_mob) @@ -156,4 +157,5 @@ Don't use ranged mobs for vore mobs. pixel_x = -16 pixel_y = -16 maxHealth = 200 - health = 200 \ No newline at end of file + health = 200 + eat_chance = 60 // Bigger mobs, bigger appetite. \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/vore/wolf.dm b/code/modules/mob/living/simple_animal/hostile/vore/wolf.dm new file mode 100644 index 0000000000..9c5953ee04 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/vore/wolf.dm @@ -0,0 +1,11 @@ +/mob/living/simple_animal/hostile/vore/wolf + name = "grey wolf" + desc = "My, what big jaws it has!" + icon_dead = "wolf-dead" + icon_living = "wolf" + icon_state = "wolf" + speed = 5 + harm_intent_damage = 5 + melee_damage_lower = 10 + melee_damage_upper = 25 + minbodytemp = 200 \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 1e6752ab77..36a1ac186a 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -515,12 +515,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class < 2) + if(I.w_class < ITEMSIZE_SMALL) return I if(iscarbon(AM)) var/mob/living/carbon/C = AM - if((C.l_hand && C.l_hand.w_class <= 2) || (C.r_hand && C.r_hand.w_class <= 2)) + if((C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL) || (C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL)) return C return null @@ -544,12 +544,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class <= 2) + if(I.w_class <= ITEMSIZE_SMALL) return I if(iscarbon(AM)) var/mob/living/carbon/C = AM - if(C.l_hand && C.l_hand.w_class <= 2 || C.r_hand && C.r_hand.w_class <= 2) + if(C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL || C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL) return C return null @@ -571,7 +571,7 @@ for(var/obj/item/I in view(1,src)) //Make sure we're not already holding it and it's small enough - if(I.loc != src && I.w_class <= 2) + if(I.loc != src && I.w_class <= ITEMSIZE_SMALL) //If we have a perch and the item is sitting on it, continue if(!client && parrot_perch && I.loc == parrot_perch.loc) @@ -600,10 +600,10 @@ var/obj/item/stolen_item = null for(var/mob/living/carbon/C in view(1,src)) - if(C.l_hand && C.l_hand.w_class <= 2) + if(C.l_hand && C.l_hand.w_class <= ITEMSIZE_SMALL) stolen_item = C.l_hand - if(C.r_hand && C.r_hand.w_class <= 2) + if(C.r_hand && C.r_hand.w_class <= ITEMSIZE_SMALL) stolen_item = C.r_hand if(stolen_item) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 20606fc5da..54356e34ea 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -310,6 +310,8 @@ M.do_attack_animation(src) if(I_HURT) + if (M.loc == src) + return // VOREStation Edit adjustBruteLoss(harm_intent_damage) M.visible_message("\red [M] [response_harm] \the [src]") M.do_attack_animation(src) @@ -341,6 +343,8 @@ O.attack(src, user, user.zone_sel.selecting) /mob/living/simple_animal/hit_with_weapon(obj/item/O, mob/living/user, var/effective_force, var/hit_zone) + if (user.loc == src) + return 1 // VOREStation Edit visible_message("\The [src] has been attacked with \the [O] by [user].") @@ -399,6 +403,9 @@ /mob/living/simple_animal/adjustBruteLoss(damage) health = Clamp(health - damage, 0, maxHealth) +/mob/living/simple_animal/adjustFireLoss(damage) + health = Clamp(health - damage, 0, maxHealth) + /mob/living/simple_animal/proc/SA_attackable(target_mob) if (isliving(target_mob)) var/mob/living/L = target_mob @@ -637,4 +644,16 @@ if(!target_mob || enroute) spawn(10) if(!src.stat) - horde() \ No newline at end of file + horde() + +/mob/living/simple_animal/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null) + shock_damage *= siemens_coeff + if (shock_damage < 1) + return 0 + + adjustFireLoss(shock_damage) + playsound(loc, "sparks", 50, 1, -1) + + var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread + s.set_up(5, 1, loc) + s.start() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 41cbbbc5e9..2a27bda5db 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -895,7 +895,7 @@ mob/proc/yank_out_object() H.shock_stage+=20 affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction") - if(prob(selection.w_class * 5) && (affected < ORGAN_ROBOT)) //I'M SO ANEMIC I COULD JUST -DIE-. + if(prob(selection.w_class * 5) && (affected.robotic < ORGAN_ROBOT)) //I'M SO ANEMIC I COULD JUST -DIE-. var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15)) affected.wounds += I H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 1679da5a0e..a586ad1efb 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -139,7 +139,7 @@ var/const/deafness = 2//Carbon var/const/muteness = 4//Carbon - var/can_pull_size = 10 // Maximum w_class the mob can pull. + var/can_pull_size = ITEMSIZE_NO_CONTAINER // Maximum w_class the mob can pull. var/can_pull_mobs = MOB_PULL_LARGER // Whether or not the mob can pull other mobs. var/datum/dna/dna = null//Carbon diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index a7b982b1b7..bbddd4c07b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -34,7 +34,7 @@ layer = 21 abstract = 1 item_state = "nothing" - w_class = 5.0 + w_class = ITEMSIZE_HUGE /obj/item/weapon/grab/New(mob/user, mob/victim) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f50b91f291..e5a095b932 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -305,6 +305,7 @@ if(!IsJobAvailable(rank)) src << alert("[rank] is not available. Please try another.") return 0 + if (!attempt_vr(src,"spawn_checks_vr",list())) return 0 // VOREStation Insert spawning = 1 close_spawn_windows() @@ -396,6 +397,7 @@ /mob/new_player/proc/create_character() + if (!attempt_vr(src,"spawn_checks_vr",list())) return 0 // VOREStation Insert spawning = 1 close_spawn_windows() diff --git a/code/modules/mob/new_player/new_player_vr.dm b/code/modules/mob/new_player/new_player_vr.dm new file mode 100644 index 0000000000..d2dbfadf52 --- /dev/null +++ b/code/modules/mob/new_player/new_player_vr.dm @@ -0,0 +1,8 @@ +/mob/new_player/proc/spawn_checks_vr() + var/pass = 1 + if (config.allow_Metadata && client && client.prefs && (isnull(client.prefs.metadata) || length(client.prefs.metadata) < 5)) + src << "You must first set your OOC notes before spawning in!" + pass = 0 + if (!pass) + alert(src,"There were problems with spawning your character. Check your message log for details.","Error","OK") + return pass diff --git a/code/modules/mob/new_player/skill.dm b/code/modules/mob/new_player/skill.dm index e1e1025bae..5fb0e81745 100644 --- a/code/modules/mob/new_player/skill.dm +++ b/code/modules/mob/new_player/skill.dm @@ -62,7 +62,7 @@ var/global/list/SKILL_PRE = list("Engineer" = SKILL_ENGINEER, "Roboticist" = SKI /datum/skill/knowledge/law ID = "law" name = "Corporate Law" - desc = "Your knowledge of corporate law and procedures. This includes Corporate Regulations, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for Station Administrators." + desc = "Your knowledge of corporate law and procedures. This includes Corporate Regulations, as well as general station rulings and procedures. A low level in this skill is typical for security officers, a high level in this skill is typical for Colony Directors." field = "Security" secondary = 1 diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index 65d13fbe55..3f873c7a79 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -193,6 +193,10 @@ spikyponytail name = "Spiky Ponytail" icon_state = "hair_spikyponytail" + + zieglertail + name = "Zieglertail" + icon_state = "hair_ziegler" wisp name = "Wisp" icon_state = "hair_wisp" @@ -510,6 +514,10 @@ name = "Double-Bun" icon_state = "hair_doublebun" + oxton + name = "Oxton" + icon_state = "hair_oxton" + /* /////////////////////////////////// diff --git a/code/modules/nano/modules/law_manager.dm b/code/modules/nano/modules/law_manager.dm index 2c691349e0..0d1c40a737 100644 --- a/code/modules/nano/modules/law_manager.dm +++ b/code/modules/nano/modules/law_manager.dm @@ -203,7 +203,13 @@ return law_sets /datum/nano_module/law_manager/proc/is_malf(var/mob/user) - return (is_admin(user) && !owner.is_slaved()) || owner.is_malf_or_traitor() + return (is_admin(user) && !owner.is_slaved()) || is_special_role(user) + +/datum/nano_module/law_manager/proc/is_special_role(var/mob/user) + if(user.mind.special_role) + return TRUE + else + return FALSE /mob/living/silicon/proc/is_slaved() return 0 diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 82201d1efa..f21b83bcac 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -877,7 +877,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(DROPLIMB_BURN) new /obj/effect/decal/cleanable/ash(get_turf(victim)) for(var/obj/item/I in src) - if(I.w_class > 2 && !istype(I,/obj/item/organ)) + if(I.w_class > ITEMSIZE_SMALL && !istype(I,/obj/item/organ)) I.loc = get_turf(src) qdel(src) if(DROPLIMB_BLUNT) @@ -899,7 +899,7 @@ Note that amputating the affected organ does in fact remove the infection from t I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30) for(var/obj/item/I in src) - if(I.w_class <= 2) + if(I.w_class <= ITEMSIZE_SMALL) qdel(I) continue I.loc = get_turf(src) @@ -1002,6 +1002,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(!(species.flags & NO_PAIN)) owner.emote("scream") + playsound(src.loc, "fracture", 10, 1, -2) status |= ORGAN_BROKEN broken_description = pick("broken","fracture","hairline fracture") @@ -1144,7 +1145,7 @@ Note that amputating the affected organ does in fact remove the infection from t for(var/atom/movable/implant in implants) //large items and non-item objs fall to the floor, everything else stays var/obj/item/I = implant - if(istype(I) && I.w_class < 3) + if(istype(I) && I.w_class < ITEMSIZE_NORMAL) implant.loc = get_turf(victim.loc) else implant.loc = src diff --git a/code/modules/organs/robolimbs_vr.dm b/code/modules/organs/robolimbs_vr.dm index f57b9bc4f7..965e7a0939 100644 --- a/code/modules/organs/robolimbs_vr.dm +++ b/code/modules/organs/robolimbs_vr.dm @@ -24,4 +24,11 @@ /obj/item/weapon/disk/limb/talon - company = "Talon LLC" \ No newline at end of file + company = "Talon LLC" + +/datum/robolimb/zenghu_taj + company = "Zeng-Hu - Tajaran" + desc = "This limb has a rubbery fleshtone covering with visible seams." + icon = 'icons/mob/human_races/cyberlimbs/zenghu/zenghu_taj.dmi' + unavailable_to_build = 1 + parts = list(BP_HEAD) \ No newline at end of file diff --git a/code/modules/organs/subtypes/diona.dm b/code/modules/organs/subtypes/diona.dm index 7f371066bb..4ae5e964ac 100644 --- a/code/modules/organs/subtypes/diona.dm +++ b/code/modules/organs/subtypes/diona.dm @@ -30,7 +30,7 @@ icon_name = "torso" max_damage = 200 min_broken_damage = 50 - w_class = 5 + w_class = ITEMSIZE_HUGE body_part = UPPER_TORSO vital = 1 cannot_amputate = 1 @@ -43,7 +43,7 @@ icon_name = "groin" max_damage = 100 min_broken_damage = 50 - w_class = 4 + w_class = ITEMSIZE_LARGE body_part = LOWER_TORSO parent_organ = BP_TORSO gendered_icon = 1 @@ -54,7 +54,7 @@ icon_name = "l_arm" max_damage = 50 min_broken_damage = 20 - w_class = 3 + w_class = ITEMSIZE_NORMAL body_part = ARM_LEFT parent_organ = BP_TORSO can_grasp = 1 @@ -71,7 +71,7 @@ icon_name = "l_leg" max_damage = 50 min_broken_damage = 20 - w_class = 3 + w_class = ITEMSIZE_NORMAL body_part = LEG_LEFT icon_position = LEFT parent_organ = BP_GROIN @@ -90,7 +90,7 @@ icon_name = "l_foot" max_damage = 35 min_broken_damage = 10 - w_class = 2 + w_class = ITEMSIZE_SMALL body_part = FOOT_LEFT icon_position = LEFT parent_organ = "l_leg" @@ -112,7 +112,7 @@ icon_name = "l_hand" max_damage = 40 min_broken_damage = 15 - w_class = 2 + w_class = ITEMSIZE_SMALL body_part = HAND_LEFT parent_organ = "l_arm" can_grasp = 1 diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 5b40922642..e0409fb16e 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -10,7 +10,7 @@ icon_name = "torso" max_damage = 100 min_broken_damage = 35 - w_class = 5 + w_class = ITEMSIZE_HUGE body_part = UPPER_TORSO vital = 1 amputation_point = "spine" @@ -34,7 +34,7 @@ icon_name = "groin" max_damage = 100 min_broken_damage = 35 - w_class = 4 + w_class = ITEMSIZE_LARGE body_part = LOWER_TORSO vital = 1 parent_organ = BP_TORSO @@ -51,7 +51,7 @@ icon_name = "l_arm" max_damage = 80 min_broken_damage = 30 - w_class = 3 + w_class = ITEMSIZE_NORMAL body_part = ARM_LEFT parent_organ = BP_TORSO joint = "left elbow" @@ -72,7 +72,7 @@ icon_name = "l_leg" max_damage = 80 min_broken_damage = 30 - w_class = 3 + w_class = ITEMSIZE_NORMAL body_part = LEG_LEFT icon_position = LEFT parent_organ = BP_GROIN @@ -95,7 +95,7 @@ icon_name = "l_foot" max_damage = 50 min_broken_damage = 15 - w_class = 2 + w_class = ITEMSIZE_SMALL body_part = FOOT_LEFT icon_position = LEFT parent_organ = "l_leg" @@ -124,7 +124,7 @@ icon_name = "l_hand" max_damage = 50 min_broken_damage = 15 - w_class = 2 + w_class = ITEMSIZE_SMALL body_part = HAND_LEFT parent_organ = "l_arm" joint = "left wrist" @@ -154,7 +154,7 @@ slot_flags = SLOT_BELT max_damage = 75 min_broken_damage = 35 - w_class = 3 + w_class = ITEMSIZE_NORMAL body_part = HEAD vital = 1 parent_organ = BP_TORSO diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 891fd809fe..ccb527986f 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -4,7 +4,7 @@ icon_state = "clipboard" item_state = "clipboard" throwforce = 0 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 3 throw_range = 10 var/obj/item/weapon/pen/haspen //The stored pen. @@ -43,7 +43,7 @@ return /obj/item/weapon/clipboard/attackby(obj/item/weapon/W as obj, mob/user as mob) - + if(istype(W, /obj/item/weapon/paper) || istype(W, /obj/item/weapon/photo)) user.drop_item() W.loc = src @@ -106,20 +106,20 @@ else if(href_list["write"]) var/obj/item/weapon/P = locate(href_list["write"]) - + if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) && (P == toppaper) ) - + var/obj/item/I = usr.get_active_hand() - + if(istype(I, /obj/item/weapon/pen)) - + P.attackby(I, usr) else if(href_list["remove"]) var/obj/item/P = locate(href_list["remove"]) - + if(P && (P.loc == src) && (istype(P, /obj/item/weapon/paper) || istype(P, /obj/item/weapon/photo)) ) - + P.loc = usr.loc usr.put_in_hands(P) if(P == toppaper) @@ -129,24 +129,24 @@ toppaper = newtop else toppaper = null - + else if(href_list["rename"]) var/obj/item/weapon/O = locate(href_list["rename"]) - + if(O && (O.loc == src)) if(istype(O, /obj/item/weapon/paper)) var/obj/item/weapon/paper/to_rename = O to_rename.rename() - + else if(istype(O, /obj/item/weapon/photo)) var/obj/item/weapon/photo/to_rename = O to_rename.rename() else if(href_list["read"]) var/obj/item/weapon/paper/P = locate(href_list["read"]) - + if(P && (P.loc == src) && istype(P, /obj/item/weapon/paper) ) - + if(!(istype(usr, /mob/living/carbon/human) || istype(usr, /mob/observer/dead) || istype(usr, /mob/living/silicon))) usr << browse("[P.name][stars(P.info)][P.stamps]", "window=[P.name]") onclose(usr, "[P.name]") diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index f2c309ff03..64db4eb484 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -1,5 +1,5 @@ var/list/obj/machinery/photocopier/faxmachine/allfaxes = list() -var/list/admin_departments = list("[boss_name]", "Sif Governmental Authority", "Supply") +var/list/admin_departments = list("[boss_name]", "Virgo Prime Governmental Authority", "Supply") // Vorestation edit var/list/alldepartments = list() var/list/adminfaxes = list() //cache for faxes that have been sent to admins @@ -182,8 +182,8 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins //message badmins that a fax has arrived if (destination == boss_name) message_admins(sender, "[uppertext(boss_short)] FAX", rcvdcopy, "CentComFaxReply", "#006100") - else if ("Sif Governmental Authority") - message_admins(sender, "SIF GOVERNMENT FAX", rcvdcopy, "CentComFaxReply", "#1F66A0") + else if ("Virgo Prime Governmental Authority") // Vorestation edit + message_admins(sender, "VIRGO GOVERNMENT FAX", rcvdcopy, "CentComFaxReply", "#1F66A0") // Vorestation edit else if ("Supply") message_admins(sender, "[uppertext(boss_short)] SUPPLY FAX", rcvdcopy, "CentComFaxReply", "#5F4519") else diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index b6450b4455..f24ce267df 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -3,7 +3,7 @@ desc = "A folder." icon = 'icons/obj/bureaucracy.dmi' icon_state = "folder" - w_class = 2 + w_class = ITEMSIZE_SMALL pressure_resistance = 2 /obj/item/weapon/folder/blue @@ -23,7 +23,7 @@ icon_state = "folder_white" /obj/item/weapon/folder/blue_captain - desc = "A blue folder with Station Administrator markings." + desc = "A blue folder with Colony Director markings." icon_state = "folder_captain" /obj/item/weapon/folder/blue_hop diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index d290c07382..e183c3b282 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -10,7 +10,7 @@ icon_state = "paper" item_state = "paper" throwforce = 0 - w_class = 1 + w_class = ITEMSIZE_TINY throw_range = 1 throw_speed = 1 layer = 4 @@ -521,7 +521,7 @@ /obj/item/weapon/paper/courtroom name = "A Crash Course in Legal SOP on SS13" - info = "Roles:
    \nThe Detective is basically the investigator and prosecutor.
    \nThe Staff Assistant can perform these functions with written authority from the Detective.
    \nThe Station Administrator/HoP/Warden is ct as the judicial authority.
    \nThe Security Officers are responsible for executing warrants, security during trial, and prisoner transport.
    \n
    \nInvestigative Phase:
    \nAfter the crime has been committed the Detective's job is to gather evidence and try to ascertain not only who did it but what happened. He must take special care to catalogue everything and don't leave anything out. Write out all the evidence on paper. Make sure you take an appropriate number of fingerprints. IF he must ask someone questions he has permission to confront them. If the person refuses he can ask a judicial authority to write a subpoena for questioning. If again he fails to respond then that person is to be jailed as insubordinate and obstructing justice. Said person will be released after he cooperates.
    \n
    \nONCE the FT has a clear idea as to who the criminal is he is to write an arrest warrant on the piece of paper. IT MUST LIST THE CHARGES. The FT is to then go to the judicial authority and explain a small version of his case. If the case is moderately acceptable the authority should sign it. Security must then execute said warrant.
    \n
    \nPre-Pre-Trial Phase:
    \nNow a legal representative must be presented to the defendant if said defendant requests one. That person and the defendant are then to be given time to meet (in the jail IS ACCEPTABLE). The defendant and his lawyer are then to be given a copy of all the evidence that will be presented at trial (rewriting it all on paper is fine). THIS IS CALLED THE DISCOVERY PACK. With a few exceptions, THIS IS THE ONLY EVIDENCE BOTH SIDES MAY USE AT TRIAL. IF the prosecution will be seeking the death penalty it MUST be stated at this time. ALSO if the defense will be seeking not guilty by mental defect it must state this at this time to allow ample time for examination.
    \nNow at this time each side is to compile a list of witnesses. By default, the defendant is on both lists regardless of anything else. Also the defense and prosecution can compile more evidence beforehand BUT in order for it to be used the evidence MUST also be given to the other side.\nThe defense has time to compile motions against some evidence here.
    \nPossible Motions:
    \n1. Invalidate Evidence- Something with the evidence is wrong and the evidence is to be thrown out. This includes irrelevance or corrupt security.
    \n2. Free Movement- Basically the defendant is to be kept uncuffed before and during the trial.
    \n3. Subpoena Witness- If the defense presents god reasons for needing a witness but said person fails to cooperate then a subpoena is issued.
    \n4. Drop the Charges- Not enough evidence is there for a trial so the charges are to be dropped. The FT CAN RETRY but the judicial authority must carefully reexamine the new evidence.
    \n5. Declare Incompetent- Basically the defendant is insane. Once this is granted a medical official is to examine the patient. If he is indeed insane he is to be placed under care of the medical staff until he is deemed competent to stand trial.
    \n
    \nALL SIDES MOVE TO A COURTROOM
    \nPre-Trial Hearings:
    \nA judicial authority and the 2 sides are to meet in the trial room. NO ONE ELSE BESIDES A SECURITY DETAIL IS TO BE PRESENT. The defense submits a plea. If the plea is guilty then proceed directly to sentencing phase. Now the sides each present their motions to the judicial authority. He rules on them. Each side can debate each motion. Then the judicial authority gets a list of crew members. He first gets a chance to look at them all and pick out acceptable and available jurors. Those jurors are then called over. Each side can ask a few questions and dismiss jurors they find too biased. HOWEVER before dismissal the judicial authority MUST agree to the reasoning.
    \n
    \nThe Trial:
    \nThe trial has three phases.
    \n1. Opening Arguments- Each side can give a short speech. They may not present ANY evidence.
    \n2. Witness Calling/Evidence Presentation- The prosecution goes first and is able to call the witnesses on his approved list in any order. He can recall them if necessary. During the questioning the lawyer may use the evidence in the questions to help prove a point. After every witness the other side has a chance to cross-examine. After both sides are done questioning a witness the prosecution can present another or recall one (even the EXACT same one again!). After prosecution is done the defense can call witnesses. After the initial cases are presented both sides are free to call witnesses on either list.
    \nFINALLY once both sides are done calling witnesses we move onto the next phase.
    \n3. Closing Arguments- Same as opening.
    \nThe jury then deliberates IN PRIVATE. THEY MUST ALL AGREE on a verdict. REMEMBER: They mix between some charges being guilty and others not guilty (IE if you supposedly killed someone with a gun and you unfortunately picked up a gun without authorization then you CAN be found not guilty of murder BUT guilty of possession of illegal weaponry.). Once they have agreed they present their verdict. If unable to reach a verdict and feel they will never they call a deadlocked jury and we restart at Pre-Trial phase with an entirely new set of jurors.
    \n
    \nSentencing Phase:
    \nIf the death penalty was sought (you MUST have gone through a trial for death penalty) then skip to the second part.
    \nI. Each side can present more evidence/witnesses in any order. There is NO ban on emotional aspects or anything. The prosecution is to submit a suggested penalty. After all the sides are done then the judicial authority is to give a sentence.
    \nII. The jury stays and does the same thing as I. Their sole job is to determine if the death penalty is applicable. If NOT then the judge selects a sentence.
    \n
    \nTADA you're done. Security then executes the sentence and adds the applicable convictions to the person's record.
    \n" + info = "Roles:
    \nThe Detective is basically the investigator and prosecutor.
    \nThe Staff Assistant can perform these functions with written authority from the Detective.
    \nThe Colony Director/HoP/Warden is ct as the judicial authority.
    \nThe Security Officers are responsible for executing warrants, security during trial, and prisoner transport.
    \n
    \nInvestigative Phase:
    \nAfter the crime has been committed the Detective's job is to gather evidence and try to ascertain not only who did it but what happened. He must take special care to catalogue everything and don't leave anything out. Write out all the evidence on paper. Make sure you take an appropriate number of fingerprints. IF he must ask someone questions he has permission to confront them. If the person refuses he can ask a judicial authority to write a subpoena for questioning. If again he fails to respond then that person is to be jailed as insubordinate and obstructing justice. Said person will be released after he cooperates.
    \n
    \nONCE the FT has a clear idea as to who the criminal is he is to write an arrest warrant on the piece of paper. IT MUST LIST THE CHARGES. The FT is to then go to the judicial authority and explain a small version of his case. If the case is moderately acceptable the authority should sign it. Security must then execute said warrant.
    \n
    \nPre-Pre-Trial Phase:
    \nNow a legal representative must be presented to the defendant if said defendant requests one. That person and the defendant are then to be given time to meet (in the jail IS ACCEPTABLE). The defendant and his lawyer are then to be given a copy of all the evidence that will be presented at trial (rewriting it all on paper is fine). THIS IS CALLED THE DISCOVERY PACK. With a few exceptions, THIS IS THE ONLY EVIDENCE BOTH SIDES MAY USE AT TRIAL. IF the prosecution will be seeking the death penalty it MUST be stated at this time. ALSO if the defense will be seeking not guilty by mental defect it must state this at this time to allow ample time for examination.
    \nNow at this time each side is to compile a list of witnesses. By default, the defendant is on both lists regardless of anything else. Also the defense and prosecution can compile more evidence beforehand BUT in order for it to be used the evidence MUST also be given to the other side.\nThe defense has time to compile motions against some evidence here.
    \nPossible Motions:
    \n1. Invalidate Evidence- Something with the evidence is wrong and the evidence is to be thrown out. This includes irrelevance or corrupt security.
    \n2. Free Movement- Basically the defendant is to be kept uncuffed before and during the trial.
    \n3. Subpoena Witness- If the defense presents god reasons for needing a witness but said person fails to cooperate then a subpoena is issued.
    \n4. Drop the Charges- Not enough evidence is there for a trial so the charges are to be dropped. The FT CAN RETRY but the judicial authority must carefully reexamine the new evidence.
    \n5. Declare Incompetent- Basically the defendant is insane. Once this is granted a medical official is to examine the patient. If he is indeed insane he is to be placed under care of the medical staff until he is deemed competent to stand trial.
    \n
    \nALL SIDES MOVE TO A COURTROOM
    \nPre-Trial Hearings:
    \nA judicial authority and the 2 sides are to meet in the trial room. NO ONE ELSE BESIDES A SECURITY DETAIL IS TO BE PRESENT. The defense submits a plea. If the plea is guilty then proceed directly to sentencing phase. Now the sides each present their motions to the judicial authority. He rules on them. Each side can debate each motion. Then the judicial authority gets a list of crew members. He first gets a chance to look at them all and pick out acceptable and available jurors. Those jurors are then called over. Each side can ask a few questions and dismiss jurors they find too biased. HOWEVER before dismissal the judicial authority MUST agree to the reasoning.
    \n
    \nThe Trial:
    \nThe trial has three phases.
    \n1. Opening Arguments- Each side can give a short speech. They may not present ANY evidence.
    \n2. Witness Calling/Evidence Presentation- The prosecution goes first and is able to call the witnesses on his approved list in any order. He can recall them if necessary. During the questioning the lawyer may use the evidence in the questions to help prove a point. After every witness the other side has a chance to cross-examine. After both sides are done questioning a witness the prosecution can present another or recall one (even the EXACT same one again!). After prosecution is done the defense can call witnesses. After the initial cases are presented both sides are free to call witnesses on either list.
    \nFINALLY once both sides are done calling witnesses we move onto the next phase.
    \n3. Closing Arguments- Same as opening.
    \nThe jury then deliberates IN PRIVATE. THEY MUST ALL AGREE on a verdict. REMEMBER: They mix between some charges being guilty and others not guilty (IE if you supposedly killed someone with a gun and you unfortunately picked up a gun without authorization then you CAN be found not guilty of murder BUT guilty of possession of illegal weaponry.). Once they have agreed they present their verdict. If unable to reach a verdict and feel they will never they call a deadlocked jury and we restart at Pre-Trial phase with an entirely new set of jurors.
    \n
    \nSentencing Phase:
    \nIf the death penalty was sought (you MUST have gone through a trial for death penalty) then skip to the second part.
    \nI. Each side can present more evidence/witnesses in any order. There is NO ban on emotional aspects or anything. The prosecution is to submit a suggested penalty. After all the sides are done then the judicial authority is to give a sentence.
    \nII. The jury stays and does the same thing as I. Their sole job is to determine if the death penalty is applicable. If NOT then the judge selects a sentence.
    \n
    \nTADA you're done. Security then executes the sentence and adds the applicable convictions to the person's record.
    \n" /obj/item/weapon/paper/hydroponics name = "Greetings from Billy Bob" @@ -538,7 +538,7 @@ /obj/item/weapon/paper/jobs name = "Job Information" - info = "Information on all formal jobs that can be assigned on Space Station 13 can be found on this document.
    \nThe data will be in the following form.
    \nGenerally lower ranking positions come first in this list.
    \n
    \nJob Name general access>lab access-engine access-systems access (atmosphere control)
    \n\tJob Description
    \nJob Duties (in no particular order)
    \nTips (where applicable)
    \n
    \nResearch Assistant 1>1-0-0
    \n\tThis is probably the lowest level position. Anyone who enters the space station after the initial job\nassignment will automatically receive this position. Access with this is restricted. Head of Personnel should\nappropriate the correct level of assistance.
    \n1. Assist the researchers.
    \n2. Clean up the labs.
    \n3. Prepare materials.
    \n
    \nStaff Assistant 2>0-0-0
    \n\tThis position assists the security officer in his duties. The staff assisstants should primarily br\npatrolling the ship waiting until they are needed to maintain ship safety.\n(Addendum: Updated/Elevated Security Protocols admit issuing of low level weapons to security personnel)
    \n1. Patrol ship/Guard key areas
    \n2. Assist security officer
    \n3. Perform other security duties.
    \n
    \nTechnical Assistant 1>0-0-1
    \n\tThis is yet another low level position. The technical assistant helps the engineer and the statian\ntechnician with the upkeep and maintenance of the station. This job is very important because it usually\ngets to be a heavy workload on station technician and these helpers will alleviate that.
    \n1. Assist Station technician and Engineers.
    \n2. Perform general maintenance of station.
    \n3. Prepare materials.
    \n
    \nMedical Assistant 1>1-0-0
    \n\tThis is the fourth position yet it is slightly less common. This position doesn't have much power\noutside of the med bay. Consider this position like a nurse who helps to upkeep medical records and the\nmaterials (filling syringes and checking vitals)
    \n1. Assist the medical personnel.
    \n2. Update medical files.
    \n3. Prepare materials for medical operations.
    \n
    \nResearch Technician 2>3-0-0
    \n\tThis job is primarily a step up from research assistant. These people generally do not get their own lab\nbut are more hands on in the experimentation process. At this level they are permitted to work as consultants to\nthe others formally.
    \n1. Inform superiors of research.
    \n2. Perform research alongside of official researchers.
    \n
    \nDetective 3>2-0-0
    \n\tThis job is in most cases slightly boring at best. Their sole duty is to\nperform investigations of crine scenes and analysis of the crime scene. This\nalleviates SOME of the burden from the security officer. This person's duty\nis to draw conclusions as to what happened and testify in court. Said person\nalso should stroe the evidence ly.
    \n1. Perform crime-scene investigations/draw conclusions.
    \n2. Store and catalogue evidence properly.
    \n3. Testify to superiors/inquieries on findings.
    \n
    \nStation Technician 2>0-2-3
    \n\tPeople assigned to this position must work to make sure all the systems aboard Space Station 13 are operable.\nThey should primarily work in the computer lab and repairing faulty equipment. They should work with the\natmospheric technician.
    \n1. Maintain SS13 systems.
    \n2. Repair equipment.
    \n
    \nAtmospheric Technician 3>0-0-4
    \n\tThese people should primarily work in the atmospheric control center and lab. They have the very important\njob of maintaining the delicate atmosphere on SS13.
    \n1. Maintain atmosphere on SS13
    \n2. Research atmospheres on the space station. (safely please!)
    \n
    \nEngineer 2>1-3-0
    \n\tPeople working as this should generally have detailed knowledge as to how the propulsion systems on SS13\nwork. They are one of the few classes that have unrestricted access to the engine area.
    \n1. Upkeep the engine.
    \n2. Prevent fires in the engine.
    \n3. Maintain a safe orbit.
    \n
    \nMedical Researcher 2>5-0-0
    \n\tThis position may need a little clarification. Their duty is to make sure that all experiments are safe and\nto conduct experiments that may help to improve the station. They will be generally idle until a new laboratory\nis constructed.
    \n1. Make sure the station is kept safe.
    \n2. Research medical properties of materials studied of Space Station 13.
    \n
    \nScientist 2>5-0-0
    \n\tThese people study the properties, particularly the toxic properties, of materials handled on SS13.\nTechnically they can also be called Phoron Technicians as phoron is the material they routinly handle.
    \n1. Research phoron
    \n2. Make sure all phoron is properly handled.
    \n
    \nMedical Doctor (Officer) 2>0-0-0
    \n\tPeople working this job should primarily stay in the medical area. They should make sure everyone goes to\nthe medical bay for treatment and examination. Also they should make sure that medical supplies are kept in\norder.
    \n1. Heal wounded people.
    \n2. Perform examinations of all personnel.
    \n3. Moniter usage of medical equipment.
    \n
    \nSecurity Officer 3>0-0-0
    \n\tThese people should attempt to keep the peace inside the station and make sure the station is kept safe. One\nside duty is to assist in repairing the station. They also work like general maintenance personnel. They are not\ngiven a weapon and must use their own resources.
    \n(Addendum: Updated/Elevated Security Protocols admit issuing of weapons to security personnel)
    \n1. Maintain order.
    \n2. Assist others.
    \n3. Repair structural problems.
    \n
    \nHead of Security 4>5-2-2
    \n\tPeople assigned as Head of Security should issue orders to the security staff. They should\nalso carefully moderate the usage of all security equipment. All security matters should be reported to this person.
    \n1. Oversee security.
    \n2. Assign patrol duties.
    \n3. Protect the station and staff.
    \n
    \nHead of Personnel 4>4-2-2
    \n\tPeople assigned as head of personnel will find themselves moderating all actions done by personnel. \nAlso they have the ability to assign jobs and access levels.
    \n1. Assign duties.
    \n2. Moderate personnel.
    \n3. Moderate research.
    \n
    \nStation Administrator 5>5-5-5 (unrestricted station wide access)
    \n\tThis is the highest position youi can aquire on Space Station 13. They are allowed anywhere inside the\nspace station and therefore should protect their ID card. They also have the ability to assign positions\nand access levels. They should not abuse their power.
    \n1. Assign all positions on SS13
    \n2. Inspect the station for any problems.
    \n3. Perform administrative duties.
    \n" + info = "Information on all formal jobs that can be assigned on Space Station 13 can be found on this document.
    \nThe data will be in the following form.
    \nGenerally lower ranking positions come first in this list.
    \n
    \nJob Name general access>lab access-engine access-systems access (atmosphere control)
    \n\tJob Description
    \nJob Duties (in no particular order)
    \nTips (where applicable)
    \n
    \nResearch Assistant 1>1-0-0
    \n\tThis is probably the lowest level position. Anyone who enters the space station after the initial job\nassignment will automatically receive this position. Access with this is restricted. Head of Personnel should\nappropriate the correct level of assistance.
    \n1. Assist the researchers.
    \n2. Clean up the labs.
    \n3. Prepare materials.
    \n
    \nStaff Assistant 2>0-0-0
    \n\tThis position assists the security officer in his duties. The staff assisstants should primarily br\npatrolling the ship waiting until they are needed to maintain ship safety.\n(Addendum: Updated/Elevated Security Protocols admit issuing of low level weapons to security personnel)
    \n1. Patrol ship/Guard key areas
    \n2. Assist security officer
    \n3. Perform other security duties.
    \n
    \nTechnical Assistant 1>0-0-1
    \n\tThis is yet another low level position. The technical assistant helps the engineer and the statian\ntechnician with the upkeep and maintenance of the station. This job is very important because it usually\ngets to be a heavy workload on station technician and these helpers will alleviate that.
    \n1. Assist Station technician and Engineers.
    \n2. Perform general maintenance of station.
    \n3. Prepare materials.
    \n
    \nMedical Assistant 1>1-0-0
    \n\tThis is the fourth position yet it is slightly less common. This position doesn't have much power\noutside of the med bay. Consider this position like a nurse who helps to upkeep medical records and the\nmaterials (filling syringes and checking vitals)
    \n1. Assist the medical personnel.
    \n2. Update medical files.
    \n3. Prepare materials for medical operations.
    \n
    \nResearch Technician 2>3-0-0
    \n\tThis job is primarily a step up from research assistant. These people generally do not get their own lab\nbut are more hands on in the experimentation process. At this level they are permitted to work as consultants to\nthe others formally.
    \n1. Inform superiors of research.
    \n2. Perform research alongside of official researchers.
    \n
    \nDetective 3>2-0-0
    \n\tThis job is in most cases slightly boring at best. Their sole duty is to\nperform investigations of crine scenes and analysis of the crime scene. This\nalleviates SOME of the burden from the security officer. This person's duty\nis to draw conclusions as to what happened and testify in court. Said person\nalso should stroe the evidence ly.
    \n1. Perform crime-scene investigations/draw conclusions.
    \n2. Store and catalogue evidence properly.
    \n3. Testify to superiors/inquieries on findings.
    \n
    \nStation Technician 2>0-2-3
    \n\tPeople assigned to this position must work to make sure all the systems aboard Space Station 13 are operable.\nThey should primarily work in the computer lab and repairing faulty equipment. They should work with the\natmospheric technician.
    \n1. Maintain SS13 systems.
    \n2. Repair equipment.
    \n
    \nAtmospheric Technician 3>0-0-4
    \n\tThese people should primarily work in the atmospheric control center and lab. They have the very important\njob of maintaining the delicate atmosphere on SS13.
    \n1. Maintain atmosphere on SS13
    \n2. Research atmospheres on the space station. (safely please!)
    \n
    \nEngineer 2>1-3-0
    \n\tPeople working as this should generally have detailed knowledge as to how the propulsion systems on SS13\nwork. They are one of the few classes that have unrestricted access to the engine area.
    \n1. Upkeep the engine.
    \n2. Prevent fires in the engine.
    \n3. Maintain a safe orbit.
    \n
    \nMedical Researcher 2>5-0-0
    \n\tThis position may need a little clarification. Their duty is to make sure that all experiments are safe and\nto conduct experiments that may help to improve the station. They will be generally idle until a new laboratory\nis constructed.
    \n1. Make sure the station is kept safe.
    \n2. Research medical properties of materials studied of Space Station 13.
    \n
    \nScientist 2>5-0-0
    \n\tThese people study the properties, particularly the toxic properties, of materials handled on SS13.\nTechnically they can also be called Phoron Technicians as phoron is the material they routinly handle.
    \n1. Research phoron
    \n2. Make sure all phoron is properly handled.
    \n
    \nMedical Doctor (Officer) 2>0-0-0
    \n\tPeople working this job should primarily stay in the medical area. They should make sure everyone goes to\nthe medical bay for treatment and examination. Also they should make sure that medical supplies are kept in\norder.
    \n1. Heal wounded people.
    \n2. Perform examinations of all personnel.
    \n3. Moniter usage of medical equipment.
    \n
    \nSecurity Officer 3>0-0-0
    \n\tThese people should attempt to keep the peace inside the station and make sure the station is kept safe. One\nside duty is to assist in repairing the station. They also work like general maintenance personnel. They are not\ngiven a weapon and must use their own resources.
    \n(Addendum: Updated/Elevated Security Protocols admit issuing of weapons to security personnel)
    \n1. Maintain order.
    \n2. Assist others.
    \n3. Repair structural problems.
    \n
    \nHead of Security 4>5-2-2
    \n\tPeople assigned as Head of Security should issue orders to the security staff. They should\nalso carefully moderate the usage of all security equipment. All security matters should be reported to this person.
    \n1. Oversee security.
    \n2. Assign patrol duties.
    \n3. Protect the station and staff.
    \n
    \nHead of Personnel 4>4-2-2
    \n\tPeople assigned as head of personnel will find themselves moderating all actions done by personnel. \nAlso they have the ability to assign jobs and access levels.
    \n1. Assign duties.
    \n2. Moderate personnel.
    \n3. Moderate research.
    \n
    \nColony Director 5>5-5-5 (unrestricted station wide access)
    \n\tThis is the highest position youi can aquire on Space Station 13. They are allowed anywhere inside the\nspace station and therefore should protect their ID card. They also have the ability to assign positions\nand access levels. They should not abuse their power.
    \n1. Assign all positions on SS13
    \n2. Inspect the station for any problems.
    \n3. Perform administrative duties.
    \n" /obj/item/weapon/paper/photograph name = "photo" diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 53110bed0f..350aab3414 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -5,7 +5,7 @@ icon_state = "paper" item_state = "paper" throwforce = 0 - w_class = 2 + w_class = ITEMSIZE_SMALL throw_range = 2 throw_speed = 1 layer = 4 diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index a2a1273ced..f6d192276f 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -8,7 +8,7 @@ ) item_state = "sheet-metal" throwforce = 1 - w_class = 3 + w_class = ITEMSIZE_NORMAL throw_speed = 3 throw_range = 7 pressure_resistance = 10 diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm index 37cfdaa86b..48e95071c5 100644 --- a/code/modules/paperwork/papershredder.dm +++ b/code/modules/paperwork/papershredder.dm @@ -128,7 +128,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "shredp" throwforce = 0 - w_class = 1 + w_class = ITEMSIZE_TINY throw_range = 3 throw_speed = 1 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 7ee79cb923..c36ec736ae 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -17,7 +17,7 @@ item_state = "pen" slot_flags = SLOT_BELT | SLOT_EARS throwforce = 0 - w_class = 1.0 + w_class = ITEMSIZE_TINY throw_speed = 7 throw_range = 15 matter = list(DEFAULT_WALL_MATERIAL = 10) @@ -184,7 +184,7 @@ desc = "A colourful crayon. Please refrain from eating it or putting it in your nose." icon = 'icons/obj/crayons.dmi' icon_state = "crayonred" - w_class = 1.0 + w_class = ITEMSIZE_TINY attack_verb = list("attacked", "coloured") colour = "#FF0000" //RGB var/shadeColour = "#220000" //RGB diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 0df6b30432..bbaec17318 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -15,7 +15,7 @@ desc = "A camera film cartridge. Insert it into a camera to reload it." icon_state = "film" item_state = "camera" - w_class = 1.0 + w_class = ITEMSIZE_TINY /******** @@ -28,7 +28,7 @@ var/global/photo_count = 0 icon = 'icons/obj/items.dmi' icon_state = "photo" item_state = "paper" - w_class = 2.0 + w_class = ITEMSIZE_SMALL var/id var/icon/img //Big photo image var/scribble //Scribble on the back. @@ -121,7 +121,7 @@ var/global/photo_count = 0 desc = "A polaroid camera. 10 photos left." icon_state = "camera" item_state = "camera" - w_class = 2.0 + w_class = ITEMSIZE_SMALL flags = CONDUCT slot_flags = SLOT_BELT matter = list(DEFAULT_WALL_MATERIAL = 2000) diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 59f0dd67b2..fff953538a 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -5,7 +5,7 @@ icon_state = "stamp-qm" item_state = "stamp" throwforce = 0 - w_class = 1.0 + w_class = ITEMSIZE_TINY throw_speed = 7 throw_range = 15 matter = list(DEFAULT_WALL_MATERIAL = 60) @@ -13,7 +13,7 @@ attack_verb = list("stamped") /obj/item/weapon/stamp/captain - name = "station administrator's rubber stamp" + name = "colony director's rubber stamp" icon_state = "stamp-cap" /obj/item/weapon/stamp/hop @@ -90,4 +90,4 @@ if(chosen_stamp) name = chosen_stamp.name - icon_state = chosen_stamp.icon_state \ No newline at end of file + icon_state = chosen_stamp.icon_state diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index 4f89687fb4..809a0750b0 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -191,7 +191,7 @@ proc/cardinalrange(var/center) icon = 'icons/obj/machines/antimatter.dmi' icon_state = "box" item_state = "electronic" - w_class = 4.0 + w_class = ITEMSIZE_LARGE flags = CONDUCT throwforce = 5 throw_speed = 1 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 49b72f4944..b577439394 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -68,6 +68,7 @@ var/cell_type = /obj/item/weapon/cell/apc var/opened = 0 //0=closed, 1=opened, 2=cover removed var/shorted = 0 + var/grid_check = FALSE var/lighting = 3 var/equipment = 3 var/environ = 3 @@ -461,7 +462,7 @@ if (stat & MAINT) user << "There is no connector for your power cell." return - if(W.w_class != 3) + if(W.w_class != ITEMSIZE_NORMAL) user << "\The [W] is too [W.w_class < 3? "small" : "large"] to fit here." return @@ -631,7 +632,7 @@ if (((stat & BROKEN) || hacker) \ && !opened \ && W.force >= 5 \ - && W.w_class >= 3.0 \ + && W.w_class >= ITEMSIZE_NORMAL \ && prob(20) ) opened = 2 user.visible_message("The APC cover was knocked down with the [W.name] by [user.name]!", \ @@ -796,7 +797,7 @@ return "[area.name] : [equipment]/[lighting]/[environ] ([lastused_equip+lastused_light+lastused_environ]) : [cell? cell.percent() : "N/C"] ([charging])" /obj/machinery/power/apc/proc/update() - if(operating && !shorted) + if(operating && !shorted && !grid_check) area.power_light = (lighting > 1) area.power_equip = (equipment > 1) area.power_environ = (environ > 1) @@ -1001,7 +1002,7 @@ if(debug) log_debug("Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]") - if(cell && !shorted) + if(cell && !shorted && !grid_check) // draw power from cell as before to power the area var/cellused = min(cell.charge, CELLRATE * lastused_total) // clamp deduction to a max, amount left in cell cell.use(cellused) @@ -1196,7 +1197,7 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) // overload the lights in this APC area /obj/machinery/power/apc/proc/overload_lighting(var/chance = 100) - if(/* !get_connection() || */ !operating || shorted) + if(/* !get_connection() || */ !operating || shorted || grid_check) return if( cell && cell.charge>=20) cell.use(20); @@ -1225,4 +1226,34 @@ obj/machinery/power/apc/proc/autoset(var/val, var/on) update_icon() return 1 +/obj/machinery/power/apc/overload(var/obj/machinery/power/source) + if(is_critical) + return + + if(prob(30)) // Nothing happens. + return + + if(prob(40)) // Lights blow. + overload_lighting() + + if(prob(40)) // Spooky flickers. + for(var/obj/machinery/light/L in area) + L.flicker(20) + + if(prob(25)) // Bluescreens. + emagged = 1 + locked = 0 + update_icon() + + if(prob(25)) // Cell gets damaged. + if(cell) + cell.corrupt() + + if(prob(10)) // Computers get broken. + for(var/obj/machinery/computer/comp in area) + comp.ex_act(3) + + if(prob(5)) // APC completely ruined. + set_broken() + #undef APC_UPDATE_ICON_COOLDOWN diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 4d75a99cf7..c837f502dd 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -488,7 +488,7 @@ obj/structure/cable/proc/cableColor(var/colorC) color = COLOR_RED desc = "A coil of power cable." throwforce = 10 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 5 matter = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 20) @@ -570,9 +570,9 @@ obj/structure/cable/proc/cableColor(var/colorC) /obj/item/stack/cable_coil/proc/update_wclass() if(amount == 1) - w_class = 1.0 + w_class = ITEMSIZE_TINY else - w_class = 2.0 + w_class = ITEMSIZE_SMALL /obj/item/stack/cable_coil/examine(mob/user) if(get_dist(src, user) > 1) diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 48798c1fb5..92d749df0f 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -234,3 +234,8 @@ return src.set_dir(turn(src.dir, -90)) + +/obj/machinery/power/generator/power_spike() + if(effective_gen >= max_power / 2 && powernet) // Don't make a spike if we're not making a whole lot of power. + ..() + diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm new file mode 100644 index 0000000000..b52dc4a4d6 --- /dev/null +++ b/code/modules/power/grid_checker.dm @@ -0,0 +1,125 @@ +/obj/machinery/power/grid_checker + name = "grid checker" + desc = "A machine that reacts to unstable conditions in the powernet, by safely shutting everything down. Probably better \ + than the alternative." + icon_state = "gridchecker_on" + circuit = /obj/item/weapon/circuitboard/grid_checker + var/power_failing = FALSE // Turns to TRUE when the grid check event is fired by the Game Master, or perhaps a cheeky antag. + // Wire stuff below. + var/datum/wires/grid_checker/wires + var/wire_locked_out = FALSE + var/wire_allow_manual_1 = FALSE + var/wire_allow_manual_2 = FALSE + var/wire_allow_manual_3 = FALSE + var/opened = FALSE + +/obj/machinery/power/grid_checker/New() + ..() + connect_to_network() + update_icon() + wires = new(src) + component_parts = list() + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/weapon/stock_parts/capacitor(src) + component_parts += new /obj/item/stack/cable_coil(src, 10) + RefreshParts() + +/obj/machinery/power/grid_checker/Destroy() + qdel(wires) + wires = null + ..() + +/obj/machinery/power/grid_checker/update_icon() + if(power_failing) + icon_state = "gridchecker_off" + set_light(2, 2, "#F86060") + else + icon_state = "gridchecker_on" + set_light(2, 2, "#A8B0F8") + +/obj/machinery/power/grid_checker/attackby(obj/item/W, mob/user) + if(!user) + return + if(istype(W, /obj/item/weapon/screwdriver)) + default_deconstruction_screwdriver(user, W) + opened = !opened + else if(istype(W, /obj/item/weapon/crowbar)) + default_deconstruction_crowbar(user, W) + else if(istype(W, /obj/item/device/multitool) || istype(W, /obj/item/weapon/wirecutters) ) + attack_hand(user) + +/obj/machinery/power/grid_checker/attack_hand(mob/user) + if(!user) + return + add_fingerprint(user) + interact(user) + +/obj/machinery/power/grid_checker/interact(mob/user) + if(!user) + return + + if(opened) + wires.Interact(user) + + return ui_interact(user) + +/obj/machinery/power/grid_checker/proc/power_failure(var/announce = TRUE) + if(announce) + command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, \ + the colony's power will be shut off for an indeterminate duration while the powernet monitor restarts automatically, or \ + when Engineering can manually resolve the issue.", + "Critical Power Failure", + new_sound = 'sound/AI/poweroff.ogg') + power_failing = TRUE + if(powernet) + for(var/obj/machinery/power/terminal/T in powernet.nodes) // SMESes that are "downstream" of the powernet. + + if(istype(T.master, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/A = T.master + if(A.is_critical) + continue + A.grid_check = TRUE + + for(var/obj/machinery/power/smes/smes in powernet.nodes) // These are "upstream" + smes.grid_check = TRUE +/* + smes.last_charge = smes.charge + smes.last_output_attempt = smes.output_attempt + smes.last_input_attempt = smes.input_attempt + smes.charge = 0 + smes.inputting(FALSE) + smes.outputting(FALSE) + smes.update_icon() + smes.power_change() +*/ + update_icon() + + spawn(rand(4 MINUTES, 10 MINUTES) ) + if(power_failing) // Check to see if engineering didn't beat us to it. + end_power_failure(TRUE) + +/obj/machinery/power/grid_checker/proc/end_power_failure(var/announce = TRUE) + if(announce) + command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", + "Power Systems Nominal", + new_sound = 'sound/AI/poweron.ogg') + power_failing = FALSE + update_icon() + + for(var/obj/machinery/power/terminal/T in powernet.nodes) + if(istype(T.master, /obj/machinery/power/apc)) + var/obj/machinery/power/apc/A = T.master + if(A.is_critical) + continue + A.grid_check = FALSE + + for(var/obj/machinery/power/smes/smes in powernet.nodes) // These are "upstream" + smes.grid_check = FALSE + /* + smes.charge = smes.last_charge + smes.output_attempt = smes.last_output_attempt + smes.input_attempt = smes.last_input_attempt + smes.update_icon() + smes.power_change() + */ \ No newline at end of file diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 2d736804d5..b079d2fde5 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -16,7 +16,7 @@ icon = 'icons/obj/lighting.dmi' icon_state = "tube-construct-stage1" anchored = 1 - layer = 5 + layer = OBJ_LAYER // Vorestation edit var/stage = 1 var/fixture_type = "tube" var/sheets_refunded = 2 @@ -198,6 +198,11 @@ light_type = /obj/item/weapon/light/bulb var/lamp_shade = 1 +//Vorestation addition, to override the New() proc further below, since this is a lamp. +/obj/machinery/light/flamp/New() + ..() + layer = OBJ_LAYER + /obj/machinery/light/small/emergency brightness_range = 6 brightness_power = 2 @@ -242,6 +247,9 @@ broken(1) spawn(1) update(0) + //Vorestation addition, so large mobs stop looking stupid in front of lights. + if (dir == 2) + layer = 5 /obj/machinery/light/Destroy() var/area/A = get_area(src) @@ -702,7 +710,7 @@ icon = 'icons/obj/lighting.dmi' force = 2 throwforce = 5 - w_class = 1 + w_class = ITEMSIZE_TINY var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN var/base_state var/switchcount = 0 // number of times switched @@ -723,7 +731,7 @@ brightness_power = 3 /obj/item/weapon/light/tube/large - w_class = 2 + w_class = ITEMSIZE_SMALL name = "large light tube" brightness_range = 15 brightness_power = 4 @@ -827,4 +835,4 @@ desc = "A lamp shade for a lamp." icon = 'icons/obj/lighting.dmi' icon_state = "lampshade" - w_class = 1 \ No newline at end of file + w_class = ITEMSIZE_TINY \ No newline at end of file diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 4f34cd7eff..b8beea238c 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -138,6 +138,29 @@ ..() return +// Used for power spikes by the engine, has specific effects on different machines. +/obj/machinery/power/proc/overload(var/obj/machinery/power/source) + return + +/obj/machinery/power/proc/power_spike() + var/obj/machinery/power/grid_checker/G = locate() in powernet.nodes + if(G) // If we found a grid checker, then all is well. + G.power_failure(prob(30)) + else // Otherwise lets break some stuff. + spawn(1) + command_announcement.Announce("Dangerous power spike detected in the power network. Please check machinery \ + for electrical damage.", + "Critical Power Overload") + var/i = 0 + var/limit = rand(30, 50) + for(var/obj/machinery/power/P in powernet.nodes) + P.overload(src) + i++ + if(i % 5) + sleep(1) + if(i >= limit) + break + /////////////////////////////////////////// // Powernet handling helpers ////////////////////////////////////////// diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 9fc0f74290..bf165f0916 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -44,6 +44,7 @@ var/building_terminal = 0 //Suggestions about how to avoid clickspam building several terminals accepted! var/obj/machinery/power/terminal/terminal = null var/should_be_mapped = 0 // If this is set to 0 it will send out warning on New() + var/grid_check = FALSE // If true, suspends all I/O. /obj/machinery/power/smes/drain_power(var/drain_check, var/surge, var/amount = 0) @@ -124,7 +125,7 @@ var/last_onln = outputting //inputting - if(input_attempt && (!input_pulsed && !input_cut)) + if(input_attempt && (!input_pulsed && !input_cut) && !grid_check) var/target_load = min((capacity-charge)/SMESRATE, input_level) // charge at set rate, limited to spare capacity var/actual_load = draw_power(target_load) // add the load to the terminal side network charge += actual_load * SMESRATE // increase the charge @@ -137,7 +138,7 @@ inputting = 0 //outputting - if(outputting && (!output_pulsed && !output_cut)) + if(outputting && (!output_pulsed && !output_cut) && !grid_check) output_used = min( charge/SMESRATE, output_level) //limit output to that stored charge -= output_used*SMESRATE // reduce the storage (may be recovered in /restore() if excessive) @@ -420,6 +421,11 @@ update_icon() ..() +/obj/machinery/power/smes/overload(var/obj/machinery/power/source) // This propagates the power spike down the powernet. + if(istype(source, /obj/machinery/power/smes)) // Prevent infinite loops if two SMESes are hooked up to each other. + return + power_spike() + /obj/machinery/power/smes/magical name = "magical power storage unit" diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm index 0ce32da396..2f0fe9419d 100644 --- a/code/modules/power/smes_construction.dm +++ b/code/modules/power/smes_construction.dm @@ -11,7 +11,7 @@ desc = "Standard superconductive magnetic coil with average capacity and I/O rating." icon = 'icons/obj/stock_parts.dmi' icon_state = "smes_coil" // Just few icons patched together. If someone wants to make better icon, feel free to do so! - w_class = 4.0 // It's LARGE (backpack size) + w_class = ITEMSIZE_LARGE // It's LARGE (backpack size) var/ChargeCapacity = 6000000 // 100 kWh var/IOCapacity = 250000 // 250 kW diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index cbb974e2e6..f580457835 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -207,7 +207,7 @@ var/list/solars_list = list() icon = 'icons/obj/power.dmi' icon_state = "sp_base" item_state = "camera" - w_class = 4 // Pretty big! + w_class = ITEMSIZE_LARGE // Pretty big! anchored = 0 var/tracker = 0 var/glass_type = null diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 3636c3acfa..a1f2fbf030 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -37,3 +37,7 @@ // Powernet rebuilds need this to work properly. /obj/machinery/power/terminal/process() return 1 + +/obj/machinery/power/terminal/overload(var/obj/machinery/power/source) + if(master) + master.overload(source) diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 34e20d499c..b06ed2aaf1 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -80,4 +80,4 @@ name = "tracker electronics" icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" - w_class = 2.0 + w_class = ITEMSIZE_SMALL diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 930cc54d82..e142f31ca0 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -6,7 +6,7 @@ flags = CONDUCT slot_flags = SLOT_BELT | SLOT_EARS throwforce = 1 - w_class = 1 + w_class = ITEMSIZE_TINY var/leaves_residue = 1 var/caliber = "" //Which kind of guns it can be loaded into @@ -72,7 +72,7 @@ item_state = "syringe_kit" matter = list(DEFAULT_WALL_MATERIAL = 500) throwforce = 5 - w_class = 2 + w_class = ITEMSIZE_SMALL throw_speed = 4 throw_range = 10 diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index 993db0f27c..b1cb0964d1 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -81,7 +81,7 @@ /obj/item/ammo_magazine/tommydrum name = "tommygun drum magazine (.45)" icon_state = "tommy-drum" - w_class = 3 // Bulky ammo doesn't fit in your pockets! + w_class = ITEMSIZE_NORMAL // Bulky ammo doesn't fit in your pockets! mag_type = MAGAZINE ammo_type = /obj/item/ammo_casing/c45 matter = list(DEFAULT_WALL_MATERIAL = 3750) @@ -359,7 +359,7 @@ caliber = "a762" matter = list(DEFAULT_WALL_MATERIAL = 10000) ammo_type = /obj/item/ammo_casing/a762 - w_class = 3 // This should NOT fit in your pocket!! + w_class = ITEMSIZE_NORMAL // This should NOT fit in your pocket!! max_ammo = 50 multiple_sprites = 1 diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index d10280854f..51652c4ccf 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -144,6 +144,14 @@ projectile_type = /obj/item/projectile/energy/flash/flare matter = list(DEFAULT_WALL_MATERIAL = 90, "glass" = 90) + +/obj/item/ammo_casing/shotgun/emp + name = "ion shell" + desc = "An advanced shotgun round that creates a small EMP when it strikes a target." + icon_state = "empshell" + projectile_type = /obj/item/projectile/bullet/shotgun/ion + matter = list(DEFAULT_WALL_MATERIAL = 360, "glass" = 720) + /obj/item/ammo_casing/a762 desc = "A 7.62mm bullet casing." caliber = "a762" diff --git a/code/modules/projectiles/dnalocking.dm b/code/modules/projectiles/dnalocking.dm index 394600fc61..616cdc6dae 100644 --- a/code/modules/projectiles/dnalocking.dm +++ b/code/modules/projectiles/dnalocking.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/ammo.dmi' icon_state = "dnalockchip" desc = "A state of the art technological chip that can be installed in a firearm. It allows the user to store their DNA and lock the gun's use from unwanted users." - w_class = 1 + w_class = ITEMSIZE_TINY origin_tech = list(TECH_COMBAT = 4, TECH_DATA = 4, TECH_BIO = 4) var/list/stored_dna = list() //list of the dna stored in the gun, used to allow users to use it or not @@ -85,4 +85,4 @@ return 1 if(!(user.dna in attached_lock.stored_dna)) return 0 - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/projectiles/effects.dm b/code/modules/projectiles/effects.dm index 94e39f41cc..c1457f942e 100644 --- a/code/modules/projectiles/effects.dm +++ b/code/modules/projectiles/effects.dm @@ -226,4 +226,4 @@ icon_state = "impact_lightning" light_range = 2 light_power = 0.5 - light_color = "#00C6FF" \ No newline at end of file + light_color = "#00C6FF" diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 01dfce8e8c..b026950f69 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -41,7 +41,7 @@ flags = CONDUCT slot_flags = SLOT_BELT|SLOT_HOLSTER matter = list(DEFAULT_WALL_MATERIAL = 2000) - w_class = 3 + w_class = ITEMSIZE_NORMAL throwforce = 5 throw_speed = 4 throw_range = 5 @@ -85,6 +85,8 @@ var/dna_lock = 0 //whether or not the gun is locked to dna var/obj/item/dnalockingchip/attached_lock + var/last_shot = 0 //records the last shot fired + /obj/item/weapon/gun/New() ..() for(var/i in 1 to firemodes.len) @@ -274,6 +276,8 @@ target = targloc pointblank = 0 + last_shot = world.time + // We do this down here, so we don't get the message if we fire an empty gun. if(requires_two_hands) if(user.item_is_in_hands(src) && user.hands_are_full()) @@ -322,6 +326,8 @@ P.launch(target) + last_shot = world.time + if(silenced) playsound(src, fire_sound, 10, 1) else diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index f05e453cfb..bbdc04ccdb 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -6,8 +6,7 @@ fire_sound_text = "laser blast" var/obj/item/weapon/cell/power_supply //What type of power cell this uses - var/charge_cost = 200 //How much energy is needed to fire. - var/max_shots = 10 //Determines the capacity of the weapon's power cell. Specifying a cell_type overrides this value. + var/charge_cost = 240 //How much energy is needed to fire. var/cell_type = null var/projectile_type = /obj/item/projectile/beam/practice var/modifystate @@ -18,6 +17,12 @@ var/use_external_power = 0 //if set, the weapon will look for an external power source to draw from, otherwise it recharges magically var/recharge_time = 4 var/charge_tick = 0 + var/charge_delay = 75 //delay between firing and charging + + var/battery_lock = 0 //If set, weapon cannot switch batteries + +/obj/item/weapon/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob) + ..() /obj/item/weapon/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob) ..() @@ -32,10 +37,7 @@ /obj/item/weapon/gun/energy/New() ..() - if(cell_type) - power_supply = new cell_type(src) - else - power_supply = new /obj/item/weapon/cell/device/variable(src, max_shots*charge_cost) + power_supply = new /obj/item/weapon/cell/device(src) if(self_recharge) processing_objects.Add(src) update_icon() @@ -46,21 +48,26 @@ ..() /obj/item/weapon/gun/energy/process() - if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the cyborg - charge_tick++ - if(charge_tick < recharge_time) return 0 - charge_tick = 0 + if(self_recharge) //Every [recharge_time] ticks, recharge a shot for the battery + if(world.time > last_shot + charge_delay) //Doesn't work if you've fired recently + if(!power_supply || power_supply.charge >= power_supply.maxcharge) + return 0 // check if we actually need to recharge - if(!power_supply || power_supply.charge >= power_supply.maxcharge) - return 0 // check if we actually need to recharge + charge_tick++ + if(charge_tick < recharge_time) return 0 + charge_tick = 0 - if(use_external_power) - var/obj/item/weapon/cell/external = get_external_power_supply() - if(!external || !external.use(charge_cost)) //Take power from the borg... - return 0 + var/rechargeamt = power_supply.maxcharge*0.2 - power_supply.give(charge_cost) //... to recharge the shot - update_icon() + if(use_external_power) + var/obj/item/weapon/cell/external = get_external_power_supply() + if(!external || !external.use(rechargeamt)) //Take power from the borg... + return 0 + + power_supply.give(rechargeamt) //... to recharge 1/5th the battery + update_icon() + else + charge_tick = 0 return 1 /obj/item/weapon/gun/energy/consume_next_projectile() @@ -69,6 +76,54 @@ if(!power_supply.checked_use(charge_cost)) return null return new projectile_type(src) +/obj/item/weapon/gun/energy/proc/load_ammo(var/obj/item/C, mob/user) + if(istype(C, /obj/item/weapon/cell)) + if(self_recharge || battery_lock) + user << "[src] does not have a battery port." + return + if(istype(C, /obj/item/weapon/cell/device)) + var/obj/item/weapon/cell/device/P = C + if(power_supply) + user << "[src] already has a power cell." + else + user.visible_message("[user] is reloading [src].", "You start to insert [P] into [src].") + if(do_after(user, 10)) + user.remove_from_mob(P) + power_supply = P + P.loc = src + user.visible_message("[user] inserts [P] into [src].", "You insert [P] into [src].") + playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1) + update_icon() + update_held_icon() + else + user << "This cell is not fitted for [src]." + return + +/obj/item/weapon/gun/energy/proc/unload_ammo(mob/user) + if(self_recharge || battery_lock) + user << "[src] does not have a battery port." + return + if(power_supply) + user.put_in_hands(power_supply) + power_supply.update_icon() + user.visible_message("[user] removes [power_supply] from [src].", "You remove [power_supply] from [src].") + power_supply = null + playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) + update_icon() + update_held_icon() + else + user << "[src] does not have a power cell." + +/obj/item/weapon/gun/energy/attackby(var/obj/item/A as obj, mob/user as mob) + ..() + load_ammo(A, user) + +/obj/item/weapon/gun/energy/attack_hand(mob/user as mob) + if(user.get_inactive_hand() == src) + unload_ammo(user) + else + return ..() + /obj/item/weapon/gun/energy/proc/get_external_power_supply() if(isrobot(src.loc)) var/mob/living/silicon/robot/R = src.loc @@ -85,12 +140,21 @@ /obj/item/weapon/gun/energy/examine(mob/user) ..(user) - var/shots_remaining = round(power_supply.charge / charge_cost) - user << "Has [shots_remaining] shot\s remaining." + if(power_supply) + var/shots_remaining = round(power_supply.charge / charge_cost) + user << "Has [shots_remaining] shot\s remaining." + else + user << "Does not have a power cell." return /obj/item/weapon/gun/energy/update_icon(var/ignore_inhands) - if(charge_meter) + if(power_supply == null) + if(modifystate) + icon_state = "[modifystate]_open" + else + icon_state = "[initial(icon_state)]_open" + return + else if(charge_meter) var/ratio = power_supply.charge / power_supply.maxcharge //make sure that rounding down will not give us the empty state even if we have charge for a shot left. @@ -104,3 +168,10 @@ else icon_state = "[initial(icon_state)][ratio]" if(!ignore_inhands) update_held_icon() + +/obj/item/weapon/gun/energy/proc/start_recharge() + if(power_supply == null) + power_supply = new /obj/item/weapon/cell/device(src) + self_recharge = 1 + processing_objects.Add(src) + update_icon() \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index cef84810bd..47206bc3e8 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -6,7 +6,7 @@ item_state = "laser" fire_sound = 'sound/weapons/Laser.ogg' slot_flags = SLOT_BELT|SLOT_BACK - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 origin_tech = list(TECH_COMBAT = 3, TECH_MAGNET = 2) matter = list(DEFAULT_WALL_MATERIAL = 2000) @@ -15,8 +15,8 @@ one_handed_penalty = 2 firemodes = list( - list(mode_name="normal", projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 200), - list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 50), + list(mode_name="normal", projectile_type=/obj/item/projectile/beam/midlaser, charge_cost = 240), + list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/weaklaser, charge_cost = 60), ) /obj/item/weapon/gun/energy/laser/mounted @@ -30,8 +30,8 @@ projectile_type = /obj/item/projectile/beam/practice firemodes = list( - list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 200), - list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 50), + list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 240), + list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 60), ) obj/item/weapon/gun/energy/retro @@ -41,7 +41,7 @@ obj/item/weapon/gun/energy/retro desc = "An older model of the basic lasergun. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws." fire_sound = 'sound/weapons/Laser.ogg' slot_flags = SLOT_BELT - w_class = 3 + w_class = ITEMSIZE_NORMAL projectile_type = /obj/item/projectile/beam fire_delay = 10 //old technology @@ -53,11 +53,14 @@ obj/item/weapon/gun/energy/retro force = 5 fire_sound = 'sound/weapons/Laser.ogg' slot_flags = SLOT_BELT - w_class = 3 + w_class = ITEMSIZE_NORMAL projectile_type = /obj/item/projectile/beam origin_tech = null - max_shots = 5 //to compensate a bit for self-recharging + fire_delay = 10 //Old pistol + charge_cost = 480 //to compensate a bit for self-recharging self_recharge = 1 + recharge_time = 3 //Recharges a bit more quickly... + charge_delay = 100 //... but it takes a while to get started /obj/item/weapon/gun/energy/lasercannon name = "laser cannon" @@ -69,13 +72,13 @@ obj/item/weapon/gun/energy/retro origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 3, TECH_POWER = 3) slot_flags = SLOT_BELT|SLOT_BACK projectile_type = /obj/item/projectile/beam/heavylaser/cannon - max_shots = 4 + battery_lock = 1 fire_delay = 20 - w_class = 4 + w_class = ITEMSIZE_LARGE // requires_two_hands = 1 one_handed_penalty = 6 // The thing's heavy and huge. accuracy = 3 - charge_cost = 400 + charge_cost = 600 /obj/item/weapon/gun/energy/lasercannon/mounted @@ -87,7 +90,6 @@ obj/item/weapon/gun/energy/retro requires_two_hands = 0 // Not sure if two-handing gets checked for mounted weapons, but better safe than sorry. projectile_type = /obj/item/projectile/beam/heavylaser charge_cost = 400 - max_shots = 6 fire_delay = 20 /obj/item/weapon/gun/energy/xray @@ -99,8 +101,7 @@ obj/item/weapon/gun/energy/retro fire_sound = 'sound/weapons/eluger.ogg' origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3, TECH_MAGNET = 2) projectile_type = /obj/item/projectile/beam/xray - charge_cost = 100 - max_shots = 12 + charge_cost = 200 /obj/item/weapon/gun/energy/sniperrifle name = "marksman energy rifle" @@ -112,11 +113,11 @@ obj/item/weapon/gun/energy/retro origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 5, TECH_POWER = 4) projectile_type = /obj/item/projectile/beam/sniper slot_flags = SLOT_BACK - charge_cost = 400 - max_shots = 4 + battery_lock = 1 + charge_cost = 600 fire_delay = 35 force = 10 - w_class = 5 // So it can't fit in a backpack. + w_class = ITEMSIZE_HUGE // So it can't fit in a backpack. accuracy = -3 //shooting at the hip scoped_accuracy = 0 // requires_two_hands = 1 diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 6819c1cd81..7d2d5f07e3 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -4,7 +4,6 @@ icon_state = "energystun100" item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/Taser.ogg' - max_shots = 10 fire_delay = 10 // Handguns should be inferior to two-handed weapons. projectile_type = /obj/item/projectile/beam/stun @@ -12,8 +11,8 @@ modifystate = "energystun" firemodes = list( - list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg'), - list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg'), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="energystun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="energykill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480), ) /obj/item/weapon/gun/energy/gun/mounted @@ -28,9 +27,9 @@ icon_state = "fm-2tstun100" //May resprite this to be more rifley item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/Taser.ogg' - max_shots = 18 + charge_cost = 100 force = 8 - w_class = 4 //Probably gonna make it a rifle sooner or later + w_class = ITEMSIZE_LARGE //Probably gonna make it a rifle sooner or later fire_delay = 6 projectile_type = /obj/item/projectile/beam/stun/weak @@ -41,20 +40,20 @@ one_handed_penalty = 2 firemodes = list( - list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'), + list(mode_name="stun", burst=1, projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 100), list(mode_name="stun burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/stun/weak, modifystate="fm-2tstun", fire_sound='sound/weapons/Taser.ogg'), - list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'), + list(mode_name="lethal", burst=1, projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 200), list(mode_name="lethal burst", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,0,0), dispersion=list(0.0, 0.2, 0.5), projectile_type=/obj/item/projectile/beam/burstlaser, modifystate="fm-2tkill", fire_sound='sound/weapons/Laser.ogg'), ) /obj/item/weapon/gun/energy/gun/nuclear name = "advanced energy gun" desc = "An energy gun with an experimental miniaturized reactor." - icon_state = "nucgun" + icon_state = "nucgunstun" origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_POWER = 3) slot_flags = SLOT_BELT force = 8 //looks heavier than a pistol - w_class = 4 //Looks bigger than a pistol, too. + w_class = ITEMSIZE_LARGE //Looks bigger than a pistol, too. fire_delay = 6 //This one's not a handgun, it should have the same fire delay as everything else self_recharge = 1 modifystate = null @@ -63,44 +62,6 @@ one_handed_penalty = 1 // It's rather bulky, so holding it in one hand is a little harder than with two, however it's not 'required'. firemodes = list( - list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg'), - list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg'), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, modifystate="nucgunstun", fire_sound='sound/weapons/Taser.ogg', charge_cost = 240), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, modifystate="nucgunkill", fire_sound='sound/weapons/Laser.ogg', charge_cost = 480), ) - - var/lightfail = 0 - -//override for failcheck behaviour -/obj/item/weapon/gun/energy/gun/nuclear/process() - charge_tick++ - if(charge_tick < 4) return 0 - charge_tick = 0 - if(!power_supply) return 0 - if((power_supply.charge / power_supply.maxcharge) != 1) - power_supply.give(charge_cost) - update_icon() - return 1 - -/obj/item/weapon/gun/energy/gun/nuclear/proc/update_charge() - var/ratio = power_supply.charge / power_supply.maxcharge - ratio = round(ratio, 0.25) * 100 - overlays += "nucgun-[ratio]" - -/obj/item/weapon/gun/energy/gun/nuclear/proc/update_reactor() - if(lightfail) - overlays += "nucgun-medium" - else if ((power_supply.charge/power_supply.maxcharge) <= 0.5) - overlays += "nucgun-light" - else - overlays += "nucgun-clean" - -/obj/item/weapon/gun/energy/gun/nuclear/proc/update_mode() - var/datum/firemode/current_mode = firemodes[sel_mode] - switch(current_mode.name) - if("stun") overlays += "nucgun-stun" - if("lethal") overlays += "nucgun-kill" - -/obj/item/weapon/gun/energy/gun/nuclear/update_icon() - overlays.Cut() - update_charge() - update_reactor() - update_mode() diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 3074638bce..2bcb2db771 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -7,14 +7,13 @@ force = 10 fire_sound='sound/weapons/Laser.ogg' projectile_type = /obj/item/projectile/beam - charge_cost=100 - max_shots = 20 // This is cut in half by "DESTROY" mode. + charge_cost = 120 sel_mode = 2 firemodes = list( - list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost=100), - list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost=100), - list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost=200), + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost = 120), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost = 120), + list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost = 240), ) /obj/item/weapon/gun/energy/pulse_rifle/mounted @@ -24,11 +23,9 @@ /obj/item/weapon/gun/energy/pulse_rifle/destroyer name = "pulse destroyer" desc = "A heavy-duty, pulse-based energy weapon. Because of its complexity and cost, it is rarely seen in use except by specialists." - cell_type = /obj/item/weapon/cell/super - fire_delay = 25 fire_sound='sound/weapons/gauss_shoot.ogg' projectile_type=/obj/item/projectile/beam/pulse - charge_cost=400 + charge_cost = 120 /obj/item/weapon/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob) user << "[src.name] has three settings, and they are all DESTROY." @@ -39,4 +36,10 @@ desc = "It's not the size of the gun, it's the size of the hole it puts through people." slot_flags = SLOT_BELT|SLOT_HOLSTER icon_state = "m1911-p" - max_shots = 5 + charge_cost = 240 + + firemodes = list( + list(mode_name="stun", projectile_type=/obj/item/projectile/beam/stun, fire_sound='sound/weapons/Taser.ogg', fire_delay=null, charge_cost = 240), + list(mode_name="lethal", projectile_type=/obj/item/projectile/beam, fire_sound='sound/weapons/Laser.ogg', fire_delay=null, charge_cost = 240), + list(mode_name="DESTROY", projectile_type=/obj/item/projectile/beam/pulse, fire_sound='sound/weapons/gauss_shoot.ogg', fire_delay=null, charge_cost = 480), + ) \ No newline at end of file diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 0c3822cced..6a02d8a38f 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -5,12 +5,10 @@ item_state = "ionrifle" fire_sound = 'sound/weapons/Laser.ogg' origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4) - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 flags = CONDUCT slot_flags = SLOT_BACK - charge_cost = 300 - max_shots = 10 projectile_type = /obj/item/projectile/ion /obj/item/weapon/gun/energy/ionrifle/emp_act(severity) @@ -30,7 +28,6 @@ item_state = "decloner" fire_sound = 'sound/weapons/pulse3.ogg' origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 4, TECH_POWER = 3) - max_shots = 10 projectile_type = /obj/item/projectile/energy/declone /obj/item/weapon/gun/energy/floragun @@ -39,8 +36,6 @@ icon_state = "floramut100" item_state = "floramut" fire_sound = 'sound/effects/stealthoff.ogg' - charge_cost = 100 - max_shots = 10 projectile_type = /obj/item/projectile/energy/floramut origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 3, TECH_POWER = 3) modifystate = "floramut" @@ -65,9 +60,10 @@ icon_state = "riotgun" item_state = "c20r" slot_flags = SLOT_BELT|SLOT_BACK - w_class = 4 + w_class = ITEMSIZE_LARGE projectile_type = /obj/item/projectile/meteor cell_type = /obj/item/weapon/cell/potato + charge_cost = 100 self_recharge = 1 recharge_time = 5 //Time it takes for shots to recharge (in ticks) charge_meter = 0 @@ -78,7 +74,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" item_state = "pen" - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_BELT @@ -94,7 +90,7 @@ desc = "A specialized firearm designed to fire lethal bolts of phoron." icon_state = "toxgun" fire_sound = 'sound/effects/stealthoff.ogg' - w_class = 3.0 + w_class = ITEMSIZE_NORMAL origin_tech = list(TECH_COMBAT = 5, TECH_PHORON = 4) projectile_type = /obj/item/projectile/energy/phoron @@ -109,8 +105,8 @@ fire_sound = 'sound/weapons/emitter.ogg' flags = CONDUCT slot_flags = SLOT_BACK - w_class = 4.0 - max_shots = 5 + w_class = ITEMSIZE_LARGE + charge_cost = 480 projectile_type = /obj/item/projectile/change origin_tech = null self_recharge = 1 @@ -134,7 +130,7 @@ name = "staff of animation" desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines." projectile_type = /obj/item/projectile/animate - max_shots = 10 + charge_cost = 240 obj/item/weapon/gun/energy/staff/focus name = "mental focus" diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index 20fa18b09e..b41c1b090b 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -4,7 +4,6 @@ icon_state = "taser" item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/Taser.ogg' - max_shots = 10 projectile_type = /obj/item/projectile/beam/stun /obj/item/weapon/gun/energy/taser/mounted @@ -14,7 +13,7 @@ /obj/item/weapon/gun/energy/taser/mounted/cyborg name = "taser gun" - max_shots = 6 + charge_cost = 400 recharge_time = 7 //Time it takes for shots to recharge (in ticks) @@ -26,14 +25,14 @@ fire_sound = 'sound/weapons/Gunshot.ogg' origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_POWER = 2) projectile_type = /obj/item/projectile/energy/electrode/strong - max_shots = 8 + charge_cost = 300 /obj/item/weapon/gun/energy/crossbow name = "mini energy-crossbow" desc = "A weapon favored by many mercenary stealth specialists." icon_state = "crossbow" - w_class = 2.0 + w_class = ITEMSIZE_SMALL item_state = "crossbow" origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 2, TECH_ILLEGAL = 5) matter = list(DEFAULT_WALL_MATERIAL = 2000) @@ -41,7 +40,7 @@ silenced = 1 fire_sound = 'sound/weapons/Genhit.ogg' projectile_type = /obj/item/projectile/energy/bolt - max_shots = 5 + charge_cost = 480 self_recharge = 1 charge_meter = 0 @@ -52,7 +51,7 @@ /obj/item/weapon/gun/energy/crossbow/largecrossbow name = "energy crossbow" desc = "A weapon favored by mercenary infiltration teams." - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 matter = list(DEFAULT_WALL_MATERIAL = 200000) projectile_type = /obj/item/projectile/energy/bolt/large diff --git a/code/modules/projectiles/guns/energy/temperature.dm b/code/modules/projectiles/guns/energy/temperature.dm index d4472e2488..64f708891b 100644 --- a/code/modules/projectiles/guns/energy/temperature.dm +++ b/code/modules/projectiles/guns/energy/temperature.dm @@ -5,7 +5,7 @@ desc = "A gun that changes temperatures. It has a small label on the side, 'More extreme temperatures will cost more charge!'" var/temperature = T20C var/current_temperature = T20C - charge_cost = 100 + charge_cost = 24 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 2) slot_flags = SLOT_BELT|SLOT_BACK diff --git a/code/modules/projectiles/guns/launcher.dm b/code/modules/projectiles/guns/launcher.dm index 8d5a9748f1..1c9a09e4e3 100644 --- a/code/modules/projectiles/guns/launcher.dm +++ b/code/modules/projectiles/guns/launcher.dm @@ -1,7 +1,7 @@ /obj/item/weapon/gun/launcher name = "launcher" desc = "A device that launches things." - w_class = 5.0 + w_class = ITEMSIZE_HUGE flags = CONDUCT slot_flags = SLOT_BACK diff --git a/code/modules/projectiles/guns/launcher/crossbow.dm b/code/modules/projectiles/guns/launcher/crossbow.dm index 407b70d20a..0fdad19238 100644 --- a/code/modules/projectiles/guns/launcher/crossbow.dm +++ b/code/modules/projectiles/guns/launcher/crossbow.dm @@ -7,7 +7,7 @@ icon_state = "bolt" item_state = "bolt" throwforce = 8 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL sharp = 1 edge = 0 @@ -20,7 +20,7 @@ sharp = 1 edge = 0 throwforce = 5 - w_class = 2 + w_class = ITEMSIZE_SMALL icon = 'icons/obj/weapons.dmi' icon_state = "metal-rod" item_state = "bolt" diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm index 107330c13d..207572a8c6 100644 --- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm +++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm @@ -3,7 +3,7 @@ desc = "A bulky pump-action grenade launcher. Holds up to 6 grenades in a revolving magazine." icon_state = "riotgun" item_state = "riotgun" - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 fire_sound = 'sound/weapons/empty.ogg' @@ -94,7 +94,7 @@ /obj/item/weapon/gun/launcher/grenade/underslung name = "underslung grenade launcher" desc = "Not much more than a tube and a firing mechanism, this grenade launcher is designed to be fitted to a rifle." - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 5 max_grenades = 0 diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm index 5463fe26f0..422515de14 100644 --- a/code/modules/projectiles/guns/launcher/pneumatic.dm +++ b/code/modules/projectiles/guns/launcher/pneumatic.dm @@ -4,15 +4,15 @@ icon_state = "pneumatic" item_state = "pneumatic" slot_flags = SLOT_BELT - w_class = 5.0 + w_class = ITEMSIZE_HUGE flags = CONDUCT fire_sound_text = "a loud whoosh of moving air" fire_delay = 50 fire_sound = 'sound/weapons/tablehit1.ogg' var/fire_pressure // Used in fire checks/pressure checks. - var/max_w_class = 3 // Hopper intake size. - var/max_storage_space = 20 // Total internal storage size. + var/max_w_class = ITEMSIZE_NORMAL // Hopper intake size. + var/max_storage_space = ITEMSIZE_COST_NORMAL * 5 // Total internal storage size. var/obj/item/weapon/tank/tank = null // Tank of gas for use in firing the cannon. var/obj/item/weapon/storage/item_storage diff --git a/code/modules/projectiles/guns/launcher/rocket.dm b/code/modules/projectiles/guns/launcher/rocket.dm index 300121aef7..438485320e 100644 --- a/code/modules/projectiles/guns/launcher/rocket.dm +++ b/code/modules/projectiles/guns/launcher/rocket.dm @@ -3,7 +3,7 @@ desc = "MAGGOT." icon_state = "rocket" item_state = "rocket" - w_class = 4.0 + w_class = ITEMSIZE_LARGE throw_speed = 2 throw_range = 10 force = 5.0 diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm index 3cbbd40f34..6b2c52a304 100644 --- a/code/modules/projectiles/guns/launcher/syringe_gun.dm +++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm @@ -9,7 +9,7 @@ slot_flags = SLOT_BELT | SLOT_EARS throwforce = 3 force = 3 - w_class = 1 + w_class = ITEMSIZE_TINY var/obj/item/weapon/reagent_containers/syringe/syringe /obj/item/weapon/syringe_cartridge/update_icon() @@ -67,7 +67,7 @@ desc = "A spring loaded rifle designed to fit syringes, designed to incapacitate unruly patients from a distance." icon_state = "syringegun" item_state = "syringegun" - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 7 matter = list(DEFAULT_WALL_MATERIAL = 2000) slot_flags = SLOT_BELT diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 93904387cd..2d3d034bf9 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -7,7 +7,7 @@ desc = "A gun that fires bullets." icon_state = "revolver" origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2) - w_class = 3 + w_class = ITEMSIZE_NORMAL matter = list(DEFAULT_WALL_MATERIAL = 1000) recoil = 1 diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 2ed89336a9..6c00f9431a 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -2,7 +2,7 @@ name = "prototype SMG" desc = "A protoype lightweight, fast firing gun. Uses 9mm rounds." icon_state = "saber" //ugly - w_class = 3 + w_class = ITEMSIZE_NORMAL load_method = SPEEDLOADER //yup. until someone sprites a magazine for it. max_shells = 22 caliber = "9mm" @@ -26,7 +26,7 @@ desc = "The C-20r is a lightweight and rapid firing SMG, for when you REALLY need someone dead. Uses 10mm rounds. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp." icon_state = "c20r" item_state = "c20r" - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 10 caliber = "10mm" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) @@ -54,7 +54,7 @@ desc = "The rugged STS-35 is a durable automatic weapon of a make popular on the frontier worlds. Uses 7.62mm rounds. This one is unmarked." icon_state = "arifle" item_state = null - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 caliber = "a762" origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4) @@ -84,7 +84,7 @@ desc = "The WT550 Saber is a cheap self-defense weapon mass-produced by Ward-Takahashi for paramilitary and private use. Uses 9mm rounds." icon_state = "wt550" item_state = "wt550" - w_class = 3 + w_class = ITEMSIZE_NORMAL caliber = "9mm" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) slot_flags = SLOT_BELT @@ -107,7 +107,7 @@ desc = "The Z8 Bulldog is an older model designated marksman rifle, made by the now defunct Zendai Foundries. Makes you feel like a space marine when you hold it, even though it can only hold 10 round magazines. Uses 5.56mm rounds and has an under barrel grenade launcher." icon_state = "carbine" // This isn't a carbine. :T item_state = "z8carbine" - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 caliber = "a556" origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 3) @@ -177,7 +177,7 @@ desc = "A rather traditionally made L6 SAW with a pleasantly lacquered wooden pistol grip. Has 'Aussec Armoury- 2531' engraved on the reciever" icon_state = "l6closed100" item_state = "l6closed" - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 slot_flags = 0 max_shells = 50 @@ -250,7 +250,7 @@ desc = "The AS-24 is a durable, rugged looking automatic weapon of a make popular on the frontier worlds. Uses 12 gauge shells. It is unmarked." icon_state = "ashot" item_state = null - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 caliber = "shotgun" fire_sound = 'sound/weapons/shotgun.ogg' @@ -280,7 +280,7 @@ name = "\improper Uzi" desc = "A lightweight, compact, fast firing gun, for when you want someone really dead. Uses .45 rounds." icon_state = "mini-uzi" - w_class = 3 + w_class = ITEMSIZE_NORMAL load_method = MAGAZINE caliber = ".45" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 5) @@ -304,7 +304,7 @@ desc = "The H90K is a compact, high capacity submachine gun produced by Hephaistos Industries. Despite its fierce reputation, it still manages to feel like a toy. Uses 9mm rounds." icon_state = "p90smg" item_state = "p90" - w_class = 3 + w_class = ITEMSIZE_NORMAL caliber = "9mm" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) slot_flags = SLOT_BELT // ToDo: Belt sprite. @@ -325,7 +325,7 @@ name = "\improper Tommygun" desc = "This weapon was made famous by gangsters in the 20th century. Cybersun Industries is currently reproducing these for a target market of historic gun collectors and classy criminals. Uses .45 rounds." icon_state = "tommygun" - w_class = 3 + w_class = ITEMSIZE_NORMAL caliber = ".45" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2, TECH_ILLEGAL = 5) slot_flags = SLOT_BELT // ToDo: Belt sprite. @@ -348,7 +348,7 @@ desc = "The bullpup configured GP3000 is a lightweight, compact, military-grade assault rifle produced by Gurov Projectile Weapons LLC. It is sold almost exclusively to standing armies. The serial number on this one has been scratched off. Uses 5.56mm rounds." icon_state = "bullpupm" item_state = "bullpup" - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 caliber = "a556" origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 1, TECH_ILLEGAL = 4) diff --git a/code/modules/projectiles/guns/projectile/boltaction.dm b/code/modules/projectiles/guns/projectile/boltaction.dm index 28da9997d2..c6e25ca767 100644 --- a/code/modules/projectiles/guns/projectile/boltaction.dm +++ b/code/modules/projectiles/guns/projectile/boltaction.dm @@ -30,7 +30,7 @@ // Stole hacky terrible code from doublebarrel shotgun. -Spades /obj/item/weapon/gun/projectile/shotgun/pump/rifle/mosin/attackby(var/obj/item/A as obj, mob/user as mob) - if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != 3) + if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter) && w_class != ITEMSIZE_NORMAL) user << "You begin to shorten the barrel and stock of \the [src]." if(loaded.len) afterattack(user, user) //will this work? //it will. we call it twice, for twice the FUN @@ -39,7 +39,7 @@ return if(do_after(user, 30)) icon_state = "obrez" - w_class = 3 + w_class = ITEMSIZE_NORMAL recoil = 2 // Owch accuracy = -1 // You know damn well why. item_state = "gun" diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 08442fcb8c..fd46803c68 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -104,7 +104,7 @@ name = "silenced pistol" desc = "A small, quiet, easily concealable gun. Uses .45 rounds." icon_state = "silenced_pistol" - w_class = 3 + w_class = ITEMSIZE_NORMAL caliber = ".45" silenced = 1 fire_delay = 1 @@ -190,7 +190,7 @@ desc = "The Lumoco Arms P3 Whisper. A small, easily concealable gun. Uses 9mm rounds." icon_state = "pistol" item_state = null - w_class = 2 + w_class = ITEMSIZE_SMALL caliber = "9mm" silenced = 0 origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 2) @@ -212,7 +212,7 @@ user << "You unscrew [silenced] from [src]." user.put_in_hands(silenced) silenced = 0 - w_class = 2 + w_class = ITEMSIZE_SMALL update_icon() return ..() @@ -225,7 +225,7 @@ user.drop_item() user << "You screw [I] onto [src]." silenced = I //dodgy? - w_class = 3 + w_class = ITEMSIZE_NORMAL I.loc = src //put the silencer into the gun update_icon() return @@ -243,7 +243,7 @@ desc = "a silencer" icon = 'icons/obj/gun.dmi' icon_state = "silencer" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/gun/projectile/pirate name = "zip gun" @@ -284,7 +284,7 @@ desc = "It's not size of your gun that matters, just the size of your load. Uses .357 rounds." //OHHH MYYY~ icon_state = "derringer" item_state = "concealed" - w_class = 2 + w_class = ITEMSIZE_SMALL origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_ILLEGAL = 3) handle_casings = CYCLE_CASINGS //player has to take the old casing out manually before reloading load_method = SINGLE_CASING diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 025aac20d9..90da6cac49 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -4,7 +4,7 @@ icon_state = "shotgun" item_state = "shotgun" max_shells = 4 - w_class = 4.0 + w_class = ITEMSIZE_LARGE force = 10 flags = CONDUCT slot_flags = SLOT_BACK @@ -60,7 +60,7 @@ load_method = SINGLE_CASING|SPEEDLOADER handle_casings = CYCLE_CASINGS max_shells = 2 - w_class = 4 + w_class = ITEMSIZE_LARGE force = 10 flags = CONDUCT slot_flags = SLOT_BACK @@ -98,7 +98,7 @@ if(do_after(user, 30)) //SHIT IS STEALTHY EYYYYY icon_state = "sawnshotgun" item_state = "sawnshotgun" - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 5 slot_flags &= ~SLOT_BACK //you can't sling it on your back slot_flags |= (SLOT_BELT|SLOT_HOLSTER) //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) - or in a holster, why not. @@ -115,5 +115,5 @@ item_state = "sawnshotgun" slot_flags = SLOT_BELT|SLOT_HOLSTER ammo_type = /obj/item/ammo_casing/shotgun/pellet - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 5 diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index f91054b2c7..be280c2f64 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -6,7 +6,7 @@ icon_state = "heavysniper" item_state = "l6closed-empty" // placeholder item_state_slots = list(slot_r_hand_str = "heavysniper", slot_l_hand_str = "heavysniper") - w_class = 5 // So it can't fit in a backpack. + w_class = ITEMSIZE_HUGE // So it can't fit in a backpack. force = 10 slot_flags = SLOT_BACK origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) @@ -75,7 +75,7 @@ desc = "The SVD, also known as the Dragunov, was mass produced with an Optical Sniper Sight so simple that even Ivan can figure out how it works. Too bad for you that it's written in Russian. Uses 7.62mm rounds." icon_state = "SVD" item_state = "SVD" - w_class = 5 // So it can't fit in a backpack. + w_class = ITEMSIZE_HUGE // So it can't fit in a backpack. force = 10 slot_flags = SLOT_BACK // Needs a sprite. origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) diff --git a/code/modules/projectiles/guns/projectile/sniper_vr.dm b/code/modules/projectiles/guns/projectile/sniper_vr.dm index f2796a61ae..ecfe070eca 100644 --- a/code/modules/projectiles/guns/projectile/sniper_vr.dm +++ b/code/modules/projectiles/guns/projectile/sniper_vr.dm @@ -5,7 +5,7 @@ desc = "The SVD, also known as the Dragunov, was mass produced with an Optical Sniper Sight so simple that even Ivan can figure out how it works. Too bad for you that it's written in Russian. Uses 7.62mm rounds." icon_state = "SVD" item_state = "SVD" - w_class = 5 // So it can't fit in a backpack. + w_class = ITEMSIZE_HUGE // So it can't fit in a backpack. force = 10 slot_flags = SLOT_BACK // Needs a sprite. origin_tech = list(TECH_COMBAT = 8, TECH_MATERIAL = 2, TECH_ILLEGAL = 8) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index 8bbd31aed0..835a097267 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -168,6 +168,19 @@ range_step = 1 spread_step = 10 +//EMP shotgun 'slug', it's basically a beanbag that pops a tiny emp when it hits. +/obj/item/projectile/bullet/shotgun/ion + name = "ion slug" + damage = 15 + embed = 0 + sharp = 0 + check_armour = "melee" + +/obj/item/projectile/bullet/shotgun/ion/on_hit(var/atom/target, var/blocked = 0) + ..() + empulse(target, 0, 0) //Only affects what it hits + return 1 + /* "Rifle" rounds */ /obj/item/projectile/bullet/rifle diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index b567512a05..8ce0360c10 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -14,7 +14,6 @@ empulse(target, 1, 1) return 1 - /obj/item/projectile/bullet/gyro name ="explosive bolt" icon_state= "bolter" diff --git a/code/modules/random_map/automata/caves.dm b/code/modules/random_map/automata/caves.dm index 30e6f1376a..4868e6d068 100644 --- a/code/modules/random_map/automata/caves.dm +++ b/code/modules/random_map/automata/caves.dm @@ -45,7 +45,10 @@ var/turf/simulated/mineral/T = locate((origin_x-1)+x,(origin_y-1)+y,origin_z) if(istype(T) && !T.ignore_mapgen) if(map[current_cell] == FLOOR_CHAR) - T.make_floor() + if(prob(90)) + T.make_floor() + else + T.ChangeTurf(/turf/space/cracked_asteroid) else T.make_wall() if(map[current_cell] == DOOR_CHAR) diff --git a/code/modules/reagents/Chemistry-Reagents-Helpers.dm b/code/modules/reagents/Chemistry-Reagents-Helpers.dm new file mode 100644 index 0000000000..a072e4402b --- /dev/null +++ b/code/modules/reagents/Chemistry-Reagents-Helpers.dm @@ -0,0 +1,14 @@ +/atom/movable/proc/can_be_injected_by(var/atom/injector) + if(!Adjacent(get_turf(injector))) + return FALSE + if(!reagents) + return FALSE + if(!reagents.get_free_space()) + return FALSE + return TRUE + +/obj/can_be_injected_by(var/atom/injector) + return is_open_container() && ..() + +/mob/living/can_be_injected_by(var/atom/injector) + return ..() && (can_inject(null, 0, BP_TORSO) || can_inject(null, 0, BP_GROIN)) \ No newline at end of file diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 64cbd4a32c..29d997cde5 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -19,6 +19,7 @@ var/list/data = null var/volume = 0 var/metabolism = REM // This would be 0.2 normally + var/mrate_static = FALSE //If the reagent should always process at the same speed, regardless of species, make this TRUE var/ingest_met = 0 var/touch_met = 0 var/dose = 0 @@ -60,6 +61,8 @@ if(overdose && (volume > overdose) && (location != CHEM_TOUCH)) overdose(M, alien) var/removed = metabolism + if(!mrate_static == TRUE) + removed *= M.species.metabolic_rate if(ingest_met && (location == CHEM_INGEST)) removed = ingest_met if(touch_met && (location == CHEM_TOUCH)) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index fcabfa811c..96aa1c238d 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -4,6 +4,7 @@ id = "blood" reagent_state = LIQUID metabolism = REM * 5 + mrate_static = TRUE color = "#C80000" glass_name = "tomato juice" @@ -75,6 +76,7 @@ id = "antibodies" reagent_state = LIQUID color = "#0050F0" + mrate_static = TRUE /datum/reagent/antibodies/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(src.data) @@ -89,6 +91,7 @@ reagent_state = LIQUID color = "#0064C877" metabolism = REM * 10 + mrate_static = TRUE glass_name = "water" glass_desc = "The father of all refreshments." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm index 89837746c3..617fb31e58 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Dispenser.dm @@ -12,6 +12,7 @@ reagent_state = SOLID color = "#1C1300" ingest_met = REM * 5 + mrate_static = TRUE /datum/reagent/carbon/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -66,6 +67,8 @@ var/targ_temp = 310 var/halluci = 0 + mrate_static = TRUE + glass_name = "ethanol" glass_desc = "A well-known alcohol with a variety of applications." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 525309f93b..33f42c3eb0 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -6,6 +6,7 @@ description = "All the vitamins, minerals, and carbohydrates the body needs in pure form." reagent_state = SOLID metabolism = REM * 4 + mrate_static = TRUE var/nutriment_factor = 30 // Per unit var/injectable = 0 color = "#664330" diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm index 2cb1bcaa5b..3f6a499ee0 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Medicine.dm @@ -8,6 +8,7 @@ color = "#00BFFF" overdose = REAGENTS_OVERDOSE * 2 metabolism = REM * 0.5 + mrate_static = TRUE scannable = 1 /datum/reagent/inaprovaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -91,6 +92,7 @@ description = "Dexalin Plus is used in the treatment of oxygen deprivation. It is highly effective." reagent_state = LIQUID color = "#0040FF" + mrate_static = TRUE //Until it's not crazy strong, at least overdose = REAGENTS_OVERDOSE * 0.5 scannable = 1 @@ -123,6 +125,7 @@ reagent_state = LIQUID color = "#8080FF" metabolism = REM * 0.5 + mrate_static = TRUE scannable = 1 /datum/reagent/cryoxadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -139,6 +142,7 @@ reagent_state = LIQUID color = "#80BFFF" metabolism = REM * 0.5 + mrate_static = TRUE scannable = 1 /datum/reagent/clonexadone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -159,6 +163,7 @@ overdose = 60 scannable = 1 metabolism = 0.02 + mrate_static = TRUE /datum/reagent/paracetamol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 50) @@ -176,6 +181,7 @@ overdose = 30 scannable = 1 metabolism = 0.02 + mrate_static = TRUE /datum/reagent/tramadol/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 80) @@ -192,6 +198,7 @@ color = "#800080" overdose = 20 metabolism = 0.02 + mrate_static = TRUE /datum/reagent/oxycodone/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) M.add_chemical_effect(CE_PAINKILLER, 200) @@ -311,6 +318,7 @@ reagent_state = LIQUID color = "#FF3300" metabolism = REM * 0.3 + mrate_static = TRUE overdose = REAGENTS_OVERDOSE * 0.5 /datum/reagent/hyperzine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -376,6 +384,7 @@ reagent_state = LIQUID color = "#C1C1C1" metabolism = REM * 0.05 + mrate_static = TRUE overdose = REAGENTS_OVERDOSE scannable = 1 @@ -430,6 +439,7 @@ reagent_state = LIQUID color = "#BF80BF" metabolism = 0.01 + mrate_static = TRUE data = 0 /datum/reagent/methylphenidate/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -450,6 +460,7 @@ reagent_state = LIQUID color = "#FF80FF" metabolism = 0.01 + mrate_static = TRUE data = 0 /datum/reagent/citalopram/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) @@ -470,6 +481,7 @@ reagent_state = LIQUID color = "#FF80BF" metabolism = 0.01 + mrate_static = TRUE data = 0 /datum/reagent/paroxetine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm index 92d09d1e18..7a94e64ac6 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Other.dm @@ -111,6 +111,7 @@ reagent_state = LIQUID color = "#C8A5DC" affects_dead = 1 //This can even heal dead people. + mrate_static = TRUE //Just in case glass_name = "liquid gold" glass_desc = "It's magic. We don't have to explain it." @@ -182,6 +183,7 @@ description = "Adrenaline is a hormone used as a drug to treat cardiac arrest and other cardiac dysrhythmias resulting in diminished or absent cardiac output." reagent_state = LIQUID color = "#C8A5DC" + mrate_static = TRUE /datum/reagent/adrenaline/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) if(alien == IS_DIONA) @@ -195,6 +197,7 @@ id = "holywater" description = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." color = "#E0E8EF" + mrate_static = TRUE glass_name = "holy water" glass_desc = "An ashen-obsidian-water mix, this solution will alter certain sections of the brain's rationality." diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 0d83a5725c..dd31ac05e4 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -7,6 +7,7 @@ reagent_state = LIQUID color = "#CF3600" metabolism = REM * 0.25 // 0.05 by default. Hopefully enough to get some help, or die horribly, whatever floats your boat + mrate_static = TRUE var/strength = 4 // How much damage it deals per unit /datum/reagent/toxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) diff --git a/code/modules/reagents/dispenser/cartridge.dm b/code/modules/reagents/dispenser/cartridge.dm index 2f7369cba0..3a129d4872 100644 --- a/code/modules/reagents/dispenser/cartridge.dm +++ b/code/modules/reagents/dispenser/cartridge.dm @@ -3,7 +3,7 @@ desc = "This goes in a chemical dispenser." icon_state = "cartridge" - w_class = 3 + w_class = ITEMSIZE_NORMAL volume = CARTRIDGE_VOLUME_LARGE amount_per_transfer_from_this = 50 diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 2c8c853ebc..6721cbd3bb 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -3,7 +3,7 @@ desc = "..." icon = 'icons/obj/chemical.dmi' icon_state = null - w_class = 2 + w_class = ITEMSIZE_SMALL var/amount_per_transfer_from_this = 5 var/possible_transfer_amounts = list(5,10,15,25,30) var/volume = 30 diff --git a/code/modules/reagents/reagent_containers/drinkingglass/extras.dm b/code/modules/reagents/reagent_containers/drinkingglass/extras.dm index 5a92b61c88..284d4ecfa9 100644 --- a/code/modules/reagents/reagent_containers/drinkingglass/extras.dm +++ b/code/modules/reagents/reagent_containers/drinkingglass/extras.dm @@ -52,7 +52,7 @@ var/glass_addition var/glass_desc var/glass_color - w_class = 1 + w_class = ITEMSIZE_TINY icon = DRINK_ICON_FILE /obj/item/weapon/glass_extra/stick diff --git a/code/modules/reagents/reagent_containers/dropper.dm b/code/modules/reagents/reagent_containers/dropper.dm index ba671cdb50..7ee525fc0b 100644 --- a/code/modules/reagents/reagent_containers/dropper.dm +++ b/code/modules/reagents/reagent_containers/dropper.dm @@ -8,7 +8,7 @@ icon_state = "dropper0" amount_per_transfer_from_this = 5 possible_transfer_amounts = list(1,2,3,4,5) - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS volume = 5 diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index b8a6e2bd51..edb8e7fae6 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -94,7 +94,7 @@ name = "golden cup" icon_state = "golden_cup" item_state = "" //nope :( - w_class = 4 + w_class = ITEMSIZE_LARGE force = 14 throwforce = 10 amount_per_transfer_from_this = 20 @@ -256,8 +256,8 @@ ..() /obj/item/weapon/reagent_containers/food/drinks/flask - name = "\improper Station Administrator's flask" - desc = "A metal flask belonging to the Station Administrator" + name = "\improper Colony Director's flask" + desc = "A metal flask belonging to the Colony Director" icon_state = "flask" volume = 60 center_of_mass = list("x"=17, "y"=7) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 6f621ce337..0270c8f2a8 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -13,7 +13,7 @@ var/dry = 0 var/nutriment_amt = 0 center_of_mass = list("x"=16, "y"=16) - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/reagent_containers/food/snacks/New() ..() @@ -2229,7 +2229,7 @@ // sliceable is just an organization type path, it doesn't have any additional code or variables tied to it. /obj/item/weapon/reagent_containers/food/snacks/sliceable - w_class = 3 //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that. + w_class = ITEMSIZE_NORMAL //Whole pizzas and cakes shouldn't fit in a pocket, you can slice them if you want to do that. /obj/item/weapon/reagent_containers/food/snacks/sliceable/meatbread name = "meatbread loaf" @@ -2904,12 +2904,12 @@ /obj/item/pizzabox/proc/closepizzabox() - if( boxes.len > 0 ) + if(boxes.len > 0) return open = !open - if( open && pizza ) + if(open && pizza) ismessy = 1 update_icon() @@ -2919,29 +2919,29 @@ overlays = list() // Set appropriate description - if( open && pizza ) + if(open && pizza) desc = "A box suited for pizzas. It appears to have a [pizza.name] inside." - else if( boxes.len > 0 ) + else if(boxes.len > 0) desc = "A pile of boxes suited for pizzas. There appears to be [boxes.len + 1] boxes in the pile." var/obj/item/pizzabox/topbox = boxes[boxes.len] var/toptag = topbox.boxtag - if( toptag != "" ) + if(toptag != "") desc = "[desc] The box on top has a tag, it reads: '[toptag]'." else desc = "A box suited for pizzas." - if( boxtag != "" ) + if(boxtag != "") desc = "[desc] The box has a tag, it reads: '[boxtag]'." // Icon states and overlays - if( open ) - if( ismessy ) + if(open) + if(ismessy) icon_state = "pizzabox_messy" else icon_state = "pizzabox_open" - if( pizza ) + if(pizza) var/image/pizzaimg = image("food.dmi", icon_state = pizza.icon_state) pizzaimg.pixel_y = -3 overlays += pizzaimg @@ -2950,33 +2950,33 @@ else // Stupid code because byondcode sucks var/doimgtag = 0 - if( boxes.len > 0 ) + if(boxes.len > 0) var/obj/item/pizzabox/topbox = boxes[boxes.len] - if( topbox.boxtag != "" ) + if(topbox.boxtag != "") doimgtag = 1 else - if( boxtag != "" ) + if(boxtag != "") doimgtag = 1 - if( doimgtag ) + if(doimgtag) var/image/tagimg = image("food.dmi", icon_state = "pizzabox_tag") tagimg.pixel_y = boxes.len * 3 overlays += tagimg icon_state = "pizzabox[boxes.len+1]" -/obj/item/pizzabox/attack_hand( mob/user as mob ) +/obj/item/pizzabox/attack_hand(mob/user as mob) if( open && pizza ) - user.put_in_hands( pizza ) + user.put_in_hands(pizza) - user << "\red You take the [src.pizza] out of the [src]." + user << "You take \the [src.pizza] out of the [src]." src.pizza = null update_icon() return - if( boxes.len > 0 ) - if( user.get_inactive_hand() != src ) + if(boxes.len > 0) + if(user.get_inactive_hand() != src) ..() return @@ -2984,13 +2984,13 @@ boxes -= box user.put_in_hands( box ) - user << "\red You remove the topmost [src] from your hand." + user << "You remove \the topmost [src] from your hand." box.update_icon() update_icon() return ..() -/obj/item/pizzabox/attack_self( mob/user as mob ) +/obj/item/pizzabox/attack_self(mob/user as mob) closepizzabox() @@ -3000,57 +3000,58 @@ closepizzabox() /obj/item/pizzabox/attackby( obj/item/I as obj, mob/user as mob ) - if( istype(I, /obj/item/pizzabox/) ) + if(istype(I, /obj/item/pizzabox/)) var/obj/item/pizzabox/box = I - if( !box.open && !src.open ) + if(!box.open && !src.open) // Make a list of all boxes to be added var/list/boxestoadd = list() boxestoadd += box for(var/obj/item/pizzabox/i in box.boxes) boxestoadd += i - if( (boxes.len+1) + boxestoadd.len <= 5 ) + if((boxes.len+1) + boxestoadd.len <= 5) user.drop_item() box.loc = src box.boxes = list() // Clear the box boxes so we don't have boxes inside boxes. - Xzibit - src.boxes.Add( boxestoadd ) + src.boxes.Add(boxestoadd) box.update_icon() update_icon() - user << "\red You put the [box] ontop of the [src]!" + user << "You put \the [box] ontop of the [src]!" else - user << "\red The stack is too high!" + user << "\The stack is too high!" else - user << "\red Close the [box] first!" + user << "Close \the [box] first!" return - if( istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/) ) // Long ass fucking object name + if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/sliceable/pizza/)) // Long ass fucking object name - if( src.open ) - user.drop_item() - I.loc = src - src.pizza = I - - update_icon() - - user << "\red You put the [I] in the [src]!" + if(open) + if(!pizza) + user.drop_item() + I.loc = src + pizza = I + update_icon() + user << "You put \the [I] in \the [src]!" + else + user << "\The [src] is full! It already has a [pizza] inside." else - user << "\red You try to push the [I] through the lid but it doesn't work!" + user << "You try to push \the [I] through the lid but it doesn't work!" + return - if( istype(I, /obj/item/weapon/pen/) ) - - if( src.open ) + if(istype(I, /obj/item/weapon/pen/)) + if(open) return var/t = sanitize(input("Enter what you want to add to the tag:", "Write", null, null) as text, 30) var/obj/item/pizzabox/boxtotagto = src - if( boxes.len > 0 ) + if(boxes.len > 0) boxtotagto = boxes[boxes.len] boxtotagto.boxtag = copytext("[boxtotagto.boxtag][t]", 1, 30) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 1347a182fc..b041aa13e7 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -12,7 +12,7 @@ amount_per_transfer_from_this = 10 possible_transfer_amounts = list(5,10,15,25,30,60) volume = 60 - w_class = 2 + w_class = ITEMSIZE_SMALL flags = OPENCONTAINER unacidable = 1 //glass doesn't dissolve in acid @@ -218,7 +218,7 @@ icon_state = "bucket" item_state = "bucket" matter = list(DEFAULT_WALL_MATERIAL = 200) - w_class = 3.0 + w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) volume = 120 @@ -256,7 +256,7 @@ icon = 'icons/obj/vending.dmi' icon_state = "water_cooler_bottle" matter = list("glass" = 2000) - w_class = 3.0 + w_class = ITEMSIZE_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(10,20,30,60,120) volume = 120 diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 150a774309..464e066264 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -8,7 +8,7 @@ icon_state = null item_state = "pill" possible_transfer_amounts = null - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS volume = 60 diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index c3b48691c0..c1c2597daf 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -7,7 +7,7 @@ flags = OPENCONTAINER|NOBLUDGEON slot_flags = SLOT_BELT throwforce = 3 - w_class = 2.0 + w_class = ITEMSIZE_SMALL throw_speed = 2 throw_range = 10 amount_per_transfer_from_this = 10 @@ -163,7 +163,7 @@ icon_state = "chemsprayer" item_state = "chemsprayer" throwforce = 3 - w_class = 3.0 + w_class = ITEMSIZE_NORMAL possible_transfer_amounts = null volume = 600 origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 87b5311be2..4bf97175d1 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -15,7 +15,7 @@ amount_per_transfer_from_this = 5 possible_transfer_amounts = null volume = 15 - w_class = 1 + w_class = ITEMSIZE_TINY slot_flags = SLOT_EARS sharp = 1 unacidable = 1 //glass diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 70ac20ae87..be3cfa72a8 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -218,7 +218,7 @@ name = "package wrapper" icon = 'icons/obj/items.dmi' icon_state = "deliveryPaper" - w_class = 3.0 + w_class = ITEMSIZE_NORMAL var/amount = 25.0 @@ -327,7 +327,7 @@ icon_state = "dest_tagger" var/currTag = 0 - w_class = 2 + w_class = ITEMSIZE_SMALL item_state = "electronic" flags = CONDUCT slot_flags = SLOT_BELT diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 78715938c3..346aecacab 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -260,6 +260,15 @@ other types of metals and chemistry for reagents). category = "Misc" sort_string = "DAAAD" +/datum/design/item/powercell/device + name = "device" + build_type = PROTOLATHE + id = "device" + materials = list(DEFAULT_WALL_MATERIAL = 350, "glass" = 25) + build_path = /obj/item/weapon/cell/device + category = "Misc" + sort_string = "DAAAE" + /datum/design/item/hud materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50) @@ -1038,6 +1047,14 @@ CIRCUITS BELOW build_path = /obj/item/weapon/circuitboard/smes sort_string = "JBABB" +/datum/design/circuit/grid_checker + name = "power grid checker" + desc = "Allows for the construction of circuit boards used to build a grid checker." + id = "grid_checker" + req_tech = list(TECH_POWER = 4, TECH_ENGINEERING = 3) + build_path = /obj/item/weapon/circuitboard/grid_checker + sort_string = "JBABC" + /datum/design/circuit/gas_heater name = "gas heating system" id = "gasheater" @@ -1523,6 +1540,14 @@ CIRCUITS BELOW materials = list(DEFAULT_WALL_MATERIAL = 20000) build_path = /obj/item/device/electronic_assembly/medium +/datum/design/item/custom_circuit_assembly/drone + name = "Drone custom assembly" + desc = "An customizable assembly optimized for autonomous devices." + id = "assembly-drone" + req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 4, TECH_POWER = 4) + materials = list(DEFAULT_WALL_MATERIAL = 30000) + build_path = /obj/item/device/electronic_assembly/drone + /datum/design/item/custom_circuit_assembly/large name = "Large custom assembly" desc = "An customizable assembly for large machines." @@ -1717,6 +1742,11 @@ CIRCUITS BELOW build_path = /obj/item/integrated_circuit/input/local_locator sort_string = "WAAEG" +/datum/design/circuit/integrated_circuit/input_output/adjacent_locator + id = "cc-adjacentlocator" + build_path = /obj/item/integrated_circuit/input/adjacent_locator + sort_string = "WAAEH" + /datum/design/circuit/integrated_circuit/input_output/signaler id = "cc-signaler" build_path = /obj/item/integrated_circuit/input/signaler @@ -1754,44 +1784,44 @@ CIRCUITS BELOW ..() name = "Custom circuitry \[Logic\] ([item_name])" -/datum/design/circuit/integrated_circuit/logic/equals +/datum/design/circuit/integrated_circuit/logic/binary/equals id = "cc-equals" - build_path = /obj/item/integrated_circuit/logic/equals + build_path = /obj/item/integrated_circuit/logic/binary/equals sort_string = "WAAFA" -/datum/design/circuit/integrated_circuit/logic/not +/datum/design/circuit/integrated_circuit/logic/unary/not id = "cc-not" - build_path = /obj/item/integrated_circuit/logic/not + build_path = /obj/item/integrated_circuit/logic/unary/not sort_string = "WAAFB" -/datum/design/circuit/integrated_circuit/logic/and +/datum/design/circuit/integrated_circuit/logic/binary/and id = "cc-and" - build_path = /obj/item/integrated_circuit/logic/and + build_path = /obj/item/integrated_circuit/logic/binary/and sort_string = "WAAFC" -/datum/design/circuit/integrated_circuit/logic/or +/datum/design/circuit/integrated_circuit/logic/binary/or id = "cc-or" - build_path = /obj/item/integrated_circuit/logic/or + build_path = /obj/item/integrated_circuit/logic/binary/or sort_string = "WAAFD" -/datum/design/circuit/integrated_circuit/logic/less_than +/datum/design/circuit/integrated_circuit/logic/binary/less_than id = "cc-less_than" - build_path = /obj/item/integrated_circuit/logic/less_than + build_path = /obj/item/integrated_circuit/logic/binary/less_than sort_string = "WAAFE" -/datum/design/circuit/integrated_circuit/logic/less_than_or_equal +/datum/design/circuit/integrated_circuit/logic/binary/less_than_or_equal id = "cc-less_than_or_equal" - build_path = /obj/item/integrated_circuit/logic/less_than_or_equal + build_path = /obj/item/integrated_circuit/logic/binary/less_than_or_equal sort_string = "WAAFF" -/datum/design/circuit/integrated_circuit/logic/greater_than +/datum/design/circuit/integrated_circuit/logic/binary/greater_than id = "cc-greater_than" - build_path = /obj/item/integrated_circuit/logic/greater_than + build_path = /obj/item/integrated_circuit/logic/binary/greater_than sort_string = "WAAFG" -/datum/design/circuit/integrated_circuit/logic/greater_than_or_equal +/datum/design/circuit/integrated_circuit/logic/binary/greater_than_or_equal id = "cc-greater_than_or_equal" - build_path = /obj/item/integrated_circuit/logic/greater_than_or_equal + build_path = /obj/item/integrated_circuit/logic/binary/greater_than_or_equal sort_string = "WAAFH" @@ -1821,7 +1851,33 @@ CIRCUITS BELOW sort_string = "WAAGB" req_tech = list(TECH_ENGINEERING = 3, TECH_DATA = 3) +/datum/design/circuit/integrated_circuit/manipulation/injector + name = "injector" + id = "cc-injector" + build_path = /obj/item/integrated_circuit/manipulation/injector + sort_string = "WAAGC" + req_tech = list(TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 3) +/datum/design/circuit/integrated_circuit/manipulation/reagent_pump + name = "reagent pump" + id = "cc-reagent_pump" + build_path = /obj/item/integrated_circuit/manipulation/reagent_pump + sort_string = "WAAGD" + req_tech = list(TECH_ENGINEERING = 1, TECH_DATA = 1, TECH_BIO = 2) + +/datum/design/circuit/integrated_circuit/manipulation/reagent_storage + name = "reagent storage" + id = "cc-reagent_storage" + build_path = /obj/item/integrated_circuit/manipulation/reagent_storage + sort_string = "WAAGE" + req_tech = list(TECH_ENGINEERING = 1, TECH_DATA = 1, TECH_BIO = 1) + +/datum/design/circuit/integrated_circuit/manipulation/reagent_storage_cryo + name = "cryo reagent storage" + id = "cc-reagent_storage_cryo" + build_path = /obj/item/integrated_circuit/manipulation/reagent_storage/cryo + sort_string = "WAAGF" + req_tech = list(TECH_MATERIALS = 3, TECH_ENGINEERING = 2, TECH_DATA = 2, TECH_BIO = 2) /datum/design/circuit/integrated_circuit/memory/AssembleDesignName() ..() diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 41c6f6978c..ce5a9e151a 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -203,7 +203,7 @@ research holder datum. icon = 'icons/obj/cloning.dmi' icon_state = "datadisk2" item_state = "card-id" - w_class = 2.0 + w_class = ITEMSIZE_SMALL matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10) var/datum/tech/stored @@ -217,7 +217,7 @@ research holder datum. icon = 'icons/obj/cloning.dmi' icon_state = "datadisk2" item_state = "card-id" - w_class = 2.0 + w_class = ITEMSIZE_SMALL matter = list(DEFAULT_WALL_MATERIAL = 30, "glass" = 10) var/datum/design/blueprint diff --git a/code/modules/spells/spellbook.dm b/code/modules/spells/spellbook.dm index b54b243609..34923745a4 100644 --- a/code/modules/spells/spellbook.dm +++ b/code/modules/spells/spellbook.dm @@ -5,7 +5,7 @@ icon_state ="spellbook" throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = ITEMSIZE_SMALL var/uses = 5 var/temp = null var/max_uses = 5 diff --git a/code/modules/vehicles/Securitrain_vr.dm b/code/modules/vehicles/Securitrain_vr.dm index b3698560d6..fcabe2f1e9 100644 --- a/code/modules/vehicles/Securitrain_vr.dm +++ b/code/modules/vehicles/Securitrain_vr.dm @@ -1,4 +1,4 @@ -//This is the initial set up for the new carts. Feel free to improve and/or rewrite everything here. +//This is the initial set up for the new carts. Feel free to improve and/or rewrite everything here. //I don't know what the hell I'm doing right now. Please help. Especially with the update_icons stuff. -Joan Risu /obj/vehicle/train/securiengine @@ -10,7 +10,7 @@ powered = 1 locked = 0 move_delay = 0.5 - + //Health stuff health = 100 maxhealth = 100 @@ -24,14 +24,14 @@ var/car_limit = 0 //how many cars an engine can pull before performance degrades. This should be 0 to prevent trailers from unhitching. active_engines = 1 var/obj/item/weapon/key/securitrain/key - var/siren = 0 //This is for eventually getting the siren sprite to work. + var/siren = 0 //This is for eventually getting the siren sprite to work. /obj/item/weapon/key/securitrain name = "The Security Cart key" - desc = "The Security Cart Key used to start it." + desc = "The Security Cart Key used to start it." icon = 'icons/obj/vehicles_vr.dmi' icon_state = "securikey" - w_class = 1 + w_class = ITEMSIZE_TINY /obj/vehicle/train/securitrolley name = "Train trolley" @@ -396,7 +396,7 @@ //----------------------------------------------------- //Update layer stuff // -//This is supposed to update the layers and put the mob in the correct spot. +//This is supposed to update the layers and put the mob in the correct spot. //Pls help squirrel get this to work. ;m; //----------------------------------------------------- /obj/vehicle/train/securiengine/proc/update_layer() diff --git a/code/modules/vehicles/cargo_train.dm b/code/modules/vehicles/cargo_train.dm index 5b1fc876b3..a8ff23a91f 100644 --- a/code/modules/vehicles/cargo_train.dm +++ b/code/modules/vehicles/cargo_train.dm @@ -20,7 +20,7 @@ desc = "A keyring with a small steel key, and a yellow fob reading \"Choo Choo!\"." icon = 'icons/obj/vehicles.dmi' icon_state = "train_keys" - w_class = 1 + w_class = ITEMSIZE_TINY /obj/vehicle/train/cargo/trolley name = "cargo train trolley" diff --git a/code/modules/virus2/items_devices.dm b/code/modules/virus2/items_devices.dm index 59e208f034..887a547e0d 100644 --- a/code/modules/virus2/items_devices.dm +++ b/code/modules/virus2/items_devices.dm @@ -4,7 +4,7 @@ name = "antibody scanner" desc = "Scans living beings for antibodies in their blood." icon_state = "health" - w_class = 2.0 + w_class = ITEMSIZE_SMALL item_state = "electronic" flags = CONDUCT @@ -99,7 +99,7 @@ name = "blank GNA disk" icon = 'icons/obj/cloning.dmi' icon_state = "datadisk0" - w_class = 1 + w_class = ITEMSIZE_TINY var/datum/disease2/effectholder/effect = null var/list/species = null var/stage = 1 diff --git a/code/modules/vore/appearance/sprite_accessories_vr.dm b/code/modules/vore/appearance/sprite_accessories_vr.dm index 91fb5f2db6..bd4476c7ee 100644 --- a/code/modules/vore/appearance/sprite_accessories_vr.dm +++ b/code/modules/vore/appearance/sprite_accessories_vr.dm @@ -628,6 +628,11 @@ icon_state = "seromitail_feathers_hc_s" do_colouration = 1 +/datum/sprite_accessory/tail/zenghu_taj + name = "Zeng-Hu Tajaran Synth tail" + desc = "" + icon_state = "zenghu_taj" + /* //////////////////////////// / =--------------------= / diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 0af5925cba..7e2feccedb 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -12,6 +12,10 @@ M << "[pick(EL)]" src.emotePend = 0 + for (var/V in internal_contents) + if (isnull(V)) + internal_contents -= V + //////////////////////// Absorbed Handling //////////////////////// for(var/mob/living/M in internal_contents) if(M.absorbed) @@ -52,15 +56,7 @@ owner << "" + digest_alert_owner + "" M << "" + digest_alert_prey + "" -// owner.nutrition += 20 // just so eating dead mobs gives you *something*. - - var/offset = (1 + ((M.weight - 137) / 137)) // 130 pounds = .95 140 pounds = 1.02 - var/difference = owner.size_multiplier / M.size_multiplier - if(offset) // If any different than default weight, multiply the % of offset. - owner.nutrition += offset*(1050/difference) // 1050 nutrients per body, modified by body weight and scale. - else - owner.nutrition += 1050 - + owner.nutrition += 20 // so eating dead mobs gives you *something*. var/deathsound = pick(death_sounds) for(var/mob/hearer in range(1,owner)) hearer << deathsound @@ -69,22 +65,19 @@ continue // Deal digestion damage (and feed the pred) - // ToDo: Allow players to adjust digestion damage because we can do that now without breaking everything. if(!(M.status_flags & GODMODE)) M.adjustBruteLoss(2) M.adjustFireLoss(3) -// Had to remove this. Incompatible with things we want to do. -Spades -/* var/offset = (1 + ((M.weight - 137) / 137)) // 130 pounds = .95 140 pounds = 1.02 + var/offset = (1 + ((M.weight - 137) / 137)) // 130 pounds = .95 140 pounds = 1.02 var/difference = owner.size_multiplier / M.size_multiplier if(offset) // If any different than default weight, multiply the % of offset. owner.nutrition += offset*(10/difference) // 9.5 nutrition per digestion tick if they're 130 pounds and it's same size. 10.2 per digestion tick if they're 140 and it's same size. Etc etc. else - owner.nutrition += (10/difference)*/ + owner.nutrition += (10/difference) return - //////////////////////////// DM_ABSORB //////////////////////////// if(digest_mode == DM_ABSORB) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index cd275e91ec..28827d7d9e 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -290,6 +290,8 @@ else var/datum/belly/B = user.vore_organs[choice] for(var/atom/movable/tgt in selected.internal_contents) + if (!(tgt in selected.internal_contents)) + continue selected.internal_contents -= tgt B.internal_contents += tgt @@ -326,6 +328,8 @@ return 1 else var/datum/belly/B = user.vore_organs[choice] + if (!(tgt in selected.internal_contents)) + return 0 selected.internal_contents -= tgt B.internal_contents += tgt diff --git a/code/modules/vore/fluffstuff/custom_clothes_vr.dm b/code/modules/vore/fluffstuff/custom_clothes_vr.dm index c1af51066b..607881c6b0 100644 --- a/code/modules/vore/fluffstuff/custom_clothes_vr.dm +++ b/code/modules/vore/fluffstuff/custom_clothes_vr.dm @@ -563,7 +563,7 @@ icon_override = 'icons/vore/custom_clothes_vr.dmi' item_state = "pom_mob" - w_class = 2.0 + w_class = ITEMSIZE_SMALL on = 0 brightness_on = 5 light_overlay = null @@ -632,7 +632,7 @@ icon_override = 'icons/vore/custom_clothes_vr.dmi' item_state = "arosuit_mob" - w_class = 4 //Oh but I can. + w_class = ITEMSIZE_LARGE //Oh but I can. allowed = list(/obj/item/device/suit_cooling_unit) //Can't fit O2 tanks mob_can_equip(var/mob/living/carbon/human/H, slot, disable_warning = 0) @@ -676,7 +676,7 @@ armor = list(melee = 90, bullet = 50, laser = 45, energy = 25, bomb = 70, bio = 100, rad = 50) //These values were taken from the combat rigs and adjusted to be weaker than said rigs. slowdown = 0 allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton) - w_class = 3 + w_class = ITEMSIZE_NORMAL icon = 'icons/vore/custom_clothes_vr.dmi' icon_state = "joansuit" diff --git a/code/modules/vore/fluffstuff/custom_guns_vr.dm b/code/modules/vore/fluffstuff/custom_guns_vr.dm index 6df096a2c4..d1feefdfb1 100644 --- a/code/modules/vore/fluffstuff/custom_guns_vr.dm +++ b/code/modules/vore/fluffstuff/custom_guns_vr.dm @@ -41,7 +41,7 @@ icon_override = 'icons/obj/gun_vr.dmi' item_state = "battlerifle" item_icons = null - w_class = 4 + w_class = ITEMSIZE_LARGE recoil = 2 // The battlerifle was known for its nasty recoil. max_shells = 36 caliber = "9.5x40mm" @@ -74,7 +74,7 @@ /obj/item/weapon/gun/projectile/shotgun/pump/unsc/fluff/ace name = "Ace's M45D Tactical Shotgun" // D-model holds half as many shells as the normal version so as not to be OP as shit. Better than shotgun, worse than combat shotgun. desc = "Owned by the respected (or feared?) veteran Captain of VORE Station. Inscribed on the barrel are the words \"Speak softly, and carry a big stick.\" It has a folding stock so it can fit into bags." - w_class = 3 // Because collapsable stock so it fits in backpacks. + w_class = ITEMSIZE_NORMAL // Because collapsable stock so it fits in backpacks. ammo_type = /obj/item/ammo_casing/shotgun/stunshell max_shells = 6 @@ -149,7 +149,7 @@ icon = 'icons/obj/gun_vr.dmi' icon_state = "stg60" item_state = "arifle" - w_class = 4 + w_class = ITEMSIZE_LARGE max_shells = 30 caliber = "kurz" origin_tech = list(TECH_COMBAT = 4, TECH_MATERIAL = 2, TECH_ILLEGAL = 6) @@ -206,7 +206,7 @@ icon = 'icons/obj/gun_vr.dmi' icon_state = "pdw" item_state = "c20r" // Placeholder - w_class = 3 + w_class = ITEMSIZE_NORMAL caliber = "9mm" origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) slot_flags = SLOT_BELT @@ -238,7 +238,7 @@ icon_override = 'icons/vore/custom_guns_vr.dmi' item_state = "crestrose_fold_mob" - w_class = 4 + w_class = ITEMSIZE_LARGE origin_tech = list(TECH_COMBAT = 7, TECH_MATERIAL = 4) slot_flags = null fire_sound = 'sound/weapons/Gunshot_light.ogg' @@ -263,7 +263,7 @@ icon_state = "crestrose" icon_override = 'icons/vore/custom_guns_vr.dmi' item_state = "crestrose_mob" - w_class = 4 + w_class = ITEMSIZE_LARGE force = 15//Obscenely robust attack_verb = list("slashed", "cut", "drives") hitsound = 'sound/weapons/bladeslice.ogg' @@ -275,7 +275,7 @@ icon_state = "crestrose_fold" icon_override = 'icons/vore/custom_guns_vr.dmi' item_state = "crestrose_fold_mob" - w_class = 3 + w_class = ITEMSIZE_NORMAL force = 3//Not so obscenely robust attack_verb = list("hit", "melee'd") hitsound = null @@ -321,7 +321,6 @@ projectile_type = /obj/item/projectile/beam/stun/kin21 - max_shots = 8 charge_cost = 125 charge_meter = 1 @@ -468,4 +467,4 @@ /obj/item/ammo_magazine/mc9mml/practice name = "\improper SMG magazine (9mm practice)" - ammo_type = /obj/item/ammo_casing/c9mmp \ No newline at end of file + ammo_type = /obj/item/ammo_casing/c9mmp diff --git a/code/modules/vore/fluffstuff/custom_items_vr.dm b/code/modules/vore/fluffstuff/custom_items_vr.dm index 5d4acbd2d8..d78484dc39 100644 --- a/code/modules/vore/fluffstuff/custom_items_vr.dm +++ b/code/modules/vore/fluffstuff/custom_items_vr.dm @@ -273,7 +273,7 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie slot_flags = SLOT_BELT force = 10 throwforce = 3 - w_class = 3 + w_class = ITEMSIZE_NORMAL damtype = HALLOSS attack_verb = list("flogged", "whipped", "lashed", "disciplined", "chastised", "flayed") @@ -370,4 +370,122 @@ obj/item/weapon/material/hatchet/tacknife/combatknife/fluff/katarina/handle_shie icon_override = 'icons/vore/custom_clothes_vr.dmi' item_state = "serdyhelm_mob" -*/ \ No newline at end of file +*/ + +//arokha:Aronai Kadigan, but anyone is welcome to use it. +/obj/item/clothing/accessory/collar/khcrystal + name = "life crystal" + desc = "A small crystal with four little dots in it. It feels slightly warm to the touch. \ + Read manual before use! NOTE: Device contains antimatter." + w_class = ITEMSIZE_SMALL + + icon = 'icons/vore/custom_items_vr.dmi' + icon_override = 'icons/vore/custom_items_vr.dmi' + + icon_state = "khlife" + item_state = "khlife_overlay" + overlay_state = "khlife_overlay" + + slot_flags = SLOT_TIE + + var/mob/owner = null + var/client/owner_c = null //They'll be dead when we message them probably. + var/state = 0 //0 - New, 1 - Paired, 2 - Breaking, 3 - Broken (same as iconstates) + + New() + ..() + update_state(0) + + Destroy() //Waitwaitwait + if(state == 1) + process() //Nownownow + ..() //Okfine + + process() + check_owner() + if((state > 1) || !owner) + processing_objects.Remove(src) + + attack_self(mob/user as mob) + if(state > 0) //Can't re-pair, one time only, for security reasons. + user << "The [name] doesn't do anything." + return 0 + + owner = user //We're paired to this guy + owner_c = user.client //This is his client + update_state(1) + user << "The [name] glows pleasantly blue." + processing_objects.Add(src) + + proc/check_owner() + //He's dead, jim + if((state == 1) && owner && (owner.stat == DEAD)) + update_state(2) + audible_message("The [name] begins flashing red.") + sleep(30) + visible_message("The [name] shatters into dust!") + if(owner_c) + owner_c << "The HAVENS system is notified of your demise via \the [name]." + update_state(3) + name = "broken [initial(name)]" + desc = "This seems like a necklace, but the actual pendant is missing." + + proc/update_state(var/tostate) + state = tostate + icon_state = "[initial(icon_state)][tostate]" + update_icon() + +/obj/item/weapon/paper/khcrystal_manual + name = "KH-LC91-1 manual" + info = {"

    KH-LC91-1 Life Crystal

    +
    Usage
    +
      +
    1. Hold new crystal in hand.
    2. +
    3. Make fist with that hand.
    4. +
    5. Wait 1 second.
    6. +
    +
    +
    Purpose
    +

    The Kitsuhana Life Crystal is a small device typically worn around the neck for the purpose of reporting your status to the HAVENS (Kitsuhana's High-AVailability ENgram Storage) system, so that appropriate measures can be taken in the case of your body's demise. The whole device is housed inside a pleasing-to-the-eye elongated diamond.

    +

    Upon your body's desmise, the crystal will send a transmission to HAVENS. Depending on your membership level, the appropriate actions can be taken to ensure that you are back up and enjoying existence as soon as possible.

    + +

    Nanotrasen has negotiated a FREE Star membership for you in the HAVENS system, though an upgrade can be obtained depending on your citizenship and reputation level.

    + + As a reminder, the membership levels in HAVENS are: + +
    +
    Technical
    +

    The Life Crystal is a small 5cm long diamond containing four main components which are visible inside the translucent gem.

    + + From tip to top, they are: +
      +
    1. Qubit Bucket: This small cube contains 200 bits worth of quantum-entangled bits for transmitting to HAVENS. QE transmission technologies cannot be jammed or interfered with, and are effectively instant over any distance. +
    2. Antimatter Bottle: This tiny antimatter vessel is required to power the transmitter for the time it takes to transmit the signal to HAVENS. The inside of the crystal is thick enough to block any alpha or beta particles emitted when this antimatter contacts matter, however the crystal will be destroyed when activated. +
    3. Decay Reactor: This long-term microreactor will last for around one month and provide sufficient power to power all but the transmitter. This power is required for containing the antimatter bottle. +
    4. Sensor Suite: The sensor that tracks the owner's life-state, such that it can be transmitted back to HAVENS when necessary. +
    +

    The diamond itself is coated in a layer of graphene, to give it a pleasant rainbow finish. This also serves as a conductor that, if broken, will discharge the antimatter bottle immediately as it is unsafe to do so any point after the crystal is broken via physical means.

    +
    +
    Special Notes
    + \[AM WARNING\] +

    This device contains antimatter. Please consult all local regulations when travelling to ensure compliance with local laws.

    "} + +/obj/item/weapon/storage/box/khcrystal + name = "KH-LC91-1 carrying case" + icon = 'icons/vore/custom_items_vr.dmi' + icon_state = "khlifebox" + desc = "This case can only hold the KH-LC91-1 and a manual." + item_state_slots = list(slot_r_hand_str = "syringe_kit", slot_l_hand_str = "syringe_kit") + storage_slots = 2 + can_hold = list(/obj/item/weapon/paper/khcrystal_manual, /obj/item/clothing/accessory/collar/khcrystal) + max_storage_space = ITEMSIZE_COST_SMALL * 2 + w_class = ITEMSIZE_SMALL + +/obj/item/weapon/storage/box/khcrystal/New() + ..() + new /obj/item/weapon/paper/khcrystal_manual(src) + new /obj/item/clothing/accessory/collar/khcrystal(src) \ No newline at end of file diff --git a/code/modules/vore/fluffstuff/custom_permits_vr.dm b/code/modules/vore/fluffstuff/custom_permits_vr.dm index 19eddd95da..f5bf14f734 100644 --- a/code/modules/vore/fluffstuff/custom_permits_vr.dm +++ b/code/modules/vore/fluffstuff/custom_permits_vr.dm @@ -9,7 +9,7 @@ This license expires on DD/Month/YYYY and must be renewed by CentCom prior to this date."} icon = 'icons/obj/card.dmi' icon_state = "guest" - w_class = 1 + w_class = ITEMSIZE_TINY // END - DO NOT EDIT PROTOTYPE /* TEMPLATE diff --git a/code/modules/vore/resizing/holder_micro_vr.dm b/code/modules/vore/resizing/holder_micro_vr.dm index 5cdecd9039..d86a50e08d 100644 --- a/code/modules/vore/resizing/holder_micro_vr.dm +++ b/code/modules/vore/resizing/holder_micro_vr.dm @@ -5,7 +5,7 @@ desc = "Another crewmember, small enough to fit in your hand." icon_state = "micro" slot_flags = SLOT_FEET | SLOT_HEAD | SLOT_ID - w_class = 2 + w_class = ITEMSIZE_SMALL item_icons = null // Override value from parent. We don't have magic sprites. pixel_y = 0 // Override value from parent. diff --git a/code/modules/xenoarcheaology/sampling.dm b/code/modules/xenoarcheaology/sampling.dm index fa0d54a9a7..e79957ba28 100644 --- a/code/modules/xenoarcheaology/sampling.dm +++ b/code/modules/xenoarcheaology/sampling.dm @@ -3,7 +3,7 @@ desc = "It looks extremely delicate." icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "sliver1" - w_class = 1 + w_class = ITEMSIZE_TINY sharp = 1 var/datum/geosample/geological_data @@ -86,7 +86,7 @@ icon = 'icons/obj/device.dmi' icon_state = "sampler0" item_state = "screwdriver_brown" - w_class = 1 + w_class = ITEMSIZE_TINY var/sampled_turf = "" var/num_stored_bags = 10 @@ -144,7 +144,7 @@ var/image/I = image("icon"=R, "layer"=FLOAT_LAYER) filled_bag.overlays += I filled_bag.overlays += "evidence" - filled_bag.w_class = 1 + filled_bag.w_class = ITEMSIZE_TINY user << "You take a core sample of the [item_to_sample]." else diff --git a/code/modules/xenoarcheaology/tools/tools.dm b/code/modules/xenoarcheaology/tools/tools.dm index 42b8e692ec..d5cab2ef6e 100644 --- a/code/modules/xenoarcheaology/tools/tools.dm +++ b/code/modules/xenoarcheaology/tools/tools.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/device.dmi' icon_state = "locator" item_state = "locator" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/device/gps/attack_self(var/mob/user as mob) var/turf/T = get_turf(src) @@ -15,7 +15,7 @@ desc = "A coiled metallic tape used to check dimensions and lengths." icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "measuring" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/storage/bag/fossils name = "Fossil Satchel" @@ -23,10 +23,10 @@ icon = 'icons/obj/mining.dmi' icon_state = "satchel" slot_flags = SLOT_BELT | SLOT_POCKET - w_class = 3 + w_class = ITEMSIZE_NORMAL storage_slots = 50 - max_storage_space = 200 - max_w_class = 3 + max_storage_space = ITEMSIZE_COST_NORMAL * 50 + max_w_class = ITEMSIZE_NORMAL can_hold = list(/obj/item/weapon/fossil) /obj/item/weapon/storage/box/samplebags @@ -46,7 +46,7 @@ icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "flashgun" item_state = "lampgreen" - w_class = 2.0 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT var/last_scan_time = 0 @@ -102,7 +102,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "crap" item_state = "analyzer" - w_class = 2 + w_class = ITEMSIZE_SMALL slot_flags = SLOT_BELT var/list/positive_locations = list() var/datum/depth_scan/current diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm index a8bf853e82..b954d5eb05 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe.dm @@ -9,7 +9,7 @@ excavation_amount = 1 drill_sound = 'sound/weapons/thudswoosh.ogg' drill_verb = "brushing" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/one_pick name = "2cm pick" @@ -21,7 +21,7 @@ excavation_amount = 2 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/two_pick name = "4cm pick" @@ -33,7 +33,7 @@ excavation_amount = 4 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/three_pick name = "6cm pick" @@ -45,7 +45,7 @@ excavation_amount = 6 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/four_pick name = "8cm pick" @@ -57,7 +57,7 @@ excavation_amount = 8 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/five_pick name = "10cm pick" @@ -69,7 +69,7 @@ excavation_amount = 10 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/six_pick name = "12cm pick" @@ -81,7 +81,7 @@ excavation_amount = 12 drill_sound = 'sound/items/Screwdriver.ogg' drill_verb = "delicately picking" - w_class = 2 + w_class = ITEMSIZE_SMALL /obj/item/weapon/pickaxe/hand name = "hand pickaxe" @@ -93,7 +93,7 @@ excavation_amount = 30 drill_sound = 'sound/items/Crowbar.ogg' drill_verb = "clearing" - w_class = 2 + w_class = ITEMSIZE_SMALL //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Pack for holding pickaxes @@ -105,7 +105,7 @@ desc = "A set of picks for excavation." item_state = "syringe_kit" storage_slots = 7 - w_class = 2 + w_class = ITEMSIZE_SMALL can_hold = list(/obj/item/weapon/pickaxe/brush, /obj/item/weapon/pickaxe/one_pick, /obj/item/weapon/pickaxe/two_pick, @@ -114,8 +114,8 @@ /obj/item/weapon/pickaxe/five_pick, /obj/item/weapon/pickaxe/six_pick, /obj/item/weapon/pickaxe/hand) - max_storage_space = 18 - max_w_class = 2 + max_storage_space = ITEMSIZE_COST_SMALL * 9 + max_w_class = ITEMSIZE_SMALL use_to_pickup = 1 /obj/item/weapon/storage/excavation/New() diff --git a/code/modules/xenoarcheaology/tools/tools_pickaxe_vr.dm b/code/modules/xenoarcheaology/tools/tools_pickaxe_vr.dm index 50063b6bd6..33e9cba180 100644 --- a/code/modules/xenoarcheaology/tools/tools_pickaxe_vr.dm +++ b/code/modules/xenoarcheaology/tools/tools_pickaxe_vr.dm @@ -33,7 +33,7 @@ drill_sound = 'sound/weapons/thudswoosh.ogg' drill_verb = "drilling" force = 15.0 - w_class = 2 + w_class = ITEMSIZE_SMALL attack_verb = list("drilled") /obj/item/weapon/pickaxe/excavationdrill/attack_self(mob/user as mob) diff --git a/code/modules/xenobio2/machinery/gene_manipulators.dm b/code/modules/xenobio2/machinery/gene_manipulators.dm index 8cf7b45a1f..98c2fa8160 100644 --- a/code/modules/xenobio2/machinery/gene_manipulators.dm +++ b/code/modules/xenobio2/machinery/gene_manipulators.dm @@ -15,7 +15,7 @@ desc = "A small disk used for carrying data on genetics." icon = 'icons/obj/hydroponics_machines.dmi' icon_state = "disk" - w_class = 1.0 + w_class = ITEMSIZE_TINY var/list/genes = list() var/genesource = "unknown" diff --git a/code/modules/xenobio2/tools/slime_handling_tools.dm b/code/modules/xenobio2/tools/slime_handling_tools.dm index b8f37a106f..27136cd872 100644 --- a/code/modules/xenobio2/tools/slime_handling_tools.dm +++ b/code/modules/xenobio2/tools/slime_handling_tools.dm @@ -1,11 +1,11 @@ /* What this file contains: * A specialized stun prod, for handling fiesty slimes - + * A specialized stun gun, for handling many fiesty slimes - + * A stun projectile for handling xenomorphs. - + */ /obj/item/weapon/melee/baton/slime name = "slimebaton" @@ -27,32 +27,31 @@ else X.stasis += (stasisforce / 6) ..() - + /obj/item/weapon/melee/baton/slime/loaded/New() ..() - bcell = new/obj/item/weapon/cell/high(src) + bcell = new/obj/item/weapon/cell/device(src) update_icon() return - - + + // Xeno stun gun + projectile /obj/item/weapon/gun/energy/taser/xeno name = "xeno taser gun" desc = "Straight out of NT's testing laboratories, this small gun is used to subdue non-humanoid xeno life forms. While marketed towards handling slimes, it may be useful for other creatures." icon_state = "taserold" fire_sound = 'sound/weapons/taser2.ogg' - max_shots = 10 projectile_type = /obj/item/projectile/beam/stun/xeno - + /obj/item/projectile/beam/stun/xeno icon_state = "omni" agony = 4 var/stasisforce = 40 - + muzzle_type = /obj/effect/projectile/laser_omni/muzzle tracer_type = /obj/effect/projectile/laser_omni/tracer impact_type = /obj/effect/projectile/laser_omni/impact - + /obj/item/projectile/beam/stun/xeno/on_hit(var/atom/target, var/blocked = 0) if(istype(target, /mob/living/simple_animal/xeno)) var/mob/living/simple_animal/xeno/X = target diff --git a/html/changelog.html b/html/changelog.html index fda0a46275..ced964c28f 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -53,6 +53,90 @@ -->
    +

    08 October 2016

    +

    Anewbe updated:

    + +

    Redstryker updated:

    + +

    Spades Neil updated:

    + +

    Yoshax updated:

    + + +

    06 October 2016

    +

    Anewbe updated:

    + +

    Neerti updated:

    + +

    Spades Neil updated:

    + +

    Yoshax updated:

    + + +

    05 October 2016

    +

    Redstryker updated:

    + + +

    02 October 2016

    +

    Anewbe updated:

    + +

    HarpyEagle updated:

    + +

    Yoshax updated:

    + +

    Zuhayr updated:

    + +

    19 September 2016

    Anewbe updated: