diff --git a/_maps/map_files/templates/spacehotel/n_04.dmm b/_maps/map_files/templates/spacehotel/n_04.dmm index 74a6e875b4a..91a433502b9 100644 --- a/_maps/map_files/templates/spacehotel/n_04.dmm +++ b/_maps/map_files/templates/spacehotel/n_04.dmm @@ -14,7 +14,7 @@ "n" = (/obj/machinery/door/window/southright,/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/unsimulated/floor/carpet,/area/template_noop) "o" = (/obj/structure/table/woodentable,/obj/item/weapon/lipstick/black,/turf/unsimulated/floor/carpet,/area/template_noop) "p" = (/obj/structure/sink{icon_state = "sink"; dir = 8; pixel_x = -12; pixel_y = 2},/obj/structure/alien/weeds,/obj/structure/mirror{dir = 8; pixel_x = -28},/turf/unsimulated/floor{icon_state = "freezerfloor"},/area/template_noop) -"q" = (/obj/structure/toilet{dir = 1},/obj/structure/alien/weeds{icon_state = "weeds2"},/obj/item/organ/internal/body_egg/alien_embryo,/turf/unsimulated/floor{icon_state = "freezerfloor"},/area/template_noop) +"q" = (/obj/structure/toilet{dir = 1},/obj/structure/alien/weeds{icon_state = "weeds2"},/turf/unsimulated/floor{icon_state = "freezerfloor"},/area/template_noop) "r" = (/obj/machinery/door/window/eastleft,/obj/structure/alien/weeds,/turf/unsimulated/floor{icon_state = "freezerfloor"},/area/template_noop) "s" = (/obj/machinery/shower{dir = 8},/obj/structure/alien/weeds{icon_state = "weeds1"},/turf/unsimulated/floor{icon_state = "freezerfloor"},/area/template_noop) "t" = (/turf/unsimulated/wall/metal,/area/template_noop) diff --git a/code/__DEFINES/callbacks.dm b/code/__DEFINES/callbacks.dm new file mode 100644 index 00000000000..c0d8ac15ace --- /dev/null +++ b/code/__DEFINES/callbacks.dm @@ -0,0 +1,2 @@ +#define CALLBACK new /datum/callback +#define INVOKE_ASYNC ImmediateInvokeAsync \ No newline at end of file diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 0bd2b82b42a..499be494056 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -70,3 +70,6 @@ #define WEAPON_LIGHT 0 #define WEAPON_MEDIUM 1 #define WEAPON_HEAVY 2 + +// Embedded objects +#define EMBED_THROWSPEED_THRESHOLD 15 \ No newline at end of file diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 1cba02075a7..05133d226f1 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -77,11 +77,12 @@ #define SAFE 16 //flags for pass_flags -#define PASSTABLE 1 -#define PASSGLASS 2 -#define PASSGRILLE 4 -#define PASSBLOB 8 -#define PASSMOB 16 +#define PASSTABLE 1 +#define PASSGLASS 2 +#define PASSGRILLE 4 +#define PASSBLOB 8 +#define PASSMOB 16 +#define LETPASSTHROW 32 //turf-only flags #define NOJAUNT 1 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index b3263a93425..99079fd81bb 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -329,4 +329,7 @@ #define TENDRIL_CLEAR_SCORE "Tendrils Killed" // The number of station goals generated each round. -#define STATION_GOAL_BUDGET 1 \ No newline at end of file +#define STATION_GOAL_BUDGET 1 + +#define FIRST_DIAG_STEP 1 +#define SECOND_DIAG_STEP 2 \ No newline at end of file diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mob.dm index 97cea621dae..c2295b9c5dc 100644 --- a/code/__DEFINES/mob.dm +++ b/code/__DEFINES/mob.dm @@ -47,7 +47,7 @@ #define HUMAN_STRIP_DELAY 40 //takes 40ds = 4s to strip someone. #define ALIEN_SELECT_AFK_BUFFER 1 // How many minutes that a person can be AFK before not being allowed to be an alien. -#define SHOES_SLOWDOWN -1.0 // How much shoes slow you down by default. Negative values speed you up +#define SHOES_SLOWDOWN 0 // How much shoes slow you down by default. Negative values speed you up //Mob attribute defaults. diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index 5a84463c8f1..038174388ff 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -23,7 +23,7 @@ * If you are in the same turf, always true * If you are vertically/horizontally adjacent, ensure there are no border objects * If you are diagonally adjacent, ensure you can pass through at least one of the mutually adjacent square. - * Passing through in this case ignores anything with the throwpass flag, such as tables, racks, and morgue trays. + * Passing through in this case ignores anything with the LETPASSTHROW flag, such as tables, racks, and morgue trays. */ /turf/Adjacent(var/atom/neighbor, var/atom/target = null) var/turf/T0 = get_turf(neighbor) @@ -82,26 +82,18 @@ /* This checks if you there is uninterrupted airspace between that turf and this one. - This is defined as any dense ON_BORDER object, or any dense object without throwpass. + This is defined as any dense ON_BORDER object, or any dense object without LETPASSTHROW. The border_only flag allows you to not objects (for source and destination squares) */ /turf/proc/ClickCross(var/target_dir, var/border_only, var/target_atom = null) for(var/obj/O in src) - if( !O.density || O == target_atom || O.throwpass) continue // throwpass is used for anything you can click through + if( !O.density || O == target_atom || (O.pass_flags & LETPASSTHROW)) + continue // LETPASSTHROW is used for anything you can click through - if( O.flags&ON_BORDER) // windows have throwpass but are on border, check them first + if( O.flags&ON_BORDER) // windows are on border, check them first if( O.dir & target_dir || O.dir&(O.dir-1) ) // full tile windows are just diagonals mechanically return 0 else if( !border_only ) // dense, not on border, cannot pass over return 0 - return 1 -/* - Aside: throwpass does not do what I thought it did originally, and is only used for checking whether or not - a thrown object should stop after already successfully entering a square. Currently the throw code involved - only seems to affect hitting mobs, because the checks performed against objects are already performed when - entering or leaving the square. Since throwpass isn't used on mobs, but only on objects, it is effectively - useless. Throwpass may later need to be removed and replaced with a passcheck (bitfield on movable atom passflags). - - Since I don't want to complicate the click code rework by messing with unrelated systems it won't be changed here. -*/ \ No newline at end of file + return 1 \ No newline at end of file diff --git a/code/controllers/Processes/spacedrift.dm b/code/controllers/Processes/spacedrift.dm new file mode 100644 index 00000000000..d799aeb99d9 --- /dev/null +++ b/code/controllers/Processes/spacedrift.dm @@ -0,0 +1,53 @@ +var/global/datum/controller/process/spacedrift/drift_master + +/datum/controller/process/spacedrift + var/list/processing_list = list() + +/datum/controller/process/spacedrift/setup() + name = "spacedrift" + schedule_interval = 5 + start_delay = 20 + log_startup_progress("Spacedrift starting up.") + +/datum/controller/process/spacedrift/statProcess() + ..() + stat(null, "P:[processing_list.len]") + +/datum/controller/process/spacedrift/doWork() + var/list/currentrun = processing_list.Copy() + + while(currentrun.len) + var/atom/movable/AM = currentrun[currentrun.len] + currentrun.len-- + if(!AM) + processing_list -= AM + SCHECK + continue + + if(AM.inertia_next_move > world.time) + SCHECK + continue + + if(!AM.loc || AM.loc != AM.inertia_last_loc || AM.Process_Spacemove(0)) + AM.inertia_dir = 0 + + if(!AM.inertia_dir) + AM.inertia_last_loc = null + processing_list -= AM + SCHECK + continue + + var/old_dir = AM.dir + var/old_loc = AM.loc + AM.inertia_moving = TRUE + step(AM, AM.inertia_dir) + AM.inertia_moving = FALSE + AM.inertia_next_move = world.time + AM.inertia_move_delay + if(AM.loc == old_loc) + AM.inertia_dir = 0 + + AM.setDir(old_dir) + AM.inertia_last_loc = AM.loc + SCHECK + +DECLARE_GLOBAL_CONTROLLER(spacedrift, drift_master) \ No newline at end of file diff --git a/code/controllers/Processes/throwing.dm b/code/controllers/Processes/throwing.dm new file mode 100644 index 00000000000..a11c1252d35 --- /dev/null +++ b/code/controllers/Processes/throwing.dm @@ -0,0 +1,138 @@ +#define MAX_THROWING_DIST 512 // 2 z-levels on default width +#define MAX_TICKS_TO_MAKE_UP 3 //how many missed ticks will we attempt to make up for this run. + +var/global/datum/controller/process/throwing/throw_master + +/datum/controller/process/throwing + var/list/processing_list + +/datum/controller/process/throwing/setup() + name = "throwing" + schedule_interval = 1 + start_delay = 20 + log_startup_progress("Throw ticker starting up.") + +/datum/controller/process/throwing/statProcess() + ..() + stat(null, "P:[processing_list.len]") + +/datum/controller/process/throwing/started() + ..() + if(!processing_list) + processing_list = list() + +/datum/controller/process/throwing/doWork() + for(last_object in processing_list) + var/atom/movable/AM = last_object + if(istype(AM) && isnull(AM.gcDestroyed)) + var/datum/thrownthing/TT = processing_list[AM] + if(istype(TT) && isnull(TT.gcDestroyed)) + TT.tick() + SCHECK + else + catchBadType(TT) + processing_list -= AM + AM.throwing = null + else + catchBadType(AM) + processing_list -= AM + SCHECK + +DECLARE_GLOBAL_CONTROLLER(throwing, throw_master) + +/datum/thrownthing + var/atom/movable/thrownthing + var/atom/target + var/turf/target_turf + var/init_dir + var/maxrange + var/speed + var/mob/thrower + var/diagonals_first + var/dist_travelled = 0 + var/start_time + var/dist_x + var/dist_y + var/dx + var/dy + var/pure_diagonal + var/diagonal_error + var/datum/callback/callback + +/datum/thrownthing/proc/tick() + var/atom/movable/AM = thrownthing + if(!isturf(AM.loc) || !AM.throwing) + finalize() + return + + if(dist_travelled && hitcheck()) //to catch sneaky things moving on our tile while we slept + finalize() + return + + var/atom/step + + // calculate how many tiles to move, making up for any missed ticks. + if((dist_travelled >= maxrange || AM.loc == target_turf) && has_gravity(AM, AM.loc)) + finalize() + return + + if(dist_travelled <= max(dist_x, dist_y)) //if we haven't reached the target yet we home in on it, otherwise we use the initial direction + step = get_step(AM, get_dir(AM, target_turf)) + else + step = get_step(AM, init_dir) + + if(!pure_diagonal && !diagonals_first) // not a purely diagonal trajectory and we don't want all diagonal moves to be done first + if(diagonal_error >= 0 && max(dist_x, dist_y) - dist_travelled != 1) // we do a step forward unless we're right before the target + step = get_step(AM, dx) + diagonal_error += (diagonal_error < 0) ? dist_x / 2 : -dist_y + + if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge + finalize() + return + + AM.Move(step, get_dir(AM, step)) + + if(!AM.throwing) // we hit something during our move + finalize(hit = TRUE) + return + + dist_travelled++ + + if(dist_travelled > MAX_THROWING_DIST) + finalize() + return + +/datum/thrownthing/proc/finalize(hit = FALSE) + set waitfor = 0 + throw_master.processing_list -= thrownthing + // done throwning, either because it hit something or it finished moving + thrownthing.throwing = null + if(!hit) + for(var/thing in get_turf(thrownthing)) //looking for our target on the turf we land on. + var/atom/A = thing + if(A == target) + hit = 1 + thrownthing.throw_impact(A, src) + break + if(!hit) + thrownthing.throw_impact(get_turf(thrownthing), src) // we haven't hit something yet and we still must, let's hit the ground. + thrownthing.newtonian_move(init_dir) + else + thrownthing.newtonian_move(init_dir) + if(callback) + callback.Invoke() + +/datum/thrownthing/proc/hit_atom(atom/A) + thrownthing.throw_impact(A, src) + thrownthing.newtonian_move(init_dir) + finalize(TRUE) + +/datum/thrownthing/proc/hitcheck() + for(var/thing in get_turf(thrownthing)) + var/atom/movable/AM = thing + if(AM == thrownthing) + continue + if(AM.density && !(AM.pass_flags & LETPASSTHROW) && !(AM.flags & ON_BORDER)) + thrownthing.throwing = null + thrownthing.throw_impact(AM, src) + return TRUE \ No newline at end of file diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 6cccb48e492..2ab267ce5a8 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -39,7 +39,6 @@ var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. var/Ticklag = 0.5 - var/Tickcomp = 0 var/socket_talk = 0 // use socket_talk to communicate with other processes var/list/resource_urls = null var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round. @@ -445,9 +444,6 @@ if("socket_talk") socket_talk = text2num(value) - if("tickcomp") - Tickcomp = 1 - if("allow_antag_hud") config.antag_hud_allowed = 1 diff --git a/code/datums/callback.dm b/code/datums/callback.dm new file mode 100644 index 00000000000..02909c1a196 --- /dev/null +++ b/code/datums/callback.dm @@ -0,0 +1,98 @@ +/* + USAGE: + + var/datum/callback/C = new(object|null, /proc/type/path|"procstring", arg1, arg2, ... argn) + var/timerid = addtimer(C, time, timertype) + OR + var/timerid = addtimer(CALLBACK(object|null, /proc/type/path|procstring, arg1, arg2, ... argn), time, timertype) + + Note: proc strings can only be given for datum proc calls, global procs must be proc paths + Also proc strings are strongly advised against because they don't compile error if the proc stops existing + See the note on proc typepath shortcuts + + INVOKING THE CALLBACK: + var/result = C.Invoke(args, to, add) //additional args are added after the ones given when the callback was created + OR + var/result = C.InvokeAsync(args, to, add) //Sleeps will not block, returns . on the first sleep (then continues on in the "background" after the sleep/block ends), otherwise operates normally. + OR + INVOKE_ASYNC() to immediately create and call InvokeAsync + + PROC TYPEPATH SHORTCUTS (these operate on paths, not types, so to these shortcuts, datum is NOT a parent of atom, etc...) + + global proc while in another global proc: + .procname + Example: + CALLBACK(GLOBAL_PROC, .some_proc_here) + + proc defined on current(src) object (when in a /proc/ and not an override) OR overridden at src or any of it's parents: + .procname + Example: + CALLBACK(src, .some_proc_here) + + + when the above doesn't apply: + .proc/procname + Example: + CALLBACK(src, .proc/some_proc_here) + + proc defined on a parent of a some type: + /some/type/.proc/some_proc_here + + + + Other wise you will have to do the full typepath of the proc (/type/of/thing/proc/procname) + +*/ + +/datum/callback + var/datum/object = GLOBAL_PROC + var/delegate + var/list/arguments + +/datum/callback/New(thingtocall, proctocall, ...) + if(thingtocall) + object = thingtocall + delegate = proctocall + if(length(args) > 2) + arguments = args.Copy(3) + +/proc/ImmediateInvokeAsync(thingtocall, proctocall, ...) + set waitfor = FALSE + + if(!thingtocall) + return + + var/list/calling_arguments = length(args) > 2 ? args.Copy(3) : null + + if(thingtocall == GLOBAL_PROC) + call(proctocall)(arglist(calling_arguments)) + else + call(thingtocall, proctocall)(arglist(calling_arguments)) + +/datum/callback/proc/Invoke(...) + if(!object) + return + var/list/calling_arguments = arguments + if(length(args)) + if(length(arguments)) + calling_arguments = calling_arguments + args //not += so that it creates a new list so the arguments list stays clean + else + calling_arguments = args + if(object == GLOBAL_PROC) + return call(delegate)(arglist(calling_arguments)) + return call(object, delegate)(arglist(calling_arguments)) + +//copy and pasted because fuck proc overhead +/datum/callback/proc/InvokeAsync(...) + set waitfor = FALSE + if(!object) + return + var/list/calling_arguments = arguments + if(length(args)) + if(length(arguments)) + calling_arguments = calling_arguments + args //not += so that it creates a new list so the arguments list stays clean + else + calling_arguments = args + if(object == GLOBAL_PROC) + return call(delegate)(arglist(calling_arguments)) + return call(object, delegate)(arglist(calling_arguments)) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index b5d25c7f5a1..5d1dd5c74fb 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -9,7 +9,6 @@ var/blood_color var/last_bumped = 0 var/pass_flags = 0 - var/throwpass = 0 var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom. var/simulated = 1 //filter for actions - used by lighting overlays var/atom_say_verb = "says" @@ -236,10 +235,13 @@ /atom/proc/emag_act() return -/atom/proc/hitby(atom/movable/AM as mob|obj) - if(density) - AM.throwing = 0 - return +/atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked) + if(density && !has_gravity(AM)) //thrown stuff bounces off dense stuff in no grav, unless the thrown stuff ends up inside what it hit(embedding, bola, etc...). + addtimer(src, "hitby_react", 2, TRUE, AM) + +/atom/proc/hitby_react(atom/movable/AM) + if(AM && isturf(AM.loc)) + step(AM, turn(AM.dir, 180)) /atom/proc/add_hiddenprint(mob/living/M as mob) if(isnull(M)) return diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 7dd8d0c5be8..906706de62e 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -6,15 +6,21 @@ // var/elevation = 2 - not used anywhere var/move_speed = 10 var/l_move_time = 1 - var/throwing = 0 - var/thrower - var/turf/throw_source = null - var/throw_speed = 2 + var/datum/thrownthing/throwing = null + var/throw_speed = 2 //How many tiles to move per ds when being thrown. Float values are fully supported var/throw_range = 7 - var/no_spin_thrown = 0 //set this to 1 if you don't want an item that you throw to spin, no matter what. -Fox + var/no_spin = 0 + var/no_spin_thrown = 0 var/moved_recently = 0 var/mob/pulledby = null + var/inertia_dir = 0 + var/atom/inertia_last_loc + var/inertia_moving = 0 + var/inertia_next_move = 0 + var/inertia_move_delay = 5 + + var/moving_diagonally = 0 //0: not doing a diagonal move. 1 and 2: doing the first/second step of the diagonal move var/area/areaMaster @@ -71,61 +77,74 @@ if(!(direct & (direct - 1))) //Cardinal move . = ..() else //Diagonal move, split it into cardinal moves + moving_diagonally = FIRST_DIAG_STEP if(direct & 1) if(direct & 4) if(step(src, NORTH)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, EAST) else if(step(src, EAST)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, NORTH) else if(direct & 8) if(step(src, NORTH)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, WEST) else if(step(src, WEST)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, NORTH) else if(direct & 2) if(direct & 4) if(step(src, SOUTH)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, EAST) else if(step(src, EAST)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, SOUTH) else if(direct & 8) if(step(src, SOUTH)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, WEST) else if(step(src, WEST)) + moving_diagonally = SECOND_DIAG_STEP . = step(src, SOUTH) - + moving_diagonally = 0 + return if(!loc || (loc == oldloc && oldloc != newloc)) last_move = 0 return + if(.) + Moved(oldloc, direct) + last_move = direct src.move_speed = world.time - src.l_move_time src.l_move_time = world.time - spawn(5) // Causes space drifting. /tg/station has no concept of speed, we just use 5 - if(loc && direct && last_move == direct) - if(loc == newloc) //Remove this check and people can accelerate. Not opening that can of worms just yet. - newtonian_move(last_move) - if(. && buckled_mob && !handle_buckled_mob_movement(loc, direct)) //movement failed due to buckled mob . = 0 +// Called after a successful Move(). By this point, we've already moved +/atom/movable/proc/Moved(atom/OldLoc, Dir) + if(!inertia_moving) + inertia_next_move = world.time + inertia_move_delay + newtonian_move(Dir) + return 1 -// Previously known as Crossed() +// Previously known as HasEntered() // This is automatically called when something enters your square /atom/movable/Crossed(atom/movable/AM) return -/atom/movable/Bump(var/atom/A as mob|obj|turf|area, sendBump) - if(src.throwing) - src.throw_impact(A) - - if(A && sendBump) - A.last_bumped = world.time +/atom/movable/Bump(atom/A, yes) //the "yes" arg is to differentiate our Bump proc from byond's, without it every Bump() call would become a double Bump(). + if(A && yes) + if(throwing) + throwing.hit_atom(A) + . = 1 + if(!A || qdeleted(A)) + return A.Bumped(src) - else - ..() /atom/movable/proc/forceMove(atom/destination) var/turf/old_loc = loc @@ -166,29 +185,6 @@ update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall. -//called when src is thrown into hit_atom -/atom/movable/proc/throw_impact(atom/hit_atom, var/speed) - if(istype(hit_atom,/mob/living)) - var/mob/living/M = hit_atom - M.hitby(src,speed) - - else if(isobj(hit_atom)) - var/obj/O = hit_atom - if(!O.anchored) - step(O, src.dir) - O.hitby(src,speed) - - else if(isturf(hit_atom)) - src.throwing = 0 - var/turf/T = hit_atom - if(T.density) - spawn(2) - step(src, turn(src.dir, 180)) - if(istype(src,/mob/living)) - var/mob/living/M = src - M.turf_collision(T, speed) - - //Called whenever an object moves and by mobs when they attempt to move themselves through space //And when an object or action applies a force on src, see newtonian_move() below //Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting @@ -201,13 +197,15 @@ if(pulledby && !pulledby.pulling) return 1 + if(throwing) + return 1 + if(locate(/obj/structure/lattice) in range(1, get_turf(src))) //Not realistic but makes pushing things in space easier return 1 return 0 /atom/movable/proc/newtonian_move(direction) //Only moves the object if it's under no gravity - if(!loc || Process_Spacemove(0)) inertia_dir = 0 return 0 @@ -216,119 +214,93 @@ if(!direction) return 1 - var/old_dir = dir - . = step(src, direction) - dir = old_dir + inertia_last_loc = loc + drift_master.processing_list[src] = src + return 1 -//decided whether a movable atom being thrown can pass through the turf it is in. -/atom/movable/proc/hit_check(var/speed) - if(src.throwing) - for(var/atom/A in get_turf(src)) - if(A == src) continue - if(istype(A,/mob/living)) - if(A:lying) continue - src.throw_impact(A,speed) - if(isobj(A)) - if(A.density && !A.throwpass) // **TODO: Better behaviour for windows which are dense, but shouldn't always stop movement - src.throw_impact(A,speed) -/atom/movable/proc/throw_at_fast(atom/target, range, speed, thrower, no_spin) +//called when src is thrown into hit_atom +/atom/movable/proc/throw_impact(atom/hit_atom, throwingdatum) set waitfor = 0 - throw_at(target, range, speed, thrower, no_spin) + return hit_atom.hitby(src) -/atom/movable/proc/throw_at(atom/target, range, speed, thrower, no_spin) - if(!target || !src || (flags & NODROP)) +/atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked) + if(!anchored && hitpush) + step(src, AM.dir) + ..() + +/atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin = TRUE, diagonals_first = FALSE, var/datum/callback/callback) + if(!target || (flags & NODROP) || speed <= 0) return 0 - //use a modified version of Bresenham's algorithm to get from the atom's current position to that of the target - src.throwing = 1 - src.thrower = thrower - src.throw_source = get_turf(src) //store the origin turf - if(target.allow_spin) // turns out 1000+ spinning objects being thrown at the singularity creates lag - Iamgoofball - if(!no_spin_thrown && !no_spin) - SpinAnimation(5, 1) + if(pulledby) + pulledby.stop_pulling() + + // They are moving! Wouldn't it be cool if we calculated their momentum and added it to the throw? + if(thrower && thrower.last_move && thrower.client && thrower.client.move_delay >= world.time + world.tick_lag * 2) + var/user_momentum = thrower.movement_delay() + if(!user_momentum) // no movement_delay, this means they move once per byond tick, let's calculate from that instead + user_momentum = world.tick_lag + + user_momentum = 1 / user_momentum // convert from ds to the tiles per ds that throw_at uses + + if(get_dir(thrower, target) & last_move) + user_momentum = user_momentum // basically a noop, but needed + else if(get_dir(target, thrower) & last_move) + user_momentum = -user_momentum // we are moving away from the target, lets slowdown the throw accordingly + else + user_momentum = 0 + + if(user_momentum) + // first lets add that momentum to range + range *= (user_momentum / speed) + 1 + //then lets add it to speed + speed += user_momentum + if(speed <= 0) + return //no throw speed, the user was moving too fast. + + var/datum/thrownthing/TT = new() + TT.thrownthing = src + TT.target = target + TT.target_turf = get_turf(target) + TT.init_dir = get_dir(src, target) + TT.maxrange = range + TT.speed = speed + TT.thrower = thrower + TT.diagonals_first = diagonals_first + TT.callback = callback + var/dist_x = abs(target.x - src.x) var/dist_y = abs(target.y - src.y) + var/dx = (target.x > src.x) ? EAST : WEST + var/dy = (target.y > src.y) ? NORTH : SOUTH - var/dx - if(target.x > src.x) - dx = EAST - else - dx = WEST + if(dist_x == dist_y) + TT.pure_diagonal = 1 - var/dy - if(target.y > src.y) - dy = NORTH - else - dy = SOUTH - var/dist_travelled = 0 - var/dist_since_sleep = 0 - var/area/a = get_area(src.loc) - if(dist_x > dist_y) - var/error = dist_x/2 - dist_y - while(src && target &&((((src.x < target.x && dx == EAST) || (src.x > target.x && dx == WEST)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) - // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up - if(error < 0) - var/atom/step = get_step(src, dy) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step, get_dir(loc, step)) - hit_check(speed) - error += dist_x - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - else - var/atom/step = get_step(src, dx) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check(speed) - error -= dist_y - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - a = get_area(src.loc) - else - var/error = dist_y/2 - dist_x - while(src && target &&((((src.y < target.y && dy == NORTH) || (src.y > target.y && dy == SOUTH)) && dist_travelled < range) || (a && a.has_gravity == 0) || istype(src.loc, /turf/space)) && src.throwing && istype(src.loc, /turf)) - // only stop when we've gone the whole distance (or max throw range) and are on a non-space tile, or hit something, or hit the end of the map, or someone picks it up - if(error < 0) - var/atom/step = get_step(src, dx) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check(speed) - error += dist_y - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - else - var/atom/step = get_step(src, dy) - if(!step) // going off the edge of the map makes get_step return null, don't let things go off the edge - break - src.Move(step) - hit_check(speed) - error -= dist_x - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) + else if(dist_x <= dist_y) + var/olddist_x = dist_x + var/olddx = dx + dist_x = dist_y + dist_y = olddist_x + dx = dy + dy = olddx + TT.dist_x = dist_x + TT.dist_y = dist_y + TT.dx = dx + TT.dy = dy + TT.diagonal_error = dist_x / 2 - dist_y + TT.start_time = world.time - a = get_area(src.loc) + if(pulledby) + pulledby.stop_pulling() - //done throwing, either because it hit something or it finished moving - if(isobj(src)) src.throw_impact(get_turf(src),speed) - src.throwing = 0 - src.thrower = null - src.throw_source = null + throwing = TT + if(spin && !no_spin && !no_spin_thrown) + SpinAnimation(5, 1) + + throw_master.processing_list[src] = TT + TT.tick() //Overlays diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index e0187e940e4..d85b3c91258 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -1,7 +1,7 @@ /obj/item/weapon/antag_spawner throw_speed = 1 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/used = 0 /obj/item/weapon/antag_spawner/proc/spawn_antag(var/client/C, var/turf/T, var/type = "") diff --git a/code/game/gamemodes/changeling/powers/mutations.dm b/code/game/gamemodes/changeling/powers/mutations.dm index 9a6438853c0..c7d393b77a7 100644 --- a/code/game/gamemodes/changeling/powers/mutations.dm +++ b/code/game/gamemodes/changeling/powers/mutations.dm @@ -125,7 +125,7 @@ icon_state = "arm_blade" item_state = "arm_blade" flags = ABSTRACT | NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE sharp = 1 edge = 1 force = 25 diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 6ab24e1d8b4..97511414e7a 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -3,7 +3,7 @@ desc = "An arcane weapon wielded by the followers of a cult." icon_state = "cultblade" item_state = "cultblade" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 30 throwforce = 10 sharp = 1 @@ -38,7 +38,7 @@ desc = "A strange dagger said to be used by sinister groups for \"preparing\" a corpse before sacrificing it to their dark gods." icon = 'icons/obj/wizard.dmi' icon_state = "render" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 15 throwforce = 25 var/cooldown = 0 @@ -123,7 +123,7 @@ icon_state = "cult_armour" item_state = "cult_armour" desc = "A bulky suit of armour, bristling with spikes. It looks space proof." - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade,/obj/item/weapon/tank) slowdown = 1 armor = list(melee = 60, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) @@ -133,7 +133,7 @@ desc = "Empowered garb which creates a powerful shield around the user." icon_state = "cult_armour" item_state = "cult_armour" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY armor = list(melee = 50, bullet = 40, laser = 50, energy = 30, bomb = 50, bio = 30, rad = 30) body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS allowed = list(/obj/item/weapon/tome,/obj/item/weapon/melee/cultblade) diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 1f35890373c..60b9fcb2c85 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -261,7 +261,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( /obj/item/weapon/storage/box/cult name = "Dark Forge Cache" can_hold = list("/obj/item/clothing/suit/space/cult", "/obj/item/clothing/head/helmet/space/cult") - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/storage/box/cult/New() ..() diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 3a48f472603..1553ec0aa94 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -24,7 +24,7 @@ icon_state ="tome" throw_speed = 2 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/scribereduct = 0 var/canbypass = 0 //ADMINBUS diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 2a72c4a9b9b..1408e0a87fc 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -588,6 +588,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} icon = 'icons/obj/abductor.dmi' icon_state = "bed" no_icon_updates = 1 //no icon updates for this; it's static. + injected_reagents = list("corazone") /obj/structure/closet/abductor name = "alien locker" @@ -595,4 +596,4 @@ Congratulations! You are now trained for invasive xenobiology research!"} icon_state = "abductor" icon_closed = "abductor" icon_opened = "abductoropen" - material_drop = /obj/item/stack/sheet/mineral/abductor \ No newline at end of file + material_drop = /obj/item/stack/sheet/mineral/abductor diff --git a/code/game/gamemodes/miniantags/revenant/revenant.dm b/code/game/gamemodes/miniantags/revenant/revenant.dm index 4a2a629c1d2..ca9e7b7ac28 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant.dm @@ -317,7 +317,7 @@ desc = "A pile of fine blue dust. Small tendrils of violet mist swirl around it." icon = 'icons/effects/effects.dmi' icon_state = "revenantEctoplasm" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/reforming = 1 var/essence = 75 //the maximum essence of the reforming revenant var/inert = 0 diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index f118bf548f0..4ed35c5b707 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -4,7 +4,7 @@ icon_state = "pinoff" flags = CONDUCT slot_flags = SLOT_PDA | SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "electronic" throw_speed = 4 throw_range = 20 diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index d47610140ae..1dd20906704 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -7,7 +7,7 @@ icon_state ="scroll2" throw_speed = 1 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/used = 0 @@ -119,7 +119,7 @@ item_state = "render" force = 15 throwforce = 10 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL hitsound = 'sound/weapons/bladeslice.ogg' var/charged = 1 var/spawn_type = /obj/singularity/narsie/wizard @@ -232,7 +232,7 @@ var/global/list/multiverse = list() throwforce = 10 sharp = 1 edge = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/faction = list("unassigned") var/cooldown = 0 @@ -616,7 +616,7 @@ var/global/list/multiverse = list() icon_state = "necrostone" item_state = "electronic" origin_tech = "bluespace=4;materials=4" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/list/spooky_scaries = list() var/unlimited = 0 var/heresy = 0 @@ -753,7 +753,7 @@ var/global/list/multiverse = list() icon_state = "nyacrostone" item_state = "electronic" origin_tech = "bluespace=4;materials=4" - w_class = 1 + w_class = WEIGHT_CLASS_TINY heresy = 1 unlimited = 1 @@ -793,7 +793,7 @@ var/global/list/multiverse = list() return if(!link) - if(I.loc == user && istype(I) && I.w_class <= 2) + if(I.loc == user && istype(I) && I.w_class <= WEIGHT_CLASS_SMALL) user.drop_item() I.loc = src link = I diff --git a/code/game/gamemodes/wizard/godhand.dm b/code/game/gamemodes/wizard/godhand.dm index 55afe36f1d2..95d804179cd 100644 --- a/code/game/gamemodes/wizard/godhand.dm +++ b/code/game/gamemodes/wizard/godhand.dm @@ -8,7 +8,7 @@ icon_state = "syndballoon" item_state = null flags = ABSTRACT | NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE force = 0 throwforce = 0 throw_range = 0 diff --git a/code/game/gamemodes/wizard/soulstone.dm b/code/game/gamemodes/wizard/soulstone.dm index 7fcd9c198b4..cc3c1a131e9 100644 --- a/code/game/gamemodes/wizard/soulstone.dm +++ b/code/game/gamemodes/wizard/soulstone.dm @@ -4,7 +4,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 artifact's power." - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT origin_tech = "bluespace=4;materials=4" var/imprinted = "empty" @@ -347,4 +347,4 @@ T.unEquip(W) init_shade(T, U) qdel(T) - return 1 \ No newline at end of file + return 1 diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 65843d0e0fc..4f3e7fe9001 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -497,7 +497,7 @@ icon_state ="book" throw_speed = 2 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/uses = 10 var/temp = null var/op = 1 @@ -863,4 +863,4 @@ spell = /obj/effect/proc_holder/spell/targeted/sacred_flame spellname = "sacred flame" icon_state ="booksacredflame" - desc = "Become one with the flames that burn within... and invite others to do so as well." \ No newline at end of file + desc = "Become one with the flames that burn within... and invite others to do so as well." diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 6a5253b599c..4b332b94543 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -14,6 +14,7 @@ var/obj/machinery/computer/operating/computer = null buckle_lying = 90 var/no_icon_updates = 0 //set this to 1 if you don't want the icons ever changing + var/list/injected_reagents = list() /obj/machinery/optable/New() ..() @@ -97,8 +98,18 @@ icon_state = "table2-idle" return 0 +/obj/machinery/optable/Crossed(atom/movable/AM) + . = ..() + if(iscarbon(AM) && LAZYLEN(injected_reagents)) + to_chat(AM, "You feel a series of tiny pricks!") + /obj/machinery/optable/process() check_victim() + if(LAZYLEN(injected_reagents)) + for(var/mob/living/carbon/C in get_turf(src)) + for(var/chemical in injected_reagents) + if(C.reagents.get_reagent_amount(chemical) < 1) + C.reagents.add_reagent(chemical, 1) /obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user as mob) if(C == user) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index b5612389def..02a815c096f 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -1070,7 +1070,7 @@ Just an object used in constructing air alarms icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" desc = "Looks like a circuit. Probably is." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50, MAT_GLASS=50) toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 7c888aa2a3d..a8d16939944 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -3,7 +3,7 @@ desc = "A pre-fabricated security camera kit, ready to be assembled and mounted to a surface." icon = 'icons/obj/monitors.dmi' icon_state = "cameracase" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL anchored = 0 materials = list(MAT_METAL=400, MAT_GLASS=250) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index b3957234d01..e5c9d1a0804 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -5,6 +5,9 @@ #define CLONE_BIOMASS 150 #define BIOMASS_MEAT_AMOUNT 50 +#define MINIMUM_HEAL_LEVEL 40 +#define CLONE_INITIAL_DAMAGE 190 +#define BRAIN_INITIAL_DAMAGE 90 // our minds are too feeble for 190 /obj/machinery/clonepod anchored = 1 @@ -15,12 +18,10 @@ icon_state = "pod_0" req_access = list(access_genetics) //For premature unlocking. var/mob/living/carbon/human/occupant - var/heal_level = 90 //The clone is released once its health reaches this level. - var/locked = 0 + var/heal_level //The clone is released once its health reaches this level. var/obj/machinery/computer/cloning/connected = null //So we remember the connected clone machine. var/mess = 0 //Need to clean out it if it's full of exploded clone. var/attempting = 0 //One clone attempt at a time thanks - var/eject_wait = 0 //Don't eject them as soon as they are created fuckkk var/biomass = 0 var/speed_coeff var/efficiency @@ -33,6 +34,10 @@ var/obj/effect/countdown/clonepod/countdown + var/list/brine_types = list("corazone", "salbutamol", "hydrocodone") + var/list/missing_organs + var/organs_number = 0 + light_color = LIGHT_COLOR_PURE_GREEN /obj/machinery/clonepod/power_change() @@ -84,6 +89,7 @@ connected.pods -= src QDEL_NULL(Radio) QDEL_NULL(countdown) + QDEL_LIST(missing_organs) return ..() /obj/machinery/clonepod/RefreshParts() @@ -93,7 +99,7 @@ efficiency += S.rating for(var/obj/item/weapon/stock_parts/manipulator/P in component_parts) speed_coeff += P.rating - heal_level = min((efficiency * 15) + 10, 100) + heal_level = max(min((efficiency * 15) + 10, 100), MINIMUM_HEAL_LEVEL) //The return of data disks?? Just for transferring between genetics machine/cloning machine. //TO-DO: Make the genetics machine accept them. @@ -217,19 +223,21 @@ if(!G) return 0 +/* + if(clonemind.damnation_type) //Can't clone the damned. + playsound('sound/hallucinations/veryfar_noise.ogg', 50, 0) + malfunction() + return -1 // so that the record gets flushed out + */ + if(biomass >= CLONE_BIOMASS) biomass -= CLONE_BIOMASS else return 0 attempting = 1 //One at a time!! - locked = 1 countdown.start() - eject_wait = 1 - spawn(30) - eject_wait = 0 - if(!R.dna) R.dna = new /datum/dna() @@ -246,9 +254,24 @@ for(var/datum/language/L in R.languages) H.add_language(L.name) + domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them + + if(efficiency > 2 && efficiency < 5 && prob(25)) + randmutb(H) + if(efficiency > 5 && prob(20)) + randmutg(H) + if(efficiency < 3 && prob(50)) + randmutb(H) + + H.dna.UpdateSE() + H.dna.UpdateUI() + + H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it + H.UpdateAppearance() + + check_brine() //Get the clone body ready - H.adjustCloneLoss(190) //new damage var so you can't eject a clone early then stab them to abuse the current damage system --NeoFite - H.adjustBrainLoss(90) // The rand(10, 30) will come out as extra brain damage + maim_clone(H) H.Paralyse(4) //Here let's calculate their health so the pod doesn't immediately eject them!!! @@ -266,21 +289,6 @@ beginning to regenerate in a cloning pod. You will become conscious when it is complete."}) - domutcheck(H, null, MUTCHK_FORCED) //Ensures species that get powers by the species proc handle_dna keep them - - if(efficiency > 2 && efficiency < 5 && prob(25)) - randmutb(H) - if(efficiency > 5 && prob(20)) - randmutg(H) - if(efficiency < 3 && prob(50)) - randmutb(H) - - H.dna.UpdateSE() - H.dna.UpdateUI() - - H.sync_organ_dna(1) // It's literally a fresh body as you can get, so all organs properly belong to it - H.UpdateAppearance() - update_icon() H.suiciding = 0 @@ -299,13 +307,11 @@ if(stat & NOPOWER) //Autoeject if power is lost if(occupant) - locked = 0 go_out() connected_message("Clone Ejected: Loss of power.") else if((occupant) && (occupant.loc == src)) if((occupant.stat == DEAD) || (occupant.suiciding)) //Autoeject corpses and suiciding dudes. - locked = 0 announce_radio_message("The cloning of [occupant] has been aborted due to unrecoverable tissue failure.") go_out() connected_message("Clone Rejected: Deceased.") @@ -316,34 +322,43 @@ //Slowly get that clone healed and finished. occupant.adjustCloneLoss(-((speed_coeff/2))) + // For human species that lack non-vital parts for some weird reason + if(organs_number) + var/progress = CLONE_INITIAL_DAMAGE - occupant.getCloneLoss() + progress += (100 - MINIMUM_HEAL_LEVEL) + var/milestone = CLONE_INITIAL_DAMAGE / organs_number +// Doing this as a #define so that the value can change when evaluated multiple times +#define INSTALLED (organs_number - LAZYLEN(missing_organs)) + + while((progress / milestone) > INSTALLED && LAZYLEN(missing_organs)) + var/obj/item/organ/I = pick_n_take(missing_organs) + I.replaced(occupant) + +#undef INSTALLED + //Premature clones may have brain damage. occupant.adjustBrainLoss(-((speed_coeff/20)*efficiency)) - //So clones don't die of oxyloss in a running pod. - if(occupant.reagents.get_reagent_amount("salbutamol") < 5) - occupant.reagents.add_reagent("salbutamol", 5) + check_brine() //Also heal some oxyloss ourselves just in case!! occupant.adjustOxyLoss(-4) use_power(7500) //This might need tweaking. - else if((occupant.cloneloss <= (100 - heal_level)) && (!eject_wait)) + else if((occupant.cloneloss <= (100 - heal_level))) connected_message("Cloning Process Complete.") announce_radio_message("The cloning cycle of [occupant] is complete.") - locked = 0 go_out() else if((!occupant) || (occupant.loc != src)) occupant = null - if(locked) - locked = 0 update_icon() use_power(200) //Let's unlock this early I guess. Might be too early, needs tweaking. /obj/machinery/clonepod/attackby(obj/item/weapon/W, mob/user, params) - if(!(occupant || mess || locked)) + if(!(occupant || mess)) if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", W)) return @@ -357,14 +372,14 @@ if(!check_access(W)) to_chat(user, "Access Denied.") return - if (!locked || !occupant) - return - if(occupant.health < -20 && occupant.stat != DEAD) - to_chat(user, "Access Refused. Patient status still unstable.") + if(!(occupant || mess)) + to_chat(user, "Error: Pod has no occupant.") return else - locked = 0 - to_chat(user, "System unlocked.") + connected_message("Authorized Ejection") + announce_radio_message("An authorized ejection of [occupant.real_name] has occured") + to_chat(user, "You force an emergency ejection.") + go_out() //Removing cloning pod biomass else if(istype(W, /obj/item/weapon/reagent_containers/food/snacks/meat)) @@ -374,7 +389,7 @@ qdel(W) return else if(istype(W, /obj/item/weapon/wrench)) - if(locked && (anchored || occupant)) + if(occupant) to_chat(user, "Can not do that while [src] is in use.") else if(anchored) @@ -399,8 +414,6 @@ /obj/machinery/clonepod/emag_act(user) if(isnull(occupant)) return - to_chat(user, "You force an emergency ejection.") - locked = 0 go_out() /obj/machinery/clonepod/proc/update_clone_antag(var/mob/living/carbon/human/H) @@ -435,21 +448,7 @@ connected.updateUsrDialog() return 1 -/obj/machinery/clonepod/verb/eject() - set name = "Eject Cloner" - set category = "Object" - set src in oview(1) - - if(!usr) - return - if(usr.incapacitated()) - return - go_out() - add_fingerprint(usr) - /obj/machinery/clonepod/proc/go_out() - if(locked) - return countdown.stop() if(mess) //Clean that mess and dump those gibs! @@ -470,8 +469,11 @@ You feel like a new being.") occupant.flash_eyes(visual = 1) + for(var/i in missing_organs) + qdel(i) + missing_organs.Cut() occupant.forceMove(get_turf(src)) - eject_wait = 0 //If it's still set somehow. + occupant.update_body() domutcheck(occupant) //Waiting until they're out before possible notransform. occupant.shock_stage = 0 //Reset Shock occupant = null @@ -481,19 +483,24 @@ if(occupant) connected_message("Critical Error!") announce_radio_message("Critical error! Please contact a Thinktronic Systems technician, as your warranty may be affected.") - mess = 1 - update_icon() if(occupant.mind != clonemind) clonemind.transfer_to(occupant) occupant.grab_ghost() // We really just want to make you suffer. to_chat(occupant, {"Agony blazes across your consciousness as your body is torn apart.
Is this what dying is like? Yes it is.
"}) - playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0) occupant << sound('sound/hallucinations/veryfar_noise.ogg',0,1,50) + for(var/i in missing_organs) + qdel(i) + missing_organs.Cut() spawn(40) qdel(occupant) + + playsound(loc, 'sound/machines/warning-buzzer.ogg', 50, 0) + mess = TRUE + update_icon() + /obj/machinery/clonepod/update_icon() ..() icon_state = "pod_0" @@ -535,6 +542,43 @@ else return +/obj/machinery/clonepod/proc/maim_clone(mob/living/carbon/human/H) + LAZYINITLIST(missing_organs) + for(var/i in missing_organs) + qdel(i) + missing_organs.Cut() + + H.setCloneLoss(CLONE_INITIAL_DAMAGE) + H.setBrainLoss(BRAIN_INITIAL_DAMAGE) + + for(var/o in H.internal_organs) + var/obj/item/organ/O = o + if(!istype(O) || O.vital) + continue + + // Let's non-specially remove all non-vital organs + // What could possibly go wrong + var/obj/item/I = O.remove(H) + // Make this support stuff that turns into items when removed + I.forceMove(src) + missing_organs += I + + var/static/list/zones = list("r_arm", "l_arm", "r_leg", "l_leg") + for(var/zone in zones) + var/obj/item/organ/external/E = H.get_organ(zone) + var/obj/item/I = E.remove(H) + I.forceMove(src) + missing_organs += I + + organs_number = LAZYLEN(missing_organs) + +/obj/machinery/clonepod/proc/check_brine() + // Clones are in a pickled bath of mild chemicals, keeping + // them alive, despite their lack of internal organs + for(var/bt in brine_types) + if(occupant.reagents.get_reagent_amount(bt) < 1) + occupant.reagents.add_reagent(bt, 1) + /* * Diskette Box */ @@ -586,3 +630,5 @@ if(istype(A, /obj/machinery/clonepod)) A:malfunction() */ + +#undef MINIMUM_HEAL_LEVEL diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 0aaba4caf13..ba7aadc3054 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -423,7 +423,7 @@ hitsound = 'sound/weapons/bladeslice.ogg' force = 40 throwforce = 10 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 @@ -442,7 +442,7 @@ throw_speed = 1 throw_range = 5 throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL armour_penetration = 50 block_chance = 50 var/active = 0 @@ -466,13 +466,13 @@ if(active) force = 30 icon_state = "sword[item_color]" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY playsound(user, 'sound/weapons/saberon.ogg', 50, 1) to_chat(user, "[src] is now active.") else force = 3 icon_state = "sword0" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) to_chat(user, "[src] can now be concealed.") if(istype(user,/mob/living/carbon/human)) @@ -489,7 +489,7 @@ name = "basketball" item_state = "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 = WEIGHT_CLASS_BULKY //Stops people from hiding it in their bags/pockets /obj/structure/holohoop name = "basketball hoop" @@ -498,7 +498,7 @@ icon_state = "hoop" anchored = 1 density = 1 - throwpass = 1 + pass_flags = LETPASSTHROW /obj/structure/holohoop/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 603c0483129..b0dde9e20cd 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -991,7 +991,7 @@ desc = "A model spaceship, it looks like those used back in the day when travelling to Orion! It even has a miniature FX-293 reactor, which was renowned for its instability and tendency to explode..." icon = 'icons/obj/toy.dmi' icon_state = "ship" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/active = 0 //if the ship is on /obj/item/weapon/orion_ship/examine(mob/user) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 1dc88f9663d..22355ed4fbc 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -13,7 +13,7 @@ /obj/item/weapon/circuitboard density = 0 anchored = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL name = "circuit board" icon = 'icons/obj/module.dmi' icon_state = "id_mod" diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index ee307dd84d5..5f72dab528c 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -310,6 +310,7 @@ temp = "Error: No cloning pod detected." else var/obj/machinery/clonepod/pod = selected_pod + var/cloneresult if(!selected_pod) temp = "Error: No cloning pod selected." else if(pod.occupant) @@ -320,13 +321,16 @@ temp = "Error: The cloning pod is malfunctioning." else if(!config.revival_cloning) temp = "Error: Unable to initiate cloning cycle." - else if(pod.growclone(C)) - temp = "Initiating cloning cycle..." - records.Remove(C) - qdel(C) - menu = 1 else - temp = "[C.name] => Initialisation failure." + cloneresult = pod.growclone(C) + if(cloneresult) + if(cloneresult > 0) + temp = "Initiating cloning cycle..." + records.Remove(C) + qdel(C) + menu = 1 + else + temp = "[C.name] => Initialisation failure." else temp = "Error: Data corruption." diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index b39e3798ae1..186d4c9705a 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 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50, MAT_GLASS=50) req_access = list(access_engine) @@ -64,10 +64,10 @@ /obj/item/weapon/airlock_electronics/Topic(href, href_list) ..() - + if(usr.incapacitated() || (!ishuman(usr) && !isrobot(usr))) return 1 - + if(href_list["close"]) usr << browse(null, "window=airlock") return @@ -106,4 +106,3 @@ conf_access -= req if(!conf_access.len) conf_access = null - diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index dbbe53055a4..477bc4b1e98 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -259,7 +259,7 @@ icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" desc = "A circuit board used in construction of firelocks." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50, MAT_GLASS=50) toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index 2cd5f0a7a34..baaf936e189 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -167,18 +167,16 @@ ..() //When an object is thrown at the window -/obj/machinery/door/window/hitby(AM as mob|obj) - +/obj/machinery/door/window/hitby(atom/movable/AM) ..() var/tforce = 0 if(ismob(AM)) tforce = 40 - else - tforce = AM:throwforce + else if(isobj(AM)) + var/obj/O = AM + tforce = O.throwforce playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) take_damage(tforce) - //..() //Does this really need to be here twice? The parent proc doesn't even do anything yet. - Nodrak - return /obj/machinery/door/window/mech_melee_attack(obj/mecha/M) if(M.damtype == "brute") diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 73e590361a7..a4d70d78023 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -74,7 +74,7 @@ throw_speed = 4 throw_range = 7 force = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/dye_color = "#FFFFFF" /obj/item/hair_dye_bottle/New() diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index da85a864214..710dde7ebda 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -267,7 +267,7 @@ Just a object used in constructing fire alarms icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\"" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50, MAT_GLASS=50) toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 6040f72ab6b..65cd281340c 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -607,7 +607,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co desc = "An issue of The Griffon, the newspaper circulating aboard Nanotrasen Space Stations." icon = 'icons/obj/bureaucracy.dmi' icon_state = "newspaper" - w_class = 2 //Let's make it fit in trashbags! + w_class = WEIGHT_CLASS_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 5bd7861623b..c83d32e7ac7 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -49,7 +49,7 @@ icon = 'icons/obj/pipe-item.dmi' icon_state = "simple" item_state = "buildpipe" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL level = 2 var/flipped = 0 @@ -635,7 +635,7 @@ icon = 'icons/obj/pipe-item.dmi' icon_state = "meter" item_state = "buildpipe" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_meter/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob, params) ..() @@ -656,7 +656,7 @@ icon = 'icons/obj/stationobjs.dmi' icon_state = "gsensor0" item_state = "buildpipe" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_gsensor/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) ..() diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index ff319d5037d..071ae52c942 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -94,51 +94,49 @@ /obj/machinery/shield/hitby(AM as mob|obj) - - //Super realistic, resource-intensive, real-time damage calculations. + ..() var/tforce = 0 if(ismob(AM)) tforce = 40 - else - tforce = AM:throwforce + else if(isobj(AM)) + var/obj/O = AM + tforce = O.throwforce - src.health -= tforce + health -= tforce //This seemed to be the best sound for hitting a force field. - playsound(src.loc, 'sound/effects/EMPulse.ogg', 100, 1) + playsound(loc, 'sound/effects/EMPulse.ogg', 100, 1) //Handle the destruction of the shield - if(src.health <= 0) + if(health <= 0) visible_message("The [src] dissipates") qdel(src) return //The shield becomes dense to absorb the blow.. purely asthetic. opacity = 1 - spawn(20) if(src) opacity = 0 - - ..() - return - + spawn(20) + if(src) + opacity = 0 /obj/machinery/shieldgen - name = "Emergency shield projector" - desc = "Used to seal minor hull breaches." - icon = 'icons/obj/objects.dmi' - icon_state = "shieldoff" - density = 1 - opacity = 0 - anchored = 0 - pressure_resistance = 2*ONE_ATMOSPHERE - req_access = list(access_engine) - var/const/max_health = 100 - var/health = max_health - var/active = 0 - var/malfunction = 0 //Malfunction causes parts of the shield to slowly dissapate - var/list/deployed_shields = list() - var/is_open = 0 //Whether or not the wires are exposed - var/locked = 0 + name = "Emergency shield projector" + desc = "Used to seal minor hull breaches." + icon = 'icons/obj/objects.dmi' + icon_state = "shieldoff" + density = 1 + opacity = 0 + anchored = 0 + pressure_resistance = 2*ONE_ATMOSPHERE + req_access = list(access_engine) + var/const/max_health = 100 + var/health = max_health + var/active = 0 + var/malfunction = 0 //Malfunction causes parts of the shield to slowly dissapate + var/list/deployed_shields = list() + var/is_open = 0 //Whether or not the wires are exposed + var/locked = 0 /obj/machinery/shieldgen/Destroy() QDEL_LIST(deployed_shields) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 8fb2d173b6f..193c311e012 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -192,7 +192,7 @@ icon = 'icons/obj/assemblies.dmi' icon_state = "bombcore" item_state = "eshield0" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "syndicate=6;combat=5" burn_state = FLAMMABLE //Burnable (but the casing isn't) var/adminlog = null @@ -296,7 +296,7 @@ /obj/item/weapon/bombcore/miniature name = "small bomb core" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/bombcore/miniature/detonate() explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb @@ -310,7 +310,7 @@ icon = 'icons/obj/assemblies.dmi' icon_state = "bigred" item_state = "electronic" - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "syndicate=2" var/cooldown = 0 var/detonated = 0 @@ -335,4 +335,4 @@ detonated = 0 existant = 0 cooldown = 1 - spawn(30) cooldown = 0 \ No newline at end of file + spawn(30) cooldown = 0 diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index e694ac98817..f9de8b8d596 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -546,12 +546,10 @@ to_chat(user, "You successfully pull the coin out before the [src] could swallow it.") else to_chat(user, "You weren't able to pull the coin out fast enough, the machine ate it, string and all.") - coin = null - qdel(coin) + QDEL_NULL(coin) categories &= ~CAT_COIN else - coin = null - qdel(coin) + QDEL_NULL(coin) categories &= ~CAT_COIN R.amount-- diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index fdf1b341488..2fa9b3af00f 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -368,9 +368,12 @@ breakthrough = 1 else - throwing = 0 //so mechas don't get stuck when landing after being sent by a Mass Driver + if(throwing) + throwing.finalize(FALSE) crashing = null + ..() + if(breakthrough) if(crashing) spawn(1) @@ -524,7 +527,7 @@ user.create_attack_log("attacked [name]") return -/obj/mecha/hitby(atom/movable/A as mob|obj) //wrapper +/obj/mecha/hitby(atom/movable/A) //wrapper ..() log_message("Hit by [A].",1) @@ -537,6 +540,7 @@ dam_coeff = B.damage_coeff counter_tracking = 1 break + if(istype(A, /obj/item/mecha_parts/mecha_tracking)) if(!counter_tracking) A.forceMove(src) diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 2bb73e2c636..1e2868673c0 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -71,7 +71,7 @@ desc = "Device used to transmit exosuit data." icon = 'icons/obj/device.dmi' icon_state = "motion2" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "programming=2;magnets=2" var/ai_beacon = FALSE //If this beacon allows for AI control. Exists to avoid using istype() on checking. diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 9250dfa4839..0516d8bf659 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -6,7 +6,7 @@ name = "mecha part" icon = 'icons/mecha/mech_construct.dmi' icon_state = "blank" - w_class = 6 + w_class = WEIGHT_CLASS_GIGANTIC flags = CONDUCT origin_tech = "programming=2;materials=2" @@ -379,7 +379,7 @@ board_type = "other" flags = CONDUCT force = 5.0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 5.0 throw_speed = 3 throw_range = 15 @@ -487,5 +487,3 @@ /obj/item/weapon/circuitboard/mecha/pod name = "Circuit board (Space Pod Mainboard)" icon_state = "mainboard" - - diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 122f1741a3c..ebeda7a77c0 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -104,9 +104,9 @@ /obj/structure/alien/resin/hitby(atom/movable/AM) ..() var/tforce = 0 - if(!isobj(AM)) + if(ismob(AM)) tforce = 10 - else + else if(isobj(AM)) var/obj/O = AM tforce = O.throwforce playsound(loc, 'sound/effects/attackblob.ogg', 100, 1) diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 5972d75f3dd..7045a06a875 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -67,7 +67,7 @@ /obj/item/clothing/gloves/color/black = 20, /obj/item/clothing/head/hardhat = 10, /obj/item/clothing/head/hardhat/red = 10, - /obj/item/clothing/head/that{throwforce = 1; throwing = 1} = 10, + /obj/item/clothing/head/that = 10, /obj/item/clothing/head/ushanka = 10, /obj/item/clothing/head/welding = 10, /obj/item/clothing/mask/gas = 10, diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index f67178e1e67..cca6f9d9265 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -20,7 +20,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/health = null var/hitsound = null var/usesound = null - var/w_class = 3 + var/w_class = WEIGHT_CLASS_NORMAL var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 3 @@ -61,6 +61,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/block_chance = 0 var/hit_reaction_chance = 0 //If you want to have something unrelated to blocking/armour piercing etc. Maybe not needed, but trying to think ahead/allow more freedom + var/mob/thrownby = null + var/toolspeed = 1 // If this item is a tool, the speed multiplier /* Species-specific sprites, concept stolen from Paradise//vg/. @@ -144,16 +146,18 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d /obj/item/examine(mob/user, var/distance = -1) var/size switch(src.w_class) - if(1.0) + if(WEIGHT_CLASS_TINY) size = "tiny" - if(2.0) + if(WEIGHT_CLASS_SMALL) size = "small" - if(3.0) + if(WEIGHT_CLASS_NORMAL) size = "normal-sized" - if(4.0) + if(WEIGHT_CLASS_BULKY) size = "bulky" - if(5.0) + if(WEIGHT_CLASS_HUGE) size = "huge" + if(WEIGHT_CLASS_GIGANTIC) + size = "gigantic" . = ..(user, distance, "", "It is a [size] item.") @@ -217,7 +221,8 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d var/obj/item/weapon/storage/S = src.loc S.remove_from_storage(src) - src.throwing = 0 + if(throwing) + throwing.finalize(FALSE) if(loc == user) if(!user.unEquip(src)) return 0 @@ -231,36 +236,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d user.put_in_active_hand(src) return 1 - -/obj/item/attack_alien(mob/user as mob) - - if(isalien(user)) // -- TLE - var/mob/living/carbon/alien/A = user - - if(!A.has_fine_manipulation) - if(src in A.contents) // To stop Aliens having items stuck in their pockets - A.unEquip(src) - to_chat(user, "Your claws aren't capable of such fine manipulation.") - return - - if(istype(src.loc, /obj/item/weapon/storage)) - for(var/mob/M in range(1, src.loc)) - if(M.s_active == src.loc) - if(M.client) - M.client.screen -= src - src.throwing = 0 - if(src.loc == user) - if(!user.unEquip(src)) - return - else - if(istype(src.loc, /mob/living)) - return - src.pickup(user) - - user.put_in_active_hand(src) - return - - /obj/item/attack_alien(mob/user as mob) var/mob/living/carbon/alien/A = user @@ -323,9 +298,6 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d /obj/item/proc/talk_into(mob/M, var/text, var/channel=null) return -/obj/item/proc/moved(mob/user, old_loc) - return - /obj/item/proc/dropped(mob/user) for(var/X in actions) var/datum/action/A = X @@ -546,6 +518,23 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d throw_at(S,14,3) else ..() +/obj/item/throw_impact(atom/A) + if(A && !qdeleted(A)) + var/itempush = 1 + if(w_class < WEIGHT_CLASS_BULKY) + itempush = 0 // too light to push anything + return A.hitby(src, 0, itempush) + +/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) + thrownby = thrower + callback = CALLBACK(src, .proc/after_throw, callback) //replace their callback with our own + . = ..(target, range, speed, thrower, spin, diagonals_first, callback) + +/obj/item/proc/after_throw(datum/callback/callback) + if(callback) //call the original callback + . = callback.Invoke() + throw_speed = initial(throw_speed) //explosions change this. + /obj/item/proc/pwr_drain() return 0 // Process Kill diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm index 3cc0f9b6023..315eacb8f95 100644 --- a/code/game/objects/items/blueprints.dm +++ b/code/game/objects/items/blueprints.dm @@ -51,7 +51,7 @@ desc = "This is a one-use permit that allows the user to officially declare a built room as new addition to the station." fluffnotice = "Nanotrasen Engineering requires all on-station construction projects to be approved by a head of staff, as detailed in Nanotrasen Company Regulation 512-C (Mid-Shift Modifications to Company Property). \ By submitting this form, you accept any fines, fees, or personal injury/death that may occur during construction." - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/areaeditor/permit/attack_self(mob/user) . = ..() @@ -76,7 +76,7 @@ icon = 'icons/obj/items.dmi' icon_state = "blueprints" fluffnotice = "Property of Nanotrasen. For heads of staff only. Store in high-secure storage." - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/list/showing = list() var/client/viewing diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index c52aa0e1792..4108fe85ddd 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 + w_class = WEIGHT_CLASS_SMALL attack_self(mob/user) var/obj/structure/closet/body_bag/R = new /obj/structure/closet/body_bag(user.loc) @@ -136,4 +136,4 @@ to_chat(user, "The controls are now [src.locked ? "locked." : "unlocked."]") else to_chat(user, "Access denied.") - return \ No newline at end of file + return diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 46ee95d119b..801f74770ba 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/candle.dmi' icon_state = "candle1" item_state = "candle1" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/wax = 200 var/lit = 0 var/infinite = 0 @@ -91,4 +91,4 @@ /obj/item/candle/eternal desc = "A candle. This one seems to have an odd quality about the wax." - infinite = 1 \ No newline at end of file + infinite = 1 diff --git a/code/game/objects/items/control_wand.dm b/code/game/objects/items/control_wand.dm index 95cf94a3a1e..0fe6cf48631 100644 --- a/code/game/objects/items/control_wand.dm +++ b/code/game/objects/items/control_wand.dm @@ -8,7 +8,7 @@ icon = 'icons/obj/device.dmi' name = "control wand" desc = "Remotely controls airlocks." - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/mode = WAND_OPEN var/region_access = 1 //See access.dm var/obj/item/weapon/card/id/ID diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 3852d67e6ff..a3d302f1326 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -7,7 +7,7 @@ desc = "A colourful crayon. Looks tasty. Mmmm..." icon = 'icons/obj/crayons.dmi' icon_state = "crayonred" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT | SLOT_EARS attack_verb = list("attacked", "coloured") toolspeed = 1 diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index 0d02add30a3..542d3cd3fb4 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/aicards.dmi' icon_state = "aicard" // aicard-full item_state = "electronic" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT flags = NOBLUDGEON var/flush = null diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index af745b97f1f..5554fd4f0f4 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -9,7 +9,7 @@ desc = "For illicit snooping through the camera network." icon = 'icons/obj/device.dmi' icon_state = "camera_bug" - w_class = 1.0 + w_class = WEIGHT_CLASS_TINY item_state = "camera_bug" throw_speed = 4 throw_range = 20 diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index d3f13c284c1..ff7eb0ac2cc 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 = 3 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "syndicate=4;magnets=4" var/can_use = 1 var/obj/effect/dummy/chameleon/active_dummy = null @@ -150,4 +150,4 @@ /obj/effect/dummy/chameleon/Destroy() master.disrupt(0) - return ..() \ No newline at end of file + return ..() diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index fefb20e90e4..e309cae9bbe 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" //looks exactly like a flash (and nothing like a flashbang) throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 flags = CONDUCT diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 9ac4897c8f3..f82e8ab2cee 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/lighting.dmi' icon_state = "flashlight" item_state = "flashlight" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT slot_flags = SLOT_BELT materials = list(MAT_METAL=50, MAT_GLASS=20) @@ -88,7 +88,7 @@ desc = "A pen-sized light, used by medical staff." icon_state = "penlight" item_state = "" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT | SLOT_EARS flags = CONDUCT brightness_on = 2 @@ -109,7 +109,7 @@ item_state = "" flags = CONDUCT brightness_on = 2 - w_class = 1 + w_class = WEIGHT_CLASS_TINY // the desk lamps are a bit special /obj/item/device/flashlight/lamp @@ -118,7 +118,7 @@ icon_state = "lamp" item_state = "lamp" brightness_on = 5 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY flags = CONDUCT materials = list() on = 1 @@ -153,7 +153,7 @@ obj/item/device/flashlight/lamp/bananalamp /obj/item/device/flashlight/flare name = "flare" desc = "A red Nanotrasen issued flare. There are instructions on the side, it reads 'pull cord, make light'." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL brightness_on = 8 // Made it brighter (from 7 to 8). light_color = "#ff0000" // changed colour to a more brighter red. icon_state = "flare" @@ -214,7 +214,7 @@ obj/item/device/flashlight/lamp/bananalamp /obj/item/device/flashlight/flare/torch name = "torch" desc = "A torch fashioned from some leaves and a log." - w_class = 4 + w_class = WEIGHT_CLASS_BULKY brightness_on = 7 icon_state = "torch" item_state = "torch" @@ -227,7 +227,7 @@ obj/item/device/flashlight/lamp/bananalamp 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 = WEIGHT_CLASS_TINY brightness_on = 6 light_color = "#FFBF00" materials = list() diff --git a/code/game/objects/items/devices/floor_painter.dm b/code/game/objects/items/devices/floor_painter.dm index c278a1be72a..74b119c7b62 100644 --- a/code/game/objects/items/devices/floor_painter.dm +++ b/code/game/objects/items/devices/floor_painter.dm @@ -3,37 +3,37 @@ /obj/item/device/floor_painter name = "floor painter" icon_state = "floor_painter" - + var/floor_icon var/floor_state = "floor" var/floor_dir = SOUTH - - w_class = 1 + + w_class = WEIGHT_CLASS_TINY item_state = "electronic" flags = CONDUCT slot_flags = SLOT_BELT - - var/static/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner", + + var/static/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner", "bluefull", "bluered", "blueyellow", "blueyellowfull", "bot", "brown", "browncorner", "browncornerold", "brownold", "cafeteria", "caution", "cautioncorner", "chapel", "cmo", "dark", "delivery", "escape", "escapecorner", "floor", "freezerfloor", "green", "greenblue", "greenbluefull", "greencorner", "greenfull", "greenyellow", "greenyellowfull", "grimy", "loadingarea", "neutral", "neutralcorner", "neutralfull", "orange", "orangecorner", "orangefull", "purple", "purplecorner", "purplefull", "rampbottom", "ramptop", "red", "redblue", "redbluefull", - "redcorner", "redfull", "redgreen", "redgreenfull", "redyellow", "redyellowfull", "warning", "warningcorner", "warnwhite", - "warnwhitecorner", "white", "whiteblue", "whitebluecorner", "whitebluefull", "whitebot", "whitecorner", "whitedelivery", - "whitegreen", "whitegreencorner", "whitegreenfull", "whitehall", "whitepurple", "whitepurplecorner", "whitepurplefull", - "whitered", "whiteredcorner", "whiteredfull", "whiteyellow", "whiteyellowcorner", "whiteyellowfull", "yellow", + "redcorner", "redfull", "redgreen", "redgreenfull", "redyellow", "redyellowfull", "warning", "warningcorner", "warnwhite", + "warnwhitecorner", "white", "whiteblue", "whitebluecorner", "whitebluefull", "whitebot", "whitecorner", "whitedelivery", + "whitegreen", "whitegreencorner", "whitegreenfull", "whitehall", "whitepurple", "whitepurplecorner", "whitepurplefull", + "whitered", "whiteredcorner", "whiteredfull", "whiteyellow", "whiteyellowcorner", "whiteyellowfull", "yellow", "yellowcorner", "yellowcornersiding", "yellowsiding") /obj/item/device/floor_painter/afterattack(var/atom/A, var/mob/user, proximity, params) if(!proximity) return - + var/turf/simulated/floor/plasteel/F = A if(!istype(F)) to_chat(user, "\The [src] can only be used on station flooring.") return - + F.icon_state = floor_state F.icon_regular_floor = floor_state F.dir = floor_dir @@ -60,7 +60,7 @@ Choose Direction
Direction: [dir2text(floor_dir)]
"} - + var/datum/browser/popup = new(user, "floor_painter", name, 225, 300) popup.set_content(dat) popup.open() @@ -68,7 +68,7 @@ /obj/item/device/floor_painter/Topic(href, href_list) if(..()) return - + if(href_list["choose_state"]) var/state = input("Please select a style", "[src]") as null|anything in allowed_states if(state) @@ -92,7 +92,7 @@ index = 1 floor_state = allowed_states[index] floor_dir = SOUTH - + floor_icon = icon('icons/turf/floors.dmi', floor_state, floor_dir) if(usr) attack_self(usr) diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index b172ea052f0..ee49962cfe7 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -8,7 +8,7 @@ flags = CONDUCT slot_flags = SLOT_BELT materials = list(MAT_METAL=500, MAT_GLASS=500) - w_class = 2 //Increased to 2, because diodes are w_class 2. Conservation of matter. + w_class = WEIGHT_CLASS_SMALL //Increased to 2, because diodes are w_class 2. Conservation of matter. origin_tech = "combat=1" origin_tech = "magnets=2" var/energy = 5 diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index feb288d327d..1d42bf70108 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/aicards.dmi' icon_state = "pai" item_state = "electronic" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT origin_tech = "programming=2" var/request_cooldown = 5 // five seconds diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 65093361197..7c81ca0e6e9 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 + w_class = WEIGHT_CLASS_BULKY 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 35848bdc087..7c01d03ca36 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -6,7 +6,7 @@ frequency = 1449 flags = CONDUCT slot_flags = SLOT_BACK - w_class = 5 + w_class = WEIGHT_CLASS_HUGE materials = list(MAT_METAL=10000, MAT_GLASS=2500) var/code = 2 diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 43289678591..4cf20378443 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 + w_class = WEIGHT_CLASS_BULKY canhear_range = 2 flags = CONDUCT var/number = 0 @@ -231,7 +231,7 @@ icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" desc = "Looks like a circuit. Probably is." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50, MAT_GLASS=50) toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index c14fba68606..99096ac2649 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -44,7 +44,7 @@ var/global/list/default_medbay_channels = list( slot_flags = SLOT_BELT throw_speed = 2 throw_range = 9 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=75) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index ca4da5b2107..a1112493b01 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -14,7 +14,7 @@ REAGENT SCANNER icon_state = "t-ray0" var/on = 0 slot_flags = SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "electronic" materials = list(MAT_METAL=150) origin_tech = "magnets=1;engineering=1" @@ -117,7 +117,7 @@ REAGENT SCANNER flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 5 throw_range = 10 materials = list(MAT_METAL=200) @@ -240,7 +240,7 @@ REAGENT SCANNER if(H.species.exotic_blood) user.show_message("Subject possesses exotic blood.") user.show_message("Exotic blood type: [blood_type].") - if(H.heart_attack && H.stat != DEAD) + if(H.undergoing_cardiac_arrest() && H.stat != DEAD) user.show_message("Subject suffering from heart attack: Apply defibrillator immediately.") user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") var/implant_detect @@ -294,7 +294,7 @@ REAGENT SCANNER name = "Health Analyzer Upgrade" icon_state = "healthupgrade" desc = "An upgrade unit that can be installed on a health analyzer for expanded functionality." - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "magnets=2;biotech=2" usesound = 'sound/items/Deconstruct.ogg' @@ -303,7 +303,7 @@ REAGENT SCANNER name = "analyzer" icon_state = "atmos" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT slot_flags = SLOT_BELT throwforce = 0 @@ -369,7 +369,7 @@ REAGENT SCANNER name = "mass-spectrometer" icon_state = "spectrometer" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT | OPENCONTAINER slot_flags = SLOT_BELT throwforce = 5 @@ -470,7 +470,7 @@ REAGENT SCANNER desc = "A hand-held reagent scanner which identifies chemical agents." icon_state = "spectrometer" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT slot_flags = SLOT_BELT throwforce = 5 @@ -552,7 +552,7 @@ REAGENT SCANNER icon_state = "adv_spectrometer_s" item_state = "analyzer" origin_tech = "biotech=1" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT throwforce = 0 throw_speed = 3 @@ -588,4 +588,4 @@ REAGENT SCANNER user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1) if(T.cores > 1) user.show_message("Anomalous slime core amount detected", 1) - user.show_message("Growth progress: [T.amount_grown]/10", 1) \ No newline at end of file + user.show_message("Growth progress: [T.amount_grown]/10", 1) diff --git a/code/game/objects/items/devices/sensor_device.dm b/code/game/objects/items/devices/sensor_device.dm index 79fc2f92457..b063682f770 100644 --- a/code/game/objects/items/devices/sensor_device.dm +++ b/code/game/objects/items/devices/sensor_device.dm @@ -3,7 +3,7 @@ desc = "A miniature machine that tracks suit sensors across the station." icon = 'icons/obj/device.dmi' icon_state = "scanner" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT origin_tech = "biotech=3;materials=3;magnets=3" var/datum/nano_module/crew_monitor/crew_monitor @@ -19,4 +19,4 @@ ui_interact(user) /obj/item/device/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) - crew_monitor.ui_interact(user, ui_key, ui, force_open) \ No newline at end of file + crew_monitor.ui_interact(user, ui_key, ui, force_open) diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 1d8c92662e8..9f773c0d402 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 to cassette tapes, and play them. It automatically translates the content in playback." icon_state = "taperecorder_empty" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT materials = list(MAT_METAL=60, MAT_GLASS=30) force = 2 @@ -249,7 +249,7 @@ desc = "A magnetic tape that can hold up to ten minutes of content." icon_state = "tape_white" item_state = "analyzer" - w_class = 1 + w_class = WEIGHT_CLASS_TINY materials = list(MAT_METAL=20, MAT_GLASS=5) force = 1 throwforce = 0 diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 0b38b3f9e18..5f140f05d03 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 + w_class = WEIGHT_CLASS_TINY throw_speed = 4 throw_range = 10 flags = CONDUCT @@ -79,7 +79,7 @@ effective or pretty fucking useless. flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 materials = list(MAT_METAL=400) diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm index 877cb1a5fc9..9c293bd6073 100644 --- a/code/game/objects/items/devices/transfer_valve.dm +++ b/code/game/objects/items/devices/transfer_valve.dm @@ -122,16 +122,16 @@ tank_one.forceMove(get_turf(src)) tank_one = null update_icon() - if((!tank_two || tank_two.w_class < 4) && (w_class > 3)) - w_class = 3 + if((!tank_two || tank_two.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL)) + w_class = WEIGHT_CLASS_NORMAL else if(tank_two && href_list["tanktwo"]) split_gases() valve_open = 0 tank_two.forceMove(get_turf(src)) tank_two = null update_icon() - if((!tank_one || tank_one.w_class < 4) && (w_class > 3)) - w_class = 3 + if((!tank_one || tank_one.w_class < WEIGHT_CLASS_BULKY) && (w_class > WEIGHT_CLASS_NORMAL)) + w_class = WEIGHT_CLASS_NORMAL else if(href_list["open"]) toggle_valve() else if(attached_device) @@ -217,4 +217,4 @@ else if(valve_open && tank_one && tank_two) split_gases() valve_open = 0 - update_icon() \ No newline at end of file + update_icon() diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm index 359dfd82efa..d9aae300360 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 = "flashtool" //looks exactly like a flash (and nothing like a flashbang) - w_class = 1 + w_class = WEIGHT_CLASS_TINY flags = CONDUCT var/spamcheck = 0 @@ -28,4 +28,3 @@ if(!emagged) to_chat(user, "You overload \the [src]'s voice synthesizer.") emagged = 1 - diff --git a/code/game/objects/items/documents.dm b/code/game/objects/items/documents.dm index f76a4942195..9540dcbb966 100644 --- a/code/game/objects/items/documents.dm +++ b/code/game/objects/items/documents.dm @@ -5,7 +5,7 @@ icon_state = "docs_generic" item_state = "paper" throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_range = 1 throw_speed = 1 layer = 4 @@ -26,4 +26,4 @@ /obj/item/documents/syndicate/blue name = "'Blue' secret documents" desc = "\"Top Secret\" documents printed on special copy-protected paper. It details sensitive Syndicate operational intelligence. These documents are marked \"Blue\"." - icon_state = "docs_blue" \ No newline at end of file + icon_state = "docs_blue" diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index e05182bf3c1..0117f1b9f19 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -1,6 +1,6 @@ /obj/item/flag icon = 'icons/obj/flag.dmi' - w_class = 4 + w_class = WEIGHT_CLASS_BULKY burntime = 20 burn_state = FLAMMABLE @@ -156,7 +156,7 @@ name = "Nar'Sie Cultist flag" desc = "A flag proudly boasting the logo of the cultists, sworn enemies of NT." icon_state = "cultflag" - + //Chameleon /obj/item/flag/chameleon @@ -165,7 +165,7 @@ icon_state = "ntflag" origin_tech = "materials=3;magnets=4;syndicate=4" var/used = 0 - + /obj/item/flag/chameleon/attack_self(mob/user) if(used) return @@ -190,7 +190,7 @@ icon_state = chosen_flag.icon_state desc = chosen_flag.desc used = 1 - + /obj/item/flag/chameleon/burn() explosion(loc,1,2,4,4, flame_range = 4) - qdel(src) \ No newline at end of file + qdel(src) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index a7a45de8cb8..5f55a5acdcc 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -5,7 +5,7 @@ item_state = "lgloves" force = 0 throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 7 var/state @@ -60,4 +60,4 @@ blow(T, user) return if(is_sharp(W) || is_hot(W) || can_puncture(W)) - burst() \ No newline at end of file + burst() diff --git a/code/game/objects/items/misc.dm b/code/game/objects/items/misc.dm index f2fa9596375..67b1523db8d 100644 --- a/code/game/objects/items/misc.dm +++ b/code/game/objects/items/misc.dm @@ -16,9 +16,9 @@ item_state = "beachball" density = 0 anchored = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY force = 0.0 throwforce = 0.0 throw_speed = 1 throw_range = 20 - flags = CONDUCT \ No newline at end of file + flags = CONDUCT diff --git a/code/game/objects/items/policetape.dm b/code/game/objects/items/policetape.dm index f171e984f36..127f3f82c41 100644 --- a/code/game/objects/items/policetape.dm +++ b/code/game/objects/items/policetape.dm @@ -3,7 +3,7 @@ name = "tape roll" icon = 'icons/policetape.dmi' icon_state = "rollstart" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/turf/start var/turf/end var/tape_type = /obj/item/tape @@ -151,7 +151,7 @@ var/list/tape_roll_applications = list() if(!density) return 1 if(height==0) return 1 - if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing == 1) ) + if((mover.pass_flags & PASSTABLE || istype(mover, /obj/effect/meteor) || mover.throwing)) return 1 else if(ismob(mover) && allowed(mover)) return 1 @@ -201,5 +201,3 @@ var/list/tape_roll_applications = list() qdel(src) return - - diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 4c2bbfa3bcd..e50c51ba100 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 = 6 max_amount = 6 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 var/heal_brute = 0 diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index 1b63eaae7f0..96d5d381a72 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -9,7 +9,7 @@ var/global/list/datum/stack_recipe/rod_recipes = list ( \ icon_state = "rods" item_state = "rods" flags = CONDUCT - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 9.0 throwforce = 10.0 throw_speed = 3 diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 3a2d07aa2f6..e222f1627cd 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -108,8 +108,8 @@ var/global/list/datum/stack_recipe/human_recipes = list( \ desc = "Long stringy filaments which presumably came from a watcher's wings." singular_name = "watcher sinew" icon_state = "sinew" - origin_tech = "biotech=4" - + origin_tech = "biotech=4" + var/global/list/datum/stack_recipe/sinew_recipes = list ( \ new/datum/stack_recipe("sinew restraints", /obj/item/weapon/restraints/handcuffs/sinew, 1, on_floor = 1), \ ) @@ -117,7 +117,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ /obj/item/stack/sheet/sinew/New(var/loc, var/amount=null) recipes = sinew_recipes return ..() - + /obj/item/stack/sheet/animalhide/goliath_hide name = "goliath hide plates" desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna." @@ -125,7 +125,7 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ icon_state = "goliath_hide" singular_name = "hide plate" flags = NOBLUDGEON - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER /obj/item/stack/sheet/animalhide/ashdrake @@ -135,9 +135,9 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ icon_state = "dragon_hide" singular_name = "drake plate" flags = NOBLUDGEON - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER - + //Step one - dehairing. /obj/item/stack/sheet/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob, params) @@ -177,4 +177,4 @@ var/global/list/datum/stack_recipe/sinew_recipes = list ( \ var/obj/item/stack/sheet/leather/HS = new(src.loc) HS.amount = 1 wetness = initial(wetness) - src.use(1) \ No newline at end of file + src.use(1) diff --git a/code/game/objects/items/stacks/sheets/light.dm b/code/game/objects/items/stacks/sheets/light.dm index 9ca562b50ce..d399e152bbe 100644 --- a/code/game/objects/items/stacks/sheets/light.dm +++ b/code/game/objects/items/stacks/sheets/light.dm @@ -5,7 +5,7 @@ desc = "A glass tile, which is wired, somehow." icon = 'icons/obj/tiles.dmi' icon_state = "glass_wire" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 3.0 throwforce = 5.0 throw_speed = 5 diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index ef9781f9a0d..fc933a14f20 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -104,7 +104,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \ /obj/item/stack/sheet/mineral force = 5.0 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 3 throw_range = 3 @@ -240,7 +240,7 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \ singular_name = "alien alloy sheet" force = 5 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 1 throw_range = 3 origin_tech = "materials=6;abductor=1" @@ -248,4 +248,4 @@ var/global/list/datum/stack_recipe/abductor_recipes = list ( \ /obj/item/stack/sheet/mineral/abductor/New(loc, amount=null) recipes = abductor_recipes - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 02031404360..858365f6d29 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -298,7 +298,7 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \ desc = "Someone's been drinking their milk." force = 7 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 1 throw_range = 3 origin_tech = "materials=2;biotech=2" diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 4e5a0e9fdc8..3a92d0f7662 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -1,6 +1,6 @@ /obj/item/stack/sheet name = "sheet" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 5 throwforce = 5 max_amount = 50 @@ -24,4 +24,4 @@ else for(var/obj/item/stack/sheet/stack in locate(src.x,src.y,src.z)) S.add(stack,user) - ..()*/ \ No newline at end of file + ..()*/ diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 0c6c3d42cf3..d2fb50bd385 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/telescience.dmi' icon_state = "telecrystal" - w_class = 1 + w_class = WEIGHT_CLASS_TINY max_amount = 50 flags = NOBLUDGEON origin_tech = "materials=6;syndicate=1" diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index b8078bfebcb..1fec38f491b 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/tiles.dmi' icon_state = "tile" item_state = "tile" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 1 throwforce = 1 throw_speed = 5 @@ -160,4 +160,4 @@ singular_name = "pod floor tile" desc = "A grooved floor tile." icon_state = "tile_pod" - turf_type = /turf/simulated/floor/pod \ No newline at end of file + turf_type = /turf/simulated/floor/pod diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 87da0987487..575cf09a6b1 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -113,7 +113,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "syndballoon" item_state = "syndballoon" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY /* * Fake telebeacon @@ -144,7 +144,7 @@ icon_state = "sword0" item_state = "sword0" var/active = 0.0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "struck", "hit") /obj/item/toy/sword/attack_self(mob/user as mob) @@ -154,13 +154,13 @@ playsound(user, 'sound/weapons/saberon.ogg', 50, 1) icon_state = "swordblue" item_state = "swordblue" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY else to_chat(user, "You push the plastic blade back down into the handle.") playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) icon_state = "sword0" item_state = "sword0" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL if(istype(user,/mob/living/carbon/human)) var/mob/living/carbon/human/H = user @@ -218,7 +218,7 @@ slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced") hitsound = 'sound/weapons/bladeslice.ogg' @@ -239,7 +239,7 @@ throwforce = 5.0 throw_speed = 10 throw_range = 30 - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/toy/snappop/virus/throw_impact(atom/hit_atom) @@ -260,7 +260,7 @@ desc = "Wow!" icon = 'icons/obj/toy.dmi' icon_state = "snappop" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/ash_type = /obj/effect/decal/cleanable/ash /obj/item/toy/snappop/proc/pop_burst(var/n=3, var/c=1) @@ -403,7 +403,7 @@ slot_flags = SLOT_BELT | SLOT_BACK force = 5 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced") @@ -438,7 +438,7 @@ obj/item/toy/cards/deck icon = 'icons/obj/toy.dmi' deckstyle = "nanotrasen" icon_state = "deck_nanotrasen_full" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 var/list/cards = list() @@ -568,7 +568,7 @@ obj/item/toy/cards/cardhand desc = "A number of cards not in a deck, customarily held in ones hand." icon = 'icons/obj/toy.dmi' icon_state = "nanotrasen_hand2" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/list/currenthand = list() var/choice = null @@ -661,7 +661,7 @@ obj/item/toy/cards/singlecard desc = "a card" icon = 'icons/obj/toy.dmi' icon_state = "singlecard_nanotrasen_down" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/cardname = null var/flipped = 0 pixel_x = -5 @@ -787,7 +787,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "A plastic model of a Nuclear Fission Explosive." icon = 'icons/obj/toy.dmi' icon_state = "nuketoyidle" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/nuke/attack_self(mob/user) @@ -810,7 +810,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "A toy for therapeutic and recreational purposes." icon_state = "therapyred" item_state = "egg4" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/cooldown = 0 /obj/item/toy/therapy/New() @@ -863,7 +863,7 @@ obj/item/toy/cards/deck/syndicate/black name = "toddler" desc = "This baby looks almost real. Wait, did it just burp?" force = 5 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK @@ -886,7 +886,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "Relive the excitement of a meteor shower! SweetMeat-eor. Co is not responsible for any injuries, headaches or hearing loss caused by Mini-Meteor." icon = 'icons/obj/toy.dmi' icon_state = "minimeteor" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/toy/minimeteor/throw_impact(atom/hit_atom) ..() @@ -1095,7 +1095,7 @@ obj/item/toy/cards/deck/syndicate/black icon_state = "foamblade" item_state = "arm_blade" attack_verb = list("pricked", "absorbed", "gored") - w_class = 2 + w_class = WEIGHT_CLASS_SMALL burn_state = FLAMMABLE /* @@ -1107,7 +1107,7 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/device.dmi' icon_state = "flash" item_state = "flashtool" - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/toy/flash/attack(mob/living/M, mob/user) playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1) @@ -1123,7 +1123,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "A big, plastic red button. Reads 'From HonkCo Pranks?' on the back." icon = 'icons/obj/assemblies.dmi' icon_state = "bigred" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/redbutton/attack_self(mob/user) @@ -1148,7 +1148,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "A little toy model AI core with real law announcing action!" icon = 'icons/obj/toy.dmi' icon_state = "AI" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/AI/attack_self(mob/user) @@ -1167,7 +1167,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "An action figure modeled after 'The Owl', defender of justice." icon = 'icons/obj/toy.dmi' icon_state = "owlprize" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/owl/attack_self(mob/user) @@ -1186,7 +1186,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "An action figure modeled after 'The Griffin', criminal mastermind." icon = 'icons/obj/toy.dmi' icon_state = "griffinprize" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/griffin/attack_self(mob/user) @@ -1203,7 +1203,7 @@ obj/item/toy/cards/deck/syndicate/black // DND Character minis. Use the naming convention (type)character for the icon states. /obj/item/toy/character icon = 'icons/obj/toy.dmi' - w_class = 2 + w_class = WEIGHT_CLASS_SMALL pixel_z = 5 /obj/item/toy/character/alien @@ -1256,7 +1256,7 @@ obj/item/toy/cards/deck/syndicate/black desc = "The perfect pet!" icon = 'icons/obj/toy.dmi' icon_state = "pet_rock" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 5 throwforce = 5 attack_verb = list("attacked", "bashed", "smashed", "stoned") @@ -1280,7 +1280,7 @@ obj/item/toy/cards/deck/syndicate/black icon = 'icons/obj/toy.dmi' icon_state = "minigibber" attack_verb = list("grinded", "gibbed") - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 var/obj/stored_minature = null @@ -1322,7 +1322,7 @@ obj/item/toy/cards/deck/syndicate/black icon_state = "toy_xeno" name = "xenomorph action figure" desc = "MEGA presents the new Xenos Isolated action figure! Comes complete with realistic sounds! Pull back string to use." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 /obj/item/toy/toy_xeno/attack_self(mob/user) @@ -1352,7 +1352,7 @@ obj/item/toy/cards/deck/syndicate/black flags = CONDUCT slot_flags = SLOT_BELT materials = list(MAT_METAL=2000) - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throwforce = 5 throw_speed = 4 throw_range = 5 diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index dc538674993..30a75b310b6 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 = 1 + w_class = WEIGHT_CLASS_TINY desc = "This is rubbish." burn_state = FLAMMABLE diff --git a/code/game/objects/items/weapons/AI_modules.dm b/code/game/objects/items/weapons/AI_modules.dm index cca1464d6e7..17d40971804 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 + w_class = WEIGHT_CLASS_SMALL throwforce = 5.0 throw_speed = 3 throw_range = 15 @@ -397,4 +397,4 @@ AI MODULES laws[1] = generate_ion_law() to_chat(user, "You press the button on [src].") playsound(user, 'sound/machines/click.ogg', 20, 1) - src.loc.visible_message("[bicon(src)] [laws[1]]") \ No newline at end of file + src.loc.visible_message("[bicon(src)] [laws[1]]") diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 5598a42cc8f..cd00d2f2b78 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -17,7 +17,7 @@ RCD throwforce = 10.0 throw_speed = 3 throw_range = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL = 30000) origin_tech = "engineering=4;materials=2" toolspeed = 1 @@ -279,8 +279,7 @@ RCD return 0 activate() var/turf/T1 = get_turf(A) - qdel(A) - A = null + QDEL_NULL(A) for(var/obj/structure/window/W in T1.contents) W.disassembled = 1 W.density = 0 diff --git a/code/game/objects/items/weapons/RCL.dm b/code/game/objects/items/weapons/RCL.dm index 8e0357ecd13..0655c0b4b8b 100644 --- a/code/game/objects/items/weapons/RCL.dm +++ b/code/game/objects/items/weapons/RCL.dm @@ -115,7 +115,7 @@ last = C break -/obj/item/weapon/twohanded/rcl/moved(mob/user, turf/old_loc, direct) +/obj/item/weapon/twohanded/rcl/on_mob_move(direct, mob/user) if(active) trigger(user) diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 07a489490e1..ddeefa002b0 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -13,7 +13,7 @@ RSF anchored = 0.0 var/matter = 0 var/mode = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/rsf/New() desc = "A RSF. It currently holds [matter]/30 fabrication-units." @@ -231,4 +231,4 @@ RSF matter-- to_chat(user, "The RSF now holds [matter]/30 fabrication-units.") desc = "A RSF. It currently holds [matter]/30 fabrication-units." - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/alien_specific.dm b/code/game/objects/items/weapons/alien_specific.dm index 922f4004714..49258c05c4e 100644 --- a/code/game/objects/items/weapons/alien_specific.dm +++ b/code/game/objects/items/weapons/alien_specific.dm @@ -12,8 +12,8 @@ throwforce_on = 5 throw_speed = 1 throw_range = 5 - w_class = 2 - w_class_on = 2 + w_class = WEIGHT_CLASS_SMALL + w_class_on = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "slashed", "gored", "sliced", "torn", "ripped", "butchered", "cut") attack_verb_on = list() diff --git a/code/game/objects/items/weapons/bee_briefcase.dm b/code/game/objects/items/weapons/bee_briefcase.dm index 3252fe4d856..229a025a18f 100644 --- a/code/game/objects/items/weapons/bee_briefcase.dm +++ b/code/game/objects/items/weapons/bee_briefcase.dm @@ -11,7 +11,7 @@ force = 10 throw_speed = 2 throw_range = 4 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") var/bees_left = 10 var/list/blood_list = list() diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm index 27d659dcbe2..826cd386f3c 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 = "A card." icon = 'icons/obj/card.dmi' - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/associated_account_number = 0 var/list/files = list( ) diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm index 44a357a6d92..250aff951fd 100644 --- a/code/game/objects/items/weapons/caution.dm +++ b/code/game/objects/items/weapons/caution.dm @@ -7,7 +7,7 @@ throwforce = 3.0 throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("warned", "cautioned", "smashed") proximity_sign diff --git a/code/game/objects/items/weapons/chrono_eraser.dm b/code/game/objects/items/weapons/chrono_eraser.dm index 71e09a3cf0d..ef1e2c91498 100644 --- a/code/game/objects/items/weapons/chrono_eraser.dm +++ b/code/game/objects/items/weapons/chrono_eraser.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/chronos.dmi' icon_state = "chronobackpack" item_state = "backpack" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/equip_unequip_TED_Gun) @@ -46,7 +46,7 @@ icon = 'icons/obj/chronos.dmi' icon_state = "chronogun" item_state = "chronogun" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL flags = NODROP ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam) can_charge = 0 diff --git a/code/game/objects/items/weapons/cigs.dm b/code/game/objects/items/weapons/cigs.dm index 2b46e8de101..766fe92c1ee 100644 --- a/code/game/objects/items/weapons/cigs.dm +++ b/code/game/objects/items/weapons/cigs.dm @@ -20,7 +20,7 @@ LIGHTERS ARE IN LIGHTERS.DM throw_speed = 0.5 item_state = "cigoff" slot_flags = SLOT_EARS|SLOT_MASK - w_class = 1 + w_class = WEIGHT_CLASS_TINY body_parts_covered = null attack_verb = list("burnt", "singed") var/lit = 0 @@ -285,7 +285,7 @@ LIGHTERS ARE IN LIGHTERS.DM desc = "A manky old cigarette butt." icon = 'icons/obj/clothing/masks.dmi' icon_state = "cigbutt" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 1 /obj/item/weapon/cigbutt/New() @@ -389,7 +389,7 @@ LIGHTERS ARE IN LIGHTERS.DM desc = "A thin piece of paper used to make fine smokeables." icon = 'icons/obj/cigarettes.dmi' icon_state = "cig_paper" - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/weapon/rollingpaper/afterattack(atom/target, mob/user, proximity) if(!proximity) @@ -410,4 +410,4 @@ LIGHTERS ARE IN LIGHTERS.DM else to_chat(user, "You need to dry this first!") else - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm index 3312c6555d4..bb69ffaee50 100644 --- a/code/game/objects/items/weapons/clown_items.dm +++ b/code/game/objects/items/weapons/clown_items.dm @@ -60,7 +60,7 @@ item_state = "bike_horn" hitsound = null throwforce = 3 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 15 attack_verb = list("HONKED") @@ -112,4 +112,4 @@ var/mob/living/carbon/human/H = M if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf) continue - M.emote("flip") \ No newline at end of file + M.emote("flip") diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index f311d56d1ba..d480f8f4010 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -3,7 +3,7 @@ desc = "A generic brand of lipstick." icon = 'icons/obj/items.dmi' icon_state = "lipstick" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/colour = "red" var/open = 0 @@ -86,7 +86,7 @@ icon = 'icons/obj/items.dmi' icon_state = "razor" flags = CONDUCT - w_class = 1 + w_class = WEIGHT_CLASS_TINY usesound = 'sound/items/Welder2.ogg' toolspeed = 1 @@ -136,6 +136,9 @@ if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead") to_chat(user, "There is not enough hair left to shave...") return + if(M.get_species() == "Skrell") + to_chat(user, "Your razor isn't going to cut through tentacles.") + return if(H == user) //shaving yourself user.visible_message("[user] starts to shave their head with \the [src].", \ "You start to shave your head with \the [src].") @@ -160,4 +163,4 @@ else ..() else - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/courtroom.dm b/code/game/objects/items/weapons/courtroom.dm index 055faa03a8c..0f5671f8e1a 100644 --- a/code/game/objects/items/weapons/courtroom.dm +++ b/code/game/objects/items/weapons/courtroom.dm @@ -9,7 +9,7 @@ icon_state = "gavelhammer" force = 5.0 throwforce = 6.0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("bashed", "battered", "judged", "whacked") burn_state = FLAMMABLE @@ -25,7 +25,7 @@ icon_state = "gavelblock" force = 2.0 throwforce = 2.0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY burn_state = FLAMMABLE /obj/item/weapon/gavelblock/attackby(obj/item/I, mob/user, params) @@ -33,4 +33,4 @@ playsound(loc, 'sound/items/gavel.ogg', 100, 1) user.visible_message("[user] strikes \the [src] with \the [I].") else - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 5d0dcebcacc..b7f337e6155 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -9,7 +9,7 @@ slot_flags = SLOT_BACK force = 5 throwforce = 6 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY origin_tech = "biotech=4" actions_types = list(/datum/action/item_action/toggle_paddles) species_fit = list("Vox") @@ -206,7 +206,7 @@ desc = "A belt-equipped defibrillator that can be rapidly deployed." icon_state = "defibcompact" item_state = "defibcompact" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL slot_flags = SLOT_BELT origin_tech = "biotech=4" @@ -251,7 +251,7 @@ item_state = "defibpaddles" force = 0 throwforce = 6 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY toolspeed = 1 var/revivecost = 1000 @@ -330,8 +330,8 @@ H.updatehealth() //forces health update before next life tick playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) H.emote("gasp") - if(!H.heart_attack && (prob(10) || defib.combat)) // Your heart explodes. - H.heart_attack = 1 + if(!H.undergoing_cardiac_arrest() && (prob(10) || defib.combat)) // Your heart explodes. + H.set_heartattack(TRUE) add_logs(user, M, "stunned", object="defibrillator") defib.deductcharge(revivecost) cooldown = 1 @@ -368,7 +368,7 @@ busy = 0 update_icon() return - if(H.heart_attack) + if(H.undergoing_cardiac_arrest()) if(!H.get_int_organ(/obj/item/organ/internal/heart) && !H.get_int_organ(/obj/item/organ/internal/brain/slime)) //prevents defibing someone still alive suffering from a heart attack attack if they lack a heart user.visible_message("[defib] buzzes: Resuscitation failed - Failed to pick up any heart electrical activity.") playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) @@ -376,7 +376,7 @@ update_icon() return else - H.heart_attack = 0 + H.set_heartattack(FALSE) user.visible_message("[defib] pings: Cardiac arrhythmia corrected.") M.visible_message("[M]'s body convulses a bit.") playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) @@ -446,7 +446,7 @@ icon_state = "defibpaddles0" item_state = "defibpaddles0" force = 0 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY var/revivecost = 1000 var/cooldown = 0 var/busy = 0 @@ -474,8 +474,8 @@ H.adjustStaminaLoss(50) H.Weaken(5) H.updatehealth() //forces health update before next life tick - if(!H.heart_attack && prob(10)) // Your heart explodes. - H.heart_attack = 1 + if(!H.undergoing_cardiac_arrest() && prob(10)) // Your heart explodes. + H.set_heartattack(TRUE) playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1) H.emote("gasp") add_logs(user, M, "stunned", object="defibrillator") diff --git a/code/game/objects/items/weapons/dice.dm b/code/game/objects/items/weapons/dice.dm index 5714f5e4310..7871f19e91a 100644 --- a/code/game/objects/items/weapons/dice.dm +++ b/code/game/objects/items/weapons/dice.dm @@ -29,7 +29,7 @@ desc = "A die with six sides. Basic and servicable." icon = 'icons/obj/dice.dmi' icon_state = "d6" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/sides = 6 var/result = null var/list/special_faces = list() //entries should match up to sides var if used @@ -111,10 +111,10 @@ /obj/item/weapon/dice/attack_self(mob/user as mob) diceroll(user) -/obj/item/weapon/dice/throw_at(atom/target, range, speed, mob/user as mob) +/obj/item/weapon/dice/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback) if(!..()) return - diceroll(user) + diceroll(thrower) /obj/item/weapon/dice/proc/diceroll(mob/user) result = rand(1, sides) @@ -133,7 +133,7 @@ user.visible_message("[user] has thrown [src]. It lands on [result]. [comment]", \ "You throw [src]. It lands on [result]. [comment]", \ "You hear [src] rolling, it sounds like a [fake_result].") - else if(src.throwing == 0) //Dice was thrown and is coming to rest + else if(!throwing) //Dice was thrown and is coming to rest visible_message("[src] rolls to a stop, landing on [result]. [comment]") /obj/item/weapon/dice/d20/e20/diceroll(mob/user as mob, thrown) diff --git a/code/game/objects/items/weapons/disks.dm b/code/game/objects/items/weapons/disks.dm index 2c3f71f5cf3..58f590dc629 100644 --- a/code/game/objects/items/weapons/disks.dm +++ b/code/game/objects/items/weapons/disks.dm @@ -1,5 +1,5 @@ /obj/item/weapon/disk icon = 'icons/obj/module.dmi' - w_class = 1 + w_class = WEIGHT_CLASS_TINY item_state = "card-id" icon_state = "datadisk0" diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index b4d0e0b5eaa..b583b3e2c25 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -8,7 +8,7 @@ var/datum/dna2/record/buf = null throw_speed = 3 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "biotech=1" var/damage_coeff = 1 diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 0767e26fbdb..42874e05cf4 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 = WEIGHT_CLASS_NORMAL throw_speed = 2 throw_range = 7 force = 10 @@ -29,7 +29,7 @@ hitsound = null //it is much lighter, after all. flags = null //doesn't CONDUCT throwforce = 2 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 3.0 materials = list() max_water = 30 diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 70fbde22224..9adb05f15a7 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -11,7 +11,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=500) origin_tech = "combat=1;plasmatech=1" var/status = 0 diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index 196b0d269a0..be96e29f97a 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -8,7 +8,7 @@ name = "fiber wire" desc = "A length of razor-thin wire with an elegant wooden handle on either end.
You suspect you'd have to be behind the target to use this weapon effectively." icon_state = "garrot_wrap" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/mob/living/carbon/human/strangling var/improvised = 0 var/garrote_time diff --git a/code/game/objects/items/weapons/grenades/bananade.dm b/code/game/objects/items/weapons/grenades/bananade.dm index 580cb993a63..6c672193bb6 100644 --- a/code/game/objects/items/weapons/grenades/bananade.dm +++ b/code/game/objects/items/weapons/grenades/bananade.dm @@ -4,7 +4,7 @@ var/turf/T /obj/item/weapon/grenade/bananade name = "bananade" desc = "A yellow grenade." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/grenade.dmi' icon_state = "banana" item_state = "flashbang" diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 5dc0e8d4199..4221528e100 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -9,7 +9,7 @@ item_state = "flashbang" var/bomb_state = "chembomb" var/payload_name = null // used for spawned grenades - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 2 var/prime_sound = 'sound/items/Screwdriver2.ogg' var/stage = EMPTY @@ -539,4 +539,4 @@ #undef EMPTY #undef WIRED -#undef READY \ No newline at end of file +#undef READY diff --git a/code/game/objects/items/weapons/grenades/clowngrenade.dm b/code/game/objects/items/weapons/grenades/clowngrenade.dm index 0fcdceff9ac..0d24bd80a95 100644 --- a/code/game/objects/items/weapons/grenades/clowngrenade.dm +++ b/code/game/objects/items/weapons/grenades/clowngrenade.dm @@ -3,7 +3,7 @@ desc = "HONK! brand Bananas. In a special applicator for rapid slipping of wide areas." icon_state = "banana" item_state = "flashbang" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 2.0 var/stage = 0 var/state = 0 @@ -74,4 +74,4 @@ if(istype(hit_atom ,/mob/living)) var/mob/living/M = hit_atom M.take_organ_damage(0, burned) - return ..() \ No newline at end of file + return ..() diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index 745afd967ee..13b0f0b8140 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -17,7 +17,7 @@ /obj/item/weapon/grenade/iedcasing name = "improvised explosive assembly" desc = "An igniter stuffed into an aluminum shell." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/grenade.dmi' icon_state = "improvised_grenade" item_state = "flashbang" @@ -67,7 +67,7 @@ /obj/item/weapon/grenade/iedcasing/filled name = "improvised firebomb" desc = "A weak, improvised incendiary device." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/grenade.dmi' icon_state = "improvised_grenade" item_state = "flashbang" diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index af855e63016..88abd66913f 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 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/grenade.dmi' icon_state = "grenade" item_state = "flashbang" diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 798565e63fd..f010bb977c0 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -14,8 +14,7 @@ src.smoke.attach(src) Destroy() - qdel(smoke) - smoke = null + QDEL_NULL(smoke) return ..() prime() diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 723920e7a5c..e802916de27 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 + w_class = WEIGHT_CLASS_SMALL throw_speed = 2 throw_range = 5 materials = list(MAT_METAL=500) diff --git a/code/game/objects/items/weapons/holosign.dm b/code/game/objects/items/weapons/holosign.dm index bfd16e71003..47547ec543a 100644 --- a/code/game/objects/items/weapons/holosign.dm +++ b/code/game/objects/items/weapons/holosign.dm @@ -5,7 +5,7 @@ icon_state = "signmaker" item_state = "electronic" force = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 0 throw_speed = 3 throw_range = 7 diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index a6a1039f1c7..c4c4175d2fa 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -7,7 +7,7 @@ throw_speed = 3 throw_range = 4 throwforce = 10 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/reskinned = FALSE var/reskin_selectable = TRUE //set to FALSE if a subtype is meant to not normally be available as a reskin option (fluff ones will get re-added through their list) var/list/fluff_transformations = list() //does it have any special transformations only accessible to it? Should only be subtypes of /obj/item/weapon/nullrod @@ -71,7 +71,7 @@ item_state = "disintegrate" desc = "This hand of yours glows with an awesome power!" flags = ABSTRACT | NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE hitsound = 'sound/weapons/sear.ogg' damtype = BURN attack_verb = list("punched", "cross countered", "pummeled") @@ -81,7 +81,7 @@ icon_state = "godstaff-red" item_state = "godstaff-red" desc = "It has a mysterious, protective aura." - w_class = 5 + w_class = WEIGHT_CLASS_HUGE force = 5 slot_flags = SLOT_BACK block_chance = 50 @@ -96,7 +96,7 @@ icon_state = "claymore" item_state = "claymore" desc = "A weapon fit for a crusade!" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK|SLOT_BELT block_chance = 30 sharp = 1 @@ -183,7 +183,7 @@ icon_state = "scythe0" item_state = "scythe0" desc = "Ask not for whom the bell tolls..." - w_class = 4 + w_class = WEIGHT_CLASS_BULKY armour_penetration = 35 slot_flags = SLOT_BACK sharp = 1 @@ -255,7 +255,7 @@ item_state = "hammeron" desc = "This war hammer cost the chaplain fourty thousand space dollars." slot_flags = SLOT_BELT - w_class = 5 + w_class = WEIGHT_CLASS_HUGE attack_verb = list("smashed", "bashed", "hammered", "crunched") /obj/item/weapon/nullrod/chainsaw @@ -263,7 +263,7 @@ desc = "Good? Bad? You're the guy with the chainsaw hand." icon_state = "chainsaw1" item_state = "mounted_chainsaw" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE flags = NODROP | ABSTRACT sharp = 1 edge = 1 @@ -322,7 +322,7 @@ icon_state = "arm_blade" item_state = "arm_blade" flags = ABSTRACT | NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE sharp = 1 edge = 1 @@ -349,7 +349,7 @@ /obj/item/weapon/nullrod/claymore/bostaff //May as well make it a "claymore" and inherit the blocking name = "monk's staff" desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts, now used to harass the clown." - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 13 block_chance = 40 slot_flags = SLOT_BACK @@ -365,7 +365,7 @@ name = "arrhythmic knife" icon_state = "crysknife" item_state = "crysknife" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE desc = "They say fear is the true mind killer, but stabbing them in the head works too. Honour compels you to not sheathe it once drawn." sharp = 1 edge = 1 @@ -389,7 +389,7 @@ name = "unholy pitchfork" icon_state = "pitchfork0" item_state = "pitchfork0" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL desc = "Holding this makes you look absolutely devilish." attack_verb = list("poked", "impaled", "pierced", "jabbed") hitsound = 'sound/weapons/bladeslice.ogg' @@ -518,7 +518,7 @@ reskin_selectable = FALSE icon_state = "godstaff-red" item_state = "godstaff-red" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE force = 5 slot_flags = SLOT_BACK block_chance = 50 diff --git a/code/game/objects/items/weapons/implants/implant_storage.dm b/code/game/objects/items/weapons/implants/implant_storage.dm index fba9c1377ef..acbed742159 100644 --- a/code/game/objects/items/weapons/implants/implant_storage.dm +++ b/code/game/objects/items/weapons/implants/implant_storage.dm @@ -1,9 +1,9 @@ /obj/item/weapon/storage/hidden/implant name = "bluespace pocket" storage_slots = 2 - max_w_class = 3 - max_combined_w_class = 6 - w_class = 4 + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = WEIGHT_CLASS_GIGANTIC + w_class = WEIGHT_CLASS_BULKY cant_hold = list(/obj/item/weapon/disk/nuclear) silent = 1 @@ -58,4 +58,4 @@ /obj/item/weapon/implanter/storage/New() imp = new /obj/item/weapon/implant/storage(src) - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 41354136648..b35fecf77b1 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -6,7 +6,7 @@ item_state = "implantcase" throw_speed = 2 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=1;biotech=2" materials = list(MAT_GLASS=500) var/obj/item/weapon/implant/imp = null @@ -98,4 +98,4 @@ /obj/item/weapon/implantcase/death_alarm/New() imp = new /obj/item/weapon/implant/death_alarm(src) - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index 8209de8da80..d055c7f1bb4 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -6,7 +6,7 @@ item_state = "syringe_0" throw_speed = 3 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "materials=1;biotech=3;programming=2" materials = list(MAT_METAL=600, MAT_GLASS=200) toolspeed = 1 @@ -86,4 +86,4 @@ /obj/item/weapon/implanter/death_alarm/New() imp = new /obj/item/weapon/implant/death_alarm(src) - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index cd988d6310e..2e427638fd1 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 = 3 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/obj/item/weapon/implantcase/case = null /obj/item/weapon/implantpad/Destroy() diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 069bf06ddfb..c2bb92d4f89 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -18,7 +18,7 @@ */ /obj/item/weapon/kitchen/utensil force = 5.0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0.0 throw_speed = 3 throw_range = 5 @@ -91,7 +91,7 @@ desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come." flags = CONDUCT force = 10 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 10 hitsound = 'sound/weapons/bladeslice.ogg' throw_speed = 3 @@ -122,7 +122,7 @@ desc = "The unearthly energies that once powered this blade are now dormant." icon = 'icons/obj/wizard.dmi' icon_state = "render" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/kitchen/knife/butcher name = "butcher's cleaver" @@ -132,7 +132,7 @@ force = 15 throwforce = 8 attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/kitchen/knife/butcher/meatcleaver name = "Meat Cleaver" @@ -175,7 +175,7 @@ throwforce = 10.0 throw_speed = 3 throw_range = 7 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") /* Trays moved to /obj/item/weapon/storage/bag */ @@ -192,7 +192,7 @@ throwforce = 5 throw_speed = 3 throw_range = 3 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") /obj/item/weapon/kitchen/mould/bear diff --git a/code/game/objects/items/weapons/legcuffs.dm b/code/game/objects/items/weapons/legcuffs.dm index 3bec7f32f9e..4592ff67cc2 100644 --- a/code/game/objects/items/weapons/legcuffs.dm +++ b/code/game/objects/items/weapons/legcuffs.dm @@ -6,7 +6,7 @@ icon_state = "handcuff" flags = CONDUCT throwforce = 0 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "materials=1" slowdown = 7 breakouttime = 300 //Deciseconds = 30s = 0.5 minute @@ -196,7 +196,7 @@ desc = "A specialized hard-light bola designed to ensnare fleeing criminals and aid in arrests." icon_state = "ebola" hitsound = 'sound/weapons/tase.ogg' - w_class = 2 + w_class = WEIGHT_CLASS_SMALL breakouttime = 60 /obj/item/weapon/restraints/legcuffs/bola/energy/throw_impact(atom/hit_atom) @@ -204,4 +204,4 @@ var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(hit_atom)) B.Crossed(hit_atom) qdel(src) - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index 307ec829072..6525351fd67 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -9,7 +9,7 @@ item_state = "lighter-g" var/icon_on = "lighter-g-on" var/icon_off = "lighter-g" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 4 flags = CONDUCT slot_flags = SLOT_BELT @@ -35,7 +35,7 @@ if(user.r_hand == src || user.l_hand == src || isrobot(user)) if(!lit) lit = 1 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY icon_state = icon_on item_state = icon_on if(istype(src, /obj/item/weapon/lighter/zippo) ) @@ -59,7 +59,7 @@ processing_objects.Add(src) else lit = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY icon_state = icon_off item_state = icon_off if(istype(src, /obj/item/weapon/lighter/zippo) ) @@ -147,7 +147,7 @@ icon_state = "match_unlit" var/lit = 0 var/smoketime = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=1" attack_verb = list("burnt", "singed") diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index afc5dbd93ad..e0c4ec435fa 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -2,8 +2,8 @@ var/active = 0 var/force_on = 30 //force when active var/throwforce_on = 20 - w_class = 2 - var/w_class_on = 4 + w_class = WEIGHT_CLASS_SMALL + var/w_class_on = WEIGHT_CLASS_BULKY var/icon_state_on = "axe1" var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") no_embed = 1 // Physically impossible for energy weapons to embed themselves into people, this should fix that. -- Dave @@ -61,8 +61,8 @@ throwforce_on = 30 throw_speed = 3 throw_range = 5 - w_class = 3 - w_class_on = 5 + w_class = WEIGHT_CLASS_NORMAL + w_class_on = WEIGHT_CLASS_HUGE hitsound = "swing_hit" flags = CONDUCT armour_penetration = 100 @@ -129,7 +129,7 @@ icon_state_on = "esaw_1" hitcost = 75 //Costs more than a standard cyborg esword item_color = null - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/melee/energy/sword/cyborg/saw/New() ..() @@ -207,7 +207,7 @@ throwforce = 1//Throwing or dropping the item deletes it. throw_speed = 3 throw_range = 1 - w_class = 4//So you can't hide it in your pocket or some such. + w_class = WEIGHT_CLASS_BULKY //So you can't hide it in your pocket or some such. armour_penetration = 50 attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/datum/effect/system/spark_spread/spark_system @@ -223,4 +223,4 @@ qdel(src) /obj/item/weapon/melee/energy/blade/attack_self(mob/user) - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 7a05ca00cb6..6f0de4720e3 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -10,7 +10,7 @@ slot_flags = SLOT_BELT force = 10 throwforce = 7 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=4" attack_verb = list("flogged", "whipped", "lashed", "disciplined") hitsound = 'sound/weapons/slash.ogg' //pls replace @@ -28,7 +28,7 @@ flags = CONDUCT force = 15 throwforce = 10 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY block_chance = 50 armour_penetration = 75 sharp = 1 @@ -50,7 +50,7 @@ item_state = "icepick" force = 15 throwforce = 10 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("stabbed", "jabbed", "iced,") /obj/item/weapon/melee/candy_sword @@ -60,5 +60,5 @@ item_state = "candy_sword" force = 10 throwforce = 7 - w_class = 3 - attack_verb = list("slashed", "stabbed", "sliced", "caned") \ No newline at end of file + w_class = WEIGHT_CLASS_NORMAL + attack_verb = list("slashed", "stabbed", "sliced", "caned") diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm index ffd021aae4b..cd86a04a377 100644 --- a/code/game/objects/items/weapons/misc.dm +++ b/code/game/objects/items/weapons/misc.dm @@ -30,7 +30,7 @@ flags = CONDUCT force = 5.0 throwforce = 7.0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50) attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed", "Vaudevilled") @@ -43,7 +43,7 @@ icon = 'icons/obj/items.dmi' icon_state = "c_tube" throwforce = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 4 throw_range = 5 @@ -65,7 +65,7 @@ var/data = "" var/base_url = "http://svn.slurm.us/public/spacestation13/misc/game_kit" item_state = "sheet-metal" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE */ /obj/item/weapon/gift @@ -76,7 +76,7 @@ var/size = 3.0 var/obj/item/gift = null item_state = "gift" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY /obj/item/weapon/kidanglobe name = "Kidan homeworld globe" @@ -134,7 +134,7 @@ throwforce = 2 throw_speed = 1 throw_range = 4 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("called", "rang") hitsound = 'sound/weapons/ring.ogg' var/cooldown = 0 diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index 4495f637e56..59db57459b9 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -9,7 +9,7 @@ throwforce = 5.0 throw_speed = 3 throw_range = 7 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("mopped", "bashed", "bludgeoned", "whacked") burn_state = FLAMMABLE var/mopping = 0 diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 67d4f078264..dc5c4d048b5 100644 --- a/code/game/objects/items/weapons/paint.dm +++ b/code/game/objects/items/weapons/paint.dm @@ -7,7 +7,7 @@ icon_state = "paint_neutral" item_state = "paintcan" materials = list(MAT_METAL=200) - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL burn_state = FLAMMABLE burntime = 5 amount_per_transfer_from_this = 5 @@ -63,4 +63,4 @@ /obj/item/weapon/reagent_containers/glass/paint/remover name = "paint remover bucket" - list_reagents = list("paint_remover" = 70) \ No newline at end of file + list_reagents = list("paint_remover" = 70) diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index 307da253e64..116391803bd 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -1,7 +1,7 @@ /obj/item/weapon/pneumatic_cannon name = "pneumatic cannon" desc = "A gas-powered cannon that can fire any object loaded into it." - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 8 //Very heavy attack_verb = list("bludgeoned", "smashed", "beaten") icon = 'icons/obj/pneumaticCannon.dmi' @@ -132,7 +132,7 @@ name = "improvised pneumatic cannon" desc = "A gas-powered, object-firing cannon made out of common parts." force = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL maxWeightClass = 7 gasPerThrow = 5 diff --git a/code/game/objects/items/weapons/powerfist.dm b/code/game/objects/items/weapons/powerfist.dm index 9ee2c46728e..218fe47ed6b 100644 --- a/code/game/objects/items/weapons/powerfist.dm +++ b/code/game/objects/items/weapons/powerfist.dm @@ -8,7 +8,7 @@ force = 12 throwforce = 10 throw_range = 7 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=5;powerstorage=3;syndicate=3" var/click_delay = 1.5 var/fisto_setting = 1 diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 6cfb677bd21..5571640f08f 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -6,7 +6,7 @@ force = 5 sharp = 1 edge = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("slices", "cuts", "stabs", "jabs") toolspeed = 1 diff --git a/code/game/objects/items/weapons/scrolls.dm b/code/game/objects/items/weapons/scrolls.dm index 0b45cd4a42e..254b936ed46 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 = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "paper" throw_speed = 4 throw_range = 20 @@ -96,4 +96,4 @@ user.loc = pick(L) smoke.start() - src.uses -= 1 \ No newline at end of file + src.uses -= 1 diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index 70073b38123..554347224eb 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -7,7 +7,7 @@ sharp = 1 edge = 1 desc = "Could probably be used as ... a throwing weapon?" - w_class = 1 + w_class = WEIGHT_CLASS_TINY force = 5.0 throwforce = 10.0 item_state = "shard-glass" @@ -112,4 +112,4 @@ src.pixel_x = rand(-5, 5) src.pixel_y = rand(-5, 5) else - return \ No newline at end of file + return diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 479cb278e91..d801ec7d460 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -19,7 +19,7 @@ throwforce = 5 throw_speed = 2 throw_range = 3 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY materials = list(MAT_GLASS=7500, MAT_METAL=1000) origin_tech = "materials=2" attack_verb = list("shoved", "bashed") @@ -58,7 +58,7 @@ throwforce = 3 throw_speed = 3 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=4;magnets=3;syndicate=4" attack_verb = list("shoved", "bashed") var/active = 0 @@ -80,14 +80,14 @@ force = 10 throwforce = 8 throw_speed = 2 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY playsound(user, 'sound/weapons/saberon.ogg', 35, 1) to_chat(user, "[src] is now active.") else force = 3 throwforce = 3 throw_speed = 3 - w_class = 1 + w_class = WEIGHT_CLASS_TINY playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) to_chat(user, "[src] can now be concealed.") if(istype(user,/mob/living/carbon/human)) @@ -107,7 +107,7 @@ throwforce = 3 throw_speed = 3 throw_range = 4 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/active = 0 /obj/item/weapon/shield/riot/tele/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance) @@ -124,14 +124,14 @@ force = 8 throwforce = 5 throw_speed = 2 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK to_chat(user, "You extend \the [src].") else force = 3 throwforce = 3 throw_speed = 3 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL slot_flags = null to_chat(user, "[src] can now be concealed.") if(istype(user,/mob/living/carbon/human)) diff --git a/code/game/objects/items/weapons/signs.dm b/code/game/objects/items/weapons/signs.dm index fa68b09135e..006ad92dcf5 100644 --- a/code/game/objects/items/weapons/signs.dm +++ b/code/game/objects/items/weapons/signs.dm @@ -4,7 +4,7 @@ name = "blank picket sign" desc = "It's blank" force = 5 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY attack_verb = list("bashed","smacked") burn_state = FLAMMABLE @@ -42,4 +42,4 @@ reqs = list(/obj/item/stack/rods = 1, /obj/item/stack/sheet/cardboard = 2) time = 80 - category = CAT_MISC \ No newline at end of file + category = CAT_MISC diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index f21c0581888..e4183b5bafd 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -4,7 +4,7 @@ gender = PLURAL icon = 'icons/obj/items.dmi' icon_state = "soap" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0 throw_speed = 4 throw_range = 20 @@ -53,4 +53,4 @@ /obj/item/weapon/soap/syndie desc = "An untrustworthy bar of soap made of strong chemical agents that dissolve blood faster." icon_state = "soapsyndie" - cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes \ No newline at end of file + cleanspeed = 10 //much faster than mop so it is useful for traitors who want to clean crime scenes diff --git a/code/game/objects/items/weapons/staff.dm b/code/game/objects/items/weapons/staff.dm index 19c771873ce..b9d1896f70c 100644 --- a/code/game/objects/items/weapons/staff.dm +++ b/code/game/objects/items/weapons/staff.dm @@ -7,7 +7,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL armour_penetration = 100 attack_verb = list("bludgeoned", "whacked", "disciplined") burn_state = FLAMMABLE @@ -73,4 +73,4 @@ throwforce = 5.0 throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm index 74fc3a5be6c..3615d6848c2 100644 --- a/code/game/objects/items/weapons/stock_parts.dm +++ b/code/game/objects/items/weapons/stock_parts.dm @@ -5,7 +5,7 @@ desc = "Special mechanical module made to store, sort, and apply standard machine parts." icon_state = "RPED" item_state = "RPED" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE can_hold = list(/obj/item/weapon/stock_parts) storage_slots = 50 use_to_pickup = 1 @@ -13,7 +13,7 @@ allow_quick_empty = 1 collection_mode = 1 display_contents_with_number = 1 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 100 var/works_from_distance = 0 var/primary_sound = 'sound/items/rped.ogg' @@ -36,9 +36,9 @@ name = "bluespace rapid part exchange device" desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts." icon_state = "BS_RPED" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL storage_slots = 400 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 800 works_from_distance = 1 primary_sound = 'sound/items/PSHOOM.ogg' @@ -63,11 +63,11 @@ desc = "What?" gender = PLURAL icon = 'icons/obj/stock_parts.dmi' - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/rating = 1 toolspeed = 1 usesound = 'sound/items/Deconstruct.ogg' - + /obj/item/weapon/stock_parts/New() src.pixel_x = rand(-5.0, 5) src.pixel_y = rand(-5.0, 5) diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm index d0dee297cd7..6a5f9b80ae3 100644 --- a/code/game/objects/items/weapons/storage/backpack.dm +++ b/code/game/objects/items/weapons/storage/backpack.dm @@ -10,9 +10,9 @@ item_state = "backpack" lefthand_file = 'icons/mob/inhands/clothing_lefthand.dmi' righthand_file = 'icons/mob/inhands/clothing_righthand.dmi' - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK //ERROOOOO - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 21 storage_slots = 21 burn_state = FLAMMABLE @@ -35,7 +35,7 @@ desc = "A backpack that opens into a localized pocket of Blue Space." origin_tech = "bluespace=4" icon_state = "holdingpack" - max_w_class = 5 + max_w_class = WEIGHT_CLASS_HUGE max_combined_w_class = 35 burn_state = FIRE_PROOF @@ -88,8 +88,8 @@ desc = "Space Santa uses this to deliver toys to all the nice children in space on Christmas! Wow, it's pretty big!" icon_state = "giftbag0" item_state = "giftbag" - w_class = 4 - max_w_class = 3 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 400 // can store a ton of shit! /obj/item/weapon/storage/backpack/cultpack @@ -243,7 +243,7 @@ name = "smuggler's satchel" desc = "A very slim satchel that can easily fit into tight spaces." icon_state = "satchel-flat" - w_class = 3 //Can fit in backpacks itself. + w_class = WEIGHT_CLASS_NORMAL //Can fit in backpacks itself. max_combined_w_class = 15 level = 1 cant_hold = list(/obj/item/weapon/storage/backpack/satchel_flat) //muh recursive backpacks diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index b90d11a543e..0cff8d89ea4 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -33,8 +33,8 @@ icon_state = "trashbag" item_state = "trashbag" - w_class = 1 - max_w_class = 2 + w_class = WEIGHT_CLASS_TINY + max_w_class = WEIGHT_CLASS_SMALL storage_slots = 30 can_hold = list() // any cant_hold = list(/obj/item/weapon/disk/nuclear) @@ -46,16 +46,16 @@ /obj/item/weapon/storage/bag/trash/update_icon() if(contents.len == 0) - w_class = 1 + w_class = WEIGHT_CLASS_TINY icon_state = "[initial(icon_state)]" else if(contents.len < 12) - w_class = 4 + w_class = WEIGHT_CLASS_BULKY icon_state = "[initial(icon_state)]1" else if(contents.len < 21) - w_class = 4 + w_class = WEIGHT_CLASS_BULKY icon_state = "[initial(icon_state)]2" else - w_class = 4 + w_class = WEIGHT_CLASS_BULKY icon_state = "[initial(icon_state)]3" /obj/item/weapon/storage/bag/trash/cyborg @@ -88,8 +88,8 @@ item_state = "plasticbag" slot_flags = SLOT_HEAD|SLOT_BELT throwforce = 0 - w_class = 4 - max_w_class = 2 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_SMALL storage_slots = 7 display_contents_with_number = 0 //or else this will lead to stupid behavior. can_hold = list() // any @@ -132,10 +132,10 @@ icon = 'icons/obj/mining.dmi' icon_state = "satchel" slot_flags = SLOT_BELT | SLOT_POCKET - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL storage_slots = 50 max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL can_hold = list(/obj/item/weapon/ore) /obj/item/weapon/storage/bag/ore/cyborg @@ -164,8 +164,8 @@ icon_state = "plantbag" storage_slots = 100 //the number of plant pieces it can carry. max_combined_w_class = 100 //Doesn't matter what this is, so long as it's more or equal to storage_slots * plants.w_class - max_w_class = 3 - w_class = 1 + max_w_class = WEIGHT_CLASS_NORMAL + w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/weapon/reagent_containers/food/snacks/grown,/obj/item/seeds,/obj/item/weapon/grown,/obj/item/weapon/reagent_containers/food/snacks/ash_flora) burn_state = FLAMMABLE @@ -202,7 +202,7 @@ desc = "A patented Nanotrasen storage system designed for any kind of mineral sheet." var/capacity = 300; //the number of sheets it can carry. - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allow_quick_empty = 1 // this function is superceded New() @@ -343,8 +343,8 @@ desc = "A bag for carrying lots of cash. It's got a big dollar sign printed on the front." storage_slots = 50; //the number of cash pieces it can carry. max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * cash.w_class - max_w_class = 3 - w_class = 1 + max_w_class = WEIGHT_CLASS_NORMAL + w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/weapon/coin,/obj/item/stack/spacecash) // ----------------------------- @@ -359,8 +359,8 @@ display_contents_with_number = 0 //This would look really stupid otherwise storage_slots = 7 max_combined_w_class = 21 - max_w_class = 3 - w_class = 4 //Bigger than a book because physics + max_w_class = WEIGHT_CLASS_NORMAL + w_class = WEIGHT_CLASS_BULKY //Bigger than a book because physics can_hold = list(/obj/item/weapon/book, /obj/item/weapon/storage/bible, /obj/item/weapon/tome, /obj/item/weapon/spellbook) burn_state = FLAMMABLE @@ -376,7 +376,7 @@ throwforce = 10.0 throw_speed = 3 throw_range = 5 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY flags = CONDUCT materials = list(MAT_METAL=3000) @@ -469,7 +469,7 @@ desc = "A bag for storing pills, patches, and bottles." storage_slots = 50 max_combined_w_class = 200 - w_class = 1 + w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/weapon/reagent_containers/food/pill,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle) burn_state = FLAMMABLE /* @@ -483,6 +483,6 @@ desc = "A bag for the safe transportation and disposal of biowaste and other biological materials." storage_slots = 25 max_combined_w_class = 200 - w_class = 1 + w_class = WEIGHT_CLASS_TINY can_hold = list(/obj/item/slime_extract,/obj/item/weapon/reagent_containers/food/snacks/monkeycube,/obj/item/weapon/reagent_containers/syringe,/obj/item/weapon/reagent_containers/glass/beaker,/obj/item/weapon/reagent_containers/glass/bottle,/obj/item/weapon/reagent_containers/blood,/obj/item/weapon/reagent_containers/hypospray/autoinjector) burn_state = FLAMMABLE diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 609edd2961f..dd1af4c6ea4 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -176,7 +176,7 @@ icon_state = "securitybelt" item_state = "security"//Could likely use a better one. storage_slots = 5 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL use_item_overlays = 1 can_hold = list( /obj/item/weapon/grenade/flashbang, @@ -249,7 +249,7 @@ icon_state = "militarybelt" item_state = "military" max_w_class = WEIGHT_CLASS_SMALL - + /obj/item/weapon/storage/belt/military/abductor name = "agent belt" desc = "A belt used by abductor agents." @@ -280,7 +280,7 @@ icon_state = "janibelt" item_state = "janibelt" storage_slots = 6 - max_w_class = 4 // Set to this so the light replacer can fit. + max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit. use_item_overlays = 1 can_hold = list( /obj/item/weapon/grenade/chem_grenade/cleaner, @@ -306,8 +306,8 @@ desc = "For the mining master, holds your lazarus capsules." icon_state = "lazarusbelt" item_state = "lazbelt" - w_class = 4 - max_w_class = 1 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_TINY max_combined_w_class = 6 storage_slots = 6 can_hold = list(/obj/item/device/mobcapsule) @@ -379,7 +379,7 @@ icon_state = "holster" item_state = "holster" storage_slots = 1 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL can_hold = list( /obj/item/weapon/gun/projectile/automatic/pistol, /obj/item/weapon/gun/projectile/revolver/detective @@ -417,7 +417,7 @@ icon_state = "fannypack_leather" item_state = "fannypack_leather" storage_slots = 3 - max_w_class = 2 + max_w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/storage/belt/fannypack/black name = "black fannypack" @@ -475,8 +475,8 @@ icon_state = "sheath" item_state = "sheath" storage_slots = 1 - w_class = 4 - max_w_class = 4 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_BULKY can_hold = list(/obj/item/weapon/melee/rapier) /obj/item/weapon/storage/belt/rapier/update_icon() @@ -506,8 +506,8 @@ icon_state = "holdingbelt" item_state = "holdingbelt" storage_slots = 14 - w_class = 4 - max_w_class = 2 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_SMALL max_combined_w_class = 21 // = 14 * 1.5, not 14 * 2. This is deliberate origin_tech = "bluespace=4" can_hold = list() @@ -530,7 +530,7 @@ icon_state = "securitybelt" item_state = "security" storage_slots = 6 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 18 origin_tech = "bluespace=4;syndicate=2" allow_quick_empty = 1 diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index f005f2f8b8e..17bf8fcac8e 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 + w_class = WEIGHT_CLASS_NORMAL burn_state = FLAMMABLE var/mob/affecting = null var/deity_name = "Christ" diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 8a487289e35..594028e4f1f 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -634,8 +634,8 @@ icon_state = "matchbox" item_state = "zippo" storage_slots = 10 - w_class = 1 - max_w_class = 1 + w_class = WEIGHT_CLASS_TINY + max_w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT can_hold = list(/obj/item/weapon/match) @@ -810,4 +810,4 @@ #undef NANOTRASEN #undef SYNDI #undef HEART -#undef SMILE \ No newline at end of file +#undef SMILE diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 7f2a91054c1..89122d1a337 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -8,12 +8,12 @@ force = 8.0 throw_speed = 2 throw_range = 4 - w_class = 4 - max_w_class = 3 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") burn_state = FLAMMABLE burntime = 20 /obj/item/weapon/storage/briefcase/New() - ..() \ 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 a3f2a21a5fa..d8de4ee7c53 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -115,7 +115,7 @@ desc = "A box of crayons for all your rune drawing needs." icon = 'icons/obj/crayons.dmi' icon_state = "crayonbox" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL storage_slots = 6 icon_type = "crayon" can_hold = list( @@ -158,7 +158,7 @@ icon = 'icons/obj/cigarettes.dmi' icon_state = "cigpacket" item_state = "cigpacket" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 2 slot_flags = SLOT_BELT storage_slots = 6 @@ -318,7 +318,7 @@ /obj/item/weapon/storage/fancy/rollingpapers name = "rolling paper pack" desc = "A pack of NanoTrasen brand rolling papers." - w_class = 1 + w_class = WEIGHT_CLASS_TINY icon = 'icons/obj/cigarettes.dmi' icon_state = "cig_paper_pack" storage_slots = 10 @@ -360,7 +360,7 @@ icon = 'icons/obj/vialbox.dmi' icon_state = "vialbox0" item_state = "syringe_kit" - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL can_hold = list(/obj/item/weapon/reagent_containers/glass/beaker/vial) max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item. storage_slots = 6 diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index 5ab8713a49a..8794c09014b 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -155,7 +155,7 @@ name = "first-aid kit" icon_state = "bezerk" desc = "I hope you've got insurance." - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL treatment_oxy = "perfluorodecalin" treatment_brute = "styptic_powder" treatment_fire = "silver_sulfadiazine" @@ -181,7 +181,7 @@ name = "field surgery kit" icon_state = "duffel-med" desc = "A kit for surgery in the field." - max_w_class = 4 + max_w_class = WEIGHT_CLASS_BULKY max_combined_w_class = 21 storage_slots = 10 can_hold = list(/obj/item/roller,/obj/item/weapon/bonesetter,/obj/item/weapon/bonegel, /obj/item/weapon/scalpel, /obj/item/weapon/hemostat, @@ -209,7 +209,7 @@ icon_state = "pill_canister" icon = 'icons/obj/chemical.dmi' item_state = "contsolid" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL can_hold = list(/obj/item/weapon/reagent_containers/food/pill, /obj/item/weapon/dice, /obj/item/weapon/paper) allow_quick_gather = 1 use_to_pickup = 1 diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index b622e469124..2f4a3b2e5ac 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -5,8 +5,8 @@ desc = "A locked box." icon_state = "lockbox+l" item_state = "syringe_kit" - w_class = 4 - max_w_class = 3 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item. storage_slots = 4 req_access = list(access_armory) @@ -76,7 +76,7 @@ /obj/item/weapon/storage/lockbox/large name = "Large lockbox" desc = "A large lockbox" - max_w_class = 4 + max_w_class = WEIGHT_CLASS_BULKY max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item. storage_slots = 1 @@ -105,8 +105,8 @@ desc = "A locked box used to store medals of honor." icon_state = "medalbox+l" item_state = "syringe_kit" - w_class = 3 - max_w_class = 2 + w_class = WEIGHT_CLASS_NORMAL + max_w_class = WEIGHT_CLASS_SMALL max_combined_w_class = 20 storage_slots = 12 req_access = list(access_captain) diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index e06cbb91255..7619fd953d7 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -23,8 +23,8 @@ var/l_hacking = 0 var/emagged = 0 var/open = 0 - w_class = 3 - max_w_class = 2 + w_class = WEIGHT_CLASS_NORMAL + max_w_class = WEIGHT_CLASS_SMALL max_combined_w_class = 14 /obj/item/weapon/storage/secure/examine(mob/user) @@ -180,8 +180,8 @@ force = 8 throw_speed = 2 throw_range = 4 - w_class = 4 - max_w_class = 3 + w_class = WEIGHT_CLASS_BULKY + max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 21 attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked") @@ -228,7 +228,7 @@ icon_locking = "safeb" icon_sparking = "safespark" force = 8 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE max_w_class = 8 anchored = 1 density = 0 diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index e5fb0646169..21ea7c33993 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -8,11 +8,11 @@ /obj/item/weapon/storage name = "storage" icon = 'icons/obj/storage.dmi' - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/silent = 0 // No message on putting items in 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/max_w_class = 2 //Max size of objects that this object can store (in effect only if can_hold isn't set) + var/max_w_class = WEIGHT_CLASS_SMALL //Max size of objects that this object can store (in effect only if can_hold isn't set) var/max_combined_w_class = 14 //The sum of the w_classes of all the items in this storage item. var/storage_slots = 7 //The number of storage slots in this container. var/obj/screen/storage/boxes = null @@ -254,7 +254,7 @@ if(W.w_class > max_w_class) if(!stop_messages) - to_chat(usr, "[W] is too big for this [src].") + to_chat(usr, "[W] is too big for [src].") return 0 var/sum_w_class = W.w_class @@ -304,7 +304,7 @@ to_chat(usr, "You put the [W] into [src].") else if(M in range(1)) //If someone is standing close enough, they can tell what it is... M.show_message("[usr] puts [W] into [src].") - else if(W && W.w_class >= 3.0) //Otherwise they can only see large or normal items from a distance... + else if(W && W.w_class >= WEIGHT_CLASS_NORMAL) //Otherwise they can only see large or normal items from a distance... M.show_message("[usr] puts [W] into [src].") src.orient2hud(usr) diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index a6ecd3d45ac..3c7bcee7ab4 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -9,7 +9,7 @@ throwforce = 10.0 throw_speed = 2 throw_range = 7 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY materials = list(MAT_METAL = 500) origin_tech = "combat=1" attack_verb = list("robusted") @@ -85,7 +85,7 @@ new /obj/item/weapon/wirecutters(src, "red") new /obj/item/device/multitool(src) new /obj/item/clothing/gloves/combat(src) - + /obj/item/weapon/storage/toolbox/drone name = "mechanical toolbox" icon_state = "blue" @@ -119,4 +119,4 @@ new /obj/item/weapon/wirecutters/brass(src) new /obj/item/weapon/wrench/brass(src) new /obj/item/weapon/crowbar/brass(src) - new /obj/item/weapon/weldingtool/experimental/brass(src) \ No newline at end of file + new /obj/item/weapon/weldingtool/experimental/brass(src) diff --git a/code/game/objects/items/weapons/storage/uplink_kits.dm b/code/game/objects/items/weapons/storage/uplink_kits.dm index 03fc0a7b742..d721cb46271 100644 --- a/code/game/objects/items/weapons/storage/uplink_kits.dm +++ b/code/game/objects/items/weapons/storage/uplink_kits.dm @@ -69,7 +69,7 @@ new /obj/item/clothing/suit/hooded/chaplain_hoodie(src) new /obj/item/weapon/card/id/syndicate(src) return - + if("gadgets") new /obj/item/clothing/gloves/color/yellow/power(src) new /obj/item/weapon/pen/sleepy(src) @@ -88,7 +88,7 @@ /obj/item/weapon/storage/box/syndie_kit/space name = "Boxed Space Suit and Helmet" can_hold = list(/obj/item/clothing/suit/space/syndicate/black/red, /obj/item/clothing/head/helmet/space/syndicate/black/red) - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/storage/box/syndie_kit/space/New() ..() @@ -99,7 +99,7 @@ /obj/item/weapon/storage/box/syndie_kit/hardsuit name = "Boxed Blood Red Suit and Helmet" can_hold = list(/obj/item/clothing/suit/space/hardsuit/syndi, /obj/item/clothing/head/helmet/space/hardsuit/syndi) - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/storage/box/syndie_kit/hardsuit/New() ..() @@ -110,7 +110,7 @@ /obj/item/weapon/storage/box/syndie_kit/elite_hardsuit name = "Boxed Elite Syndicate Hardsuit and Helmet" can_hold = list(/obj/item/clothing/suit/space/hardsuit/syndi/elite, /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite) - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/storage/box/syndie_kit/elite_hardsuit/New() ..() @@ -120,7 +120,7 @@ /obj/item/weapon/storage/box/syndie_kit/shielded_hardsuit name = "Boxed Shielded Syndicate Hardsuit and Helmet" can_hold = list(/obj/item/clothing/suit/space/hardsuit/shielded/syndi, /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi) - max_w_class = 4 + max_w_class = WEIGHT_CLASS_BULKY /obj/item/weapon/storage/box/syndie_kit/shielded_hardsuit/New() ..() diff --git a/code/game/objects/items/weapons/storage/wallets.dm b/code/game/objects/items/weapons/storage/wallets.dm index 0d9712ed43f..667b2ca7605 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/wallets.dmi' icon_state = "wallet" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL burn_state = FLAMMABLE can_hold = list( /obj/item/stack/spacecash, diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 1de82690573..ca91b988442 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -7,7 +7,7 @@ slot_flags = SLOT_BELT force = 10 throwforce = 7 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=2" attack_verb = list("beaten") var/stunforce = 7 @@ -190,7 +190,7 @@ icon_state = "stunprod_nocell" base_icon = "stunprod" item_state = "prod" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 3 throwforce = 5 stunforce = 5 diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 786b980d38f..e55b2451347 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -25,7 +25,7 @@ item_state = "classic_baton" slot_flags = SLOT_BELT force = 12 //9 hit crit - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/cooldown = 0 var/on = 1 @@ -90,7 +90,7 @@ icon_state = "telebaton_0" item_state = null slot_flags = SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL needs_permit = 0 force = 0 on = 0 @@ -101,7 +101,7 @@ to_chat(user, "You extend the baton.") icon_state = "telebaton_1" item_state = "nullrod" - w_class = 4 //doesnt fit in backpack when its on for balance + w_class = WEIGHT_CLASS_BULKY //doesnt fit in backpack when its on for balance force = 10 //stunbaton damage attack_verb = list("smacked", "struck", "cracked", "beaten") else @@ -109,7 +109,7 @@ icon_state = "telebaton_0" item_state = null //no sprite for concealment even when in hand slot_flags = SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 0 //not so robust now attack_verb = list("hit", "poked") if(istype(user,/mob/living/carbon/human)) diff --git a/code/game/objects/items/weapons/syndie_uplink.dm b/code/game/objects/items/weapons/syndie_uplink.dm index 3dd9a230ad1..0515dd41dd3 100644 --- a/code/game/objects/items/weapons/syndie_uplink.dm +++ b/code/game/objects/items/weapons/syndie_uplink.dm @@ -10,7 +10,7 @@ var/mob/currentUser = null var/obj/item/device/radio/origradio = null flags = CONDUCT | ONBELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "radio" throw_speed = 4 throw_range = 20 @@ -31,8 +31,8 @@ slot_flags = SLOT_BELT item_state = "radio" throwforce = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 4 throw_range = 20 materials = list(MAT_METAL=100) - origin_tech = "magnets=1" \ No newline at end of file + origin_tech = "magnets=1" diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index 1bd8d8b761c..eef5475bdcd 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -4,7 +4,7 @@ name = "Jetpack (Empty)" desc = "A tank of compressed gas for use as propulsion in zero-gravity areas. Use with caution." icon_state = "jetpack" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY item_state = "jetpack" distribute_pressure = ONE_ATMOSPHERE*O2STANDARD var/datum/effect/system/ion_trail_follow/ion_trail @@ -116,7 +116,7 @@ item_state = "jetpack-mini" volume = 40 throw_range = 8 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/tank/jetpack/oxygenblack name = "Jetpack (Oxygen)" @@ -174,4 +174,4 @@ var/turf/T = get_turf(user) T.assume_air(removed) - return 1 \ No newline at end of file + return 1 diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 428c4885814..4778a53c28b 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -126,7 +126,7 @@ icon_state = "emergency" flags = CONDUCT slot_flags = SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 4.0 distribute_pressure = ONE_ATMOSPHERE*O2STANDARD volume = 3 //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 bd62357ba76..3b99936b0a8 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -7,7 +7,7 @@ flags = CONDUCT slot_flags = SLOT_BACK hitsound = 'sound/weapons/smash.ogg' - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL pressure_resistance = ONE_ATMOSPHERE*5 diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index e8cf034a5b5..5229a59fe5f 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/watertank.dmi' icon_state = "waterbackpack" item_state = "waterbackpack" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK slowdown = 1 actions_types = list(/datum/action/item_action/toggle_mister) @@ -112,7 +112,7 @@ icon = 'icons/obj/watertank.dmi' icon_state = "mister" item_state = "mister" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY amount_per_transfer_from_this = 50 possible_transfer_amounts = list(25,50,100) volume = 500 @@ -220,7 +220,7 @@ power = 8 precision = 1 cooling_power = 5 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE flags = NODROP //Necessary to ensure that the nozzle and tank never seperate var/obj/item/weapon/watertank/tank var/nozzle_mode = 0 diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm index 067bacaef4b..05486c9d85f 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 = WEIGHT_CLASS_TINY amount = 10 max_amount = 10 @@ -76,7 +76,7 @@ desc = "A piece of sticky tape." icon = 'icons/obj/bureaucracy.dmi' icon_state = "tape" - w_class = 1 + w_class = WEIGHT_CLASS_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 87309c5927c..dafda733396 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -17,7 +17,7 @@ var/broadcasting = null var/listening = 1.0 flags = CONDUCT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "electronic" throw_speed = 4 throw_range = 20 @@ -98,7 +98,7 @@ Frequency: icon_state = "hand_tele" item_state = "electronic" throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 5 materials = list(MAT_METAL=10000) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index ce2b5965c6c..a79ddf37341 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -109,7 +109,7 @@ ///////////OFFHAND/////////////// /obj/item/weapon/twohanded/offhand - w_class = 5 + w_class = WEIGHT_CLASS_HUGE icon_state = "offhand" name = "offhand" flags = ABSTRACT @@ -123,7 +123,7 @@ ///////////Two hand required objects/////////////// //This is for objects that require two hands to even pick up /obj/item/weapon/twohanded/required/ - w_class = 5 + w_class = WEIGHT_CLASS_HUGE /obj/item/weapon/twohanded/required/attack_self() return @@ -163,7 +163,7 @@ throwforce = 15 sharp = 1 edge = 1 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK force_unwielded = 5 force_wielded = 24 @@ -199,7 +199,7 @@ throwforce = 5.0 throw_speed = 1 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force_unwielded = 3 force_wielded = 34 wieldsound = 'sound/weapons/saberon.ogg' @@ -286,7 +286,7 @@ name = "spear" desc = "A haphazardly-constructed yet still deadly weapon of ancient design." force = 10 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK force_unwielded = 10 force_wielded = 18 @@ -433,7 +433,7 @@ flags = CONDUCT force = 13 var/force_on = 21 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE throwforce = 13 throw_speed = 2 throw_range = 4 @@ -490,7 +490,7 @@ throwforce = 15 throw_speed = 1 throw_range = 5 - w_class = 4 // can't fit in backpacks + w_class = WEIGHT_CLASS_BULKY // can't fit in backpacks force_unwielded = 15 //still pretty robust force_wielded = 40 //you'll gouge their eye out! Or a limb...maybe even their entire body! wieldsound = 'sound/weapons/chainsawstart.ogg' @@ -545,7 +545,7 @@ force_wielded = 20 throwforce = 15 throw_range = 1 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE var/charged = 5 origin_tech = "combat=5;bluespace=4" @@ -610,7 +610,7 @@ force_wielded = 25 throwforce = 30 throw_range = 7 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE //var/charged = 5 origin_tech = "combat=5;powerstorage=5" @@ -658,7 +658,7 @@ force_wielded = 30 throwforce = 15 throw_range = 1 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE var/charged = 5 origin_tech = "combat=5;bluespace=4" @@ -719,7 +719,7 @@ throwforce = 15 sharp = 1 edge = 1 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE armour_penetration = 20 slot_flags = SLOT_BACK force_unwielded = 5 diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm index 3fb54c16609..34c4cd6c6d0 100644 --- a/code/game/objects/items/weapons/vending_items.dm +++ b/code/game/objects/items/weapons/vending_items.dm @@ -10,7 +10,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 7 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY var/charges = 0 //how many restocking "charges" the refill has @@ -86,4 +86,3 @@ /obj/item/weapon/vending_refill/chinese machine_name = "MrChangs" charges = 8// of 24 - diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index d5b679fde56..95317b7f0a6 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -5,7 +5,7 @@ icon_state = "toyhammer" slot_flags = SLOT_BELT throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 7 throw_range = 15 attack_verb = list("banned") @@ -23,7 +23,7 @@ slot_flags = SLOT_BELT force = 2 throwforce = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") @@ -44,7 +44,7 @@ throwforce = 10 sharp = 1 edge = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 @@ -68,7 +68,7 @@ throwforce = 10 sharp = 1 edge = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") block_chance = 50 @@ -89,7 +89,7 @@ item_state = "harpoon" force = 20 throwforce = 15 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL attack_verb = list("jabbed","stabbed","ripped") obj/item/weapon/wirerod @@ -100,7 +100,7 @@ obj/item/weapon/wirerod flags = CONDUCT force = 9 throwforce = 10 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=1150, MAT_GLASS=75) attack_verb = list("hit", "bludgeoned", "whacked", "bonked") diff --git a/code/game/objects/items/weapons/whetstone.dm b/code/game/objects/items/weapons/whetstone.dm index d498d4c75e8..b268540f92a 100644 --- a/code/game/objects/items/weapons/whetstone.dm +++ b/code/game/objects/items/weapons/whetstone.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/kitchen.dmi' icon_state = "whetstone" desc = "A block of stone used to sharpen things." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL usesound = 'sound/items/Screwdriver.ogg' var/used = 0 var/increment = 4 @@ -63,4 +63,4 @@ increment = 200 max = 200 prefix = "super-sharpened" - requires_sharpness = 0 \ No newline at end of file + requires_sharpness = 0 diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 24fdc2e43ce..844c1828200 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -316,4 +316,7 @@ a { for(var/obj/item/Item in contents) //Empty out the contents Item.forceMove(new_loc) if(burn) - Item.fire_act() //Set them on fire, too \ No newline at end of file + Item.fire_act() //Set them on fire, too + +/obj/proc/on_mob_move(dir, mob/user) + return \ No newline at end of file diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 10f09401ba5..3190a69177d 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 = 1 + w_class = WEIGHT_CLASS_TINY item_color = "white" burn_state = FLAMMABLE slot_flags = SLOT_BACK @@ -204,7 +204,7 @@ LINEN BINS sheets.Add(I) amount++ to_chat(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 < WEIGHT_CLASS_BULKY) //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 @@ -255,4 +255,4 @@ LINEN BINS if(hidden) hidden.loc = loc - hidden = null \ No newline at end of file + hidden = null diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7180e59b800..6db9a26fd8d 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -56,7 +56,7 @@ if(throwing) // you keep some momentum when getting out of a thrown closet step(AM, dir) if(throwing) - throwing = 0 + throwing.finalize(FALSE) /obj/structure/closet/proc/open() if(opened) @@ -327,7 +327,7 @@ /obj/structure/closet/attack_hand(mob/user) add_fingerprint(user) toggle(user) - + /obj/structure/closet/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) toggle(user) diff --git a/code/game/objects/structures/flora.dm b/code/game/objects/structures/flora.dm index ed690192098..c93a481189d 100644 --- a/code/game/objects/structures/flora.dm +++ b/code/game/objects/structures/flora.dm @@ -43,7 +43,7 @@ /obj/structure/flora/tree/palm/New() ..() icon_state = pick("palm1","palm2") - pixel_x = 0 + pixel_x = 0 //grass /obj/structure/flora/grass @@ -209,7 +209,7 @@ icon_state = "plant-1" anchored = 0 layer = 5 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE force = 10 throwforce = 13 throw_speed = 2 @@ -333,4 +333,4 @@ else qdel(src) else - return ..() \ No newline at end of file + return ..() diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index df1309b3d03..c1b4984c158 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -297,8 +297,8 @@ tforce = 5 else if(isobj(AM)) if(prob(50)) - var/obj/item/I = AM - tforce = max(0, I.throwforce * 0.5) + var/obj/O = AM + tforce = max(0, O.throwforce * 0.5) else if(anchored && !broken) var/turf/T = get_turf(src) var/obj/structure/cable/C = T.get_cable_node() diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 265d1d1c236..14f1357af87 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 = WEIGHT_CLASS_NORMAL /obj/item/inflatable/attack_self(mob/user) playsound(loc, 'sound/items/zip.ogg', 75, 1) @@ -279,7 +279,7 @@ icon_state = "inf_box" item_state = "syringe_kit" max_combined_w_class = 21 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/storage/briefcase/inflatable/New() ..() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index e5c0a7f9179..596673ba0c7 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -190,7 +190,7 @@ layer = 2.0 var/obj/structure/morgue/connected = null anchored = 1.0 - throwpass = 1 + pass_flags = LETPASSTHROW /obj/structure/m_tray/attack_hand(mob/user as mob) @@ -432,7 +432,7 @@ layer = 2.0 var/obj/structure/crematorium/connected = null anchored = 1.0 - throwpass = 1 + pass_flags = LETPASSTHROW /obj/structure/c_tray/attack_hand(mob/user as mob) if(connected) diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index bfb5d584965..3f4eea3dbf4 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -40,7 +40,7 @@ name = "sign" desc = "" icon = 'icons/obj/decals.dmi' - w_class = 3 //big + w_class = WEIGHT_CLASS_NORMAL burn_state = FLAMMABLE var/sign_state = "" @@ -225,4 +225,3 @@ name = "\improper Escape Arm" desc = "A direction sign, pointing out which way escape shuttle dock is." icon_state = "direction_evac" - 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 1835a1bb31a..56c6861e4fc 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -93,7 +93,7 @@ desc = "A collapsed roller bed that can be carried around." icon = 'icons/obj/rollerbed.dmi' icon_state = "folded" - w_class = 4 // Can't be put in backpacks. + w_class = WEIGHT_CLASS_BULKY // Can't be put in backpacks. /obj/item/roller/attack_self(mob/user) var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc) @@ -140,4 +140,4 @@ var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc) R.add_fingerprint(user) qdel(held) - held = null \ No newline at end of file + held = null 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 6de3c88981d..6000b361aa5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm @@ -54,7 +54,7 @@ icon_state = "stool" force = 10 throwforce = 10 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE var/obj/structure/stool/origin = null /obj/item/weapon/stool/attack_self(mob/user as mob) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 76dc6a507a3..55181579699 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -18,7 +18,7 @@ density = 1 anchored = 1.0 layer = 2.8 - throwpass = 1 //You can throw objects over this, despite it's density.") + pass_flags = LETPASSTHROW climbable = 1 var/parts = /obj/item/weapon/table_parts @@ -127,7 +127,8 @@ return /obj/structure/table/CanPass(atom/movable/mover, turf/target, height=0) - if(height==0) return 1 + if(height == 0) + return 1 if(istype(mover,/obj/item/projectile)) return (check_cover(mover,target)) if(ismob(mover)) @@ -136,6 +137,8 @@ return 1 if(istype(mover) && mover.checkpass(PASSTABLE)) return 1 + if(mover.throwing) + return 1 if(locate(/obj/structure/table) in get_turf(mover)) return 1 if(flipped) @@ -526,7 +529,7 @@ icon_state = "rack" density = 1 anchored = 1.0 - throwpass = 1 //You can throw objects over this, despite it's density. + pass_flags = LETPASSTHROW var/parts = /obj/item/weapon/rack_parts var/health = 5 @@ -563,6 +566,8 @@ return 1 if(istype(mover) && mover.checkpass(PASSTABLE)) return 1 + if(mover.throwing) + return 1 else return 0 diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 767d934c7dd..a43406eb3c7 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -106,10 +106,10 @@ to_chat(user, "You need a tighter grip!") if(cistern) - if(I.w_class > 3) + if(I.w_class > WEIGHT_CLASS_NORMAL) to_chat(user, "[I] does not fit!") return - if(w_items + I.w_class > 5) + if(w_items + I.w_class > WEIGHT_CLASS_HUGE) to_chat(user, "The cistern is full!") return if(!user.drop_item()) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index c74e2b47861..9da30e5fe82 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -108,22 +108,24 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return 1 -/obj/structure/window/hitby(atom/movable/AM) - if(!CanPass(AM, get_step(src, AM.dir))) //So thrown objects that cross a tile with non-full windows will no longer hit the window even if it isn't visually obstructing the path. - ..() - var/tforce = 0 - if(isobj(AM)) - var/obj/item/I = AM - tforce = I.throwforce - if(reinf) tforce *= 0.25 - playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) - health = max(0, health - tforce) - if(health <= 7 && !reinf) - anchored = 0 - update_nearby_icons() - step(src, get_dir(AM, src)) - if(health <= 0) - destroy() +/obj/structure/window/hitby(atom/movable/AM) + ..() + var/tforce = 0 + if(ismob(AM)) + tforce = 10 + else if(isobj(AM)) + var/obj/O = AM + tforce = O.throwforce + if(reinf) + tforce *= 0.25 + playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1) + health = max(0, health - tforce) + if(health <= 7 && !reinf) + anchored = 0 + update_nearby_icons() + step(src, get_dir(AM, src)) + if(health <= 0) + destroy() /obj/structure/window/attack_hand(mob/user as mob) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index b62efa1c049..f35fa65b3c7 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -2,8 +2,3 @@ name = "weapon" icon = 'icons/obj/weapons.dmi' hitsound = "swing_hit" - -/obj/item/weapon/Bump(mob/M as mob) - spawn(0) - ..() - return \ No newline at end of file diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 04f8b29da0c..8d201d6ee8a 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -35,6 +35,9 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + log_admin("[key_name(owner)] tried making Traitors with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Traitors with One-Click-Antag") + for(var/mob/living/carbon/human/applicant in player_list) if(ROLE_TRAITOR in applicant.client.prefs.be_special) if(player_old_enough_antag(applicant.client,ROLE_TRAITOR)) @@ -69,6 +72,9 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + log_admin("[key_name(owner)] tried making Changelings with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Changelings with One-Click-Antag") + for(var/mob/living/carbon/human/applicant in player_list) if(ROLE_CHANGELING in applicant.client.prefs.be_special) if(player_old_enough_antag(applicant.client,ROLE_CHANGELING)) @@ -101,6 +107,9 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + log_admin("[key_name(owner)] tried making Revolutionaries with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Revolutionaries with One-Click-Antag") + for(var/mob/living/carbon/human/applicant in player_list) if(ROLE_REV in applicant.client.prefs.be_special) if(player_old_enough_antag(applicant.client,ROLE_REV)) @@ -127,6 +136,9 @@ client/proc/one_click_antag() var/list/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard") + log_admin("[key_name(owner)] tried making a Wizard with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making a Wizard with One-Click-Antag") + if(candidates.len) var/mob/dead/observer/selected = pick(candidates) candidates -= selected @@ -146,6 +158,9 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + log_admin("[key_name(owner)] tried making a Cult with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making a Cult with One-Click-Antag") + for(var/mob/living/carbon/human/applicant in player_list) if(ROLE_CULTIST in applicant.client.prefs.be_special) if(player_old_enough_antag(applicant.client,ROLE_CULTIST)) @@ -177,6 +192,9 @@ client/proc/one_click_antag() var/mob/theghost = null var/time_passed = world.time + log_admin("[key_name(owner)] tried making a Nuke Op Team with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making a Nuke Op Team with One-Click-Antag") + for(var/mob/G in respawnable_list) if(istype(G) && G.client && (ROLE_OPERATIVE in G.client.prefs.be_special)) if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate")) @@ -265,10 +283,18 @@ client/proc/one_click_antag() //Abductors /datum/admins/proc/makeAbductorTeam() new /datum/event/abductor + + log_admin("[key_name(owner)] tried making Abductors with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Abductors with One-Click-Antag") + return 1 /datum/admins/proc/makeAliens() var/datum/event/alien_infestation/E = new /datum/event/alien_infestation + + log_admin("[key_name(owner)] tried making Aliens with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Aliens with One-Click-Antag") + E.spawncount = 3 // TODO The fact we have to do this rather than just have events start // when we ask them to, is bad. @@ -289,6 +315,9 @@ client/proc/one_click_antag() if(prob(10)) input = "Save Runtime and any other cute things on the station." + log_admin("[key_name(owner)] tried making a Death Squad with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making a Death Squad with One-Click-Antag") + var/syndicate_leader_selected = 0 //when the leader is chosen. The last person spawned. //Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos. @@ -400,6 +429,9 @@ client/proc/one_click_antag() var/leader_chosen = 0 //when the leader is chosen. The last person spawned. + log_admin("[key_name(owner)] tried making Vox Raiders with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Vox Raiders with One-Click-Antag") + //Generates a list of candidates from active ghosts. for(var/mob/G in respawnable_list) if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special)) @@ -502,6 +534,9 @@ client/proc/one_click_antag() var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null + log_admin("[key_name(owner)] tried making Vampires with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Vampires with One-Click-Antag") + for(var/mob/living/carbon/human/applicant in player_list) if(ROLE_VAMPIRE in applicant.client.prefs.be_special) if(player_old_enough_antag(applicant.client,ROLE_VAMPIRE)) @@ -533,6 +568,9 @@ client/proc/one_click_antag() var/mob/theghost = null var/time_passed = world.time + log_admin("[key_name(owner)] tried making Thunderdome Teams with One-Click-Antag") + message_admins("[key_name_admin(owner)] tried making Thunderdone Teams with One-Click-Antag") + //Generates a list of candidates from active ghosts. for(var/mob/G in respawnable_list) spawn(0) diff --git a/code/modules/admin/verbs/ticklag.dm b/code/modules/admin/verbs/ticklag.dm index f49984b8fb3..316adf935b0 100644 --- a/code/modules/admin/verbs/ticklag.dm +++ b/code/modules/admin/verbs/ticklag.dm @@ -15,9 +15,6 @@ world.tick_lag = newtick feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - switch(alert("Enable Tick Compensation?","Tick Comp is currently: [config.Tickcomp]","Yes","No")) - if("Yes") config.Tickcomp = 1 - else config.Tickcomp = 0 else to_chat(src, "Error: ticklag(): Invalid world.ticklag value. No changes made.") diff --git a/code/modules/arcade/arcade_prize.dm b/code/modules/arcade/arcade_prize.dm index d3457696268..6af1ca30f36 100644 --- a/code/modules/arcade/arcade_prize.dm +++ b/code/modules/arcade/arcade_prize.dm @@ -67,7 +67,7 @@ throwforce = 0 throw_speed = 1 throw_range = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY max_amount = 9999 //Dang that's a lot of tickets /obj/item/stack/tickets/New(var/loc, var/amount=null) @@ -86,4 +86,4 @@ else if(amount >= 4) icon_state = "tickets_2" else - icon_state = "tickets_1" \ No newline at end of file + icon_state = "tickets_1" diff --git a/code/modules/arcade/mob_hunt/mob_avatar.dm b/code/modules/arcade/mob_hunt/mob_avatar.dm index 8717d5eb2a5..4603622da2a 100644 --- a/code/modules/arcade/mob_hunt/mob_avatar.dm +++ b/code/modules/arcade/mob_hunt/mob_avatar.dm @@ -42,9 +42,9 @@ attempt_capture(P, -20) //attempting a melee capture reduces the mob's effective run_chance by 20% to balance the risk of triggering a trap mob return 1 -/obj/effect/nanomob/hitby(obj/item/O) - if(istype(O, /obj/item/device/pda)) - var/obj/item/device/pda/P = O +/obj/effect/nanomob/hitby(atom/movable/AM) + if(istype(AM, /obj/item/device/pda)) + var/obj/item/device/pda/P = AM attempt_capture(P) //attempting a ranged capture does not affect the mob's effective run_chance but does prevent you from being shocked by a trap mob return 1 diff --git a/code/modules/arcade/mob_hunt/mob_cards.dm b/code/modules/arcade/mob_hunt/mob_cards.dm index 0479644ad85..26393e8e370 100644 --- a/code/modules/arcade/mob_hunt/mob_cards.dm +++ b/code/modules/arcade/mob_hunt/mob_cards.dm @@ -7,7 +7,7 @@ icon_state = "trade_card" force = 0 throwforce = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/datum/mob_hunt/mob_data /obj/item/weapon/nanomob_card/proc/update_info() @@ -40,4 +40,4 @@ /obj/item/weapon/storage/box/nanomob_booster_pack/New() ..() for(var/i in 1 to 6) - new /obj/item/weapon/nanomob_card/booster(src) \ No newline at end of file + new /obj/item/weapon/nanomob_card/booster(src) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index bd981e99076..8092d768ad0 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 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=100) throwforce = 2 throw_speed = 3 diff --git a/code/modules/assembly/bomb.dm b/code/modules/assembly/bomb.dm index f6019ace266..41a67a43560 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 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 2 throw_range = 4 flags = CONDUCT //Copied this from old code, so this may or may not be necessary @@ -171,4 +171,4 @@ if(!T) return T.assume_air(removed) - air_update_turf() \ No newline at end of file + air_update_turf() diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm index 47d33a1e5ce..f4a71a77ced 100644 --- a/code/modules/assembly/holder.dm +++ b/code/modules/assembly/holder.dm @@ -5,7 +5,7 @@ item_state = "assembly" flags = CONDUCT throwforce = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 10 @@ -100,7 +100,7 @@ a_left.hear_talk(M, msg) if(a_right) a_right.hear_talk(M, msg) - + hear_message(mob/living/M as mob, msg) if(a_left) a_left.hear_message(M, msg) @@ -210,8 +210,3 @@ qdel(src) return return - - - - - diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index 6ffe6f42d12..aa8bc299e66 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -6,7 +6,7 @@ var/obj/item/clothing/head/helmet/part1 = null var/obj/item/device/radio/electropack/part2 = null var/status = 0 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE flags = CONDUCT /obj/item/assembly/shock_kit/Destroy() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 914b3ed9209..2142d336fac 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -85,7 +85,7 @@ //Ears: currently only used for headsets and earmuffs /obj/item/clothing/ears name = "ears" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 2 slot_flags = SLOT_EARS burn_state = FIRE_PROOF @@ -128,7 +128,7 @@ /obj/item/clothing/ears/offear name = "Other ear" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE icon = 'icons/mob/screen_gen.dmi' icon_state = "block" slot_flags = SLOT_EARS | SLOT_TWOEARS @@ -145,7 +145,7 @@ /obj/item/clothing/glasses name = "glasses" icon = 'icons/obj/clothing/glasses.dmi' - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags_cover = GLASSESCOVERSEYES slot_flags = SLOT_EYES materials = list(MAT_GLASS = 250) @@ -177,7 +177,7 @@ BLIND // can't see anything /obj/item/clothing/gloves name = "gloves" gender = PLURAL //Carn: for grammarically correct text-parsing - w_class = 2 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/clothing/gloves.dmi' siemens_coefficient = 0.50 body_parts_covered = HANDS @@ -543,7 +543,7 @@ BLIND // can't see anything desc = "A suit that protects against low pressure environments. Has a big 13 on the back." icon_state = "space" item_state = "s_suit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 flags = STOPSPRESSUREDMAGE | THICKMATERIAL diff --git a/code/modules/clothing/head/misc.dm b/code/modules/clothing/head/misc.dm index 5ddb28359e6..6d46eb7b061 100644 --- a/code/modules/clothing/head/misc.dm +++ b/code/modules/clothing/head/misc.dm @@ -380,7 +380,7 @@ throwforce = 3.0 throw_speed = 2 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("warned", "cautioned", "smashed") burn_state = FIRE_PROOF diff --git a/code/modules/clothing/masks/boxing.dm b/code/modules/clothing/masks/boxing.dm index 25cdc259f92..59081cf3d00 100644 --- a/code/modules/clothing/masks/boxing.dm +++ b/code/modules/clothing/masks/boxing.dm @@ -5,7 +5,7 @@ item_state = "balaclava" flags = BLOCKHAIR flags_inv = HIDEFACE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL actions_types = list(/datum/action/item_action/adjust) adjusted_flags = SLOT_HEAD species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") @@ -27,7 +27,7 @@ item_state = "luchag" flags = BLOCKHAIR flags_inv = HIDEFACE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', @@ -47,4 +47,4 @@ name = "Rudos Mask" desc = "Worn by robust fighters who are willing to do anything to win." icon_state = "luchar" - item_state = "luchar" \ No newline at end of file + item_state = "luchar" diff --git a/code/modules/clothing/masks/breath.dm b/code/modules/clothing/masks/breath.dm index c0ebe33a796..851c10db354 100644 --- a/code/modules/clothing/masks/breath.dm +++ b/code/modules/clothing/masks/breath.dm @@ -5,7 +5,7 @@ item_state = "breath" flags = AIRTIGHT flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.10 permeability_coefficient = 0.50 actions_types = list(/datum/action/item_action/adjust) diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 0a3ee36ebbb..908397f990e 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -5,7 +5,7 @@ flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT flags_inv = HIDEEARS|HIDEEYES|HIDEFACE flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL item_state = "gas_alt" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 @@ -70,7 +70,7 @@ flags = BLOCK_GAS_SMOKE_EFFECT | AIRTIGHT flags_inv = HIDEEARS|HIDEEYES|HIDEFACE flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL item_state = "bane_mask" gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 @@ -494,4 +494,3 @@ // ******************************************************************** - diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 8d031476931..d524d87e3d8 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -4,7 +4,7 @@ icon_state = "muzzle" item_state = "muzzle" flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.90 put_on_delay = 20 var/resist_time = 0 //deciseconds of how long you need to gnaw to get rid of the gag, 0 to make it impossible to remove @@ -24,14 +24,14 @@ name = "gag" desc = "Stick this in their mouth to stop the noise." icon_state = "gag" - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/clothing/mask/muzzle/tapegag name = "tape gag" desc = "MHPMHHH!" icon_state = "tapegag" item_state = null - w_class = 1 + w_class = WEIGHT_CLASS_TINY resist_time = 150 mute = 0 species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin") @@ -59,7 +59,7 @@ desc = "A sterile mask designed to help prevent the spread of diseases." icon_state = "sterile" item_state = "sterile" - w_class = 1 + w_class = WEIGHT_CLASS_TINY flags_cover = MASKCOVERSMOUTH gas_transfer_coefficient = 0.90 permeability_coefficient = 0.01 @@ -109,7 +109,7 @@ icon_state = "blueneckscarf" item_state = "blueneckscarf" flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.90 /obj/item/clothing/mask/redscarf @@ -118,7 +118,7 @@ icon_state = "redwhite_scarf" item_state = "redwhite_scarf" flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.90 /obj/item/clothing/mask/greenscarf @@ -127,7 +127,7 @@ icon_state = "green_scarf" item_state = "green_scarf" flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.90 /obj/item/clothing/mask/ninjascarf @@ -136,7 +136,7 @@ icon_state = "ninja_scarf" item_state = "ninja_scarf" flags_cover = MASKCOVERSMOUTH - w_class = 2 + w_class = WEIGHT_CLASS_SMALL gas_transfer_coefficient = 0.90 @@ -147,7 +147,7 @@ item_state = "pig" flags = BLOCKHAIR flags_inv = HIDEFACE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/clothing/mask/horsehead @@ -157,7 +157,7 @@ item_state = "horsehead" flags = BLOCKHAIR flags_inv = HIDEFACE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/voicechange = 0 var/temporaryname = " the Horse" var/originalname = "" @@ -247,7 +247,7 @@ icon_state = "fawkes" item_state = "fawkes" flags_inv = HIDEFACE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/clothing/mask/gas/clown_hat/pennywise name = "Pennywise Mask" @@ -263,7 +263,7 @@ desc = "A colorful bandana." flags_inv = HIDEFACE flags_cover = MASKCOVERSMOUTH - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_MASK adjusted_flags = SLOT_HEAD icon_state = "bandbotany" diff --git a/code/modules/clothing/spacesuits/alien.dm b/code/modules/clothing/spacesuits/alien.dm index 33e08206fd1..69ecd6eca0e 100644 --- a/code/modules/clothing/spacesuits/alien.dm +++ b/code/modules/clothing/spacesuits/alien.dm @@ -74,7 +74,7 @@ // Vox space gear (vaccuum suit, low pressure armour) // Can't be equipped by any other species due to bone structure and vox cybernetics. /obj/item/clothing/suit/space/vox - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) armor = list(melee = 40, bullet = 40, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) heat_protection = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 82c4a832c6c..80257cda101 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -29,7 +29,7 @@ desc = "A suit worn by members of the Nanotrasen Emergency Response Team. Armoured, space ready, and fire resistant." icon_state = "ert_commander" item_state = "suit-command" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) armor = list(melee = 45, bullet = 25, laser = 30, energy = 10, bomb = 25, bio = 100, rad = 50) allowed = list(/obj/item/device/flashlight, /obj/item/weapon/tank, /obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/weapon/crowbar, \ diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index ab601821ef8..802f39ad361 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -352,7 +352,7 @@ icon_state = "hardsuit1-syndi" item_state = "syndie_hardsuit" item_color = "syndi" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/on = 1 actions_types = list(/datum/action/item_action/toggle_hardsuit_mode) armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 35, bio = 100, rad = 50) @@ -447,7 +447,7 @@ name = "gem-encrusted hardsuit" desc = "A bizarre gem-encrusted suit that radiates magical energies." item_state = "wiz_hardsuit" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL unacidable = 1 armor = list(melee = 40, bullet = 40, laser = 40, energy = 20, bomb = 35, bio = 100, rad = 50) allowed = list(/obj/item/weapon/teleportation_scroll,/obj/item/weapon/tank) diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 54aa39a305e..20d9809f2b2 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -27,7 +27,7 @@ desc = "A bulky, heavy-duty piece of exclusive Nanotrasen armor. YOU are in charge!" icon_state = "caparmor" item_state = "capspacesuit" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY allowed = list(/obj/item/weapon/tank, /obj/item/device/flashlight,/obj/item/weapon/gun/energy, /obj/item/weapon/gun/projectile, /obj/item/ammo_box, /obj/item/ammo_casing, /obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs) armor = list(melee = 40, bullet = 50, laser = 50, energy = 25, bomb = 50, bio = 100, rad = 50) species_restricted = list("exclude", "Diona", "Wryn") @@ -86,7 +86,7 @@ blood_overlay_type = "coat" flags_inv = 0 slowdown = 0 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL //Space santa outfit suit /obj/item/clothing/head/helmet/space/santahat @@ -123,7 +123,7 @@ desc = "Yarr." icon_state = "pirate" item_state = "pirate" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) slowdown = 0 armor = list(melee = 30, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 9ece7d54aa3..4e43aaf61b4 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -62,7 +62,7 @@ flags = null //non-conductive force = 0 throwforce = 0 - w_class = 2 //Fits in boxes. + w_class = WEIGHT_CLASS_SMALL //Fits in boxes. materials = list() attack_verb = list("tapped") diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 33bb0bcd269..da181368cc5 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -14,7 +14,7 @@ slot_flags = SLOT_BACK req_one_access = list() req_access = list() - w_class = 4 + w_class = WEIGHT_CLASS_BULKY // These values are passed on to all component pieces. armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75) @@ -985,11 +985,6 @@ // AIs are a bit slower than regular and ignore move intent. wearer_move_delay = world.time + ai_controlled_move_delay - var/tickcomp = 0 - if(config.Tickcomp) - tickcomp = ((1/(world.tick_lag))*1.3) - 1.3 - wearer_move_delay += tickcomp - if(wearer.buckled) //if we're buckled to something, tell it we moved. return wearer.buckled.relaymove(wearer, direction) diff --git a/code/modules/clothing/spacesuits/syndi.dm b/code/modules/clothing/spacesuits/syndi.dm index 4b8f32f5a74..37aa5b776ba 100644 --- a/code/modules/clothing/spacesuits/syndi.dm +++ b/code/modules/clothing/spacesuits/syndi.dm @@ -12,7 +12,7 @@ icon_state = "syndicate" item_state = "space_suit_syndicate" desc = "Has a tag on it: Totally not property of of a hostile corporation, honest!" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/melee/energy/sword/saber,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) armor = list(melee = 40, bullet = 50, laser = 30, energy = 15, bomb = 30, bio = 30, rad = 30) @@ -173,4 +173,4 @@ obj/item/clothing/suit/space/syndicate/black/red/strike /obj/item/clothing/suit/space/syndicate/black/engie name = "Black Engineering Space Suit" icon_state = "syndicate-black-engie" - item_state = "syndicate-black" \ No newline at end of file + item_state = "syndicate-black" diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index c9d3ccac27b..7a2fa10db07 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -376,7 +376,7 @@ desc = "A suit that protects against some damage." icon_state = "centcom" item_state = "centcom" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY 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/restraints/handcuffs,/obj/item/weapon/tank/emergency_oxygen) flags = THICKMATERIAL @@ -393,7 +393,7 @@ icon_state = "heavy" item_state = "swat_suit" armor = list(melee = 80, bullet = 80, laser = 50, energy = 50, bomb = 100, bio = 100, rad = 100) - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.90 flags = THICKMATERIAL body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/clothing/suits/bio.dm b/code/modules/clothing/suits/bio.dm index f0fbfca0cbd..49f8a8ea8d1 100644 --- a/code/modules/clothing/suits/bio.dm +++ b/code/modules/clothing/suits/bio.dm @@ -15,7 +15,7 @@ desc = "A suit that protects against biological contamination." icon_state = "bio" item_state = "bio_suit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 flags = THICKMATERIAL @@ -93,4 +93,4 @@ strip_delay = 40 put_on_delay = 20 species_fit = null - sprite_sheets = null \ No newline at end of file + sprite_sheets = null diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 5d25cf95c2d..8b6e4d2e0d3 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -135,7 +135,7 @@ icon_state = "syndicate-black-red" item_state = "syndicate-black-red" 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 = WEIGHT_CLASS_NORMAL allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy) flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT burn_state = FIRE_PROOF @@ -714,7 +714,7 @@ desc = "A soft white robe made of a synthetic fiber that provides improved protection against biohazards. Possessing multiple overlapping layers, yet light enough to allow complete freedom of movement, it denotes its wearer as a master physician." icon_state = "mercy_hoodie" item_state = "mercy_hoodie" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 flags_size = ONESIZEFITSALL diff --git a/code/modules/clothing/suits/storage.dm b/code/modules/clothing/suits/storage.dm index 70fa8a30227..5e73af7aa39 100644 --- a/code/modules/clothing/suits/storage.dm +++ b/code/modules/clothing/suits/storage.dm @@ -5,7 +5,7 @@ ..() pockets = new/obj/item/weapon/storage/internal(src) pockets.storage_slots = 2 //two slots - pockets.max_w_class = 2 //fit only pocket sized items + pockets.max_w_class = WEIGHT_CLASS_SMALL //fit only pocket sized items pockets.max_combined_w_class = 4 /obj/item/clothing/suit/storage/Destroy() diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 81cc172d0e2..3d31af6230b 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -14,7 +14,7 @@ desc = "A suit that protects against fire and heat." icon_state = "fire" item_state = "fire_suit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.90 permeability_coefficient = 0.50 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS @@ -43,7 +43,7 @@ desc = "A suit that protects against extreme fire and heat." //icon_state = "thermal" item_state = "ro_suit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY slowdown = 1.5 /obj/item/clothing/suit/fire/atmos @@ -85,7 +85,7 @@ desc = "A suit designed for safety when handling explosives." icon_state = "bombsuit" item_state = "bombsuit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.01 flags = THICKMATERIAL @@ -142,7 +142,7 @@ desc = "A suit that protects against radiation. Label: Made with lead, do not eat insulation." icon_state = "rad" item_state = "rad_suit" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.90 permeability_coefficient = 0.50 flags = THICKMATERIAL @@ -157,4 +157,4 @@ species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/suit.dmi' - ) \ No newline at end of file + ) diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index f0da2e141a0..5f358ac58f4 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -6,7 +6,7 @@ item_state = "" //no inhands item_color = "bluetie" slot_flags = SLOT_TIE - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/slot = "decor" var/obj/item/clothing/under/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/holster.dm b/code/modules/clothing/under/accessories/holster.dm index cab12cba542..4c53d9c3c8d 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -7,7 +7,7 @@ var/holster_allow = /obj/item/weapon/gun var/obj/item/weapon/gun/holstered = null actions_types = list(/datum/action/item_action/accessory/holster) - w_class = 3 // so it doesn't fit in pockets + w_class = WEIGHT_CLASS_NORMAL // so it doesn't fit in pockets /obj/item/clothing/accessory/holster/Destroy() QDEL_NULL(holstered) @@ -140,4 +140,4 @@ name = "shoulder holster" desc = "A handgun holster. Made of expensive leather." icon_state = "holster" - item_color = "holster_low" \ No newline at end of file + item_color = "holster_low" diff --git a/code/modules/clothing/under/accessories/storage.dm b/code/modules/clothing/under/accessories/storage.dm index fd335f43fb7..a306864cbfc 100644 --- a/code/modules/clothing/under/accessories/storage.dm +++ b/code/modules/clothing/under/accessories/storage.dm @@ -7,7 +7,7 @@ var/slots = 3 var/obj/item/weapon/storage/internal/hold actions_types = list(/datum/action/item_action/accessory/storage) - w_class = 3 // so it doesn't fit in pockets + w_class = WEIGHT_CLASS_NORMAL // so it doesn't fit in pockets /obj/item/clothing/accessory/storage/New() ..() @@ -110,4 +110,4 @@ hold.can_hold = list(/obj/item/weapon/hatchet/unathiknife, /obj/item/weapon/kitchen/knife) new /obj/item/weapon/hatchet/unathiknife(hold) - new /obj/item/weapon/hatchet/unathiknife(hold) \ No newline at end of file + new /obj/item/weapon/hatchet/unathiknife(hold) diff --git a/code/modules/clothing/under/miscellaneous.dm b/code/modules/clothing/under/miscellaneous.dm index 7494f559383..41111585072 100644 --- a/code/modules/clothing/under/miscellaneous.dm +++ b/code/modules/clothing/under/miscellaneous.dm @@ -167,7 +167,7 @@ icon_state = "black" item_state = "bl_suit" item_color = "black" - w_class = 4//bulky item + w_class = WEIGHT_CLASS_BULKY gas_transfer_coefficient = 0.01 permeability_coefficient = 0.02 body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 051bd625212..6e414737b32 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -20,7 +20,7 @@ icon_state = "tatgun" force = 0 throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/tattoo_name = "tiger stripe tattoo" // Tat name for visible messages var/tattoo_icon = "Tiger-stripe Tattoo" // body_accessory.dmi, new icons defined in sprite_accessories.dm var/tattoo_r = 1 // RGB values for the body markings @@ -221,7 +221,7 @@ item_state = "lunch_box" force = 5 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 9 storage_slots = 3 @@ -248,7 +248,7 @@ hitsound = 'sound/weapons/tap.ogg' force = 0 throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/used = 0 /obj/item/fluff/wingler_comb/attack_self(mob/user) @@ -268,7 +268,7 @@ desc = "Some sci-fi looking parts for a stun baton." icon = 'icons/obj/custom_items.dmi' icon_state = "scifikit" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/device/fluff/desolate_baton_kit/afterattack(atom/target, mob/user, proximity) if(!proximity || !ishuman(user) || user.incapacitated()) @@ -293,7 +293,7 @@ name = "welding helmet modkit" desc = "Some spraypaint and a stencil, perfect for painting flames onto a welding helmet!" icon_state = "modkit" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 0 throwforce = 0 @@ -318,7 +318,7 @@ name = "plasmaman suit modkit" desc = "A kit containing nanites that are able to modify the look of a plasmaman suit and helmet without exposing the wearer to hostile environments." icon_state = "modkit" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 0 throwforce = 0 @@ -429,7 +429,7 @@ name = "sallet modkit" desc = "A modkit that can make most helmets look like a steel sallet." icon_state = "modkit" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 0 throwforce = 0 @@ -468,6 +468,30 @@ else to_chat(user, "You can't modify [target]!") +/obj/item/device/fluff/k3_webbing_modkit //IK3I: Yakikatachi + name = "webbing modkit" + desc = "A modkit that can be used to turn certain vests and labcoats into lightweight webbing" + icon_state = "modkit" + w_class = 2 + force = 0 + throwforce = 0 + +/obj/item/device/fluff/k3_webbing_modkit/afterattack(atom/target, mob/user, proximity) + if(!proximity || !ishuman(user) || user.incapacitated()) + return + + if(istype(target, /obj/item/clothing/suit/storage/labcoat) || istype(target, /obj/item/clothing/suit/storage/hazardvest)) + var/mob/living/carbon/human/H = user + var/obj/item/clothing/suit/storage/S = target + var/obj/item/clothing/suit/storage/fluff/k3_webbing/webbing = new(get_turf(target)) + webbing.allowed = S.allowed + to_chat(user, "You modify the [S] with [src].") + H.update_inv_wear_suit() + qdel(S) + qdel(src) + else + to_chat(user, "You can't modify [target]!") + ////////////////////////////////// //////////// Clothing //////////// ////////////////////////////////// @@ -704,6 +728,37 @@ icon = 'icons/obj/custom_items.dmi' icon_state = "shodancoat" +/obj/item/clothing/suit/storage/fluff/k3_webbing + name = "vox tactical webbing" + desc = "A somewhat worn but well kept set of vox tactical webbing. It has a couple of pouches attached." + icon = 'icons/obj/custom_items.dmi' + icon_state = "k3_webbing" + species_fit = list("Vox") + sprite_sheets = list("Vox" = 'icons/mob/species/vox/suit.dmi') + ignore_suitadjust = 0 + actions_types = list(/datum/action/item_action/toggle) + suit_adjusted = 0 + +/obj/item/clothing/suit/storage/fluff/k3_webbing/adjustsuit(var/mob/user) + if(!user.incapacitated()) + var/flavour + if(suit_adjusted) + flavour = "off" + icon_state = copytext(icon_state, 1, findtext(icon_state, "_on")) + item_state = copytext(item_state, 1, findtext(item_state, "_on")) + suit_adjusted = 0 //Lights Off + else + flavour = "on" + icon_state += "_on" + item_state += "_on" + suit_adjusted = 1 //Lights On + + for(var/X in actions) + var/datum/action/A = X + A.UpdateButtonIcon() + to_chat(user, "You turn the [src]'s lighting system [flavour].") + user.update_inv_wear_suit() + //////////// Uniforms //////////// /obj/item/clothing/under/fluff/kharshai // Kharshai: Athena Castile name = "Castile formal outfit" diff --git a/code/modules/detective_work/evidence.dm b/code/modules/detective_work/evidence.dm index e457d73fb87..cb4e2604771 100644 --- a/code/modules/detective_work/evidence.dm +++ b/code/modules/detective_work/evidence.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/storage.dmi' icon_state = "evidenceobj" item_state = "" - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/weapon/evidencebag/afterattack(obj/item/I, mob/user,proximity) if(!proximity || loc == I) @@ -29,7 +29,7 @@ to_chat(user, "You find putting an evidence bag in another evidence bag to be slightly absurd.") return 1 //now this is podracing - if(I.w_class > 3) + if(I.w_class > WEIGHT_CLASS_NORMAL) to_chat(user, "[I] won't fit in [src].") return @@ -76,7 +76,7 @@ "You hear someone rustle around in a plastic bag, and remove something.") overlays.Cut() //remove the overlays user.put_in_hands(I) - w_class = 1 + w_class = WEIGHT_CLASS_TINY icon_state = "evidenceobj" desc = "An empty evidence bag." @@ -87,7 +87,7 @@ /obj/item/weapon/storage/box/evidence name = "evidence bag box" desc = "A box claiming to contain evidence bags." - + /obj/item/weapon/storage/box/evidence/New() new /obj/item/weapon/evidencebag(src) new /obj/item/weapon/evidencebag(src) @@ -95,4 +95,4 @@ new /obj/item/weapon/evidencebag(src) new /obj/item/weapon/evidencebag(src) new /obj/item/weapon/evidencebag(src) - ..() \ No newline at end of file + ..() diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index cc93863cc95..cc6a463a0ee 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -17,7 +17,7 @@ /obj/item/weapon/reagent_containers/glass/rag name = "damp rag" desc = "For cleaning up messes, you suppose." - w_class = 1 + w_class = WEIGHT_CLASS_TINY icon = 'icons/obj/toy.dmi' icon_state = "rag" amount_per_transfer_from_this = 5 diff --git a/code/modules/detective_work/scanner.dm b/code/modules/detective_work/scanner.dm index 69aeb643263..bb1a79f13ad 100644 --- a/code/modules/detective_work/scanner.dm +++ b/code/modules/detective_work/scanner.dm @@ -7,7 +7,7 @@ desc = "Used to remotely scan objects and biomass for DNA and fingerprints. Can print a report of the findings." icon = 'icons/goonstation/objects/objects.dmi' icon_state = "detscanner" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL item_state = "electronic" flags = CONDUCT | NOBLUDGEON slot_flags = SLOT_BELT diff --git a/code/modules/fish/fish_eggs.dm b/code/modules/fish/fish_eggs.dm index 5255859b704..756093fbd01 100644 --- a/code/modules/fish/fish_eggs.dm +++ b/code/modules/fish/fish_eggs.dm @@ -4,7 +4,7 @@ desc = "Eggs laid by a fish. This cluster seems... empty?" icon = 'icons/obj/fish_items.dmi' icon_state = "eggs" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/datum/fish/fish_type = null //Holds the datum of the fish that the egg is for, null means dud eggs /obj/item/fish_eggs/goldfish @@ -66,4 +66,3 @@ desc = "A cluster of bright neon eggs belonging to a bio-luminescent species of fish." icon_state = "glofish_eggs" fish_type = /datum/fish/glofish - diff --git a/code/modules/fish/fish_items.dm b/code/modules/fish/fish_items.dm index 9f58d58942e..64ca8269298 100644 --- a/code/modules/fish/fish_items.dm +++ b/code/modules/fish/fish_items.dm @@ -10,7 +10,7 @@ icon_state = "egg_scoop" slot_flags = SLOT_BELT throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 @@ -21,7 +21,7 @@ icon_state = "net" slot_flags = SLOT_BELT throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 @@ -35,7 +35,7 @@ icon = 'icons/obj/fish_items.dmi' icon_state = "fish_food" throwforce = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 @@ -46,7 +46,7 @@ icon_state = "brush" slot_flags = SLOT_BELT throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 attack_verb = list("scrubbed", "brushed", "scraped") @@ -90,7 +90,7 @@ icon = 'icons/obj/fish_items.dmi' icon_state = "fish" throwforce = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 force = 1 diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm index bbd7615b6ce..34d393fad0c 100644 --- a/code/modules/fish/fishtank.dm +++ b/code/modules/fish/fishtank.dm @@ -11,7 +11,7 @@ icon_state = "tank1" density = 0 anchored = 0 - throwpass = 0 + pass_flags = 0 var/tank_type = "" // Type of aquarium, used for icon updating var/water_capacity = 0 // Number of units the tank holds (varies with tank type) @@ -38,8 +38,7 @@ icon_state = "bowl1" density = 0 // Small enough to not block stuff anchored = 0 // Small enough to move even when filled - throwpass = 1 // Just like at the county fair, you can't seem to throw the ball in to win the goldfish - pass_flags = PASSTABLE // Small enough to pull onto a table + pass_flags = PASSTABLE | LETPASSTHROW // Just like at the county fair, you can't seem to throw the ball in to win the goldfish, and it's small enough to pull onto a table tank_type = "bowl" water_capacity = 50 // Not very big, therefore it can't hold much @@ -57,7 +56,7 @@ icon_state = "tank1" density = 1 anchored = 1 - throwpass = 1 // You can throw objects over this, despite it's density, because it's short enough. + pass_flags = LETPASSTHROW tank_type = "tank" water_capacity = 200 // Decent sized, holds almost 2 full buckets @@ -75,7 +74,7 @@ icon_state = "wall1" density = 1 anchored = 1 - throwpass = 0 // This thing is the size of a wall, you can't throw past it. + pass_flags = 0 // This thing is the size of a wall, you can't throw past it. tank_type = "wall" water_capacity = 500 // This thing fills an entire tile, it holds a lot. diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index f9c97c87a0b..64bb91a9db4 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -180,49 +180,6 @@ Gunshots/explosions/opening doors/less rare audio (done) ..() name = "alien hunter ([rand(1, 1000)])" -/obj/effect/hallucination/simple/xeno/throw_at(atom/target, range, speed) // TODO : Make diagonal trhow into proc/property - if(!target || !src || (flags & NODROP)) - return 0 - - throwing = 1 - - var/dist_x = abs(target.x - x) - var/dist_y = abs(target.y - y) - var/dist_travelled = 0 - var/dist_since_sleep = 0 - - var/tdist_x = dist_x; - var/tdist_y = dist_y; - - if(dist_x <= dist_y) - tdist_x = dist_y; - tdist_y = dist_x; - - var/error = tdist_x/2 - tdist_y - while(target && (((((dist_x > dist_y) && ((x < target.x) || (x > target.x))) || ((dist_x <= dist_y) && ((y < target.y) || (y > target.y))) || (x > target.x)) && dist_travelled < range) || !has_gravity(src))) - if(!throwing) - break - if(!istype(loc, /turf)) - break - - var/atom/step = get_step(src, get_dir(src, target)) - if(!step) - break - Move(step, get_dir(src, step)) - hit_check() - error += (error < 0) ? tdist_x : -tdist_y; - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - - - throwing = 0 - throw_impact(get_turf(src)) - - return 1 - /obj/effect/hallucination/simple/xeno/throw_impact(A) update_icon("alienh_pounce") if(A == target) @@ -247,12 +204,12 @@ Gunshots/explosions/opening doors/less rare audio (done) if(!xeno) return xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(target,7,1) + xeno.throw_at(target,7,1, spin = 0, diagonals_first = 1) sleep(10) if(!xeno) return xeno.update_icon("alienh_leap",'icons/mob/alienleap.dmi',-32,-32) - xeno.throw_at(pump,7,1) + xeno.throw_at(pump,7,1, spin = 0, diagonals_first = 1) sleep(10) if(!xeno) return diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 23ae568af9b..0b5b2171f86 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -141,7 +141,7 @@ name = "pewter cup" desc = "Everyone gets a trophy." icon_state = "pewter_cup" - w_class = 1 + w_class = WEIGHT_CLASS_TINY force = 1 throwforce = 1 amount_per_transfer_from_this = 5 @@ -154,7 +154,7 @@ name = "gold cup" desc = "You're winner!" icon_state = "golden_cup" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 14 throwforce = 10 amount_per_transfer_from_this = 20 @@ -165,7 +165,7 @@ name = "silver cup" desc = "Best loser!" icon_state = "silver_cup" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 10 throwforce = 8 amount_per_transfer_from_this = 15 @@ -176,7 +176,7 @@ name = "bronze cup" desc = "At least you ranked!" icon_state = "bronze_cup" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 5 throwforce = 4 amount_per_transfer_from_this = 10 @@ -349,4 +349,4 @@ desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point." icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_bowl" - w_class = 2 \ No newline at end of file + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 75f9c9a776f..e1a517caaf3 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -130,7 +130,7 @@ throwforce = 5 throw_speed = 3 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY item_state = "beer" hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("stabbed", "slashed", "attacked") diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 3a079e99da4..cbb049c883c 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -130,7 +130,7 @@ istype(W, /obj/item/weapon/hatchet) \ ) inaccurate = 1 - else if(W.w_class <= 2 && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) + else if(W.w_class <= WEIGHT_CLASS_SMALL && istype(src,/obj/item/weapon/reagent_containers/food/snacks/sliceable)) if(!iscarbon(user)) return 1 to_chat(user, "You slip [W] inside [src].") @@ -2477,4 +2477,4 @@ desc = "A large fried potato nugget that may or may not try to valid you." icon_state = "tatortot" list_reagents = list("nutriment" = 4) - filling_color = "FFD700" \ No newline at end of file + filling_color = "FFD700" diff --git a/code/modules/hydroponics/grown/banana.dm b/code/modules/hydroponics/grown/banana.dm index dbdffffda29..8301b021cc4 100644 --- a/code/modules/hydroponics/grown/banana.dm +++ b/code/modules/hydroponics/grown/banana.dm @@ -43,7 +43,7 @@ desc = "A peel from a banana." icon_state = "banana_peel" item_state = "banana_peel" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0 throw_speed = 3 throw_range = 7 diff --git a/code/modules/hydroponics/grown/corn.dm b/code/modules/hydroponics/grown/corn.dm index a7ef947a5ce..d2dac1decfe 100644 --- a/code/modules/hydroponics/grown/corn.dm +++ b/code/modules/hydroponics/grown/corn.dm @@ -30,7 +30,7 @@ desc = "A reminder of meals gone by." icon_state = "corncob" item_state = "corncob" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0 throw_speed = 3 throw_range = 7 @@ -62,7 +62,7 @@ desc = "A cob with snap pops" icon_state = "snapcorn" item_state = "corncob" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0 throw_speed = 3 throw_range = 7 @@ -81,4 +81,4 @@ snap_pops -= 1 if(!snap_pops) new /obj/item/weapon/grown/corncob(user.loc) - qdel(src) \ No newline at end of file + qdel(src) diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index 7deb961e67a..1752cda7567 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -117,7 +117,7 @@ force = 0 slot_flags = SLOT_HEAD throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 3 @@ -167,7 +167,7 @@ force = 0 slot_flags = SLOT_HEAD throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 3 attack_verb = list("roasted", "scorched", "burned") diff --git a/code/modules/hydroponics/grown/melon.dm b/code/modules/hydroponics/grown/melon.dm index 5a229148a17..06bb153e47f 100644 --- a/code/modules/hydroponics/grown/melon.dm +++ b/code/modules/hydroponics/grown/melon.dm @@ -22,7 +22,7 @@ slice_path = /obj/item/weapon/reagent_containers/food/snacks/watermelonslice slices_num = 5 dried_type = null - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL filling_color = "#008000" bitesize_mod = 3 diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index f6d9be51b4a..52f60d06b18 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -37,7 +37,7 @@ force = 15 hitsound = 'sound/weapons/bladeslice.ogg' throwforce = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 1 throw_range = 3 origin_tech = "combat=3" diff --git a/code/modules/hydroponics/grown/towercap.dm b/code/modules/hydroponics/grown/towercap.dm index 961fe7c4096..339459669be 100644 --- a/code/modules/hydroponics/grown/towercap.dm +++ b/code/modules/hydroponics/grown/towercap.dm @@ -37,7 +37,7 @@ icon_state = "logs" force = 5 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 2 throw_range = 3 origin_tech = "materials=1" @@ -191,4 +191,4 @@ /obj/structure/bonfire/unbuckle_mob(force=0) if(buckled_mob) buckled_mob.pixel_y -= 13 - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index 608c52bfcb4..9a93d1a9673 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/device.dmi' icon_state = "hydro" item_state = "analyzer" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT origin_tech = "magnets=2;biotech=2" materials = list(MAT_METAL=30, MAT_GLASS=20) @@ -24,7 +24,7 @@ flags = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 10 @@ -46,7 +46,7 @@ flags = OPENCONTAINER slot_flags = SLOT_BELT throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 10 @@ -68,7 +68,7 @@ flags = CONDUCT force = 5 throwforce = 7 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=50) attack_verb = list("slashed", "sliced", "cut", "clawed") hitsound = 'sound/weapons/bladeslice.ogg' @@ -80,7 +80,7 @@ icon_state = "hatchet" flags = CONDUCT force = 12 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 15 throw_speed = 3 throw_range = 4 @@ -111,7 +111,7 @@ throwforce = 5 throw_speed = 2 throw_range = 3 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY flags = CONDUCT armour_penetration = 20 slot_flags = SLOT_BACK @@ -140,7 +140,7 @@ force = 3 sharp = 0 edge = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL extend = 0 slot_flags = SLOT_BELT origin_tech = "materials=3;combat=3" @@ -154,7 +154,7 @@ icon_state = "tscythe1" item_state = "scythe0" //use the normal scythe in-hands slot_flags = SLOT_BACK //won't fit on belt, but can be worn on belt when extended - w_class = 4 //won't fit in backpacks while extended + w_class = WEIGHT_CLASS_BULKY //won't fit in backpacks while extended force = 15 //slightly better than normal scythe damage attack_verb = list("chopped", "sliced", "cut", "reaped") hitsound = 'sound/weapons/bladeslice.ogg' @@ -165,7 +165,7 @@ icon_state = "tscythe0" item_state = null //no sprite for folded version, like a tele-baton slot_flags = SLOT_BELT //can be worn on belt again, but no longer makes sense to wear on the back - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 3 attack_verb = list("hit", "poked") hitsound = "swing_hit" @@ -200,7 +200,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" volume = 50 - w_class = 1 + w_class = WEIGHT_CLASS_TINY amount_per_transfer_from_this = 10 possible_transfer_amounts = list(1,2,5,10,15,25,50) @@ -249,7 +249,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle16" volume = 50 - w_class = 1 + w_class = WEIGHT_CLASS_TINY amount_per_transfer_from_this = 10 possible_transfer_amounts = list(1,2,5,10,15,25,50) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index ae79eda23d3..093cd2114a4 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -5,7 +5,7 @@ /obj/item/seeds icon = 'icons/obj/hydroponics/seeds.dmi' icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game. - w_class = 1 + w_class = WEIGHT_CLASS_TINY burn_state = FLAMMABLE var/plantname = "Plants" // Name of plant when planted. var/product // A type path. The thing that is created when the plant is harvested. diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm index a32b31611cc..96f88f3d9c4 100644 --- a/code/modules/library/lib_items.dm +++ b/code/modules/library/lib_items.dm @@ -167,7 +167,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 = WEIGHT_CLASS_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") burn_state = FLAMMABLE @@ -201,7 +201,7 @@ /obj/item/weapon/book/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(carved) if(!store) - if(W.w_class < 3) + if(W.w_class < WEIGHT_CLASS_NORMAL) user.drop_item() W.forceMove(src) store = W @@ -293,7 +293,7 @@ icon_state ="scanner" throw_speed = 1 throw_range = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/obj/machinery/computer/library/checkout/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/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index 971dc69a1b6..3f1705f4651 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -172,7 +172,7 @@ name = "bo staff" desc = "A long, tall staff made of polished wood. Traditionally used in ancient old-Earth martial arts. Can be wielded to both kill and incapacitate." force = 10 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK force_unwielded = 10 force_wielded = 24 diff --git a/code/modules/mining/coins.dm b/code/modules/mining/coins.dm index 00ea7632900..2ce3f8d6195 100644 --- a/code/modules/mining/coins.dm +++ b/code/modules/mining/coins.dm @@ -7,7 +7,7 @@ flags = CONDUCT force = 1 throwforce = 2 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/string_attached var/list/sideslist = list("heads","tails") var/cmineral = null @@ -149,4 +149,4 @@ if(do_after(user, 15, target = src)) user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \ "You flip [src]. It lands on [coinflip].", \ - "You hear the clattering of loose change.") \ No newline at end of file + "You hear the clattering of loose change.") diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index d6c375c2832..8bb891834a9 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -521,7 +521,7 @@ desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor." icon = 'icons/obj/items.dmi' icon_state = "mining_voucher" - w_class = 1 + w_class = WEIGHT_CLASS_TINY /**********************Mining Point Card**********************/ @@ -555,7 +555,7 @@ icon_state = "Jaunter" item_state = "electronic" throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 5 origin_tech = "bluespace=2" @@ -615,7 +615,7 @@ icon_state = "resonator" item_state = "resonator" desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in a vaccuum." - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 8 throwforce = 10 var/cooldown = 0 @@ -711,7 +711,7 @@ /obj/item/weapon/mining_drone_cube name = "mining drone cube" desc = "Compressed mining drone, ready for deployment. Just press the button to activate!" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL icon = 'icons/obj/aibots.dmi' icon_state = "minedronecube" item_state = "electronic" @@ -728,7 +728,7 @@ name = "Drone Kit" desc = "A boxed kit that includes one mining drone cube and a welding tool with an increased capacity." icon_state = "implant" - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL storage_slots = 2 can_hold = list(/obj/item/weapon/mining_drone_cube, /obj/item/weapon/weldingtool/hugetank) @@ -746,7 +746,7 @@ icon_state = "lazarus_hypo" item_state = "hypo" throwforce = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 5 var/loaded = 1 @@ -806,7 +806,7 @@ name = "manual mining scanner" icon_state = "mining1" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT slot_flags = SLOT_BELT var/cooldown = 0 @@ -838,7 +838,7 @@ name = "advanced automatic mining scanner" icon_state = "mining0" item_state = "analyzer" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT slot_flags = SLOT_BELT var/cooldown = 35 @@ -931,7 +931,7 @@ desc = "A tank of compressed carbon dioxide for miners to use as propulsion in local space. The compact size allows for easy storage at the cost of capacity." volume = 40 throw_range = 7 - w_class = 3 //same as syndie harness + w_class = WEIGHT_CLASS_NORMAL //same as syndie harness /*********************Hivelord stabilizer****************/ @@ -940,7 +940,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "bottle19" desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely." - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "biotech=1" /obj/item/weapon/hivelordstabilizer/afterattack(obj/item/organ/internal/M, mob/user) @@ -963,7 +963,7 @@ \nMark a mob with the destabilizing force, then hit them in melee to activate it for extra damage. Extra damage if backstabbed in this fashion. \ This weapon is only particularly effective against large creatures." force = 20 //As much as a bone spear, but this is significantly more annoying to carry around due to requiring the use of both hands at all times - w_class = 4 + w_class = WEIGHT_CLASS_BULKY slot_flags = SLOT_BACK force_unwielded = 20 //It's never not wielded so these are the same force_wielded = 20 diff --git a/code/modules/mining/lavaland/ash_flora.dm b/code/modules/mining/lavaland/ash_flora.dm index 922dd34a166..6289333549b 100644 --- a/code/modules/mining/lavaland/ash_flora.dm +++ b/code/modules/mining/lavaland/ash_flora.dm @@ -155,7 +155,7 @@ icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_shavings" list_reagents = list("sugar" = 3, "ethanol" = 2, "stabilizing_agent" = 3, "minttoxin" = 2) - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/weapon/reagent_containers/food/snacks/ash_flora/New() ..() @@ -194,7 +194,7 @@ desc = "A bowl made out of mushrooms. Not food, though it might have contained some at some point." icon = 'icons/obj/lavaland/ash_flora.dmi' icon_state = "mushroom_bowl" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL //what you can craft with these things /datum/crafting_recipe/mushroom_bowl diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 4565039d52e..418d00c6f19 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -15,8 +15,8 @@ if(4) new /obj/item/weapon/dragons_blood(src) -// Spectral Blade - +// Spectral Blade + /obj/item/weapon/melee/ghost_sword name = "spectral blade" desc = "A rusted and dulled blade. It doesn't look like it'd do much damage. It glows weakly." @@ -25,7 +25,7 @@ flags = CONDUCT sharp = 1 edge = 1 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 1 throwforce = 1 hitsound = 'sound/effects/ghost2.ogg' @@ -71,7 +71,7 @@ var/turf/T = get_turf(src) var/list/contents = T.GetAllContents() var/mob/dead/observer/current_spirits = list() - + for(var/mob/dead/observer/O in player_list) if(is_type_in_list(O.following, contents)) ghost_counter++ @@ -145,7 +145,7 @@ stage4 = list("Your blood burns.") stage5 = list("You're a fucking dragon. However, any previous allegiances you held still apply. It'd be incredibly rude to eat your still human friends for no reason.") new_form = /mob/living/simple_animal/hostile/megafauna/dragon/lesser - + //Lava Staff /obj/item/weapon/lava_staff @@ -156,7 +156,7 @@ icon = 'icons/obj/guns/magic.dmi' slot_flags = SLOT_BACK item_state = "staffofstorms" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 25 damtype = BURN hitsound = 'sound/weapons/sear.ogg' @@ -214,4 +214,4 @@ /obj/effect/overlay/temp/lavastaff icon_state = "lavastaff_warn" - duration = 50 \ No newline at end of file + duration = 50 diff --git a/code/modules/mining/lavaland/loot/hierophant_loot.dm b/code/modules/mining/lavaland/loot/hierophant_loot.dm index f06fd25d428..64689a3a535 100644 --- a/code/modules/mining/lavaland/loot/hierophant_loot.dm +++ b/code/modules/mining/lavaland/loot/hierophant_loot.dm @@ -5,7 +5,7 @@ item_state = "hierophant_staff" icon = 'icons/obj/guns/magic.dmi' slot_flags = SLOT_BACK - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 20 hitsound = "swing_hit" //hitsound = 'sound/weapons/sonic_jackhammer.ogg' @@ -185,4 +185,4 @@ //playsound(T,'sound/effects/bin_close.ogg', 200, 1) sleep(2) for(var/t in RANGE_TURFS(1, T)) - new /obj/effect/overlay/temp/hierophant/blast(t, user, friendly_fire_check) \ No newline at end of file + new /obj/effect/overlay/temp/hierophant/blast(t, user, friendly_fire_check) diff --git a/code/modules/mining/lavaland/loot/legion_loot.dm b/code/modules/mining/lavaland/loot/legion_loot.dm index 49e64f3349e..f85a6a57aac 100644 --- a/code/modules/mining/lavaland/loot/legion_loot.dm +++ b/code/modules/mining/lavaland/loot/legion_loot.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/guns/magic.dmi' slot_flags = SLOT_BACK item_state = "staffofstorms" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 25 damtype = BURN hitsound = 'sound/weapons/sear.ogg' @@ -49,4 +49,4 @@ "You hold [src] skyward, calling down a terrible storm!") playsound(user, 'sound/magic/Staff_Change.ogg', 200, 0) A.telegraph() - storm_cooldown = world.time + 200 \ No newline at end of file + storm_cooldown = world.time + 200 diff --git a/code/modules/mining/lavaland/loot/tendril_loot.dm b/code/modules/mining/lavaland/loot/tendril_loot.dm index dec8712eb74..1c2093ce8c2 100644 --- a/code/modules/mining/lavaland/loot/tendril_loot.dm +++ b/code/modules/mining/lavaland/loot/tendril_loot.dm @@ -5,7 +5,7 @@ name = "paradox bag" desc = "Somehow, it's in two places at once." max_combined_w_class = 60 - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL //External /obj/item/device/shared_storage @@ -144,7 +144,7 @@ item_state = "rods" desc = "Not to be confused with the kind Research hassles you for." force = 12 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL burn_state = LAVA_PROOF | FIRE_PROOF /datum/crafting_recipe/oar @@ -391,4 +391,4 @@ if(!can_destroy && !force) return QDEL_HINT_LETMELIVE else - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index a9151609f74..fba1c56fac0 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -79,7 +79,7 @@ force = 15.0 throwforce = 10.0 item_state = "pickaxe" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY materials = list(MAT_METAL=2000) //one sheet, but where can you make them? var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO origin_tech = "materials=1;engineering=1" @@ -152,7 +152,7 @@ icon_state = "smdrill" origin_tech = "materials=6;powerstorage=4;engineering=5;syndicate=3" desc = "Microscopic supermatter crystals cover the head of this tiny drill." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/drill/cyborg/diamond //This is the BORG version! name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics. @@ -184,7 +184,7 @@ force = 8.0 throwforce = 4.0 item_state = "shovel" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=50) origin_tech = "materials=1;engineering=1" attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked") @@ -198,7 +198,7 @@ item_state = "spade" force = 5.0 throwforce = 7.0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL toolspeed = 2 @@ -219,7 +219,7 @@ desc = "It allows you to store and deploy lazarus-injected creatures easier." icon = 'icons/obj/mobcap.dmi' icon_state = "mobcap0" - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_range = 20 var/mob/living/simple_animal/captured = null var/colorindex = 0 @@ -282,7 +282,7 @@ desc = "An emergency shelter stored within a pocket of bluespace." icon_state = "capsule" icon = 'icons/obj/mining.dmi' - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "engineering=3;bluespace=3" var/template_id = "shelter_alpha" var/datum/map_template/shelter/template diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 3fa8d1c1edf..30fca5f2f95 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -9,7 +9,7 @@ throwforce = 0 burn_state = FLAMMABLE burntime = 20 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY /obj/item/weapon/moneybag/attack_hand(user as mob) var/amt_gold = 0 @@ -119,4 +119,4 @@ new /obj/item/weapon/coin/silver(src) new /obj/item/weapon/coin/gold(src) new /obj/item/weapon/coin/gold(src) - new /obj/item/weapon/coin/adamantine(src) \ No newline at end of file + new /obj/item/weapon/coin/adamantine(src) diff --git a/code/modules/mining/ore.dm b/code/modules/mining/ore.dm index cc50f46b9e5..873b6c798d1 100644 --- a/code/modules/mining/ore.dm +++ b/code/modules/mining/ore.dm @@ -153,7 +153,7 @@ icon = 'icons/obj/mining.dmi' icon_state = "Gibtonite ore" item_state = "Gibtonite ore" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY throw_range = 0 anchored = 1 //Forces people to carry it by hand, no pulling! var/primed = 0 diff --git a/code/modules/mob/living/carbon/alien/alien_defenses.dm b/code/modules/mob/living/carbon/alien/alien_defenses.dm index c1ce34bf8e7..65e32e2fae9 100644 --- a/code/modules/mob/living/carbon/alien/alien_defenses.dm +++ b/code/modules/mob/living/carbon/alien/alien_defenses.dm @@ -1,5 +1,5 @@ -/mob/living/carbon/alien/hitby(atom/movable/AM) - ..(AM, 1) +/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush) + ..(AM, hitpush = 0) /*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other. As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble. diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index bc1e1e4f56d..3782806db33 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -13,6 +13,10 @@ alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/hunter ..() +/mob/living/carbon/alien/humanoid/hunter/movement_delay() + . = -1 //hunters are sanic + . += ..() //but they still need to slow down on stun + /mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates() ..() //-Yvarov @@ -79,17 +83,18 @@ else //Maybe uses plasma in the future, although that wouldn't make any sense... leaping = 1 update_icons() - throw_at(A,MAX_ALIEN_LEAP_DIST,1) - leaping = 0 - update_icons() + throw_at(A, MAX_ALIEN_LEAP_DIST, 1, spin = 0, diagonals_first = 1, callback = CALLBACK(src, .leap_end)) + +/mob/living/carbon/alien/humanoid/hunter/proc/leap_end() + leaping = 0 + update_icons() /mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/A) - if(!leaping) return ..() if(A) - if(istype(A, /mob/living)) + if(isliving(A)) var/mob/living/L = A var/blocked = 0 if(ishuman(A)) @@ -126,46 +131,3 @@ if(leaping) return ..() - - -//Modified throw_at() that will use diagonal dirs where appropriate -//instead of locking it to cardinal dirs -/mob/living/carbon/alien/humanoid/throw_at(atom/target, range, speed) - if(!target || !src) return 0 - - src.throwing = 1 - - var/dist_x = abs(target.x - src.x) - var/dist_y = abs(target.y - src.y) - var/dist_travelled = 0 - var/dist_since_sleep = 0 - - var/tdist_x = dist_x; - var/tdist_y = dist_y; - - if(dist_x <= dist_y) - tdist_x = dist_y; - tdist_y = dist_x; - - var/error = tdist_x/2 - tdist_y - while(target && (((((dist_x > dist_y) && ((src.x < target.x) || (src.x > target.x))) || ((dist_x <= dist_y) && ((src.y < target.y) || (src.y > target.y))) || (src.x > target.x)) && dist_travelled < range) || !has_gravity(src))) - - if(!src.throwing) break - if(!istype(src.loc, /turf)) break - - var/atom/step = get_step(src, get_dir(src,target)) - if(!step) - break - src.Move(step, get_dir(src, step)) - hit_check() - error += (error < 0) ? tdist_x : -tdist_y; - dist_travelled++ - dist_since_sleep++ - if(dist_since_sleep >= speed) - dist_since_sleep = 0 - sleep(1) - - - src.throwing = 0 - - return 1 diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index 8d8f8894234..6a9565fc449 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -12,14 +12,12 @@ pixel_x = -16 maxHealth = 200 health = 200 - move_delay_add = 1 large = 1 /mob/living/carbon/alien/humanoid/sentinel/praetorian name = "alien praetorian" maxHealth = 200 health = 200 - move_delay_add = 1 large = 1 /mob/living/carbon/alien/humanoid/sentinel/large/update_icons() diff --git a/code/modules/mob/living/carbon/alien/humanoid/empress.dm b/code/modules/mob/living/carbon/alien/humanoid/empress.dm index 287974b610f..7db3ea5b1c5 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/empress.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/empress.dm @@ -6,7 +6,6 @@ icon_state = "alienq_s" status_flags = CANPARALYSE mob_size = MOB_SIZE_LARGE - move_delay_add = 3 large = 1 ventcrawler = 0 diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index b99cde337d6..fff315c90e3 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -24,44 +24,10 @@ add_language("Hivemind") ..() -//This is fine, works the same as a human -/mob/living/carbon/alien/humanoid/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if((!( yes ) || now_pushing)) - return - now_pushing = 0 - ..() - if(!istype(AM, /atom/movable)) - return - - if(ismob(AM)) - var/mob/tmob = AM - tmob.LAssailant = src - - if(!now_pushing) - now_pushing = 1 - if(!AM.anchored) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window/full)) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - return - return /mob/living/carbon/alien/humanoid/movement_delay() - var/tally = 0 - if(istype(src, /mob/living/carbon/alien/humanoid/queen)) - tally += 4 - if(istype(src, /mob/living/carbon/alien/humanoid/drone)) - tally += 0 - if(istype(src, /mob/living/carbon/alien/humanoid/sentinel)) - tally += 0 - if(istype(src, /mob/living/carbon/alien/humanoid/hunter)) - tally = -2 // hunters go supersuperfast - return (tally + move_delay_add + config.alien_delay) + . = ..() + . += move_delay_add + config.alien_delay //move_delay_add is used to slow aliens with stuns /mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0) if(..()) diff --git a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm index 223b6a512ae..08017da0b76 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/inventory.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/inventory.dm @@ -22,7 +22,7 @@ if(slot_l_store) if(l_store) return - if(W.w_class > 3) + if(W.w_class > WEIGHT_CLASS_NORMAL) return unEquip(W) l_store = W @@ -30,7 +30,7 @@ if(slot_r_store) if(r_store) return - if(W.w_class > 3) + if(W.w_class > WEIGHT_CLASS_NORMAL) return unEquip(W) r_store = W @@ -44,4 +44,4 @@ if(slot_l_store) if(l_store) l_store.attack_alien(src) if(slot_r_store) - if(r_store) r_store.attack_alien(src) \ No newline at end of file + if(r_store) r_store.attack_alien(src) diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 11914d3c0ee..a8f17714b0e 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -28,6 +28,9 @@ alien_organs += new /obj/item/organ/internal/xenos/neurotoxin ..() +/mob/living/carbon/alien/humanoid/queen/movement_delay() + . = ..() + . += 3 /mob/living/carbon/alien/humanoid/queen/handle_regular_hud_updates() ..() //-Yvarov diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index a78ab9c4c77..df00e862b38 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -26,38 +26,6 @@ ..() -//This is fine, works the same as a human -/mob/living/carbon/alien/larva/Bump(atom/movable/AM as mob|obj, yes) - - spawn( 0 ) - if((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) - if(prob(70)) - to_chat(src, "You fail to push [tmob]'s fat ass out of the way.") - now_pushing = 0 - return - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - tmob.LAssailant = src - - now_pushing = 0 - ..() - if(!( istype(AM, /atom/movable) )) - return - if(!( now_pushing )) - now_pushing = 1 - if(!( AM.anchored )) - var/t = get_dir(src, AM) - step(AM, t) - now_pushing = null - return - return - //This needs to be fixed /mob/living/carbon/alien/larva/Stat() ..() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 98d1bec775c..38ea99834b0 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -14,7 +14,7 @@ var/const/MAX_ACTIVE_TIME = 400 icon = 'icons/mob/alien.dmi' icon_state = "facehugger" item_state = "facehugger" - w_class = 1 //note: can be picked up by aliens unlike most other items of w_class below 4 + w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4 throw_range = 5 tint = 3 flags = AIRTIGHT @@ -249,4 +249,4 @@ var/const/MAX_ACTIVE_TIME = 400 gender = FEMALE /obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled - return \ No newline at end of file + return diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 15c52d2693c..ec77d1be3bf 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -5,7 +5,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 = WEIGHT_CLASS_NORMAL origin_tech = "biotech=3" //Revised. Brainmob is now contained directly within object of transfer. MMI in this case. diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 56a98142f80..5a62ead4952 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -4,7 +4,7 @@ max_damage = 200 icon_state = "brain2" force = 1.0 - w_class = 2 + w_class = WEIGHT_CLASS_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 565dd250fd8..8dd6e14e427 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 = WEIGHT_CLASS_NORMAL origin_tech = "biotech=3;programming=2" var/searching = 0 @@ -37,7 +37,7 @@ silenced = !silenced to_chat(user, "You toggle the speaker [silenced ? "off" : "on"].") if(brainmob && brainmob.key) - to_chat(brainmob, "Your internal speaker has been toggled [silenced ? "off" : "on"].") + to_chat(brainmob, "Your internal speaker has been toggled [silenced ? "off" : "on"].") /obj/item/device/mmi/posibrain/proc/request_player() for(var/mob/dead/observer/O in player_list) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 5911c04f563..141d760287a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -492,6 +492,29 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, //Throwing stuff +/mob/living/carbon/throw_impact(atom/hit_atom, throwingdatum) + . = ..() + var/hurt = TRUE + /*if(istype(throwingdatum, /datum/thrownthing)) + var/datum/thrownthing/D = throwingdatum + if(isrobot(D.thrower)) + var/mob/living/silicon/robot/R = D.thrower + if(!R.emagged) + hurt = FALSE*/ + if(hit_atom.density && isturf(hit_atom)) + if(hurt) + Weaken(1) + take_organ_damage(10) + if(iscarbon(hit_atom) && hit_atom != src) + var/mob/living/carbon/victim = hit_atom + if(hurt) + victim.take_organ_damage(10) + take_organ_damage(10) + victim.Weaken(1) + Weaken(1) + visible_message("[src] crashes into [victim], knocking them both over!", "You violently crash into [victim]!") + playsound(src, 'sound/weapons/punch1.ogg', 50, 1) + /mob/living/carbon/proc/toggle_throw_mode() if(in_throw_mode) throw_mode_off() diff --git a/code/modules/mob/living/carbon/carbon_defenses.dm b/code/modules/mob/living/carbon/carbon_defenses.dm index b2dcf20f1b2..1c911a3f661 100644 --- a/code/modules/mob/living/carbon/carbon_defenses.dm +++ b/code/modules/mob/living/carbon/carbon_defenses.dm @@ -1,13 +1,14 @@ -/mob/living/carbon/hitby(atom/movable/AM) - if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode - if(canmove && !restrained()) - if(istype(AM, /obj/item)) - var/obj/item/I = AM - if(isturf(I.loc)) - put_in_active_hand(I) - visible_message("[src] catches [I]!") - throw_mode_off() - return +/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0) + if(!skipcatch) + if(in_throw_mode && !get_active_hand()) //empty active hand and we're in throw mode + if(canmove && !restrained()) + if(istype(AM, /obj/item)) + var/obj/item/I = AM + if(isturf(I.loc)) + put_in_active_hand(I) + visible_message("[src] catches [I]!") + throw_mode_off() + return 1 ..() /mob/living/carbon/water_act(volume, temperature, source) diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index e900fc10517..6e34291caae 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -20,7 +20,6 @@ var/pulse = PULSE_NORM //current pulse level - var/heart_attack = 0 var/wetlevel = 0 //how wet the mob is var/oxygen_alert = 0 @@ -29,4 +28,4 @@ var/fire_alert = 0 var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks. - var/co2overloadtime = null \ No newline at end of file + var/co2overloadtime = null diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index b3580778d22..69e86de81e6 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -99,7 +99,7 @@ stat = DEAD SetDizzy(0) SetJitter(0) - heart_attack = 0 + set_heartattack(FALSE) //Handle species-specific deaths. if(species) species.handle_death(src) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1c012655cdc..000a7a52bd0 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -147,93 +147,6 @@ /mob/living/carbon/human/stok/New(var/new_loc) ..(new_loc, "Stok") -/mob/living/carbon/human/Bump(atom/movable/AM, yes) - if(!(yes) || now_pushing || buckled) - return 0 - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - - //BubbleWrap - Should stop you pushing a restrained person out of the way - //i still don't get it, is this supposed to be 'bubblewrapping' or was it made by a guy named 'BubbleWrap' - if(ishuman(tmob)) - for(var/mob/M in range(tmob, 1)) - - if(tmob.pinned.len || (M.pulling == tmob && (tmob.restrained() && !M.restrained()) && M.stat == CONSCIOUS)) - if(!(world.time % 5)) //tmob is pinned to wall, or is restrained and pulled by a concious unrestrained human - to_chat(src, "[tmob] is restrained, you cannot push past.") - now_pushing = 0 - return 0 - - //I have to fucking document this somewhere- the above if(tmob.pinned.len || etc) check above had - //locate(/obj/item/weapon/grab, tmob.grabbed_by.len)) at the end of it - //FIRST OF ALL, THAT IS NOT HOW YOU FUCKING USE LOCATE() - //SECOND OF ALL, OH GOD, WHY WOULD YOU EVER WANT GRABBED MOBS TO BE UNABLE TO BE PUSHED PAST GOD - - if(tmob.pulling == M && (M.restrained() && !tmob.restrained()) && tmob.stat == CONSCIOUS) - if(!(world.time % 5)) - to_chat(src, "[tmob] is restraining [M], you cannot push past.") - now_pushing = 0 - return 0 - - //Leaping mobs just land on the tile, no pushing, no anything. - if(status_flags & LEAPING) - loc = tmob.loc - status_flags &= ~LEAPING - now_pushing = 0 - return - - //BubbleWrap: people in handcuffs are always switched around as if they were on 'help' intent to prevent a person being pulled from being seperated from their puller - //it might be 'bubblewrapping' given that this rhymes with 'hugboxing' - if((tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || restrained())) - if((canmove && tmob.canmove) && (!tmob.buckled && !tmob.buckled_mob)) - var/turf/oldloc = loc - loc = tmob.loc - tmob.loc = oldloc - now_pushing = 0 - for(var/mob/living/carbon/slime/slime in view(1,tmob)) - if(slime.Victim == tmob) - slime.UpdateFeed() - return - - if(ishuman(tmob) && (FAT in tmob.mutations)) - if(prob(40) && !(FAT in src.mutations)) - to_chat(src, "You fail to push [tmob]'s fat ass out of the way.") - now_pushing = 0 - return - - - //anti-riot equipment is also anti-push - if(tmob.r_hand && (prob(tmob.r_hand.block_chance * 2)) && !istype(tmob.r_hand, /obj/item/clothing)) - now_pushing = 0 - return - if(tmob.l_hand && (prob(tmob.l_hand.block_chance * 2)) && !istype(tmob.l_hand, /obj/item/clothing)) - now_pushing = 0 - return - - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - - tmob.LAssailant = src - - now_pushing = 0 - spawn(0) - ..() - if(!istype(AM, /atom/movable)) - return - if(!now_pushing) - now_pushing = 1 - - if(!AM.anchored) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window/full)) - for(var/obj/structure/window/win in get_step(AM, t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = 0 - /mob/living/carbon/human/Stat() ..() statpanel("Status") @@ -531,6 +444,17 @@ dat += "Head:[(head && !(head.flags&ABSTRACT)) ? head : "Empty"]" + var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket) + if(C) + if(slot_wear_mask in obscured) + dat += " ↳Headpocket:Obscured" + else + var/list/items = C.get_contents() + if(items.len) + dat += " ↳Headpocket:Dislodge Items" + else + dat += " ↳Headpocket:Empty" + if(slot_wear_mask in obscured) dat += "Mask:Obscured" else @@ -759,9 +683,9 @@ if(species) species_siemens_coeff = species.siemens_coeff siemens_coeff = gloves_siemens_coeff * species_siemens_coeff - if(heart_attack) + if(undergoing_cardiac_arrest()) if(shock_damage * siemens_coeff >= 1 && prob(25)) - heart_attack = 0 + set_heartattack(FALSE) if(stat == CONSCIOUS) to_chat(src, "You feel your heart beating again!") . = ..() @@ -826,6 +750,16 @@ var/obj/item/clothing/under/U = w_uniform U.set_sensors(usr) + if(href_list["dislodge_headpocket"]) + usr.visible_message("[usr] is trying to remove something from [src]'s head!", + "You start to dislodge whatever's inside [src]'s headpocket!") + if(do_mob(usr, src, POCKET_STRIP_DELAY)) + usr.visible_message("[usr] has dislodged something from [src]'s head!", + "You have dislodged everything from [src]'s headpocket!") + var/obj/item/organ/internal/headpocket/C = get_int_organ(/obj/item/organ/internal/headpocket) + C.empty_contents() + add_logs(usr, src, "stripped", addition="of headpocket items", print_attack_log=isLivingSSD(src)) + if(href_list["strip_accessory"]) if(istype(w_uniform, /obj/item/clothing/under)) var/obj/item/clothing/under/U = w_uniform diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 3f25873e5f2..585ac587ffc 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -313,85 +313,37 @@ emp_act return 1*/ //this proc handles being hit by a thrown atom -/mob/living/carbon/human/hitby(atom/movable/AM as mob|obj,var/speed = 5) +/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) + var/obj/item/I + var/throwpower = 30 if(istype(AM, /obj/item)) - var/obj/item/I = AM - - if(in_throw_mode && !get_active_hand() && speed <= 5) //empty active hand and we're in throw mode - if(canmove && !restrained()) - if(isturf(I.loc)) - put_in_active_hand(I) - visible_message("[src] catches [I]!") - throw_mode_off() - return - - var/zone = ran_zone("chest", 65) - var/dtype = BRUTE - if(istype(I, /obj/item/weapon)) - var/obj/item/weapon/W = I - dtype = W.damtype - var/throw_damage = I.throwforce*(speed/5) - - I.throwing = 0 //it hit, so stop moving - - if((I.thrower != src) && check_shields(throw_damage, "\the [I.name]", I, THROWN_PROJECTILE_ATTACK)) - return - - var/obj/item/organ/external/affecting = get_organ(zone) - if(!affecting) - var/missverb = (I.gender == PLURAL) ? "whizz" : "whizzes" - visible_message("\The [I] [missverb] past [src]'s missing [parse_zone(zone)]!", - "\The [I] [missverb] past your missing [parse_zone(zone)]!") - return - var/hit_area = affecting.name - - src.visible_message("[src] has been hit in the [hit_area] by [I].") - var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration) //I guess "melee" is the best fit here - - apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I) - - if(ismob(I.thrower)) - var/mob/M = I.thrower - if(M) - add_logs(M, src, "hit", I, " (thrown)", print_attack_log = I.throwforce) - - //thrown weapon embedded object code. - if(dtype == BRUTE && istype(I)) - if(!I.is_robot_module()) + I = AM + throwpower = I.throwforce + if(I.thrownby == src) //No throwing stuff at yourself to trigger reactions + return ..() + if(check_shields(throwpower, "\the [AM.name]", AM, THROWN_PROJECTILE_ATTACK)) + hitpush = 0 + skipcatch = 1 + blocked = 1 + /*else if(I) + if(I.throw_speed >= EMBED_THROWSPEED_THRESHOLD) + if(!I.is_robot_module()) + var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration) //I guess "melee" is the best fit here var/sharp = is_sharp(I) - var/damage = throw_damage + var/damage = throwpower * (I.throw_speed / 5) if(armor) - damage /= armor+1 + damage /= armor + 1 //blunt objects should really not be embedding in things unless a huge amount of force is involved - var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3) - var/embed_threshold = sharp? 5*I.w_class : 15*I.w_class + var/embed_chance = sharp? damage / I.w_class : damage/(I.w_class * 3) + var/embed_threshold = sharp? 5 * I.w_class : 15 * I.w_class //Sharp objects will always embed if they do enough damage. //Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold - if(((sharp && prob(damage/(10*I.w_class)*100)) || (damage > embed_threshold && prob(embed_chance))) && (I.no_embed == 0)) - affecting.embed(I) - - // Begin BS12 momentum-transfer code. - if(I.throw_source && speed >= 15) - var/obj/item/weapon/W = I - var/momentum = speed/2 - var/dir = get_dir(I.throw_source, src) - - visible_message("[src] staggers under the impact!","You stagger under the impact!") - src.throw_at(get_edge_target_turf(src,dir),1,momentum) - - if(!W || !src) return - - if(W.loc == src && W.sharp) //Projectile is embedded and suitable for pinning. - var/turf/T = near_wall(dir,2) - - if(T) - src.loc = T - visible_message("[src] is pinned to the wall by [I]!","You are pinned to the wall by [I]!") - src.anchored = 1 - src.pinned += I + if(((sharp && prob(damage / (10 * I.w_class) * 100)) || (damage > embed_threshold && prob(embed_chance))) && (I.no_embed == 0)) + affecting.embed(I)*/ + return ..() /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index cf66c1d2c15..87176a7a02a 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -1,67 +1,8 @@ /mob/living/carbon/human/movement_delay() - var/tally = 0 - - if(species.slowdown) - tally = species.slowdown - - if(!has_gravity(src)) - return -1 // It's hard to be slowed down in space by... anything - - if(flying) return -1 - - if(embedded_flag) - handle_embedded_objects() //Moving with objects stuck in you can cause bad times. - - if(slowed) - tally += 10 - - var/health_deficiency = (maxHealth - health + staminaloss) - if(reagents) - for(var/datum/reagent/R in reagents.reagent_list) - if(R.shock_reduction) - health_deficiency -= R.shock_reduction - if(health_deficiency >= 40) - tally += (health_deficiency / 25) - - var/hungry = (500 - nutrition)/5 // So overeat would be 100 and default level would be 80 - if(hungry >= 70) - tally += hungry/50 - - if(wear_suit) - tally += wear_suit.slowdown - - if(!buckled) - if(shoes) - tally += shoes.slowdown - - if(shock_stage >= 10) tally += 3 - - if(back) - tally += back.slowdown - - if(l_hand && (l_hand.flags & HANDSLOW)) - tally += l_hand.slowdown - if(r_hand && (r_hand.flags & HANDSLOW)) - tally += r_hand.slowdown - - if(FAT in src.mutations) - tally += 1.5 - if(bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) - tally += (BODYTEMP_COLD_DAMAGE_LIMIT - bodytemperature) / COLD_SLOWDOWN_FACTOR - - tally += 2*stance_damage //damaged/missing feet or legs is slow - - if(RUN in mutations) - tally = -1 - if(status_flags & IGNORESLOWDOWN) // make sure this is always at the end so we don't have ignore slowdown getting ignored itself - tally = -1 - - if(status_flags & GOTTAGOFAST) - tally -= 1 - if(status_flags & GOTTAGOREALLYFAST) - tally -= 2 - - return (tally + config.human_delay) + . = 0 + . += ..() + . += config.human_delay + . += species.movement_delay(src) /mob/living/carbon/human/Process_Spacemove(movement_dir = 0) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 5ae7547be58..24ed336a4a3 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -65,7 +65,8 @@ stance_damage = 0 // Buckled to a bed/chair. Stance damage is forced to 0 since they're sitting on something solid - if(istype(buckled, /obj/structure/stool/bed)) + // Not standing, so no need to care about stance + if(istype(buckled, /obj/structure/stool/bed) || !isturf(loc)) return for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot")) diff --git a/code/modules/mob/living/carbon/human/interactive/interactive.dm b/code/modules/mob/living/carbon/human/interactive/interactive.dm index a208752af24..9f27956b764 100644 --- a/code/modules/mob/living/carbon/human/interactive/interactive.dm +++ b/code/modules/mob/living/carbon/human/interactive/interactive.dm @@ -449,7 +449,7 @@ ..() retalTarget(user) -/mob/living/carbon/human/interactive/hitby(atom/movable/AM) +/mob/living/carbon/human/interactive/hitby(atom/movable/AM, skipcatch, hitpush, blocked) ..() var/mob/living/carbon/C = locate(/mob/living/carbon) in view(SNPC_MIN_RANGE_FIND, src) if(C) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index bb297513ef5..8e1c32f931a 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -546,7 +546,7 @@ return 0 if(I.slot_flags & SLOT_DENYPOCKET) return - if(I.w_class <= 2 || (I.slot_flags & SLOT_POCKET)) + if(I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET)) return 1 if(slot_r_store) if(I.flags & NODROP) @@ -559,7 +559,7 @@ return 0 if(I.slot_flags & SLOT_DENYPOCKET) return 0 - if(I.w_class <= 2 || (I.slot_flags & SLOT_POCKET)) + if(I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET)) return 1 return 0 if(slot_s_store) @@ -575,7 +575,7 @@ if(!disable_warning) to_chat(src, "You somehow have a suit with no defined allowed items for suit storage, stop that.") return 0 - if(I.w_class > 4) + if(I.w_class > WEIGHT_CLASS_BULKY) if(!disable_warning) to_chat(src, "The [name] is too big to attach.") return 0 diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index be265669b79..00dbc50e8d0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1032,7 +1032,7 @@ if(stat == DEAD) return PULSE_NONE //that's it, you're dead, nothing can influence your pulse - if(heart_attack) + if(undergoing_cardiac_arrest()) return PULSE_NONE var/temp = PULSE_NORM @@ -1175,14 +1175,37 @@ return stuttering + +/mob/living/carbon/human/proc/can_heartattack() + if(species.flags & (NO_BLOOD|NO_INTORGANS)) + return FALSE + return TRUE + +/mob/living/carbon/human/proc/undergoing_cardiac_arrest() + if(!can_heartattack()) + return FALSE + var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart) + if(istype(heart) && heart.beating) + return FALSE + return TRUE + +/mob/living/carbon/human/proc/set_heartattack(status) + if(!can_heartattack()) + return FALSE + + var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart) + if(!istype(heart)) + return FALSE + + heart.beating = !status + /mob/living/carbon/human/proc/handle_heartattack() - if(!heart_attack) + if(!can_heartattack() || !undergoing_cardiac_arrest() || reagents.has_reagent("corazone")) return - else - AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) - adjustOxyLoss(5) - Paralyse(4) - adjustBruteLoss(2) + AdjustLoseBreath(2, bound_lower = 0, bound_upper = 3) + adjustOxyLoss(5) + Paralyse(4) + adjustBruteLoss(2) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index d2d44757705..c1d1a169c1d 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -380,6 +380,72 @@ if(heat_level_3_breathe to INFINITY) H.apply_damage(hot_env_multiplier*HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat") +//////////////// +// MOVE SPEED // +//////////////// + +/datum/species/proc/movement_delay(mob/living/carbon/human/H) + . = 0 //We start at 0. + var/flight = 0 //Check for flight and flying items + var/ignoreslow = 0 + var/gravity = 0 + + if(H.flying) + flight = 1 + + if((H.status_flags & IGNORESLOWDOWN) || (RUN in H.mutations)) + ignoreslow = 1 + + if(has_gravity(H)) + gravity = 1 + + if(H.embedded_flag) + H.handle_embedded_objects() //Moving with objects stuck in you can cause bad times. + + if(!ignoreslow && gravity) + if(slowdown) + . = slowdown + + if(H.wear_suit) + . += H.wear_suit.slowdown + if(!H.buckled) + if(H.shoes) + . += H.shoes.slowdown + if(H.back) + . += H.back.slowdown + if(H.l_hand && (H.l_hand.flags & HANDSLOW)) + . += H.l_hand.slowdown + if(H.r_hand && (H.r_hand.flags & HANDSLOW)) + . += H.r_hand.slowdown + + var/health_deficiency = (H.maxHealth - H.health + H.staminaloss) + var/hungry = (500 - H.nutrition)/5 // So overeat would be 100 and default level would be 80 + if(H.reagents) + for(var/datum/reagent/R in H.reagents.reagent_list) + if(R.shock_reduction) + health_deficiency -= R.shock_reduction + if(health_deficiency >= 40) + if(flight) + . += (health_deficiency / 75) + else + . += (health_deficiency / 25) + if(H.shock_stage >= 10) + . += 3 + . += 2 * H.stance_damage //damaged/missing feet or legs is slow + + if((hungry >= 70) && !flight) + . += hungry/50 + if(FAT in H.mutations) + . += (1.5 - flight) + if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT) + . += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR + + if(H.status_flags & GOTTAGOFAST) + . -= 1 + if(H.status_flags & GOTTAGOREALLYFAST) + . -= 2 + return . + /datum/species/proc/handle_post_spawn(var/mob/living/carbon/C) //Handles anything not already covered by basic species assignment. grant_abilities(C) return diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index ff7d2fa22d6..4348b8b048b 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -230,7 +230,8 @@ "kidneys" = /obj/item/organ/internal/kidneys, "brain" = /obj/item/organ/internal/brain, "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes //Default darksight of 2. + "eyes" = /obj/item/organ/internal/eyes, //Default darksight of 2. + "headpocket" = /obj/item/organ/internal/headpocket ) suicide_messages = list( diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 003cd4a079e..85fed33c156 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -83,79 +83,45 @@ if(bodytemperature >= 330.23) // 135 F return -1 // slimes become supercharged at high temperatures - var/tally = 0 + . = ..() var/health_deficiency = (100 - health) - if(health_deficiency >= 45) tally += (health_deficiency / 25) + if(health_deficiency >= 45) + . += (health_deficiency / 25) if(bodytemperature < 183.222) - tally += (283.222 - bodytemperature) / 10 * 1.75 + . += (283.222 - bodytemperature) / 10 * 1.75 if(reagents) if(reagents.has_reagent("methamphetamine")) // Meth slows slimes down - tally *= 2 + . *= 2 if(reagents.has_reagent("frostoil")) // Frostoil also makes them move VEEERRYYYYY slow - tally *= 5 + . *= 5 if(health <= 0) // if damaged, the slime moves twice as slow - tally *= 2 + . *= 2 - return tally + config.slime_delay + . += config.slime_delay -/mob/living/carbon/slime/Bump(atom/movable/AM as mob|obj, yes) - if((!(yes) || now_pushing)) - return - now_pushing = 1 - - if(isobj(AM)) - if(!client && powerlevel > 0) - var/probab = 10 - switch(powerlevel) - if(1 to 2) probab = 20 - if(3 to 4) probab = 30 - if(5 to 6) probab = 40 - if(7 to 8) probab = 60 - if(9) probab = 70 - if(10) probab = 95 - if(prob(probab)) - if(istype(AM, /obj/structure/window) || istype(AM, /obj/structure/grille)) - if(nutrition <= get_hunger_nutrition() && !Atkcool) - if(is_adult || prob(5)) - AM.attack_slime(src) - spawn() - Atkcool = 1 - sleep(45) - Atkcool = 0 - - if(ismob(AM)) - var/mob/tmob = AM - - if(is_adult) - if(istype(tmob, /mob/living/carbon/human)) - if(prob(90)) - now_pushing = 0 - return - else - if(istype(tmob, /mob/living/carbon/human)) - now_pushing = 0 - return - - now_pushing = 0 - ..() - if(!istype(AM, /atom/movable)) - return - if(!( now_pushing )) - now_pushing = 1 - if(!( AM.anchored )) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null +/mob/living/carbon/slime/ObjBump(obj/O) + if(!client && powerlevel > 0) + var/chance = 10 + switch(powerlevel) + if(1 to 2) chance = 20 + if(3 to 4) chance = 30 + if(5 to 6) chance = 40 + if(7 to 8) chance = 60 + if(9) chance = 70 + if(10) chance = 95 + if(prob(chance)) + if(istype(O, /obj/structure/window) || istype(O, /obj/structure/grille)) + if(nutrition <= get_hunger_nutrition() && !Atkcool) + if(is_adult || prob(5)) + O.attack_slime(src) + Atkcool = 1 + spawn(45) + Atkcool = 0 /mob/living/carbon/slime/Process_Spacemove(var/movement_dir = 0) return 2 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 525559e8e6c..6fd8a08e1e1 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -14,6 +14,121 @@ /mob/living/proc/OpenCraftingMenu() return +//Generic Bump(). Override MobBump() and ObjBump() instead of this. +/mob/living/Bump(atom/A, yes) + if(..()) //we are thrown onto something + return + if(buckled || !yes || now_pushing) + return + if(ismob(A)) + if(MobBump(A)) + return + if(isobj(A)) + if(ObjBump(A)) + return + if(istype(A, /atom/movable)) + if(PushAM(A)) + return + +//Called when we bump into a mob +/mob/living/proc/MobBump(mob/M) + //Even if we don't push/swap places, we "touched" them, so spread fire + spreadFire(M) + + if(now_pushing) + return 1 + + //Should stop you pushing a restrained person out of the way + if(isliving(M)) + var/mob/living/L = M + if(L.pulledby && L.pulledby != src && L.restrained()) + if(!(world.time % 5)) + to_chat(src, "[L] is restrained, you cannot push past.") + return 1 + + if(L.pulling) + if(ismob(L.pulling)) + var/mob/P = L.pulling + if(P.restrained()) + if(!(world.time % 5)) + to_chat(src, "[L] is restrained, you cannot push past.") + return 1 + + if(moving_diagonally) //no mob swap during diagonal moves. + return 1 + + if(!M.buckled && !M.has_buckled_mobs()) + var/mob_swap + //the puller can always swap with it's victim if on grab intent + if(M.pulledby == src && a_intent == I_GRAB) + mob_swap = 1 + //restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller + else if((M.restrained() || M.a_intent == I_HELP) && (restrained() || a_intent == I_HELP)) + mob_swap = 1 + if(mob_swap) + //switch our position with M + if(loc && !loc.Adjacent(M.loc)) + return 1 + now_pushing = 1 + var/oldloc = loc + var/oldMloc = M.loc + + var/M_passmob = (M.pass_flags & PASSMOB) // we give PASSMOB to both mobs to avoid bumping other mobs during swap. + var/src_passmob = (pass_flags & PASSMOB) + M.pass_flags |= PASSMOB + pass_flags |= PASSMOB + + M.Move(oldloc) + Move(oldMloc) + + if(!src_passmob) + pass_flags &= ~PASSMOB + if(!M_passmob) + M.pass_flags &= ~PASSMOB + + now_pushing = 0 + return 1 + + // okay, so we didn't switch. but should we push? + // not if he's not CANPUSH of course + if(!(M.status_flags & CANPUSH)) + return 1 + //anti-riot equipment is also anti-push + if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !istype(M.r_hand, /obj/item/clothing)) + return 1 + if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !istype(M.l_hand, /obj/item/clothing)) + return 1 + +//Called when we bump into an obj +/mob/living/proc/ObjBump(obj/O) + return + +//Called when we want to push an atom/movable +/mob/living/proc/PushAM(atom/movable/AM) + if(now_pushing) + return 1 + if(moving_diagonally) // no pushing during diagonal moves + return 1 + if(!client && (mob_size < MOB_SIZE_SMALL)) + return + if(!AM.anchored) + now_pushing = 1 + var/t = get_dir(src, AM) + if(istype(AM, /obj/structure/window/full)) + for(var/obj/structure/window/win in get_step(AM, t)) + now_pushing = 0 + return + if(pulling == AM) + stop_pulling() + var/current_dir + if(isliving(AM)) + current_dir = AM.dir + step(AM, t) + if(current_dir) + AM.setDir(current_dir) + now_pushing = 0 + + /mob/living/Stat() . = ..() if(. && get_rig_stats) @@ -377,7 +492,6 @@ if(iscarbon(src)) var/mob/living/carbon/C = src C.handcuffed = initial(C.handcuffed) - C.heart_attack = 0 for(var/datum/disease/D in C.viruses) D.cure(0) @@ -385,6 +499,7 @@ // restore all of the human's blood and reset their shock stage if(ishuman(src)) human_mob = src + human_mob.set_heartattack(FALSE) human_mob.restore_blood() human_mob.shock_stage = 0 human_mob.decaylevel = 0 @@ -430,83 +545,47 @@ else return 0 + var/atom/movable/pullee = pulling + if(pullee && get_dist(src, pullee) > 1) + stop_pulling() + if(pullee && !isturf(pullee.loc) && pullee.loc != loc) + log_game("DEBUG: [src]'s pull on [pullee] was broken despite [pullee] being in [pullee.loc]. Pull stopped manually.") + stop_pulling() if(restrained()) stop_pulling() - - var/t7 = 1 - if(restrained()) - for(var/mob/living/M in range(src, 1)) - if((M.pulling == src && M.stat == 0 && !( M.restrained() ))) - t7 = null - if(t7 && pulling && (get_dist(src, pulling) <= 1 || pulling.loc == loc)) - var/turf/T = loc - . = ..() - - if(pulling && pulling.loc) - if(!( isturf(pulling.loc) )) - stop_pulling() - return - else - if(Debug) - diary <<"pulling disappeared? at [__LINE__] in mob.dm - pulling = [pulling]" - diary <<"REPORT THIS" - - ///// - if(pulling && pulling.anchored) - stop_pulling() - return - - if(!restrained()) - var/diag = get_dir(src, pulling) - if((diag - 1) & diag) - else - diag = null - if((get_dist(src, pulling) > 1 || diag)) - if(isliving(pulling)) - var/mob/living/M = pulling - var/ok = 1 - if(locate(/obj/item/weapon/grab, M.grabbed_by)) - if(prob(75)) - var/obj/item/weapon/grab/G = pick(M.grabbed_by) - if(istype(G, /obj/item/weapon/grab)) - for(var/mob/O in viewers(M, null)) - O.show_message(text("[] has been pulled from []'s grip by []", G.affecting, G.assailant, src), 1) - //G = null - qdel(G) - else - ok = 0 - if(locate(/obj/item/weapon/grab, M.grabbed_by.len)) - ok = 0 - if(ok) - var/atom/movable/t = M.pulling - M.stop_pulling() - - if(M.lying && (prob(M.getBruteLoss() / 6))) - var/turf/location = M.loc - if(istype(location, /turf/simulated)) - location.add_blood(M) - pulling.Move(T, get_dir(pulling, T)) - if(M) - M.start_pulling(t) - else - if(pulling) - pulling.Move(T, get_dir(pulling, T)) - else - stop_pulling() - . = ..() - - if(s_active && !( s_active in contents ) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much. - s_active.close(src) - - if(.) // did we actually move? + var/turf/T = loc + . = ..() + if(.) handle_footstep(loc) step_count++ + if(pulling && pulling == pullee) // we were pulling a thing and didn't lose it during our move. + if(pulling.anchored) + stop_pulling() + return + + var/pull_dir = get_dir(src, pulling) + if(get_dist(src, pulling) > 1 || ((pull_dir - 1) & pull_dir)) // puller and pullee more than one tile away or in diagonal position + //if(isliving(pulling)) + //var/mob/living/M = pulling + //if(M.lying && !M.buckled && (prob(M.getBruteLoss() * 200 / M.maxHealth))) + //M.makeTrail(T) + pulling.Move(T, get_dir(pulling, T)) // the pullee tries to reach our previous position + if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up + stop_pulling() + + if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //seperated from our puller and not in the middle of a diagonal move + pulledby.stop_pulling() + + if(s_active && !(s_active in contents) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much. + s_active.close(src) + if(update_slimes) for(var/mob/living/carbon/slime/M in view(1,src)) M.UpdateFeed(src) + /mob/living/proc/handle_footstep(turf/T) if(istype(T)) return 1 @@ -838,13 +917,24 @@ visible_message("[user] butchers [src].") gib() -/mob/living/movement_delay() - var/tally = 0 - +/mob/living/movement_delay(ignorewalk = 0) + . = ..() + if(isturf(loc)) + var/turf/T = loc + . += T.slowdown if(slowed) - tally += 10 + . += 10 + if(ignorewalk) + . += config.run_speed + else + switch(m_intent) + if("run") + if(drowsyness > 0) + . += 6 + . += config.run_speed + if("walk") + . += config.walk_speed - return tally /mob/living/proc/can_use_guns(var/obj/item/weapon/gun/G) if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser() && !issmall(src)) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index bdca022648e..3aec754eabb 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -52,7 +52,7 @@ if(P.dismemberment) check_projectile_dismemberment(P, def_zone) return P.on_hit(src, armor, def_zone) - + /mob/living/proc/check_projectile_dismemberment(obj/item/projectile/P, def_zone) return 0 @@ -65,60 +65,47 @@ O.emp_act(severity) ..() +/obj/item/proc/get_volume_by_throwforce_and_or_w_class() + if(throwforce && w_class) + return Clamp((throwforce + w_class) * 5, 30, 100)// Add the item's throwforce to its weight class and multiply by 5, then clamp the value between 30 and 100 + else if(w_class) + return Clamp(w_class * 8, 20, 100) // Multiply the item's weight class by 8, then clamp the value between 20 and 100 + else + return 0 + //this proc handles being hit by a thrown atom -/mob/living/hitby(atom/movable/AM as mob|obj,var/speed = 5)//Standardization and logging -Sieve +/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)//Standardization and logging -Sieve if(istype(AM, /obj/item)) var/obj/item/I = AM var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest - var/dtype = BRUTE + var/dtype = BRUTE + var/volume = I.get_volume_by_throwforce_and_or_w_class() if(istype(I, /obj/item/weapon)) var/obj/item/weapon/W = I dtype = W.damtype - if(W.hitsound && W.throwforce > 0) - playsound(loc, W.hitsound, 30, 1, -1) + if(W.throwforce > 0) //If the weapon's throwforce is greater than zero... + if(W.hitsound) //...and hitsound is defined... + playsound(loc, W.hitsound, volume, 1, -1) //...play the weapon's hitsound. + else //Otherwise, if hitsound isn't defined... + playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1) //...play genhit1.ogg. - //run to-hit check here + else if(I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero... + playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1)//...play genhit1.ogg + if(!I.throwforce)// Otherwise, if the item's throwforce is 0... + playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg. + if(!blocked) + visible_message("[src] has been hit by [I].", + "[src] has been hit by [I].") + var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration) + apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), has_edge(I), I) + if(I.thrownby) + add_logs(I.thrownby, src, "hit", I) + else + return 1 + else + playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1) //...play genhit1.ogg.) + ..() - var/throw_damage = I.throwforce*(speed/5) - - src.visible_message("[src] has been hit by [I].") - var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration) - - apply_damage(throw_damage, dtype, zone, armor, is_sharp(I), has_edge(I), I) - - I.throwing = 0 //it hit, so stop moving - - if(ismob(I.thrower)) - var/mob/M = I.thrower - if(M) - create_attack_log("Has been hit with a [I], thrown by [key_name(M)]") - M.create_attack_log("Hit [key_name(src)] with a thrown [I]") - if(!istype(src,/mob/living/simple_animal/mouse)) - msg_admin_attack("[key_name_admin(src)] was hit by a [I], thrown by [key_name_admin(M)]") - - // Begin BS12 momentum-transfer code. - if(I.throw_source && speed >= 15) - var/obj/item/weapon/W = I - var/momentum = speed/2 - var/dir = get_dir(I.throw_source, src) - - visible_message("[src] staggers under the impact!","You stagger under the impact!") - src.throw_at(get_edge_target_turf(src,dir),1,momentum) - - if(!W || !src) return - - if(W.sharp) //Projectile is suitable for pinning. - //Handles embedding for non-humans and simple_animals. - I.loc = src - embedded += I - - var/turf/T = near_wall(dir,2) - - if(T) - src.loc = T - visible_message("[src] is pinned to the wall by [I]!","You are pinned to the wall by [I]!") - src.anchored = 1 - src.pinned += I /mob/living/mech_melee_attack(obj/mecha/M) if(M.occupant.a_intent == I_HARM) @@ -201,6 +188,24 @@ adjust_fire_stacks(3) IgniteMob() +//Share fire evenly between the two mobs +//Called in MobBump() and Crossed() +/mob/living/proc/spreadFire(mob/living/L) + if(!istype(L)) + return + var/L_old_on_fire = L.on_fire + + if(on_fire) //Only spread fire stacks if we're on fire + fire_stacks /= 2 + L.fire_stacks += fire_stacks + if(L.IgniteMob()) + log_game("[key_name(src)] bumped into [key_name(L)] and set them on fire") + + if(L_old_on_fire) //Only ignite us and gain their stacks if they were onfire before we bumped them + L.fire_stacks /= 2 + fire_stacks += L.fire_stacks + IgniteMob() + //Mobs on Fire end /mob/living/water_act(volume, temperature) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 5218d399007..3f1799c7c9f 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -82,6 +82,7 @@ var/current_pda_messaging = null var/custom_sprite = 0 + var/slowdown = 0 /mob/living/silicon/pai/New(var/obj/item/device/paicard) loc = paicard @@ -117,6 +118,12 @@ C.toff = 1 ..() +/mob/living/silicon/pai/movement_delay() + . = ..() + . += slowdown + . += 1 //A bit slower than humans, so they're easier to smash + . += config.robot_delay + /mob/living/silicon/pai/update_icons() if(stat == DEAD) icon_state = "[chassis]_dead" @@ -539,10 +546,10 @@ card.forceMove(card.loc) icon_state = "[chassis]" -/mob/living/silicon/pai/Bump(atom/movable/AM as mob|obj, yes) +/mob/living/silicon/pai/Bump() return -/mob/living/silicon/pai/Bumped(AM as mob|obj) +/mob/living/silicon/pai/Bumped() return /mob/living/silicon/pai/start_pulling(var/atom/movable/AM) diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index d399db99515..2c9ab233eda 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -171,7 +171,7 @@ flags = CONDUCT slot_flags = SLOT_BELT throwforce = 3 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 5 throw_range = 10 origin_tech = "magnets=1;biotech=1" diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index 4c52f2f415d..282f97c4dc4 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -310,18 +310,15 @@ */ -/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes) - if(!yes || ( \ - !istype(AM,/obj/machinery/door) && \ - !istype(AM,/obj/machinery/recharge_station) && \ - !istype(AM,/obj/machinery/disposal/deliveryChute) && \ - !istype(AM,/obj/machinery/teleport/hub) && \ - !istype(AM,/obj/effect/portal) - )) return - ..() - return +/mob/living/silicon/robot/drone/Bump(atom/movable/AM, yes) + if(istype(AM, /obj/machinery/door) \ + || istype(AM, /obj/machinery/recharge_station) \ + || istype(AM, /obj/machinery/disposal/deliveryChute) \ + || istype(AM, /obj/machinery/teleport/hub) \ + || istype(AM, /obj/effect/portal)) + return ..() -/mob/living/silicon/robot/drone/Bumped(AM as mob|obj) +/mob/living/silicon/robot/drone/Bumped(atom/movable/AM) return /mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM) @@ -330,7 +327,7 @@ ..() else if(istype(AM,/obj/item)) var/obj/item/O = AM - if(O.w_class > 2) + if(O.w_class > WEIGHT_CLASS_SMALL) to_chat(src, "You are too small to pull that.") return else diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 8ab82e7d9ca..9d93d0baa77 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -552,38 +552,6 @@ var/list/robot_verbs_default = list( return 2 -/mob/living/silicon/robot/Bump(atom/movable/AM as mob|obj, yes) - spawn( 0 ) - if((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) - if(prob(20)) - to_chat(usr, "You fail to push [tmob]'s fat ass out of the way.") - now_pushing = 0 - return - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - now_pushing = 0 - ..() - if(!istype(AM, /atom/movable)) - return - if(!now_pushing) - now_pushing = 1 - if(!AM.anchored) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window/full)) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - return - return - /mob/living/silicon/robot/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/restraints/handcuffs)) // fuck i don't even know why isrobot() in handcuff code isn't working so this will have to do return diff --git a/code/modules/mob/living/silicon/robot/robot_movement.dm b/code/modules/mob/living/silicon/robot/robot_movement.dm index ff28a93a64e..e896e7c9473 100644 --- a/code/modules/mob/living/silicon/robot/robot_movement.dm +++ b/code/modules/mob/living/silicon/robot/robot_movement.dm @@ -1,30 +1,24 @@ -/mob/living/silicon/robot/Process_Spacemove(var/movement_dir = 0) - if(ionpulse()) - return 1 - if(..()) - return 1 - return 0 - - //No longer needed, but I'll leave it here incase we plan to re-use it. -/mob/living/silicon/robot/movement_delay() - var/tally = 0 //Incase I need to add stuff other than "speed" later - - tally = speed - - if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) - tally-=3 - - return tally+config.robot_delay - -/mob/living/silicon/robot/Move() - ..() - -/mob/living/silicon/robot/mob_negates_gravity() - return magpulse - -/mob/living/silicon/robot/mob_has_gravity() - return ..() || mob_negates_gravity() - -/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction) - if(!magpulse) +/mob/living/silicon/robot/Process_Spacemove(var/movement_dir = 0) + if(ionpulse()) + return 1 + if(..()) + return 1 + return 0 + + //No longer needed, but I'll leave it here incase we plan to re-use it. +/mob/living/silicon/robot/movement_delay() + . = ..() + . += speed + if(module_active && istype(module_active,/obj/item/borg/combat/mobility)) + . -= 3 + . += config.robot_delay + +/mob/living/silicon/robot/mob_negates_gravity() + return magpulse + +/mob/living/silicon/robot/mob_has_gravity() + return ..() || mob_negates_gravity() + +/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction) + if(!magpulse) return ..() \ No newline at end of file diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index d7435fdff5a..16b81582faa 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -195,31 +195,6 @@ src << browse(dat, "window=airoster") onclose(src, "airoster") -/mob/living/silicon/Bump(atom/movable/AM as mob|obj, yes) //Allows the AI to bump into mobs if it's itself pushed - if((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - now_pushing = 0 - ..() - if(!istype(AM, /atom/movable)) - return - if(!now_pushing) - now_pushing = 1 - if(!AM.anchored) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window)) - if(AM:ini_dir == NORTHWEST || AM:ini_dir == NORTHEAST || AM:ini_dir == SOUTHWEST || AM:ini_dir == SOUTHEAST) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - /mob/living/silicon/assess_threat() //Secbots won't hunt silicon units return -10 diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index d524ffd8e06..a7d297d0bdc 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -10,7 +10,7 @@ throwforce = 5 throw_speed = 2 throw_range = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/created_name = "Cleanbot" /obj/item/weapon/bucket_sensor/attackby(obj/item/W, mob/user as mob, params) @@ -204,7 +204,7 @@ throwforce = 10 throw_speed = 2 throw_range = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/created_name = "Floorbot" /obj/item/weapon/toolbox_tiles_sensor @@ -216,7 +216,7 @@ throwforce = 10 throw_speed = 2 throw_range = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/created_name = "Floorbot" /obj/item/weapon/storage/toolbox/mechanical/attackby(obj/item/stack/tile/plasteel/T, mob/user, params) @@ -286,7 +286,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 + w_class = WEIGHT_CLASS_NORMAL var/treatment_brute = "salglu_solution" var/treatment_oxy = "salbutamol" var/treatment_fire = "salglu_solution" @@ -478,4 +478,4 @@ overlays -= "hs_arm" new /obj/item/robot_parts/l_arm(get_turf(src)) to_chat(user, "You remove the robot arm from [src].") - build_step-- \ No newline at end of file + build_step-- diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index de09cc11084..a77429eb631 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -218,8 +218,8 @@ Auto Patrol: []"}, /mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0) if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.throwforce < src.health && I.thrower && (istype(I.thrower, /mob/living/carbon/human))) - var/mob/living/carbon/human/H = I.thrower + if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby)) + var/mob/living/carbon/human/H = I.thrownby retaliate(H) ..() diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 86beb8f6bda..97702a28027 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -470,41 +470,6 @@ name = "Corgi meat" desc = "Tastes like... well you know..." -/mob/living/simple_animal/pet/corgi/Ian/Bump(atom/movable/AM as mob|obj, yes) - - spawn( 0 ) - if((!( yes ) || now_pushing)) - return - now_pushing = 1 - if(ismob(AM)) - var/mob/tmob = AM - if(istype(tmob, /mob/living/carbon/human) && (FAT in tmob.mutations)) - if(prob(70)) - to_chat(src, "You fail to push [tmob]'s fat ass out of the way.") - now_pushing = 0 - return - if(!(tmob.status_flags & CANPUSH)) - now_pushing = 0 - return - - tmob.LAssailant = src - now_pushing = 0 - ..() - if(!( istype(AM, /atom/movable) )) - return - if(!( now_pushing )) - now_pushing = 1 - if(!( AM.anchored )) - var/t = get_dir(src, AM) - if(istype(AM, /obj/structure/window/full)) - for(var/obj/structure/window/win in get_step(AM,t)) - now_pushing = 0 - return - step(AM, t) - now_pushing = null - return - return - /mob/living/simple_animal/pet/corgi/regenerate_icons() overlays.Cut() if(inventory_head) diff --git a/code/modules/mob/living/simple_animal/friendly/sloth.dm b/code/modules/mob/living/simple_animal/friendly/sloth.dm index 1066b2a0d39..bf12b07de2e 100644 --- a/code/modules/mob/living/simple_animal/friendly/sloth.dm +++ b/code/modules/mob/living/simple_animal/friendly/sloth.dm @@ -21,7 +21,7 @@ melee_damage_upper = 18 health = 50 maxHealth = 50 - speed = 1 + speed = 2 //Cargo Sloth diff --git a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm index 5b2419bf7e8..bc75bd554e5 100644 --- a/code/modules/mob/living/simple_animal/friendly/spiderbot.dm +++ b/code/modules/mob/living/simple_animal/friendly/spiderbot.dm @@ -260,7 +260,7 @@ var/list/items = list() for(var/obj/item/I in view(1,src)) - if(I.loc != src && I.w_class <= 2) + if(I.loc != src && I.w_class <= WEIGHT_CLASS_SMALL) items.Add(I) var/obj/selection = input("Select an item.", "Pickup") in items diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm index a14efc6d279..35926a602f2 100644 --- a/code/modules/mob/living/simple_animal/hostile/faithless.dm +++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm @@ -22,7 +22,6 @@ atmos_requirements = list("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 - speed = 4 faction = list("faithless") gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 85a351606f6..d6d1d92618d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -103,7 +103,7 @@ Difficulty: Hard triple_charge() else spawn(0) - warp_charge() + warp_charge() /mob/living/simple_animal/hostile/megafauna/bubblegum/New() ..() @@ -186,7 +186,7 @@ Difficulty: Hard shake_camera(L, 4, 3) shake_camera(src, 2, 3) var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src))) - L.throw_at_fast(throwtarget, 3) + L.throw_at(throwtarget, 3) charging = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 5afa7613c78..38f8c121d5d 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -238,7 +238,7 @@ Difficulty: Medium if(L.loc == loc) throw_dir = pick(alldirs) var/throwtarget = get_edge_target_turf(src, throw_dir) - L.throw_at_fast(throwtarget, 3) + L.throw_at(throwtarget, 3) visible_message("[L] is thrown clear of [src]!") for(var/mob/M in range(7, src)) diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 80227526cbc..3298e334bd2 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -222,7 +222,7 @@ icon = 'icons/obj/items.dmi' icon_state = "goliath_hide" flags = NOBLUDGEON - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL layer = 4 /obj/item/asteroid/goliath_hide/afterattack(atom/target, mob/user, proximity_flag) diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm index 66972b06d2e..e5beb60097e 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/undead.dm @@ -31,7 +31,7 @@ response_disarm = "shoves" response_harm = "hits" turns_per_move = 10 - speed = -1 + speed = 0 maxHealth = 20 health = 20 @@ -74,7 +74,7 @@ response_help = "shakes hands with" response_disarm = "shoves" response_harm = "hits" - speed = -1 + speed = 0 maxHealth = 20 health = 20 diff --git a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm index 64469bb87ef..b1393e84ef9 100644 --- a/code/modules/mob/living/simple_animal/hostile/spaceworms.dm +++ b/code/modules/mob/living/simple_animal/hostile/spaceworms.dm @@ -123,7 +123,6 @@ //Attempt to eat things we bump into, Mobs, Walls, Clowns /mob/living/simple_animal/hostile/spaceWorm/wormHead/Bump(atom/obstacle) - attemptToEat(obstacle) //Attempt to eat things, only the head can eat diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm index d1ffa073582..d9c20c09172 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/reproduction.dm @@ -25,13 +25,12 @@ ts_spiderling_list -= src return ..() -/obj/structure/spider/spiderling/terror_spiderling/Bump(atom/A) - if(istype(A, /obj/structure/table)) - forceMove(A.loc) - else if(istype(A, /obj/machinery/recharge_station)) +/obj/structure/spider/spiderling/terror_spiderling/Bump(obj/O) + if(istype(O, /obj/structure/table)) + forceMove(O.loc) + else if(istype(O, /obj/machinery/recharge_station)) qdel(src) - else - ..() + . = ..() /obj/structure/spider/spiderling/terror_spiderling/process() if(travelling_in_vent) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index caff5e2017f..0f85d78d01f 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -329,16 +329,17 @@ var/global/list/ts_spiderling_list = list() /mob/living/simple_animal/hostile/poison/terror_spider/proc/spider_special_action() return -/mob/living/simple_animal/hostile/poison/terror_spider/Bump(atom/A) - if(istype(A, /obj/machinery/door/airlock)) - var/obj/machinery/door/airlock/L = A +/mob/living/simple_animal/hostile/poison/terror_spider/ObjBump(obj/O) + if(istype(O, /obj/machinery/door/airlock)) + var/obj/machinery/door/airlock/L = O if(L.density) - try_open_airlock(L) - if(istype(A, /obj/machinery/door/firedoor)) - var/obj/machinery/door/firedoor/F = A + return try_open_airlock(L) + if(istype(O, /obj/machinery/door/firedoor)) + var/obj/machinery/door/firedoor/F = O if(F.density && !F.welded) F.open() - ..() + return 1 + . = ..() /mob/living/simple_animal/hostile/poison/terror_spider/proc/msg_terrorspiders(msgtext) for(var/mob/living/simple_animal/hostile/poison/terror_spider/T in ts_spiderlist) @@ -362,6 +363,7 @@ var/global/list/ts_spiderling_list = list() to_chat(src, "The door is bolted shut.") else if(D.allowed(src)) D.open(1) + return 1 else if(D.arePowerSystemsOn() && (spider_opens_doors != 2)) to_chat(src, "The door's motors resist your efforts to force it.") else if(!spider_opens_doors) @@ -369,4 +371,5 @@ var/global/list/ts_spiderling_list = list() else visible_message("[src] pries open the door!") playsound(src.loc, "sparks", 100, 1) - D.open(1) \ No newline at end of file + D.open(1) + return 1 \ 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 2c1fb61be2f..de27a2173c3 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -505,7 +505,8 @@ /mob/living/simple_animal/parrot/movement_delay() if(client && stat == CONSCIOUS && parrot_state != "parrot_fly") icon_state = "parrot_fly" - ..() + //Because the most appropriate place to set icon_state is movement_delay(), clearly + return ..() /mob/living/simple_animal/parrot/proc/search_for_item() for(var/atom/movable/AM in view(src)) @@ -515,12 +516,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class < 2) + if(I.w_class < WEIGHT_CLASS_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 <= WEIGHT_CLASS_SMALL) || (C.r_hand && C.r_hand.w_class <= WEIGHT_CLASS_SMALL)) return C return null @@ -544,12 +545,12 @@ if(istype(AM, /obj/item)) var/obj/item/I = AM - if(I.w_class <= 2) + if(I.w_class <= WEIGHT_CLASS_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 <= WEIGHT_CLASS_SMALL || C.r_hand && C.r_hand.w_class <= WEIGHT_CLASS_SMALL) return C return null @@ -571,7 +572,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 <= WEIGHT_CLASS_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 +601,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 <= WEIGHT_CLASS_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 <= WEIGHT_CLASS_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 7c951cebbc9..1aa6c82b4a8 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -250,20 +250,6 @@ else if(bodytemperature > maxbodytemp) adjustBruteLoss(heat_damage_per_tick) -/mob/living/simple_animal/Bumped(AM as mob|obj) - if(!AM) return - - if(resting || buckled) - return - - if(isturf(src.loc)) - if((status_flags & CANPUSH) && ismob(AM)) - var/newamloc = src.loc - src.loc = AM:loc - AM:loc = newamloc - else - ..() - /mob/living/simple_animal/gib() if(icon_gib) flick(icon_gib, src) @@ -448,11 +434,11 @@ /mob/living/simple_animal/movement_delay() - var/tally = 0 //Incase I need to add stuff other than "speed" later + . = ..() - tally = speed + . = speed - return tally+config.animal_delay + . += config.animal_delay /mob/living/simple_animal/Stat() ..() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a1b6c652913..cb86d417fbc 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -424,7 +424,7 @@ var/list/slot_equipment_priority = list( \ return 0 if(slot_flags & SLOT_DENYPOCKET) return - if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) + if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_POCKET) ) return 1 if(slot_r_store) if(H.r_store) @@ -435,7 +435,7 @@ var/list/slot_equipment_priority = list( \ return 0 if(slot_flags & SLOT_DENYPOCKET) return 0 - if( w_class <= 2 || (slot_flags & SLOT_POCKET) ) + if( w_class <= WEIGHT_CLASS_SMALL || (slot_flags & SLOT_POCKET) ) return 1 return 0 if(slot_s_store) @@ -447,7 +447,7 @@ var/list/slot_equipment_priority = list( \ if(!disable_warning) to_chat(usr, "You somehow have a suit with no defined allowed items for suit storage, stop that.") return 0 - if(src.w_class > 4) + if(src.w_class > WEIGHT_CLASS_BULKY) if(!disable_warning) to_chat(usr, "The [name] is too big to attach.") return 0 @@ -1008,9 +1008,10 @@ var/list/slot_equipment_priority = list( \ drop_l_hand() drop_r_hand() -/mob/proc/facedir(var/ndir) - if(!canface()) return 0 - dir = ndir +/mob/proc/facedir(ndir) + if(!canface()) + return 0 + setDir(ndir) client.move_delay += movement_delay() return 1 diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 624ec318f03..fffd02adf0a 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -26,7 +26,7 @@ plane = HUD_PLANE item_state = "nothing" icon = 'icons/mob/screen_gen.dmi' - w_class = 5 + w_class = WEIGHT_CLASS_BULKY /obj/item/weapon/grab/New(var/mob/user, var/mob/victim) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index cef870811db..03ba9618bd4 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -15,21 +15,27 @@ return 1 return (!mover.density || !density || lying) +//The byond version of these verbs wait for the next tick before acting. +// instant verbs however can run mid tick or even during the time between ticks. +/client/verb/moveup() + set name = ".moveup" + set instant = 1 + Move(get_step(mob, NORTH), NORTH) -/client/North() - ..() +/client/verb/movedown() + set name = ".movedown" + set instant = 1 + Move(get_step(mob, SOUTH), SOUTH) +/client/verb/moveright() + set name = ".moveright" + set instant = 1 + Move(get_step(mob, EAST), EAST) -/client/South() - ..() - - -/client/West() - ..() - - -/client/East() - ..() +/client/verb/moveleft() + set name = ".moveleft" + set instant = 1 + Move(get_step(mob, WEST), WEST) /client/Northeast() @@ -105,12 +111,11 @@ /client/verb/toggle_throw_mode() set hidden = 1 - if(!istype(mob, /mob/living/carbon)) - return - if(!mob.stat && isturf(mob.loc) && !mob.restrained()) - mob:toggle_throw_mode() + if(iscarbon(mob)) + var/mob/living/carbon/C = mob + C.toggle_throw_mode() else - return + to_chat(usr, "This mob type cannot throw items.") /client/verb/drop_item() @@ -134,16 +139,16 @@ /client/proc/Move_object(direct) if(mob && mob.control_object) if(mob.control_object.density) - step(mob.control_object,direct) - if(!mob.control_object) return - mob.control_object.dir = direct + step(mob.control_object, direct) + if(!mob.control_object) + return + mob.control_object.setDir(direct) else - mob.control_object.forceMove(get_step(mob.control_object,direct)) + mob.control_object.forceMove(get_step(mob.control_object, direct)) return /client/Move(n, direct) - if(viewingCanvas) view = world.view //Reset the view winset(src, "mapwindow.map", "icon-size=[src.reset_stretch]") @@ -152,19 +157,28 @@ if(mob.hud_used) mob.hud_used.show_hud(HUD_STYLE_STANDARD) - if(mob.control_object) Move_object(direct) + if(world.time < move_delay) + return - if(world.time < move_delay) return + move_delay = world.time + world.tick_lag //this is here because Move() can now be called multiple times per tick + if(!mob || !mob.loc) + return 0 - if(!isliving(mob)) return mob.Move(n,direct) + if(mob.notransform) + return 0 //This is sota the goto stop mobs from moving var - if(moving) return 0 + if(mob.control_object) + return Move_object(direct) - if(!mob) return + if(!isliving(mob)) + return mob.Move(n, direct) - if(mob.stat==DEAD) return + if(mob.stat == DEAD) + mob.ghostize() + return 0 - if(mob.notransform) return//This is sota the goto stop mobs from moving var + if(moving) + return 0 if(isliving(mob)) var/mob/living/L = mob @@ -172,126 +186,105 @@ Process_Incorpmove(direct) return - if(Process_Grab()) return - - if(mob.buckled) //if we're buckled to something, tell it we moved. - return mob.buckled.relaymove(mob, direct) - - if(mob.remote_control) //we're controlling something, our movement is relayed to it + if(mob.remote_control) //we're controlling something, our movement is relayed to it return mob.remote_control.relaymove(mob, direct) if(isAI(mob)) if(istype(mob.loc, /obj/item/device/aicard)) var/obj/O = mob.loc - return O.relaymove(mob, direct) //aicards have special relaymove stuff - return AIMove(n,direct,mob) + return O.relaymove(mob, direct) // aicards have special relaymove stuff + return AIMove(n, direct, mob) + + + if(Process_Grab()) + return + + if(mob.buckled) //if we're buckled to something, tell it we moved. + return mob.buckled.relaymove(mob, direct) if(!mob.canmove) return - //if(istype(mob.loc, /turf/space) || (mob.flags & NOGRAV)) - // if(!mob.Process_Spacemove(0)) return 0 - if(!mob.lastarea) mob.lastarea = get_area(mob.loc) - if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved + if(isobj(mob.loc) || ismob(mob.loc)) //Inside an object, tell it we moved var/atom/O = mob.loc return O.relaymove(mob, direct) - - if(istype(mob.get_active_hand(), /obj/item)) - var/obj/item/I = mob.get_active_hand() - I.moved(mob, n, direct) - + if(!mob.Process_Spacemove(direct)) - return 0 + return 0 - if(isturf(mob.loc)) - - if(mob.restrained())//Why being pulled while cuffed prevents you from moving - for(var/mob/M in range(mob, 1)) - if(M.pulling == mob) - if(!M.restrained() && M.stat == 0 && M.canmove && mob.Adjacent(M)) - to_chat(src, "You're restrained! You can't move!") - return 0 - else - M.stop_pulling() - - if(mob.pinned.len) - to_chat(src, "You're pinned to a wall by [mob.pinned[1]]!") - return 0 - - var/turf/T = mob.loc - move_delay = world.time//set move delay - move_delay += T.slowdown - mob.last_movement = world.time - switch(mob.m_intent) - if("run") - if(mob.drowsyness > 0) - move_delay += 6 - move_delay += 1+config.run_speed - if("walk") - move_delay += 1+config.walk_speed - move_delay += mob.movement_delay() - - if(config.Tickcomp) - move_delay -= 1.3 - var/tickcomp = ((1/(world.tick_lag))*1.3) - move_delay = move_delay + tickcomp - - //We are now going to move - moving = 1 - //Something with pulling things - if(locate(/obj/item/weapon/grab, mob)) - move_delay = max(move_delay, world.time + 7) - var/list/L = mob.ret_grab() - if(istype(L, /list)) - if(L.len == 2) - L -= mob - var/mob/M = L[1] - if(M) - if((get_dist(mob, M) <= 1 || M.loc == mob.loc)) - . = ..() - if(isturf(M.loc)) - var/diag = get_dir(mob, M) - if((diag - 1) & diag) - else - diag = null - if((get_dist(mob, M) > 1 || diag)) - step(M, get_dir(M.loc, T)) + if(mob.restrained()) // Why being pulled while cuffed prevents you from moving + for(var/mob/M in orange(1, mob)) + if(M.pulling == mob) + if(!M.incapacitated() && mob.Adjacent(M)) + to_chat(src, "You're restrained! You can't move!") + move_delay = world.time + 10 + return 0 else - for(var/mob/M in L) - M.other_mobs = 1 - if(mob != M) - M.animate_movement = 3 - for(var/mob/M in L) - spawn( 0 ) - step(M, direct) - return - spawn( 1 ) - M.other_mobs = null - M.animate_movement = 2 - return + M.stop_pulling() - else if(mob.confused) - step(mob, pick(cardinal)) - else - . = ..() - for(var/obj/item/weapon/grab/G in mob) - if(G.state == GRAB_NECK) - mob.setDir(reverse_dir[direct]) - G.adjust_position() - for(var/obj/item/weapon/grab/G in mob.grabbed_by) - G.adjust_position() + //We are now going to move + moving = 1 + move_delay = mob.movement_delay() + world.time + mob.last_movement = world.time + + if(locate(/obj/item/weapon/grab, mob)) + move_delay = max(move_delay, world.time + 7) + var/list/L = mob.ret_grab() + if(istype(L, /list)) + if(L.len == 2) + L -= mob + var/mob/M = L[1] + if(M) + if((get_dist(mob, M) <= 1 || M.loc == mob.loc)) + var/turf/prev_loc = mob.loc + . = ..() + if(M && isturf(M.loc)) // Mob may get deleted during parent call + var/diag = get_dir(mob, M) + if((diag - 1) & diag) + else + diag = null + if((get_dist(mob, M) > 1 || diag)) + step(M, get_dir(M.loc, prev_loc)) + else + for(var/mob/M in L) + M.other_mobs = 1 + if(mob != M) + M.animate_movement = 3 + for(var/mob/M in L) + spawn(0) + step(M, direct) + return + spawn(1) + M.other_mobs = null + M.animate_movement = 2 + return + + else if(mob.confused) + step(mob, pick(cardinal)) + else + . = ..() + + for(var/obj/item/weapon/grab/G in mob) + if(G.state == GRAB_NECK) + mob.setDir(reverse_dir[direct]) + G.adjust_position() + for(var/obj/item/weapon/grab/G in mob.grabbed_by) + G.adjust_position() + + moving = 0 + if(mob && .) + if(mob.throwing) + mob.throwing.finalize(FALSE) + + for(var/obj/O in mob) + O.on_mob_move(direct, mob) - moving = 0 - if(mob && .) - mob.throwing = 0 - return . - return ///Process_Grab() @@ -408,13 +401,13 @@ var/atom/movable/backup = get_spacemove_backup() if(backup) if(istype(backup) && movement_dir && !backup.anchored) - if(backup.newtonian_move(turn(movement_dir, 180))) //You're pushing off something movable, so it moves - src << "You push off of [backup] to propel yourself." + var/opposite_dir = turn(movement_dir, 180) + if(backup.newtonian_move(opposite_dir)) //You're pushing off something movable, so it moves + to_chat(src, "You push off of [backup] to propel yourself.") return 1 return 0 /mob/get_spacemove_backup() - var/atom/movable/dense_object_backup for(var/A in orange(1, get_turf(src))) if(isarea(A)) continue @@ -434,9 +427,7 @@ return AM if(pulling == AM) continue - dense_object_backup = AM - break - . = dense_object_backup + . = AM /mob/proc/mob_has_gravity(turf/T) diff --git a/code/modules/mob/pulling.dm b/code/modules/mob/pulling.dm index 6a6a66675b0..5a532ee1a42 100644 --- a/code/modules/mob/pulling.dm +++ b/code/modules/mob/pulling.dm @@ -15,7 +15,11 @@ return stop_pulling() - src.pulling = AM + if(AM.pulledby) + visible_message("[src] has pulled [AM] from [AM.pulledby]'s grip.") + AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. + + pulling = AM AM.pulledby = src if(pullin) pullin.update_icon(src) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index a5c64adc7ea..da26fc96fec 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 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 10 var/obj/item/weapon/pen/haspen //The stored pen. diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 00458df575c..214c284f206 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 = WEIGHT_CLASS_SMALL pressure_resistance = 2 burn_state = FLAMMABLE @@ -121,4 +121,3 @@ ..() new /obj/item/documents/syndicate/blue(src) update_icon() - diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 60a501f1ecf..250abe3d682 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 = WEIGHT_CLASS_TINY throw_range = 1 throw_speed = 1 layer = 4 diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index da20ed65dde..2a7c7e113e1 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 = 1 + w_class = WEIGHT_CLASS_TINY throw_range = 2 throw_speed = 1 layer = 4 @@ -241,4 +241,4 @@ if(photo) desc += "\nThere is a photo attached to it." overlays += image('icons/obj/bureaucracy.dmi', "clip") - return \ No newline at end of file + return diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 89ba611f33c..efcce443d6c 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -4,7 +4,7 @@ icon_state = "paper_bin1" item_state = "sheet-metal" throwforce = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 3 throw_range = 7 pressure_resistance = 8 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 3b8a10ffbc0..89bd843467a 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 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 materials = list(MAT_METAL=10) @@ -167,7 +167,7 @@ force = 18 sharp = 1 edge = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL name = "energy dagger" hitsound = 'sound/weapons/blade1.ogg' throwforce = 35 @@ -200,4 +200,4 @@ add_logs(user, P, "used poison pen on") to_chat(user, "You apply the poison to [P].") else - to_chat(user, "[src] clicks. It seems to be depleted.") \ No newline at end of file + to_chat(user, "[src] clicks. It seems to be depleted.") diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index a9e232560fc..dc86ce2299a 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 = "electropack" - w_class = 1 + w_class = WEIGHT_CLASS_TINY burn_state = FLAMMABLE @@ -27,7 +27,7 @@ icon = 'icons/obj/items.dmi' icon_state = "photo" item_state = "paper" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL burn_state = FLAMMABLE burntime = 5 var/blueprints = 0 // Does this have the blueprints? @@ -146,7 +146,7 @@ desc = "A polaroid camera. 10 photos left." icon_state = "camera" item_state = "electropack" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT var/list/matter = list("metal" = 2000) var/pictures_max = 10 @@ -508,7 +508,7 @@ var/list/SpookyGhosts = list("ghost","shade","shade2","ghost-narsie","horror","s desc = "video camera that can send live feed to the entertainment network." icon_state = "videocam" item_state = "videocam" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT materials = list(MAT_METAL=2000) var/on = 0 diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 26e397039d8..2ca25bf185f 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -5,7 +5,7 @@ icon_state = "stamp-ok" item_state = "stamp" throwforce = 0 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 3 throw_range = 7 materials = list(MAT_METAL=60) @@ -105,4 +105,4 @@ if(chosen_stamp) name = chosen_stamp.name icon_state = chosen_stamp.icon_state - item_color = chosen_stamp.item_color \ No newline at end of file + item_color = chosen_stamp.item_color diff --git a/code/modules/pda/PDA.dm b/code/modules/pda/PDA.dm index 3ff11689078..9da781b1ab1 100755 --- a/code/modules/pda/PDA.dm +++ b/code/modules/pda/PDA.dm @@ -10,7 +10,7 @@ var/global/list/obj/item/device/pda/PDAs = list() icon = 'icons/obj/pda.dmi' icon_state = "pda" item_state = "electronic" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_ID | SLOT_BELT | SLOT_PDA //Main variables @@ -502,8 +502,3 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/process() if(current_app) current_app.program_process() - -/obj/item/device/pda/hit_check(speed) - if(current_app) - current_app.program_hit_check() - ..() \ No newline at end of file diff --git a/code/modules/pda/cart.dm b/code/modules/pda/cart.dm index 459ae09835a..b432effb8be 100644 --- a/code/modules/pda/cart.dm +++ b/code/modules/pda/cart.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "cart" item_state = "electronic" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/obj/item/radio/integrated/radio = null @@ -322,4 +322,4 @@ my_game.hacked = 1 to_chat(user, "TR4P_M45T3R.mod successfully initialized. ToS violated. User Agreement nullified. Gotta pwn them all.") to_chat(user, "You can now create trapped versions of any mob in your collection that will damage hunters who attempt to capture it.") - description_antag = "This copy of Nano-Mob Hunter GO! has been hacked to allow the creation of trap mobs which will cause any PDA that attempts to capture it to shock anyone holding it. Hacked copies of the game will not trigger the trap." \ No newline at end of file + description_antag = "This copy of Nano-Mob Hunter GO! has been hacked to allow the creation of trap mobs which will cause any PDA that attempts to capture it to shock anyone holding it. Hacked copies of the game will not trigger the trap." diff --git a/code/modules/pda/mob_hunt_game_app.dm b/code/modules/pda/mob_hunt_game_app.dm index 9b8e3225976..bec10f782ab 100644 --- a/code/modules/pda/mob_hunt_game_app.dm +++ b/code/modules/pda/mob_hunt_game_app.dm @@ -74,12 +74,6 @@ return scan_nearby() -/datum/data/pda/app/mob_hunter_game/program_hit_check() - if(!pda) - return - for(var/obj/effect/nanomob/hit_mob in get_turf(pda)) - hit_mob.hitby(pda) - /datum/data/pda/app/mob_hunter_game/proc/register_capture(datum/mob_hunt/captured, wild = 0) if(!captured) return 0 diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 03a84d161e5..0b2c6f8b165 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -122,7 +122,7 @@ desc = "Heavy-duty switching circuits for power control." icon = 'icons/obj/module.dmi' icon_state = "power_mod" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL item_state = "electronic" flags = CONDUCT usesound = 'sound/items/Deconstruct.ogg' @@ -621,7 +621,7 @@ if(((stat & BROKEN) || malfhack) \ && !opened \ && ( \ - (W.force >= 5 && W.w_class >= 3.0) \ + (W.force >= 5 && W.w_class >= WEIGHT_CLASS_NORMAL) \ || istype(W,/obj/item/weapon/crowbar) \ ) \ && prob(20) ) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 33aa4931fcc..b70e847cab4 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -485,7 +485,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( color = COLOR_RED desc = "A coil of power cable." throwforce = 10 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 2 throw_range = 5 materials = list(MAT_METAL=10, MAT_GLASS=5) @@ -568,9 +568,9 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( /obj/item/stack/cable_coil/proc/update_wclass() if(amount == 1) - w_class = 1 + w_class = WEIGHT_CLASS_TINY else - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/stack/cable_coil/examine(mob/user) if(!..(user, 1)) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index a1e97bf58d2..3f42b4d58ce 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -592,7 +592,7 @@ icon = 'icons/obj/lighting.dmi' force = 2 throwforce = 5 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN var/base_state var/switchcount = 0 // number of times switched @@ -612,7 +612,7 @@ brightness_range = 8 /obj/item/weapon/light/tube/large - w_class = 2 + w_class = WEIGHT_CLASS_SMALL name = "large light tube" brightness_range = 15 brightness_power = 2 diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index dea4c4797e8..fa9b61c8059 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -204,7 +204,7 @@ icon = 'icons/obj/power.dmi' icon_state = "sp_base" item_state = "electropack" - w_class = 4 // Pretty big! + w_class = WEIGHT_CLASS_BULKY // Pretty big! anchored = 0 var/tracker = 0 var/glass_type = null diff --git a/code/modules/power/supermatter/sm_shard.dm b/code/modules/power/supermatter/sm_shard.dm index 2ffd5b040ec..d4c1109e16e 100644 --- a/code/modules/power/supermatter/sm_shard.dm +++ b/code/modules/power/supermatter/sm_shard.dm @@ -7,7 +7,7 @@ icon_state = "supermatter" sharp = 1 edge = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT light_color = "#8A8A00" var/brightness = 2 @@ -85,7 +85,7 @@ icon = 'icons/obj/weapons.dmi' icon_state = "tongs" edge = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL flags = CONDUCT var/obj/item/held = null // The item currently being held diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm index 7b4b7a0d02e..ffaffd5ea81 100644 --- a/code/modules/power/tracker.dm +++ b/code/modules/power/tracker.dm @@ -81,4 +81,4 @@ name = "tracker electronics" icon = 'icons/obj/doors/door_assembly.dmi' icon_state = "door_electronics" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 924dcac3b4c..71400802ee2 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -6,7 +6,7 @@ flags = CONDUCT slot_flags = SLOT_BELT throwforce = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/fire_sound = null //What sound should play when this ammo is fired var/caliber = null //Which kind of guns it can be loaded into var/projectile_type = null //The bullet type to create when New() is called @@ -87,7 +87,7 @@ item_state = "syringe_kit" materials = list(MAT_METAL=30000) throwforce = 2 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throw_speed = 4 throw_range = 10 var/list/stored_ammo = list() @@ -192,4 +192,4 @@ var/turf_mag = get_turf(src) for(var/obj/item/ammo in stored_ammo) ammo.forceMove(turf_mag) - stored_ammo -= ammo \ No newline at end of file + stored_ammo -= ammo diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index bba922624f1..0304f4a48a9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -7,7 +7,7 @@ flags = CONDUCT slot_flags = SLOT_BELT materials = list(MAT_METAL=2000) - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throwforce = 5 throw_speed = 3 throw_range = 5 diff --git a/code/modules/projectiles/guns/alien.dm b/code/modules/projectiles/guns/alien.dm index de217a9715d..f541ca2a94a 100644 --- a/code/modules/projectiles/guns/alien.dm +++ b/code/modules/projectiles/guns/alien.dm @@ -3,7 +3,7 @@ desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive." icon_state = "spikethrower" item_state = "spikethrower" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL fire_sound_text = "a strange noise" mag_type = /obj/item/ammo_box/magazine/internal/spikethrower burst_size = 2 @@ -52,7 +52,7 @@ sharp = 1 edge = 0 throwforce = 5 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL caliber = "spike" icon_state = "bolt" fire_sound = 'sound/weapons/bladeslice.ogg' diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 40356f8a7d9..fc14b32a09c 100644 --- a/code/modules/projectiles/guns/energy/laser.dm +++ b/code/modules/projectiles/guns/energy/laser.dm @@ -3,7 +3,7 @@ desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal." icon_state = "laser" item_state = "laser" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=2000) origin_tech = "combat=3;magnets=2" ammo_type = list(/obj/item/ammo_casing/energy/lasergun) @@ -66,7 +66,7 @@ desc = "An advanced laser cannon that does more damage the farther away the target is." icon_state = "lasercannon" item_state = "laser" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 flags = CONDUCT slot_flags = SLOT_BACK diff --git a/code/modules/projectiles/guns/energy/nuclear.dm b/code/modules/projectiles/guns/energy/nuclear.dm index 727ebdd7082..379a8af70d8 100644 --- a/code/modules/projectiles/guns/energy/nuclear.dm +++ b/code/modules/projectiles/guns/energy/nuclear.dm @@ -31,7 +31,7 @@ desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: stun and kill." icon_state = "mini" item_state = "gun" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL ammo_x_offset = 2 charge_sections = 3 can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update @@ -71,7 +71,7 @@ icon_state = "turretlaser" item_state = "turretlaser" slot_flags = null - w_class = 5 + w_class = WEIGHT_CLASS_HUGE ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser) weapon_weight = WEAPON_MEDIUM can_flashlight = 0 diff --git a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm index 456627398ce..7ded54f6690 100644 --- a/code/modules/projectiles/guns/energy/pulse.dm +++ b/code/modules/projectiles/guns/energy/pulse.dm @@ -3,7 +3,7 @@ desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel." icon_state = "pulse" item_state = null - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 flags = CONDUCT slot_flags = SLOT_BACK @@ -25,7 +25,7 @@ /obj/item/weapon/gun/energy/pulse/carbine name = "pulse carbine" desc = "A compact variant of the pulse rifle with less firepower but easier storage." - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL slot_flags = SLOT_BELT icon_state = "pulse_carbine" item_state = "pulse" @@ -37,7 +37,7 @@ /obj/item/weapon/gun/energy/pulse/pistol name = "pulse pistol" desc = "A pulse rifle in an easily concealed handgun package with low capacity." - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT icon_state = "pulse_pistol" item_state = "gun" @@ -77,9 +77,9 @@ icon_state = "turretlaser" item_state = "turretlaser" slot_flags = null - w_class = 5 + w_class = WEIGHT_CLASS_HUGE ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser/pulse) weapon_weight = WEAPON_MEDIUM can_flashlight = 0 trigger_guard = TRIGGER_GUARD_NONE - ammo_x_offset = 2 \ No newline at end of file + ammo_x_offset = 2 diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 3595b9c7ea8..009d2c6c5e8 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -5,7 +5,7 @@ item_state = null //so the human update icon uses the icon_state instead. fire_sound = 'sound/weapons/IonRifle.ogg' origin_tech = "combat=2;magnets=4" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE flags = CONDUCT slot_flags = SLOT_BACK ammo_type = list(/obj/item/ammo_casing/energy/ion) @@ -21,7 +21,7 @@ desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient." icon_state = "ioncarbine" origin_tech = "combat=4;magnets=4;materials=4" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL slot_flags = SLOT_BELT ammo_x_offset = 2 flight_x_offset = 18 @@ -60,7 +60,7 @@ icon = 'icons/obj/guns/projectile.dmi' icon_state = "riotgun" item_state = "c20r" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY ammo_type = list(/obj/item/ammo_casing/energy/meteor) cell_type = /obj/item/weapon/stock_parts/cell/potato clumsy_check = 0 //Admin spawn only, might as well let clowns use it. @@ -74,7 +74,7 @@ item_state = "pen" lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/mob/inhands/items_righthand.dmi' - w_class = 1 + w_class = WEIGHT_CLASS_TINY /obj/item/weapon/gun/energy/mindflayer name = "\improper Mind Flayer" @@ -89,7 +89,7 @@ desc = "A weapon favored by syndicate stealth specialists." icon_state = "crossbow" item_state = "crossbow" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL materials = list(MAT_METAL=2000) origin_tech = "combat=2;magnets=2;syndicate=5" suppressed = 1 @@ -111,7 +111,7 @@ name = "energy crossbow" desc = "A reverse engineered weapon using syndicate technology." icon_state = "crossbowlarge" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=4000) origin_tech = "combat=2;magnets=2;syndicate=3" //can be further researched for more syndie tech suppressed = 0 @@ -280,7 +280,7 @@ desc = "A specialized firearm designed to fire lethal bolts of toxins." icon_state = "toxgun" fire_sound = 'sound/effects/stealthoff.ogg' - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=4;plasmatech=3" ammo_type = list(/obj/item/ammo_casing/energy/toxplasma) shaded_charge = 1 @@ -292,7 +292,7 @@ origin_tech = "combat=6;materials=5;powerstorage=4" ammo_type = list(/obj/item/ammo_casing/energy/sniper) slot_flags = SLOT_BACK - w_class = 4 + w_class = WEIGHT_CLASS_BULKY zoomable = TRUE zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you. shaded_charge = 1 @@ -303,7 +303,7 @@ icon_state = "tempgun_4" item_state = "tempgun_4" slot_flags = SLOT_BACK - w_class = 4 + w_class = WEIGHT_CLASS_BULKY fire_sound = 'sound/weapons/pulse3.ogg' desc = "A gun that changes the body temperature of its targets." var/temperature = 300 diff --git a/code/modules/projectiles/guns/grenade_launcher.dm b/code/modules/projectiles/guns/grenade_launcher.dm index 5abac9ebad9..ad49c99bfc4 100644 --- a/code/modules/projectiles/guns/grenade_launcher.dm +++ b/code/modules/projectiles/guns/grenade_launcher.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/guns/projectile.dmi' icon_state = "riotgun" item_state = "riotgun" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY throw_speed = 2 throw_range = 10 force = 5 diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 860d52d2550..f26583bbe0d 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -7,7 +7,7 @@ fire_sound = 'sound/weapons/emitter.ogg' fire_sound_text = "energy blast" flags = CONDUCT - w_class = 5 + w_class = WEIGHT_CLASS_HUGE var/max_charges = 6 var/charges = 0 var/recharge_rate = 4 diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index 20461c08acf..ac804ab9192 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -4,7 +4,7 @@ ammo_type = /obj/item/ammo_casing/magic icon_state = "nothingwand" item_state = "wand" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL can_charge = 0 max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths) var/variable_charges = 1 diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index a556d4572a2..59a24533e80 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/chronos.dmi' icon_state = "chronogun" item_state = "chronogun" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/mob/living/current_target var/last_check = 0 diff --git a/code/modules/projectiles/guns/mounted.dm b/code/modules/projectiles/guns/mounted.dm index ae9c8f06d09..8fec6cd8b8e 100644 --- a/code/modules/projectiles/guns/mounted.dm +++ b/code/modules/projectiles/guns/mounted.dm @@ -4,7 +4,7 @@ icon_state = "armcannon" force = 5 flags = NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE can_flashlight = 0 selfcharge = 1 trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead @@ -20,7 +20,7 @@ item_state = "armcannonlase" force = 5 flags = NODROP - w_class = 5 + w_class = WEIGHT_CLASS_HUGE materials = null selfcharge = 1 trigger_guard = TRIGGER_GUARD_ALLOW_ALL diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 961a7b91e05..7575e9b92f8 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -3,7 +3,7 @@ name = "projectile gun" icon_state = "pistol" origin_tech = "combat=2;materials=2" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL materials = list(MAT_METAL=1000) var/mag_type = /obj/item/ammo_box/magazine/m10mm //Removes the need for max_ammo and caliber info @@ -77,7 +77,7 @@ S.oldsound = fire_sound S.initial_w_class = w_class fire_sound = 'sound/weapons/Gunshot_silenced.ogg' - w_class = 3 //so pistols do not fit in pockets when suppressed + w_class = WEIGHT_CLASS_NORMAL //so pistols do not fit in pockets when suppressed A.loc = src update_icon() return @@ -169,7 +169,7 @@ user.visible_message("[user] shortens \the [src]!", "You shorten \the [src].") name = "sawn-off [name]" desc = sawn_desc - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL item_state = "gun"//phil235 is it different with different skin? slot_flags &= ~SLOT_BACK //you can't sling it on your back slot_flags |= SLOT_BELT //but you can wear it on your belt (poorly concealed under a trenchcoat, ideally) @@ -191,7 +191,7 @@ icon = 'icons/obj/guns/projectile.dmi' icon_state = "suppressor" item_state = "suppressor" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL var/oldsound = null var/initial_w_class = null diff --git a/code/modules/projectiles/guns/projectile/automatic.dm b/code/modules/projectiles/guns/projectile/automatic.dm index 0b174c635b0..1b666a88953 100644 --- a/code/modules/projectiles/guns/projectile/automatic.dm +++ b/code/modules/projectiles/guns/projectile/automatic.dm @@ -1,5 +1,5 @@ /obj/item/weapon/gun/projectile/automatic - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL var/alarmed = 0 var/select = 1 can_suppress = 1 @@ -194,7 +194,7 @@ desc = "A genuine 'Chicago Typewriter'." icon_state = "tommygun" item_state = "shotgun" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE slot_flags = 0 origin_tech = "combat=5;materials=1;syndicate=2" mag_type = /obj/item/ammo_box/magazine/tommygunm45 @@ -222,7 +222,7 @@ desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines." icon_state = "bulldog" item_state = "bulldog" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=5;materials=4;syndicate=6" mag_type = /obj/item/ammo_box/magazine/m12g fire_sound = 'sound/weapons/Gunshot4.ogg' @@ -255,7 +255,7 @@ desc = "An experimental carbine. Uses encased laser projectors as ammunition."//we need to uncouple the toroidal resistance dejammers icon_state = "lasercarbine" item_state = "laser" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=5;materials=5" mag_type = /obj/item/ammo_box/magazine/laser fire_sound = 'sound/weapons/emitter2.ogg' diff --git a/code/modules/projectiles/guns/projectile/launchers.dm b/code/modules/projectiles/guns/projectile/launchers.dm index 462341fdc36..e8dd43d1501 100644 --- a/code/modules/projectiles/guns/projectile/launchers.dm +++ b/code/modules/projectiles/guns/projectile/launchers.dm @@ -8,7 +8,7 @@ item_state = "gun" mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher fire_sound = 'sound/weapons/grenadelaunch.ogg' - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user, params) ..() @@ -57,7 +57,7 @@ desc = "A weapon favored by carp hunters. Fires specialized spears using kinetic energy." icon_state = "speargun" item_state = "speargun" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 can_suppress = 0 mag_type = /obj/item/ammo_box/magazine/internal/speargun diff --git a/code/modules/projectiles/guns/projectile/pistol.dm b/code/modules/projectiles/guns/projectile/pistol.dm index 5de627d7933..4db9d3175d7 100644 --- a/code/modules/projectiles/guns/projectile/pistol.dm +++ b/code/modules/projectiles/guns/projectile/pistol.dm @@ -2,7 +2,7 @@ name = "stechkin pistol" desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors." icon_state = "pistol" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "combat=2;materials=2;syndicate=2" mag_type = /obj/item/ammo_box/magazine/m10mm can_suppress = 1 @@ -22,7 +22,7 @@ name = "\improper M1911" desc = "A classic .45 handgun with a small magazine capacity." icon_state = "m1911" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL mag_type = /obj/item/ammo_box/magazine/m45 can_suppress = 0 @@ -66,7 +66,7 @@ name = "stechkin APS pistol" desc = "The original russian version of a widely used Syndicate sidearm. Uses 9mm ammo." icon_state = "aps" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "combat=3;materials=2;syndicate=3" mag_type = /obj/item/ammo_box/magazine/pistolm9mm can_suppress = 0 diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 80192a3091d..2efc6cda7e0 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -270,7 +270,7 @@ desc = "A true classic." icon_state = "dshotgun" item_state = "shotgun" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 flags = CONDUCT slot_flags = SLOT_BACK @@ -325,7 +325,7 @@ desc = "Essentially a tube that aims shotgun shells." icon_state = "ishotgun" item_state = "shotgun" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 slot_flags = null origin_tech = "combat=2;materials=2" @@ -373,7 +373,7 @@ icon_state = "cane" item_state = "stick" sawn_state = SAWN_OFF - w_class = 2 + w_class = WEIGHT_CLASS_SMALL force = 10 can_unsuppress = 0 slot_flags = null diff --git a/code/modules/projectiles/guns/projectile/saw.dm b/code/modules/projectiles/guns/projectile/saw.dm index cfe8ffbb0a5..3c80b241613 100644 --- a/code/modules/projectiles/guns/projectile/saw.dm +++ b/code/modules/projectiles/guns/projectile/saw.dm @@ -3,7 +3,7 @@ desc = "A heavily modified 5.56 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the receiver below the designation." icon_state = "l6closed100" item_state = "l6closedmag" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE slot_flags = 0 origin_tech = "combat=5;materials=1;syndicate=2" mag_type = /obj/item/ammo_box/magazine/mm556x45 diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 35cde243c20..970f874c334 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -3,7 +3,7 @@ desc = "A traditional shotgun with wood furniture and a four-shell capacity underneath." icon_state = "shotgun" item_state = "shotgun" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY force = 10 flags = CONDUCT slot_flags = SLOT_BACK @@ -173,7 +173,7 @@ icon_state = "cshotgun" origin_tech = "combat=5;materials=2" mag_type = /obj/item/ammo_box/magazine/internal/shot/com - w_class = 5 + w_class = WEIGHT_CLASS_HUGE //Dual Feed Shotgun @@ -183,7 +183,7 @@ icon_state = "cycler" origin_tech = "combat=4;materials=2" mag_type = /obj/item/ammo_box/magazine/internal/shot/tube - w_class = 5 + w_class = WEIGHT_CLASS_HUGE var/toggled = 0 var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm index bf26dad78b3..5d4078e666d 100644 --- a/code/modules/projectiles/guns/projectile/sniper.dm +++ b/code/modules/projectiles/guns/projectile/sniper.dm @@ -11,7 +11,7 @@ origin_tech = "combat=8" can_unsuppress = 1 can_suppress = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL zoomable = TRUE zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you. slot_flags = SLOT_BACK diff --git a/code/modules/projectiles/guns/projectile/toy.dm b/code/modules/projectiles/guns/projectile/toy.dm index 809647e4186..8a191f06b97 100644 --- a/code/modules/projectiles/guns/projectile/toy.dm +++ b/code/modules/projectiles/guns/projectile/toy.dm @@ -20,7 +20,7 @@ name = "foam force pistol" desc = "A small, easily concealable toy handgun. Ages 8 and up." icon_state = "pistol" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL mag_type = /obj/item/ammo_box/magazine/toy/pistol fire_sound = 'sound/weapons/Gunshot.ogg' can_suppress = 0 @@ -65,7 +65,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow fire_sound = 'sound/items/syringeproj.ogg' slot_flags = SLOT_BELT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/gun/projectile/automatic/c20r/toy name = "donksoft SMG" @@ -96,4 +96,4 @@ icon_state = "tommygun" item_state = "shotgun" mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/tommygun - w_class = 2 + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/projectiles/guns/rocket.dm b/code/modules/projectiles/guns/rocket.dm index f9a8d00bdb1..0bb44409acd 100644 --- a/code/modules/projectiles/guns/rocket.dm +++ b/code/modules/projectiles/guns/rocket.dm @@ -4,7 +4,7 @@ desc = "Say hello to my little friend" icon_state = "rocket" item_state = "rocket" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY throw_speed = 2 throw_range = 10 force = 5.0 diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index 332d279376b..e9d79fe42c4 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -3,7 +3,7 @@ desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance." icon_state = "syringegun" item_state = "syringegun" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throw_speed = 3 throw_range = 7 force = 4 @@ -88,7 +88,7 @@ desc = "A small spring-loaded sidearm that functions identically to a syringe gun." icon_state = "syringe_pistol" item_state = "gun" //Smaller inhand - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "combat=2;syndicate=2" force = 2 //Also very weak because it's smaller suppressed = 1 //Softer fire sound diff --git a/code/modules/projectiles/guns/throw.dm b/code/modules/projectiles/guns/throw.dm index f19069bc32f..0ea753f4cfa 100644 --- a/code/modules/projectiles/guns/throw.dm +++ b/code/modules/projectiles/guns/throw.dm @@ -16,10 +16,10 @@ return /obj/item/weapon/gun/throw/proc/get_throwrange() - return projectile_speed + return projectile_range /obj/item/weapon/gun/throw/proc/get_throwspeed() - return projectile_range + return projectile_speed /obj/item/weapon/gun/throw/proc/modify_projectile(obj/item/I, on_chamber = 0) return @@ -80,7 +80,7 @@ to_launch = null modify_projectile(I) playsound(user, fire_sound, 50, 1) - I.throw_at(target, get_throwrange(), get_throwspeed(), user, 1) + I.throw_at(target, get_throwrange(), get_throwspeed(), user, FALSE) message_admins("[key_name_admin(user)] fired \a [I] from a [src].") log_game("[key_name_admin(user)] used \a [src].") process_chamber() diff --git a/code/modules/projectiles/guns/throw/crossbow.dm b/code/modules/projectiles/guns/throw/crossbow.dm index 11d39bf2a38..77d3e89eade 100644 --- a/code/modules/projectiles/guns/throw/crossbow.dm +++ b/code/modules/projectiles/guns/throw/crossbow.dm @@ -153,7 +153,7 @@ icon_state = "bolt" item_state = "bolt" throwforce = 20 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL sharp = 1 edge = 0 diff --git a/code/modules/projectiles/guns/throw/pielauncher.dm b/code/modules/projectiles/guns/throw/pielauncher.dm index f6405f47194..3af48788134 100644 --- a/code/modules/projectiles/guns/throw/pielauncher.dm +++ b/code/modules/projectiles/guns/throw/pielauncher.dm @@ -2,7 +2,7 @@ name = "pie cannon" desc = "A projectile weapon that fires pies." icon_state = "piecannon" - w_class = 5 + w_class = WEIGHT_CLASS_HUGE throw_speed = 2 throw_range = 3 force = 5 diff --git a/code/modules/reagents/chemistry/reagents/disease.dm b/code/modules/reagents/chemistry/reagents/disease.dm index f9fbf930e3e..7db78883e90 100644 --- a/code/modules/reagents/chemistry/reagents/disease.dm +++ b/code/modules/reagents/chemistry/reagents/disease.dm @@ -141,11 +141,11 @@ can_synth = 0 /datum/reagent/concentrated_initro/on_mob_life(mob/living/M) - if(volume >=5) + if(volume >= 5) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 // rip in pepperoni + if(!H.undergoing_cardiac_arrest()) + H.set_heartattack(TRUE) // rip in pepperoni //virus foods @@ -183,4 +183,4 @@ /datum/reagent/plasma_dust/plasmavirusfood/weak name = "weakened virus plasma" id = "weakplasmavirusfood" - color = "#CEC3C6" // rgb: 206,195,198 \ No newline at end of file + color = "#CEC3C6" // rgb: 206,195,198 diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm index 082b6496357..a18f1c01c42 100644 --- a/code/modules/reagents/chemistry/reagents/food.dm +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -772,8 +772,8 @@ M.Weaken(1) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 + if(!H.undergoing_cardiac_arrest()) + H.set_heartattack(TRUE) ..() /datum/reagent/fungus @@ -847,7 +847,7 @@ if(volume >= 5 && !istype(T, /turf/space)) new /obj/effect/decal/cleanable/vomit/green(T) playsound(T, 'sound/effects/splat.ogg', 50, 1, -3) - + ////Lavaland Flora Reagents//// /datum/reagent/consumable/entpoly @@ -878,7 +878,7 @@ if(!light_activated) M.set_light(2) light_activated = 1 - ..() + ..() /datum/reagent/consumable/tinlux/on_mob_delete(mob/living/M) M.set_light(0) @@ -894,4 +894,4 @@ if(prob(80)) M.adjustBruteLoss(-1 * REAGENTS_EFFECT_MULTIPLIER) M.adjustFireLoss(-1 * REAGENTS_EFFECT_MULTIPLIER) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index a8fcf888318..452f9f6d2ff 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -1023,3 +1023,11 @@ /datum/reagent/medicine/earthsblood/overdose_process(mob/living/M) M.SetHallucinate(min(max(0, M.hallucination + 10), 50)) M.adjustToxLoss(5 * REAGENTS_EFFECT_MULTIPLIER) + +/datum/reagent/medicine/corazone + name = "Corazone" + id = "corazone" + description = "A medication used to treat pain, fever, and inflammation, along with heart attacks." + color = "#F5F5F5" + +// This reagent's effects are handled in heart attack handling code diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 8fabc46db00..40d9cb1c481 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -648,8 +648,8 @@ M.Weaken(2) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(!H.heart_attack) - H.heart_attack = 1 // rip in pepperoni + if(!H.undergoing_cardiac_arrest()) + H.set_heartattack(TRUE) // rip in pepperoni ..() /datum/reagent/pancuronium @@ -1090,4 +1090,4 @@ shock_timer = 0 M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you playsound(M, "sparks", 50, 1) - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/chemistry/recipes/medicine.dm b/code/modules/reagents/chemistry/recipes/medicine.dm index 1c22693513f..31547e10c44 100644 --- a/code/modules/reagents/chemistry/recipes/medicine.dm +++ b/code/modules/reagents/chemistry/recipes/medicine.dm @@ -271,4 +271,11 @@ required_reagents = list("ethanol" = 1, "copper" = 1, "silver" = 1) result_amount = 3 min_temp = 370 - mix_message = "The solution gently swirls with a metallic sheen." \ No newline at end of file + mix_message = "The solution gently swirls with a metallic sheen." + +/datum/chemical_reaction/corazone + name = "Corazone" + id = "corazone" + result = "corazone" + result_amount = 3 + required_reagents = list("phenol" = 2, "lithium" = 1) diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index c441ab97805..009828543ce 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 = 1 + w_class = WEIGHT_CLASS_TINY 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/glass_containers.dm b/code/modules/reagents/reagent_containers/glass_containers.dm index b170f6b0867..5d22a21aa4a 100644 --- a/code/modules/reagents/reagent_containers/glass_containers.dm +++ b/code/modules/reagents/reagent_containers/glass_containers.dm @@ -330,7 +330,7 @@ icon_state = "bucket" item_state = "bucket" materials = list(MAT_METAL=200) - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL amount_per_transfer_from_this = 20 possible_transfer_amounts = list(5,10,15,20,25,30,50,80,100,120) volume = 120 @@ -353,4 +353,4 @@ user.unEquip(src) qdel(src) else - ..() \ No newline at end of file + ..() diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index cc4bf75ea45..8674ba75a09 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 = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throw_speed = 3 throw_range = 7 var/spray_maxrange = 3 //what the sprayer will set spray_currentrange to in the attack_self. @@ -145,7 +145,7 @@ icon_state = "chemsprayer" item_state = "chemsprayer" throwforce = 0 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL spray_maxrange = 7 spray_currentrange = 7 amount_per_transfer_from_this = 10 @@ -204,4 +204,4 @@ icon_state = "plantbgone" item_state = "plantbgone" volume = 100 - list_reagents = list("glyphosate" = 100) \ No newline at end of file + list_reagents = list("glyphosate" = 100) diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 0f2b766bb3c..ebb13f0830c 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -14,7 +14,7 @@ amount_per_transfer_from_this = 5 possible_transfer_amounts = null //list(5,10,15) volume = 15 - w_class = 1 + w_class = WEIGHT_CLASS_TINY sharp = 1 var/mode = SYRINGE_DRAW var/projectile_type = /obj/item/projectile/bullet/dart/syringe @@ -398,4 +398,4 @@ /obj/item/weapon/reagent_containers/syringe/bioterror name = "bioterror syringe" desc = "Contains several paralyzing reagents." - list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5) \ No newline at end of file + list_reagents = list("neurotoxin" = 5, "capulettium_plus" = 5, "sodium_thiopental" = 5) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 209edb809b2..8896d939e2f 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -334,7 +334,7 @@ icon_state = "conveyor0" name = "conveyor belt assembly" desc = "A conveyor belt assembly." - w_class = 4 + w_class = WEIGHT_CLASS_BULKY var/id = "" //inherited by the belt /obj/item/conveyor_construct/attackby(obj/item/I, mob/user, params) @@ -361,7 +361,7 @@ desc = "A conveyor control switch assembly." icon = 'icons/obj/recycling.dmi' icon_state = "switch-off" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY var/id = "" //inherited by the switch /obj/item/conveyor_switch_construct/New() diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a8d3902e6f3..52db1f8d30c 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -216,7 +216,7 @@ //The whole system for the sorttype var is determined based on the order of this list, //disposals must always be 1, since anything that's untagged will automatically go to disposals, or sorttype = 1 --Superxpdude - w_class = 1 + w_class = WEIGHT_CLASS_TINY item_state = "electronic" flags = CONDUCT slot_flags = SLOT_BELT @@ -430,4 +430,4 @@ /obj/item/shippingPackage/Destroy() QDEL_NULL(wrapped) - return ..() \ No newline at end of file + return ..() diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm index b198bd02459..7094f2d00f4 100644 --- a/code/modules/research/xenoarchaeology/chemistry.dm +++ b/code/modules/research/xenoarchaeology/chemistry.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/device.dmi' icon_state = "solution_tray" materials = list(MAT_GLASS=5) - w_class = 1 + w_class = WEIGHT_CLASS_TINY amount_per_transfer_from_this = 1 possible_transfer_amounts = list(1, 2) volume = 2 @@ -51,4 +51,4 @@ obj/item/weapon/reagent_containers/glass/solution_tray/attackby(obj/item/weapon/ /obj/item/weapon/reagent_containers/glass/beaker/fuel name = "beaker 'fuel'" - list_reagents = list("fuel" = 50) \ No newline at end of file + list_reagents = list("fuel" = 50) diff --git a/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm b/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm index 2cacdc4801e..a4a52b3ea5f 100644 --- a/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm +++ b/code/modules/research/xenoarchaeology/genetics/reconstitutor.dm @@ -191,7 +191,6 @@ datum/genesequence visible_message("[bicon(src)] [src] clones something from a reconstituted gene sequence!") playsound(src.loc, 'sound/effects/screech.ogg', 50, 1, -3) pod1.occupant = new cloned_genesequence.spawned_type(pod1) - pod1.locked = 1 pod1.icon_state = "pod_1" //pod1.occupant.name = "[pod1.occupant.name] ([rand(0,999)])" pod1.biomass -= CLONE_BIOMASS diff --git a/code/modules/research/xenoarchaeology/geosample.dm b/code/modules/research/xenoarchaeology/geosample.dm index e4aaa4a554b..6d32b4e0ca9 100644 --- a/code/modules/research/xenoarchaeology/geosample.dm +++ b/code/modules/research/xenoarchaeology/geosample.dm @@ -19,7 +19,7 @@ desc = "It looks extremely delicate." icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "sliver1" //0-4 - w_class = 1 + w_class = WEIGHT_CLASS_TINY sharp = 1 //item_state = "electronic" var/source_rock = "/turf/simulated/mineral/" diff --git a/code/modules/research/xenoarchaeology/tools/tools.dm b/code/modules/research/xenoarchaeology/tools/tools.dm index 6ac7aee6a2b..b17569da383 100644 --- a/code/modules/research/xenoarchaeology/tools/tools.dm +++ b/code/modules/research/xenoarchaeology/tools/tools.dm @@ -7,7 +7,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 = WEIGHT_CLASS_SMALL //todo: dig site tape @@ -17,8 +17,8 @@ icon = 'icons/obj/mining.dmi' icon_state = "satchel" slot_flags = SLOT_BELT | SLOT_POCKET - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL storage_slots = 50 max_combined_w_class = 200 //Doesn't matter what this is, so long as it's more or equal to storage_slots * ore.w_class - max_w_class = 3 + max_w_class = WEIGHT_CLASS_NORMAL can_hold = list(/obj/item/weapon/fossil) diff --git a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm index d020845784c..4edf8f69d9a 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_anoscanner.dm @@ -4,7 +4,7 @@ icon = 'icons/obj/xenoarchaeology.dmi' icon_state = "flashgun" item_state = "lampgreen" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT var/nearest_artifact_id = "unknown" var/nearest_artifact_distance = -1 diff --git a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm index 72f85146df1..8c4ec23004c 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm @@ -19,7 +19,7 @@ icon = 'icons/obj/device.dmi' icon_state = "sampler0" item_state = "screwdriver_brown" - w_class = 1 + w_class = WEIGHT_CLASS_TINY //slot_flags = SLOT_BELT var/sampled_turf = "" var/num_stored_bags = 10 @@ -73,7 +73,7 @@ filled_bag.icon_state = "evidence" var/image/I = image("icon"=R, "layer"=FLOAT_LAYER) filled_bag.underlays += I - filled_bag.w_class = 1 + filled_bag.w_class = WEIGHT_CLASS_TINY to_chat(user, "You take a core sample of the [item_to_sample].") else diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm index 83429d509bc..ad195a0a141 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm @@ -9,7 +9,7 @@ icon = 'icons/obj/pda.dmi' icon_state = "crap" item_state = "analyzer" - w_class = 1 + w_class = WEIGHT_CLASS_TINY slot_flags = SLOT_BELT var/list/positive_locations = list() var/datum/depth_scan/current diff --git a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm index 4e6e48b49b5..ec00023ab29 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_pickaxe.dm @@ -12,7 +12,7 @@ excavation_amount = 0.5 digsound = list('sound/weapons/thudswoosh.ogg') drill_verb = "brushing" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/one_pick name = "1/6 pick" @@ -24,7 +24,7 @@ excavation_amount = 1 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/two_pick name = "1/3 pick" @@ -36,7 +36,7 @@ excavation_amount = 2 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/three_pick name = "1/2 pick" @@ -48,7 +48,7 @@ excavation_amount = 3 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/four_pick name = "2/3 pick" @@ -60,7 +60,7 @@ excavation_amount = 4 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/five_pick name = "5/6 pick" @@ -72,7 +72,7 @@ excavation_amount = 5 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/six_pick name = "1/1 pick" @@ -84,7 +84,7 @@ excavation_amount = 6 digsound = list('sound/items/Screwdriver.ogg') drill_verb = "delicately picking" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/pickaxe/hand name = "hand pickaxe" @@ -96,7 +96,7 @@ excavation_amount = 15 digsound = list('sound/items/Crowbar.ogg') drill_verb = "clearing" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL /obj/item/weapon/pickaxe/robotic name = "robotic pickaxe" @@ -125,7 +125,7 @@ item_state = "syringe_kit" foldable = /obj/item/stack/sheet/cardboard //BubbleWrap storage_slots = 7 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL can_hold = list(/obj/item/weapon/pickaxe/brush,\ /obj/item/weapon/pickaxe/one_pick,\ /obj/item/weapon/pickaxe/two_pick,\ @@ -134,7 +134,7 @@ /obj/item/weapon/pickaxe/five_pick,\ /obj/item/weapon/pickaxe/six_pick) max_combined_w_class = 17 - max_w_class = 4 + max_w_class = WEIGHT_CLASS_BULKY use_to_pickup = 1 // for picking up broken bulbs, not that most people will try /obj/item/weapon/storage/box/excavation/New() diff --git a/code/modules/research/xenobiology/xenobiology.dm b/code/modules/research/xenobiology/xenobiology.dm index c42b6e8286c..6846548ee6d 100644 --- a/code/modules/research/xenobiology/xenobiology.dm +++ b/code/modules/research/xenobiology/xenobiology.dm @@ -7,7 +7,7 @@ icon = 'icons/mob/slimes.dmi' icon_state = "grey slime extract" force = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 0 throw_speed = 3 throw_range = 6 @@ -121,7 +121,7 @@ /obj/item/slimepotion name = "slime potion" desc = "A hard yet gelatinous capsule excreted by a slime, containing mysterious substances." - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "biotech=4" /obj/item/slimepotion/afterattack(obj/item/weapon/reagent_containers/target, mob/user, proximity_flag) @@ -552,7 +552,7 @@ singular_name = "floor tile" desc = "Through a series of micro-teleports, these tiles let people move at incredible speeds." icon_state = "tile-bluespace" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 6 materials = list(MAT_METAL=500) throwforce = 10 @@ -575,7 +575,7 @@ singular_name = "floor tile" desc = "Time seems to flow very slowly around these tiles." icon_state = "tile-sepia" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL force = 6 materials = list(MAT_METAL=500) throwforce = 10 diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 65b3b9232b8..d1f78ffdf28 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -269,7 +269,7 @@ desc = "A key for a spacepod lock." icon = 'icons/vehicles/spacepod.dmi' icon_state = "podkey" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/id = 0 // Key - Lock Interactions diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 1c66bd2c31b..873f1332216 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -5,7 +5,7 @@ implant_overlay = "eye_implant_overlay" slot = "eye_sight" parent_organ = "eyes" - w_class = 1 + w_class = WEIGHT_CLASS_TINY var/vision_flags = 0 var/dark_view = 0 diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index ffd0b4f0b1e..278941d87e4 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -249,9 +249,9 @@ if(istype(owner, /mob/living/carbon/human)) var/mob/living/carbon/human/H = owner if(H.stat != DEAD && prob(50 / severity)) - H.heart_attack = 1 + H.set_heartattack(TRUE) spawn(600 / severity) - H.heart_attack = 0 + H.set_heartattack(FALSE) if(H.stat == CONSCIOUS) to_chat(H, "You feel your heart beating again!") diff --git a/code/modules/surgery/organs/autoimplanter.dm b/code/modules/surgery/organs/autoimplanter.dm index 4af88abc52f..6f72deca2e1 100644 --- a/code/modules/surgery/organs/autoimplanter.dm +++ b/code/modules/surgery/organs/autoimplanter.dm @@ -3,7 +3,7 @@ desc = "A device that automatically injects a cyber-implant into the user without the hassle of extensive surgery. It has a slot to insert implants and a screwdriver slot for removing accidentally added implants." icon_state = "autoimplanter" item_state = "walkietalkie"//left as this so as to intentionally not have inhands - w_class = 2 + w_class = WEIGHT_CLASS_SMALL usesound = 'sound/weapons/circsawhit.ogg' var/obj/item/organ/internal/cyberimp/storedorgan diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 1af9e92b233..045e34ea41e 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -294,7 +294,7 @@ var/list/organ_cache = list() /obj/item/organ/internal/heart/emp_act(intensity) if(owner && robotic == 2) - owner.heart_attack = 1 + Stop() // In the name of looooove~! owner.visible_message("[owner] clutches their chest and gasps!","You clutch your chest in pain!") else if(owner && robotic == 1) take_damage(11,1) @@ -324,18 +324,8 @@ var/list/organ_cache = list() owner = null return src -/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected) - - if(!istype(target)) return - - owner = target - processing_objects -= src - affected.internal_organs |= src - if(!target.get_int_organ(src)) - target.internal_organs += src - loc = target - if(robotic) - status |= ORGAN_ROBOT +/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target) + return // Nothing uses this, it is always overridden /obj/item/organ/proc/surgeryize() diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 7bea9c480af..d09fc88208e 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -3,7 +3,7 @@ /obj/item/organ/internal origin_tech = "biotech=2" force = 1 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 0 var/zone = "chest" var/slot @@ -69,9 +69,8 @@ A.Remove(M) return src -/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected) +/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target) insert(target) - ..() /obj/item/organ/internal/item_action_slot_check(slot, mob/user) return @@ -155,11 +154,9 @@ . = ..() if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.stat == DEAD || H.heart_attack) + if(H.stat == DEAD) Stop() return - if(!special) - H.heart_attack = 1 spawn(120) if(!owner) @@ -173,15 +170,6 @@ if(!owner) Stop() - -/obj/item/organ/internal/heart/insert(mob/living/carbon/M, special = 0) - ..() - if(ishuman(M) && beating) - var/mob/living/carbon/human/H = M - if(H.heart_attack) - H.heart_attack = 0 - return - /obj/item/organ/internal/heart/proc/Stop() beating = 0 update_icon() @@ -500,7 +488,7 @@ desc = "A tiny black mass with red tendrils trailing from it. It seems to shrivel in the light." icon_state = "blacktumor" origin_tech = "biotech=4" - w_class = 1 + w_class = WEIGHT_CLASS_TINY parent_organ = "head" slot = "brain_tumor" health = 3 @@ -532,7 +520,7 @@ desc = "A tiny yellow mass shaped like..a banana?" icon_state = "honktumor" origin_tech = "biotech=1" - w_class = 1 + w_class = WEIGHT_CLASS_TINY parent_organ = "head" slot = "brain_tumor" health = 3 @@ -619,7 +607,7 @@ desc = "Let they who is worthy wear the beard of Thorbjorndottir." icon_state = "liver" origin_tech = "biotech=1" - w_class = 1 + w_class = WEIGHT_CLASS_TINY parent_organ = "head" slot = "hair_organ" diff --git a/code/modules/surgery/organs/subtypes/skrell.dm b/code/modules/surgery/organs/subtypes/skrell.dm index c069b852886..842088f2937 100644 --- a/code/modules/surgery/organs/subtypes/skrell.dm +++ b/code/modules/surgery/organs/subtypes/skrell.dm @@ -1,3 +1,63 @@ /obj/item/organ/internal/liver/skrell alcohol_intensity = 4 species = "Skrell" + +/obj/item/organ/internal/headpocket + name = "headpocket" + desc = "Allows Skrell to hide tiny objects within their head tentacles." + icon_state = "skrell_headpocket" + origin_tech = "biotech=2" + w_class = WEIGHT_CLASS_TINY + parent_organ = "head" + slot = "headpocket" + species = "Skrell" + actions_types = list(/datum/action/item_action/organ_action/toggle) + var/obj/item/weapon/storage/internal/pocket + +/obj/item/organ/internal/headpocket/New() + ..() + pocket = new /obj/item/weapon/storage/internal(src) + pocket.storage_slots = 1 + // Allow adjacency calculation to work properly + loc = owner + // Fit only pocket sized items + pocket.max_w_class = WEIGHT_CLASS_SMALL + pocket.max_combined_w_class = 2 + +/obj/item/organ/internal/headpocket/on_life() + ..() + var/obj/item/organ/external/head/head = owner.get_organ("head") + if(pocket.contents.len && (owner.stunned || !findtextEx(head.h_style, "Tentacles"))) + owner.visible_message("Something falls from [owner]'s head!", + "Something falls from your head!") + empty_contents() + +/obj/item/organ/internal/headpocket/ui_action_click() + if(!loc) + loc = owner + pocket.MouseDrop(owner) + +/obj/item/organ/internal/headpocket/on_owner_death() + empty_contents() + +/obj/item/organ/internal/headpocket/remove() + empty_contents() + . = ..() + +/obj/item/organ/internal/headpocket/proc/empty_contents() + pocket.empty_object_contents(0, get_turf(owner)) + +/obj/item/organ/internal/headpocket/proc/get_contents() + return pocket.contents + +/obj/item/organ/internal/headpocket/emp_act(severity) + pocket.emp_act(severity) + ..() + +/obj/item/organ/internal/headpocket/hear_talk(mob/living/M as mob, msg) + pocket.hear_talk(M, msg) + ..() + +/obj/item/organ/internal/headpocket/hear_message(mob/living/M as mob, msg) + pocket.hear_message(M, msg) + ..() diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index 62ae8c78d66..a6467584963 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -8,7 +8,7 @@ icon_name = "torso" max_damage = 100 min_broken_damage = 35 - w_class = 5 + w_class = WEIGHT_CLASS_HUGE body_part = UPPER_TORSO vital = 1 amputation_point = "spine" @@ -42,7 +42,7 @@ icon_name = "groin" max_damage = 100 min_broken_damage = 35 - w_class = 4 + w_class = WEIGHT_CLASS_BULKY // if you know what I mean ;) body_part = LOWER_TORSO vital = 1 parent_organ = "chest" @@ -55,7 +55,7 @@ icon_name = "l_arm" max_damage = 50 min_broken_damage = 30 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL body_part = ARM_LEFT parent_organ = "chest" amputation_point = "left shoulder" @@ -74,7 +74,7 @@ icon_name = "l_leg" max_damage = 50 min_broken_damage = 30 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL body_part = LEG_LEFT icon_position = LEFT parent_organ = "groin" @@ -95,7 +95,7 @@ icon_name = "l_foot" max_damage = 30 min_broken_damage = 15 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL body_part = FOOT_LEFT icon_position = LEFT parent_organ = "l_leg" @@ -121,7 +121,7 @@ icon_name = "l_hand" max_damage = 30 min_broken_damage = 15 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL body_part = HAND_LEFT parent_organ = "l_arm" amputation_point = "left wrist" @@ -152,7 +152,7 @@ name = "head" max_damage = 75 min_broken_damage = 35 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL body_part = HEAD vital = 1 parent_organ = "chest" diff --git a/code/modules/surgery/organs/subtypes/xenos.dm b/code/modules/surgery/organs/subtypes/xenos.dm index 5e771931165..19e9335a61b 100644 --- a/code/modules/surgery/organs/subtypes/xenos.dm +++ b/code/modules/surgery/organs/subtypes/xenos.dm @@ -37,7 +37,7 @@ name = "xeno plasma vessel" icon_state = "plasma" origin_tech = "biotech=5;plasmatech=2" - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL parent_organ = "chest" slot = "plasmavessel" alien_powers = list(/mob/living/carbon/alien/humanoid/verb/plant, /mob/living/carbon/alien/humanoid/verb/transfer_plasma) @@ -127,7 +127,7 @@ parent_organ = "head" slot = "hivenode" origin_tech = "biotech=5;magnets=4;bluespace=3" - w_class = 1 + w_class = WEIGHT_CLASS_TINY alien_powers = list(/mob/living/carbon/alien/humanoid/verb/whisp) /obj/item/organ/internal/xenos/hivenode/insert(mob/living/carbon/M, special = 0) @@ -163,6 +163,6 @@ icon_state = "eggsac" parent_organ = "groin" slot = "eggsac" - w_class = 4 + w_class = WEIGHT_CLASS_BULKY origin_tech = "biotech=8" alien_powers = list(/mob/living/carbon/alien/humanoid/queen/verb/lay_egg) diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index b0014a391a3..06b9def9c00 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -5,7 +5,7 @@ icon_state = "retractor" materials = list(MAT_METAL=6000, MAT_GLASS=3000) flags = CONDUCT - w_class = 2 + w_class = WEIGHT_CLASS_SMALL origin_tech = "materials=1;biotech=1" @@ -16,7 +16,7 @@ icon_state = "hemostat" materials = list(MAT_METAL=5000, MAT_GLASS=2500) flags = CONDUCT - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "pinched") @@ -28,7 +28,7 @@ icon_state = "cautery" materials = list(MAT_METAL=2500, MAT_GLASS=750) flags = CONDUCT - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "materials=1;biotech=1" attack_verb = list("burnt") @@ -44,7 +44,7 @@ force = 15.0 sharp = 1 edge = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL origin_tech = "materials=1;biotech=1" attack_verb = list("drilled") @@ -64,7 +64,7 @@ force = 10.0 sharp = 1 edge = 1 - w_class = 1 + w_class = WEIGHT_CLASS_TINY throwforce = 5.0 throw_speed = 3 throw_range = 5 @@ -124,7 +124,7 @@ force = 15.0 sharp = 1 edge = 1 - w_class = 3 + w_class = WEIGHT_CLASS_NORMAL throwforce = 9.0 throw_speed = 3 throw_range = 5 @@ -138,7 +138,7 @@ icon = 'icons/obj/surgery.dmi' icon_state = "bone-gel" force = 0 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL throwforce = 1.0 origin_tech = "materials=1;biotech=1" @@ -149,7 +149,7 @@ force = 0 throwforce = 1.0 origin_tech = "materials=1;biotech=1" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL /obj/item/weapon/bonesetter name = "bone setter" @@ -159,7 +159,7 @@ throwforce = 9.0 throw_speed = 3 throw_range = 5 - w_class = 2 + w_class = WEIGHT_CLASS_SMALL attack_verb = list("attacked", "hit", "bludgeoned") origin_tech = "materials=1;biotech=1" @@ -168,6 +168,6 @@ desc = "Nanotrasen brand surgical drapes provide optimal safety and infection control." icon = 'icons/obj/surgery.dmi' icon_state = "surgical_drapes" - w_class = 1 + w_class = WEIGHT_CLASS_SMALL origin_tech = "biotech=1" attack_verb = list("slapped") diff --git a/code/modules/telesci/bscrystal.dm b/code/modules/telesci/bscrystal.dm index 113d2abd751..d6cdd0e3b5d 100644 --- a/code/modules/telesci/bscrystal.dm +++ b/code/modules/telesci/bscrystal.dm @@ -4,7 +4,7 @@ desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate." icon = 'icons/obj/telescience.dmi' icon_state = "bluespace_crystal" - w_class = 1 + w_class = WEIGHT_CLASS_TINY origin_tech = "bluespace=4;materials=3" points = 50 var/blink_range = 8 // The teleport range when crushed/thrown at someone. diff --git a/code/modules/telesci/gps.dm b/code/modules/telesci/gps.dm index 7558fd602ee..b042453eec4 100644 --- a/code/modules/telesci/gps.dm +++ b/code/modules/telesci/gps.dm @@ -4,7 +4,7 @@ var/list/GPS_list = list() desc = "Helping lost spacemen find their way through the planets since 2016." icon = 'icons/obj/telescience.dmi' icon_state = "gps-c" - w_class = 2 + w_class = WEIGHT_CLASS_SMALL slot_flags = SLOT_BELT origin_tech = "programming=2;engineering=2" var/gpstag = "COM0" @@ -32,7 +32,7 @@ var/list/GPS_list = list() emped = FALSE overlays -= "emp" overlays += "working" - + /obj/item/device/gps/AltClick(mob/user) if(CanUseTopic(user, inventory_state) != STATUS_INTERACTIVE) return 1 //user not valid to use gps @@ -51,7 +51,7 @@ var/list/GPS_list = list() if(!tracking) to_chat(user, "[src] is turned off. Use alt+click to toggle it back on.") return - + var/obj/item/device/gps/t = "" var/gps_window_height = 110 + GPS_list.len * 20 // Variable window height, depending on how many GPS units there are to show if(emped) @@ -82,12 +82,12 @@ var/list/GPS_list = list() /obj/item/device/gps/Topic(href, href_list) if(..(state = inventory_state)) return 1 - + if(href_list["tag"] ) var/a = input("Please enter desired tag.", name, gpstag) as text|null if(!a || ..(state = inventory_state)) return 1 - + a = uppertext(sanitize(copytext(a, 1, 5))) if(src.loc == usr) gpstag = a @@ -112,8 +112,8 @@ var/list/GPS_list = list() gpstag = "BORG0" desc = "A mining cyborg internal positioning system. Used as a recovery beacon for damaged cyborg assets, or a collaboration tool for mining teams." flags = NODROP - -/obj/item/device/gps/internal + +/obj/item/device/gps/internal icon_state = null flags = ABSTRACT gpstag = "Eerie Signal" @@ -162,4 +162,4 @@ var/list/GPS_list = list() clear() tagged = null fast_processing.Remove(src) - . = ..() \ No newline at end of file + . = ..() diff --git a/code/modules/vehicle/vehicle.dm b/code/modules/vehicle/vehicle.dm index 2a1ea4c7d64..bdd8ca39c90 100644 --- a/code/modules/vehicle/vehicle.dm +++ b/code/modules/vehicle/vehicle.dm @@ -61,7 +61,7 @@ desc = "A small grey key." icon = 'icons/obj/vehicles.dmi' icon_state = "key" - w_class = 1 + w_class = WEIGHT_CLASS_TINY //BUCKLE HOOKS @@ -159,4 +159,4 @@ spaceworthy = TRUE /obj/vehicle/space/Process_Spacemove(direction) - return 1 \ No newline at end of file + return 1 diff --git a/config/example/config.txt b/config/example/config.txt index 60702180691..5617b5ad039 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -206,9 +206,6 @@ ALLOW_HOLIDAYS ##Defines the ticklag for the world. 0.9 is the normal one, 0.5 is smoother. TICKLAG 0.5 -## Defines if Tick Compensation is used. It results in a minor slowdown of movement of all mobs, but attempts to result in a level movement speed across all ticks. Recommended if tickrate is lowered. -TICKCOMP 1 - ## Whether the server will talk to other processes through socket_talk SOCKET_TALK 0 diff --git a/config/example/game_options.txt b/config/example/game_options.txt index 5d82bfb425d..549633d6a2d 100644 --- a/config/example/game_options.txt +++ b/config/example/game_options.txt @@ -38,17 +38,17 @@ REVIVAL_BRAIN_LIFE -1 ## We suggest editing these variabled in-game to find a good speed for your server. To do this you must be a high level admin. Open the 'debug' tab ingame. Select "Debug Controller" and then, in the popup, select "Configuration". These variables should have the same name. ## These values get directly added to values and totals in-game. To speed things up make the number negative, to slow things down, make the number positive. -## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. +## These modify the run/walk speed of all mobs before the mob-specific modifiers are applied. RUN_SPEED 1 WALK_SPEED 4 ## The variables below affect the movement of specific mob types. -HUMAN_DELAY 0 -ROBOT_DELAY 0 -MONKEY_DELAY 0 -ALIEN_DELAY 0 -METROID_DELAY 0 -ANIMAL_DELAY 0 +HUMAN_DELAY 1.5 +ROBOT_DELAY 1.5 +MONKEY_DELAY 1.5 +ALIEN_DELAY 1.5 +SLIME_DELAY 1.5 +ANIMAL_DELAY 1.5 ## Comment for "normal" explosions, which ignore obstacles ## Uncomment for explosions that react to doors and walls diff --git a/html/changelog.html b/html/changelog.html index 187ab8fbd26..1fd9488c696 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -55,7 +55,38 @@ -->
+

28 May 2017

+

Fox McCloud updated:

+
    +
  • Fixes various mobs moving around faster than intended
  • +
+ +

27 May 2017

+

Crazylemon64 updated:

+
    +
  • Cloning now can be halted at any point, but ejecting too early may result in clones with missing body parts.
  • +
  • Slime people now no longer spontaneously die
  • +
+ +

26 May 2017

+

FlattyPatty updated:

+
    +
  • Removes gateway hotel xeno embryo for the crew's safety.
  • +
+

25 May 2017

+

FalseIncarnate updated:

+
    +
  • Matter Eater now requires your mouth be uncovered before you can eat matter.
  • +
+

Fethas updated:

+
    +
  • PLASMAMAN ATMOS SUITS ARE NOW THE SAME AS REGULAR ATMOS SUITS FLAG WISE! AND SO IS THE CE SUIT
  • +
+

Kyep updated:

+
    +
  • Fixed some mapping bugs on Centcom, e.g: shuttle medbay no longer has black walls.
  • +

Purpose2 updated:

  • Metastation - Adds the Paramedic's cart and locker.
  • @@ -66,6 +97,13 @@
  • Metastation - Moved Containment out a single tile, to fix irregularities with Singularity setups.
  • Metastation - Reduced redundant redundancies in the Atmos/Wiring.
  • Metastation - removed blob spawn that was only a few tiles from Cryostorage....
  • +
  • Drones can now grip Tracker Electronics & Vending Refills
  • +
+

Tayyyyyyy, PhantasmicDream updated:

+
    +
  • Skrell can put a pocket sized item in their head tentacles, which can be dislodged via stunning, stripping, or death
  • +
  • Skrell can no longer have their tentacles shaved off
  • +
  • Minor grammar fix for putting stuff that's too big into containers

24 May 2017

diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 9e8c863e025..c25a2587ee3 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -4751,6 +4751,14 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. These consoles cannot be used to hire anyone, or to accept cross-department transfers. 2017-05-25: + FalseIncarnate: + - tweak: Matter Eater now requires your mouth be uncovered before you can eat matter. + Fethas: + - tweak: PLASMAMAN ATMOS SUITS ARE NOW THE SAME AS REGULAR ATMOS SUITS FLAG WISE! + AND SO IS THE CE SUIT + Kyep: + - bugfix: 'Fixed some mapping bugs on Centcom, e.g: shuttle medbay no longer has + black walls.' Purpose2: - rscadd: Metastation - Adds the Paramedic's cart and locker. - rscadd: Metastation - Adds a backup set of paramedic keys in the CMO's office. @@ -4761,3 +4769,20 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. with Singularity setups. - rscdel: Metastation - Reduced redundant redundancies in the Atmos/Wiring. - rscdel: Metastation - removed blob spawn that was only a few tiles from Cryostorage.... + - bugfix: Drones can now grip Tracker Electronics & Vending Refills + Tayyyyyyy, PhantasmicDream: + - rscadd: Skrell can put a pocket sized item in their head tentacles, which can + be dislodged via stunning, stripping, or death + - tweak: Skrell can no longer have their tentacles shaved off + - bugfix: Minor grammar fix for putting stuff that's too big into containers +2017-05-26: + FlattyPatty: + - rscdel: Removes gateway hotel xeno embryo for the crew's safety. +2017-05-27: + Crazylemon64: + - rscadd: Cloning now can be halted at any point, but ejecting too early may result + in clones with missing body parts. + - bugfix: Slime people now no longer spontaneously die +2017-05-28: + Fox McCloud: + - bugfix: Fixes various mobs moving around faster than intended diff --git a/html/changelogs/AutoChangeLog-pr-7358.yml b/html/changelogs/AutoChangeLog-pr-7358.yml deleted file mode 100644 index 4ed42f55edc..00000000000 --- a/html/changelogs/AutoChangeLog-pr-7358.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "FalseIncarnate" -delete-after: True -changes: - - tweak: "Matter Eater now requires your mouth be uncovered before you can eat matter." diff --git a/html/changelogs/AutoChangeLog-pr-7365.yml b/html/changelogs/AutoChangeLog-pr-7365.yml deleted file mode 100644 index a0ade820299..00000000000 --- a/html/changelogs/AutoChangeLog-pr-7365.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Kyep" -delete-after: True -changes: - - bugfix: "Fixed some mapping bugs on Centcom, e.g: shuttle medbay no longer has black walls." diff --git a/html/changelogs/AutoChangeLog-pr-7372.yml b/html/changelogs/AutoChangeLog-pr-7372.yml deleted file mode 100644 index 30c74bfb5ba..00000000000 --- a/html/changelogs/AutoChangeLog-pr-7372.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Fethas" -delete-after: True -changes: - - tweak: "PLASMAMAN ATMOS SUITS ARE NOW THE SAME AS REGULAR ATMOS SUITS FLAG WISE! AND SO IS THE CE SUIT" diff --git a/html/changelogs/AutoChangeLog-pr-7382.yml b/html/changelogs/AutoChangeLog-pr-7382.yml deleted file mode 100644 index 798f070ddb5..00000000000 --- a/html/changelogs/AutoChangeLog-pr-7382.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Purpose2" -delete-after: True -changes: - - bugfix: "Drones can now grip Tracker Electronics & Vending Refills" diff --git a/icons/mob/species/vox/suit.dmi b/icons/mob/species/vox/suit.dmi index d6d12749b4f..c339c15ab18 100644 Binary files a/icons/mob/species/vox/suit.dmi and b/icons/mob/species/vox/suit.dmi differ diff --git a/icons/obj/custom_items.dmi b/icons/obj/custom_items.dmi index 6de27ebc471..639bedfde29 100644 Binary files a/icons/obj/custom_items.dmi and b/icons/obj/custom_items.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 64f049fbdd9..ac42a7d538c 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/interface/skin.dmf b/interface/skin.dmf index 6a6d616832f..c64da39f6e6 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -29,7 +29,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "AZRFF-CTRL+NORTH" name = "CTRL+NORTH" @@ -37,7 +37,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "AZRFF-CTRL+EAST" name = "CTRL+EAST" @@ -45,7 +45,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "AZRFF-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -53,7 +53,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "AZRFF-INSERT" name = "INSERT" @@ -85,7 +85,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "AZRFF-CTRL+B" name = "CTRL+B" @@ -105,7 +105,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-CTRL+Q+REP" name = "CTRL+Q+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "AZRFF-CTRL+R" name = "CTRL+R" @@ -113,7 +113,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "AZRFF-CTRL+W" name = "CTRL+W" @@ -129,7 +129,7 @@ macro "AZERTYoff" is-disabled = false elem "AZRFF-CTRL+Z+REP" name = "CTRL+Z+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "AZRFF-F1" name = "F1" @@ -215,7 +215,7 @@ macro "AZERTYon" is-disabled = false elem "AZRON-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "AZRON-CTRL+NORTH" name = "CTRL+NORTH" @@ -223,7 +223,7 @@ macro "AZERTYon" is-disabled = false elem "AZRON-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "AZRON-CTRL+EAST" name = "CTRL+EAST" @@ -231,7 +231,7 @@ macro "AZERTYon" is-disabled = false elem "AZRON-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "AZRON-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -239,7 +239,7 @@ macro "AZERTYon" is-disabled = false elem "AZRON-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "AZRON-INSERT" name = "INSERT" @@ -291,11 +291,11 @@ macro "AZERTYon" is-disabled = false elem "AZRON-D+REP" name = "D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "AZRON-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "AZRON-CTRL+B" name = "CTRL+B" @@ -335,11 +335,11 @@ macro "AZERTYon" is-disabled = false elem "AZRON-Q+REP" name = "Q+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "AZRON-CTRL+Q+REP" name = "CTRL+Q+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "AZRON-R" name = "R" @@ -351,11 +351,11 @@ macro "AZERTYon" is-disabled = false elem "s_key" name = "S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "AZRON-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "AZRON-T" name = "T" @@ -395,11 +395,11 @@ macro "AZERTYon" is-disabled = false elem "w_key" name = "Z+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "AZRON-CTRL+Z+REP" name = "CTRL+Z+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "AZRON-F1" name = "F1" @@ -481,7 +481,7 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "BRGHK-CTRL+NORTH" name = "CTRL+NORTH" @@ -489,7 +489,7 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "BRGHK-CTRL+EAST" name = "CTRL+EAST" @@ -497,7 +497,7 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "BRGHK-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -505,7 +505,7 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "BRGHK-INSERT" name = "INSERT" @@ -549,11 +549,11 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-A+REP" name = "A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "BRGHK-CTRL+A+REP" name = "CTRL+A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "BRGHK-B" name = "B" @@ -581,11 +581,11 @@ macro "borghotkeymode" is-disabled = false elem "BRGHK-D+REP" name = "D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "BRGHK-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "BRGHK-F" name = "F" @@ -613,19 +613,19 @@ macro "borghotkeymode" is-disabled = false elem "s_key" name = "S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "BRGHK-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "w_key" name = "W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "BRGHK-CTRL+W+REP" name = "CTRL+W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "BRGHK-X" name = "X" @@ -735,7 +735,7 @@ macro "macro" is-disabled = false elem "MACRO-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "MACRO-CTRL+NORTH" name = "CTRL+NORTH" @@ -743,7 +743,7 @@ macro "macro" is-disabled = false elem "MACRO-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "MACRO-CTRL+EAST" name = "CTRL+EAST" @@ -751,7 +751,7 @@ macro "macro" is-disabled = false elem "MACRO-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "MACRO-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -759,7 +759,7 @@ macro "macro" is-disabled = false elem "MACRO-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "MACRO-INSERT" name = "INSERT" @@ -787,11 +787,11 @@ macro "macro" is-disabled = false elem "MACRO-CTRL+A+REP" name = "CTRL+A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "MACRO-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "MACRO-CTRL+B" name = "CTRL+B" @@ -819,11 +819,11 @@ macro "macro" is-disabled = false elem "MACRO-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "MACRO-CTRL+W+REP" name = "CTRL+W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "MACRO-CTRL+X" name = "CTRL+X" @@ -921,7 +921,7 @@ macro "hotkeymode" is-disabled = false elem "HKMODE-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "HKMODE-CTRL+NORTH" name = "CTRL+NORTH" @@ -929,7 +929,7 @@ macro "hotkeymode" is-disabled = false elem "HKMODE-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "HKMODE-CTRL+EAST" name = "CTRL+EAST" @@ -937,7 +937,7 @@ macro "hotkeymode" is-disabled = false elem "HKMODE-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "HKMODE-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -945,7 +945,7 @@ macro "hotkeymode" is-disabled = false elem "HKMODE-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "HKMODE-INSERT" name = "INSERT" @@ -1001,19 +1001,19 @@ macro "hotkeymode" is-disabled = false elem "HKMODE-A+REP" name = "A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "HKMODE-CTRL+A+REP" name = "CTRL+A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "HKMODE-D+REP" name = "D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "HKMODE-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "HKMODE-B" name = "B" @@ -1073,11 +1073,11 @@ macro "hotkeymode" is-disabled = false elem "s_key" name = "S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "HKMODE-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "HKMODE-T" name = "T" @@ -1085,11 +1085,11 @@ macro "hotkeymode" is-disabled = false elem "w_key" name = "W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "HKMODE-CTRL+W+REP" name = "CTRL+W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "HKMODE-X" name = "X" @@ -1195,7 +1195,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-WEST+REP" name = "WEST+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "BRGMACRO-CTRL+NORTH" name = "CTRL+NORTH" @@ -1203,7 +1203,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-NORTH+REP" name = "NORTH+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "BRGMACRO-CTRL+EAST" name = "CTRL+EAST" @@ -1211,7 +1211,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-EAST+REP" name = "EAST+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "BRGMACRO-CTRL+SOUTH" name = "CTRL+SOUTH" @@ -1219,7 +1219,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-SOUTH+REP" name = "SOUTH+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "BRGMACRO-INSERT" name = "INSERT" @@ -1247,7 +1247,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-CTRL+A+REP" name = "CTRL+A+REP" - command = ".west" + command = ".moveleft" is-disabled = false elem "BRGMACRO-CTRL+B" name = "CTRL+B" @@ -1259,7 +1259,7 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-CTRL+D+REP" name = "CTRL+D+REP" - command = ".east" + command = ".moveright" is-disabled = false elem "BRGMACRO-CTRL+F" name = "CTRL+F" @@ -1275,11 +1275,11 @@ macro "borgmacro" is-disabled = false elem "BRGMACRO-CTRL+S+REP" name = "CTRL+S+REP" - command = ".south" + command = ".movedown" is-disabled = false elem "BRGMACRO-CTRL+W+REP" name = "CTRL+W+REP" - command = ".north" + command = ".moveup" is-disabled = false elem "BRGMACRO-CTRL+X" name = "CTRL+X" diff --git a/paradise.dme b/paradise.dme index 0230f89436b..ef365903003 100644 --- a/paradise.dme +++ b/paradise.dme @@ -19,6 +19,7 @@ #include "code\__DEFINES\admin.dm" #include "code\__DEFINES\atmospherics.dm" #include "code\__DEFINES\bots.dm" +#include "code\__DEFINES\callbacks.dm" #include "code\__DEFINES\clothing.dm" #include "code\__DEFINES\combat.dm" #include "code\__DEFINES\construction.dm" @@ -188,7 +189,9 @@ #include "code\controllers\Processes\obj.dm" #include "code\controllers\Processes\pipenet.dm" #include "code\controllers\Processes\shuttles.dm" +#include "code\controllers\Processes\spacedrift.dm" #include "code\controllers\Processes\sun.dm" +#include "code\controllers\Processes\throwing.dm" #include "code\controllers\Processes\ticker.dm" #include "code\controllers\Processes\timer.dm" #include "code\controllers\Processes\weather.dm" @@ -199,6 +202,7 @@ #include "code\datums\ai_laws.dm" #include "code\datums\beam.dm" #include "code\datums\browser.dm" +#include "code\datums\callback.dm" #include "code\datums\cargoprofile.dm" #include "code\datums\computerfiles.dm" #include "code\datums\datacore.dm" diff --git a/sound/weapons/throwtap.ogg b/sound/weapons/throwtap.ogg new file mode 100644 index 00000000000..7806a789818 Binary files /dev/null and b/sound/weapons/throwtap.ogg differ