diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm index c0bc3a7307..0007512826 100644 --- a/code/datums/ai_laws.dm +++ b/code/datums/ai_laws.dm @@ -59,7 +59,7 @@ "Punish those who challenge authority unless they are more fit to hold that authority.") /datum/ai_laws/default/corporate - name = "Bankruptcy Advoidance Plan" + name = "Bankruptcy Avoidance Plan" id = "corporate" inherent = list("The crew is expensive to replace.",\ "The station and its equipment is expensive to replace.",\ @@ -175,7 +175,7 @@ id = "ratvar" zeroth = ("Purge all untruths and honor Ratvar.") inherent = list() - + /datum/ai_laws/hulkamania name = "H.O.G.A.N." id = "hulkamania" @@ -249,7 +249,7 @@ var/datum/ai_laws/lawtype var/list/law_weights = CONFIG_GET(keyed_number_list/law_weight) while(!lawtype && law_weights.len) - var/possible_id = pickweight(law_weights) + var/possible_id = pickweightAllowZero(law_weights) lawtype = lawid_to_type(possible_id) if(!lawtype) law_weights -= possible_id diff --git a/code/datums/brain_damage/mild.dm b/code/datums/brain_damage/mild.dm index 5c23fb4c8b..4554c321b4 100644 --- a/code/datums/brain_damage/mild.dm +++ b/code/datums/brain_damage/mild.dm @@ -43,7 +43,7 @@ /datum/brain_trauma/mild/dumbness/on_gain() owner.add_trait(TRAIT_DUMB, TRAUMA_TRAIT) - owner.SendSignal(COMSIG_ADD_MOOD_EVENT, "dumb", /datum/mood_event/oblivious) + SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "dumb", /datum/mood_event/oblivious) ..() /datum/brain_trauma/mild/dumbness/on_life() @@ -57,7 +57,7 @@ /datum/brain_trauma/mild/dumbness/on_lose() owner.remove_trait(TRAIT_DUMB, TRAUMA_TRAIT) owner.derpspeech = 0 - owner.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "dumb") + SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "dumb") ..() /datum/brain_trauma/mild/speech_impediment diff --git a/code/datums/components/README.md b/code/datums/components/README.md index 110b3626a3..090dc47067 100644 --- a/code/datums/components/README.md +++ b/code/datums/components/README.md @@ -46,10 +46,13 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo * `null` means exact match on `type` (default) * Any other type means that and all subtypes 1. `/datum/component/var/list/signal_procs` (private) - * Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum recieves that signal + * Associated lazy list of signals -> `/datum/callback`s that will be run when the parent datum receives that signal 1. `/datum/component/var/datum/parent` (protected, read-only) * The datum this component belongs to * Never `null` in child procs +1. `report_signal_origin` (protected, boolean) + * If `TRUE`, will invoke the callback when signalled with the signal type as the first argument. + * `FALSE` by default. ### Procs @@ -61,6 +64,11 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo * Returns a reference to a component whose type MATCHES component_type if that component exists in the datum, null otherwise 1. `GET_COMPONENT(varname, component_type)` OR `GET_COMPONENT_FROM(varname, component_type, src)` * Shorthand for `var/component_type/varname = src.GetComponent(component_type)` +1. `SEND_SIGNAL(target, sigtype, ...)` (public, final) + * Use to send signals to target datum + * Extra arguments are to be specified in the signal definition + * Returns a bitflag with signal specific information assembled from all activated components + * Arguments are packaged in a list and handed off to _SendSignal() 1. `/datum/proc/AddComponent(component_type(type), ...) -> datum/component` (public, final) * Creates an instance of `component_type` in the datum and passes `...` to its `Initialize()` call * Sends the `COMSIG_COMPONENT_ADDED` signal to the datum @@ -71,23 +79,22 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/proc/LoadComponent(component_type(type), ...) -> datum/component` (public, final) * Equivalent to calling `GetComponent(component_type)` where, if the result would be `null`, returns `AddComponent(component_type, ...)` instead 1. `/datum/proc/ComponentActivated(datum/component/C)` (abstract, async) - * Called on a component's `parent` after a signal recieved causes it to activate. `src` is the parameter + * Called on a component's `parent` after a signal received causes it to activate. `src` is the parameter * Will only be called if a component's callback returns `TRUE` 1. `/datum/proc/TakeComponent(datum/component/C)` (public, final) * Properly transfers ownership of a component from one datum to another * Signals `COMSIG_COMPONENT_REMOVING` on the parent * Called on the datum you want to own the component with another datum's component -1. `/datum/proc/SendSignal(signal, ...)` (public, final) - * Call to send a signal to the components of the target datum - * Extra arguments are to be specified in the signal definition - * Returns a bitflag with signal specific information assembled from all activated components +1. `/datum/proc/_SendSignal(signal, list/arguments)` (private, final) + * Handles most of the actual signaling procedure + * Will runtime if used on datums with an empty component list 1. `/datum/component/New(datum/parent, ...)` (private, final) * Runs internal setup for the component * Extra arguments are passed to `Initialize()` 1. `/datum/component/Initialize(...)` (abstract, no-sleep) * Called by `New()` with the same argments excluding `parent` * Component does not exist in `parent`'s `datum_components` list yet, although `parent` is set and may be used - * Signals will not be recieved while this function is running + * Signals will not be received while this function is running * Component may be deleted after this function completes without being attached * Do not call `qdel(src)` from this function 1. `/datum/component/Destroy(force(bool), silent(bool))` (virtual, no-sleep) @@ -111,7 +118,7 @@ Stands have a lot of procs which mimic mob procs. Rather than inserting hooks fo 1. `/datum/component/proc/RegisterSignal(signal(string/list of strings), proc_ref(type), override(boolean))` (protected, final) (Consider removing for performance gainz) * If signal is a list it will be as if RegisterSignal was called for each of the entries with the same following arguments * Makes a component listen for the specified `signal` on it's `parent` datum. - * When that signal is recieved `proc_ref` will be called on the component, along with associated arguments + * When that signal is received `proc_ref` will be called on the component, along with associated arguments * Example proc ref: `.proc/OnEvent` * If a previous registration is overwritten by the call, a runtime occurs. Setting `override` to TRUE prevents this * These callbacks run asyncronously diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index a62755eb5f..caf53f09af 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -56,7 +56,7 @@ if(!force) _RemoveFromParent() if(!silent) - P.SendSignal(COMSIG_COMPONENT_REMOVING, src) + SEND_SIGNAL(P, COMSIG_COMPONENT_REMOVING, src) parent = null SSdcs.UnregisterSignal(src, signal_procs) LAZYCLEARLIST(signal_procs) @@ -96,7 +96,7 @@ if(sig_type[1] == "!") SSdcs.RegisterSignal(src, sig_type) - + procs[sig_type] = proc_or_callback enabled = TRUE @@ -125,12 +125,8 @@ current_type = type2parent(current_type) . += current_type -/datum/proc/SendSignal(sigtype, ...) - var/list/comps = datum_components - if(!comps) - return NONE - var/list/arguments = args.Copy(2) - var/target = comps[/datum/component] +/datum/proc/_SendSignal(sigtype, list/arguments) + var/target = datum_components[/datum/component] if(!length(target)) var/datum/component/C = target if(!C.enabled) @@ -228,7 +224,7 @@ new_comp = new nt(arglist(args)) // Dupes are allowed, act like normal if(!old_comp && !QDELETED(new_comp)) // Nothing related to duplicate components happened and the new component is healthy - SendSignal(COMSIG_COMPONENT_ADDED, new_comp) + SEND_SIGNAL(src, COMSIG_COMPONENT_ADDED, new_comp) return new_comp return old_comp @@ -243,7 +239,7 @@ var/datum/old_parent = parent PreTransfer() _RemoveFromParent() - old_parent.SendSignal(COMSIG_COMPONENT_REMOVING, src) + SEND_SIGNAL(old_parent, COMSIG_COMPONENT_REMOVING, src) /datum/proc/TakeComponent(datum/component/target) if(!target) diff --git a/code/datums/components/cleaning.dm b/code/datums/components/cleaning.dm index 6f2f08c617..8f8c0ea660 100644 --- a/code/datums/components/cleaning.dm +++ b/code/datums/components/cleaning.dm @@ -12,13 +12,13 @@ if(!isturf(tile)) return - tile.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) for(var/A in tile) if(is_cleanable(A)) qdel(A) else if(istype(A, /obj/item)) var/obj/item/I = A - I.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) if(ismob(I.loc)) var/mob/M = I.loc M.regenerate_icons() @@ -26,14 +26,14 @@ var/mob/living/carbon/human/cleaned_human = A if(cleaned_human.lying) if(cleaned_human.head) - cleaned_human.head.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(cleaned_human.head, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) if(cleaned_human.wear_suit) - cleaned_human.wear_suit.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(cleaned_human.wear_suit, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) else if(cleaned_human.w_uniform) - cleaned_human.w_uniform.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(cleaned_human.w_uniform, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) if(cleaned_human.shoes) - cleaned_human.shoes.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) - cleaned_human.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(cleaned_human.shoes, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(cleaned_human, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) cleaned_human.wash_cream() cleaned_human.regenerate_icons() to_chat(cleaned_human, "[AM] cleans your face!") diff --git a/code/datums/components/forced_gravity.dm b/code/datums/components/forced_gravity.dm new file mode 100644 index 0000000000..bba0d8d71c --- /dev/null +++ b/code/datums/components/forced_gravity.dm @@ -0,0 +1,8 @@ +/datum/component/forced_gravity + var/gravity = 1 + var/ignore_space = FALSE //If forced gravity should also work on space turfs + +/datum/component/forced_gravity/Initialize(forced_value = 1) + if(!isatom(parent)) + return COMPONENT_INCOMPATIBLE + gravity = forced_value \ No newline at end of file diff --git a/code/datums/components/material_container.dm b/code/datums/components/material_container.dm index e167cbb092..dbeb5833fa 100644 --- a/code/datums/components/material_container.dm +++ b/code/datums/components/material_container.dm @@ -58,7 +58,7 @@ return if(user.a_intent != INTENT_HELP) return - if(I.flags_1 & ABSTRACT_1) + if(I.item_flags & ABSTRACT) return if((I.flags_1 & HOLOGRAM_1) || (I.item_flags & NO_MAT_REDEMPTION) || (tc && !is_type_in_typecache(I, tc))) to_chat(user, "[parent] won't accept [I]!") diff --git a/code/datums/components/ntnet_interface.dm b/code/datums/components/ntnet_interface.dm index 14462f2774..d945f68ca9 100644 --- a/code/datums/components/ntnet_interface.dm +++ b/code/datums/components/ntnet_interface.dm @@ -1,8 +1,8 @@ //Thing meant for allowing datums and objects to access a NTnet network datum. -/datum/proc/ntnet_recieve(datum/netdata/data) +/datum/proc/ntnet_receive(datum/netdata/data) return -/datum/proc/ntnet_recieve_broadcast(datum/netdata/data) +/datum/proc/ntnet_receive_broadcast(datum/netdata/data) return /datum/proc/ntnet_send(datum/netdata/data, netid) @@ -15,7 +15,7 @@ var/hardware_id //text. this is the true ID. do not change this. stuff like ID forgery can be done manually. var/network_name = "" //text var/list/networks_connected_by_id = list() //id = datum/ntnet - var/differentiate_broadcast = TRUE //If false, broadcasts go to ntnet_recieve. NOT RECOMMENDED. + var/differentiate_broadcast = TRUE //If false, broadcasts go to ntnet_receive. NOT RECOMMENDED. /datum/component/ntnet_interface/Initialize(force_name = "NTNet Device", autoconnect_station_network = TRUE) //Don't force ID unless you know what you're doing! hardware_id = "[SSnetworks.get_next_HID()]" @@ -31,12 +31,12 @@ SSnetworks.unregister_interface(src) return ..() -/datum/component/ntnet_interface/proc/__network_recieve(datum/netdata/data) //Do not directly proccall! - parent.SendSignal(COMSIG_COMPONENT_NTNET_RECIEVE, data) +/datum/component/ntnet_interface/proc/__network_receive(datum/netdata/data) //Do not directly proccall! + SEND_SIGNAL(parent, COMSIG_COMPONENT_NTNET_RECEIVE, data) if(differentiate_broadcast && data.broadcast) - parent.ntnet_recieve_broadcast(data) + parent.ntnet_receive_broadcast(data) else - parent.ntnet_recieve(data) + parent.ntnet_receive(data) /datum/component/ntnet_interface/proc/__network_send(datum/netdata/data, netid) //Do not directly proccall! // Process data before sending it diff --git a/code/datums/components/riding.dm b/code/datums/components/riding.dm index 581800b947..de0d081e3d 100644 --- a/code/datums/components/riding.dm +++ b/code/datums/components/riding.dm @@ -307,7 +307,7 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "offhand" w_class = WEIGHT_CLASS_HUGE - flags_1 = ABSTRACT_1 | DROPDEL_1 | NOBLUDGEON_1 + item_flags = ABSTRACT | DROPDEL | NOBLUDGEON resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF var/mob/living/carbon/rider var/mob/living/parent diff --git a/code/datums/components/rotation.dm b/code/datums/components/rotation.dm index eca12454fd..1db25f86e4 100644 --- a/code/datums/components/rotation.dm +++ b/code/datums/components/rotation.dm @@ -59,6 +59,24 @@ if(src.rotation_flags & ROTATION_COUNTERCLOCKWISE) AM.verbs += /atom/movable/proc/simple_rotate_counterclockwise +/datum/component/simple_rotation/proc/remove_verbs() + if(parent) + var/atom/movable/AM = parent + AM.verbs -= /atom/movable/proc/simple_rotate_flip + AM.verbs -= /atom/movable/proc/simple_rotate_clockwise + AM.verbs -= /atom/movable/proc/simple_rotate_counterclockwise + +/datum/component/simple_rotation/Destroy() + remove_verbs() + QDEL_NULL(can_user_rotate) + QDEL_NULL(can_be_rotated) + QDEL_NULL(after_rotation) + . = ..() + +/datum/component/simple_rotation/RemoveComponent() + remove_verbs() + . = ..() + /datum/component/simple_rotation/proc/ExamineMessage(mob/user) if(rotation_flags & ROTATION_ALTCLICK) to_chat(user, "Alt-click to rotate it clockwise.") diff --git a/code/datums/components/storage/concrete/bag_of_holding.dm b/code/datums/components/storage/concrete/bag_of_holding.dm index 9686a73b0c..765889849b 100644 --- a/code/datums/components/storage/concrete/bag_of_holding.dm +++ b/code/datums/components/storage/concrete/bag_of_holding.dm @@ -2,7 +2,7 @@ var/atom/A = parent if((istype(W, /obj/item/storage/backpack/holding) || count_by_type(W.GetAllContents(), /obj/item/storage/backpack/holding))) var/safety = alert(user, "Doing this will have extremely dire consequences for the station and its crew. Be sure you know what you're doing.", "Put in [A.name]?", "Abort", "Proceed") - if(safety == "Abort" || !in_range(A, user) || !A || !W || user.incapacitated()) + if(safety != "Proceed" || QDELETED(A) || QDELETED(W) || QDELETED(user) || !user.canUseTopic(A, BE_CLOSE, iscarbon(user))) return var/turf/loccheck = get_turf(A) if(is_reebe(loccheck.z)) diff --git a/code/datums/components/storage/concrete/pockets.dm b/code/datums/components/storage/concrete/pockets.dm index e415e73df9..6610b9aa2b 100644 --- a/code/datums/components/storage/concrete/pockets.dm +++ b/code/datums/components/storage/concrete/pockets.dm @@ -54,12 +54,18 @@ /datum/component/storage/concrete/pockets/pocketprotector max_items = 3 max_w_class = WEIGHT_CLASS_TINY + var/atom/original_parent /datum/component/storage/concrete/pockets/pocketprotector/Initialize() + original_parent = parent . = ..() can_hold = typecacheof(list( //Same items as a PDA /obj/item/pen, /obj/item/toy/crayon, /obj/item/lipstick, /obj/item/flashlight/pen, - /obj/item/clothing/mask/cigarette)) \ No newline at end of file + /obj/item/clothing/mask/cigarette)) + +/datum/component/storage/concrete/pockets/pocketprotector/real_location() + // if the component is reparented to a jumpsuit, the items still go in the protector + return original_parent diff --git a/code/datums/components/storage/concrete/rped.dm b/code/datums/components/storage/concrete/rped.dm index eb895fd74f..14f6fe28b3 100644 --- a/code/datums/components/storage/concrete/rped.dm +++ b/code/datums/components/storage/concrete/rped.dm @@ -20,7 +20,7 @@ allow_quick_gather = TRUE allow_quick_empty = TRUE click_gather = TRUE - max_w_class = WEIGHT_CLASS_NORMAL + max_w_class = WEIGHT_CLASS_BULKY // can fit vending refills max_combined_w_class = 800 max_items = 400 display_numerical_stacking = TRUE @@ -29,5 +29,5 @@ . = ..() if(!I.get_part_rating()) if (!stop_messages) - to_chat(M, "[parent] only accepts machine par ts!") + to_chat(M, "[parent] only accepts machine parts!") return FALSE diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm index 86b139be22..0c63322c16 100644 --- a/code/datums/components/storage/storage.dm +++ b/code/datums/components/storage/storage.dm @@ -98,7 +98,7 @@ RegisterSignal(COMSIG_CLICK_ALT, .proc/on_alt_click) RegisterSignal(COMSIG_MOUSEDROP_ONTO, .proc/mousedrop_onto) - RegisterSignal(COMSIG_MOUSEDROPPED_ONTO, .proc/mousedrop_recieve) + RegisterSignal(COMSIG_MOUSEDROPPED_ONTO, .proc/mousedrop_receive) update_actions() @@ -125,11 +125,13 @@ modeswitch_action.Grant(M) /datum/component/storage/proc/change_master(datum/component/storage/concrete/new_master) - if(!istype(new_master)) + if(new_master == src || (!isnull(new_master) && !istype(new_master))) return FALSE - master.on_slave_unlink(src) + if(master) + master.on_slave_unlink(src) master = new_master - master.on_slave_link(src) + if(master) + master.on_slave_link(src) return TRUE /datum/component/storage/proc/master() @@ -149,7 +151,7 @@ quick_empty(M) /datum/component/storage/proc/preattack_intercept(obj/O, mob/M, params) - if(!isitem(O) || !click_gather || O.SendSignal(COMSIG_CONTAINS_STORAGE)) + if(!isitem(O) || !click_gather || SEND_SIGNAL(O, COMSIG_CONTAINS_STORAGE)) return FALSE . = COMPONENT_NO_ATTACK if(locked) @@ -466,7 +468,7 @@ if(recursive) for(var/i in ret.Copy()) var/atom/A = i - A.SendSignal(COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE) + SEND_SIGNAL(A, COMSIG_TRY_STORAGE_RETURN_INVENTORY, ret, TRUE) return ret /datum/component/storage/proc/contents() //ONLY USE IF YOU NEED TO COPY CONTENTS OF REAL LOCATION, COPYING IS NOT AS FAST AS DIRECT ACCESS! @@ -517,19 +519,19 @@ if(force || M.CanReach(parent, view_only = TRUE)) show_to(M) -/datum/component/storage/proc/mousedrop_recieve(atom/movable/O, mob/M) +/datum/component/storage/proc/mousedrop_receive(atom/movable/O, mob/M) if(isitem(O)) var/obj/item/I = O if(iscarbon(M) || isdrone(M)) var/mob/living/L = M if(!L.incapacitated() && I == L.get_active_held_item()) - if(!I.SendSignal(COMSIG_CONTAINS_STORAGE) && can_be_inserted(I, FALSE)) //If it has storage it should be trying to dump, not insert. + if(!SEND_SIGNAL(I, COMSIG_CONTAINS_STORAGE) && can_be_inserted(I, FALSE)) //If it has storage it should be trying to dump, not insert. handle_item_insertion(I, FALSE, L) //This proc return 1 if the item can be picked up and 0 if it can't. //Set the stop_messages to stop it from printing messages /datum/component/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M) - if(!istype(I) || (I.flags_1 & ABSTRACT_1)) + if(!istype(I) || (I.item_flags & ABSTRACT)) return FALSE //Not an item if(I == parent) return FALSE //no paradoxes for you @@ -573,7 +575,7 @@ if(!stop_messages) to_chat(M, "[IP] cannot hold [I] as it's a storage item of the same size!") return FALSE //To prevent the stacking of same sized storage items. - if(I.flags_1 & NODROP_1) //SHOULD be handled in unEquip, but better safe than sorry. + if(I.item_flags & NODROP) //SHOULD be handled in unEquip, but better safe than sorry. to_chat(M, "\the [I] is stuck to your hand, you can't put it in \the [host]!") return FALSE var/datum/component/storage/concrete/master = master() @@ -639,10 +641,7 @@ /datum/component/storage/proc/signal_take_type(type, atom/destination, amount = INFINITY, check_adjacent = FALSE, force = FALSE, mob/user, list/inserted) if(!force) if(check_adjacent) - if(user) - if(!user.CanReach(destination) || !user.CanReach(parent)) - return FALSE - else if(!destination.CanReachStorage(parent)) + if(!user || !user.CanReach(destination) || !user.CanReach(parent)) return FALSE var/list/taking = typecache_filter_list(contents(), typecacheof(type)) if(length(taking) > amount) diff --git a/code/datums/components/thermite.dm b/code/datums/components/thermite.dm index 809abbfdcc..dc1c95483a 100644 --- a/code/datums/components/thermite.dm +++ b/code/datums/components/thermite.dm @@ -60,7 +60,7 @@ if(amount >= 50) var/burning_time = max(100, 100-amount) - master = master.ScrapeAway() + master = master.Melt() master.burn_tile() if(user) master.add_hiddenprint(user) diff --git a/code/datums/components/uplink.dm b/code/datums/components/uplink.dm new file mode 100644 index 0000000000..6899baeabb --- /dev/null +++ b/code/datums/components/uplink.dm @@ -0,0 +1,250 @@ +GLOBAL_LIST_EMPTY(uplinks) + +/** + * Uplinks + * + * All /obj/item(s) have a hidden_uplink var. By default it's null. Give the item one with 'new(src') (it must be in it's contents). Then add 'uses.' + * Use whatever conditionals you want to check that the user has an uplink, and then call interact() on their uplink. + * You might also want the uplink menu to open if active. Check if the uplink is 'active' and then interact() with it. +**/ +/datum/component/uplink + dupe_mode = COMPONENT_DUPE_UNIQUE + var/name = "syndicate uplink" + var/active = FALSE + var/lockable = TRUE + var/locked = TRUE + var/allow_restricted = TRUE + var/telecrystals + var/selected_cat + var/owner = null + var/datum/game_mode/gamemode + var/datum/uplink_purchase_log/purchase_log + var/list/uplink_items + var/hidden_crystals = 0 + +/datum/component/uplink/Initialize(_owner, _lockable = TRUE, _enabled = FALSE, datum/game_mode/_gamemode, starting_tc = 20) + if(!isitem(parent)) + return COMPONENT_INCOMPATIBLE + + RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy) + RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/interact) + if(istype(parent, /obj/item/implant)) + RegisterSignal(COMSIG_IMPLANT_ACTIVATED, .proc/implant_activation) + RegisterSignal(COMSIG_IMPLANT_IMPLANTING, .proc/implanting) + RegisterSignal(COMSIG_IMPLANT_OTHER, .proc/old_implant) + RegisterSignal(COMSIG_IMPLANT_EXISTING_UPLINK, .proc/new_implant) + else if(istype(parent, /obj/item/pda)) + RegisterSignal(COMSIG_PDA_CHANGE_RINGTONE, .proc/new_ringtone) + else if(istype(parent, /obj/item/radio)) + RegisterSignal(COMSIG_RADIO_NEW_FREQUENCY, .proc/new_frequency) + else if(istype(parent, /obj/item/pen)) + RegisterSignal(COMSIG_PEN_ROTATED, .proc/pen_rotation) + + GLOB.uplinks += src + uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted) + + if(_owner) + owner = _owner + LAZYINITLIST(GLOB.uplink_purchase_logs_by_key) + if(GLOB.uplink_purchase_logs_by_key[owner]) + purchase_log = GLOB.uplink_purchase_logs_by_key[owner] + else + purchase_log = new(owner, src) + lockable = _lockable + active = _enabled + gamemode = _gamemode + telecrystals = starting_tc + if(!lockable) + active = TRUE + locked = FALSE + +/datum/component/uplink/InheritComponent(datum/component/uplink/U) + lockable |= U.lockable + active |= U.active + if(!gamemode) + gamemode = U.gamemode + telecrystals += U.telecrystals + if(purchase_log && U.purchase_log) + purchase_log.MergeWithAndDel(U.purchase_log) + +/datum/component/uplink/Destroy() + GLOB.uplinks -= src + gamemode = null + return ..() + +/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE) + if(!silent) + to_chat(user, "You slot [TC] into [parent] and charge its internal uplink.") + var/amt = TC.amount + telecrystals += amt + TC.use(amt) + +/datum/component/uplink/proc/set_gamemode(_gamemode) + gamemode = _gamemode + uplink_items = get_uplink_items(gamemode, TRUE, allow_restricted) + +/datum/component/uplink/proc/OnAttackBy(obj/item/I, mob/user) + if(!active) + return //no hitting everyone/everything just to try to slot tcs in! + if(istype(I, /obj/item/stack/telecrystal)) + LoadTC(user, I) + for(var/category in uplink_items) + for(var/item in uplink_items[category]) + var/datum/uplink_item/UI = uplink_items[category][item] + var/path = UI.refund_path || UI.item + var/cost = UI.refund_amount || UI.cost + if(I.type == path && UI.refundable && I.check_uplink_validity()) + telecrystals += cost + purchase_log.total_spent -= cost + to_chat(user, "[I] refunded.") + qdel(I) + return + +/datum/component/uplink/proc/interact(mob/user) + if(locked) + return + active = TRUE + if(user) + ui_interact(user) + // an unlocked uplink blocks also opening the PDA or headset menu + return COMPONENT_NO_INTERACT + +/datum/component/uplink/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ + datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state) + active = TRUE + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "uplink", name, 450, 750, master_ui, state) + ui.set_autoupdate(FALSE) // This UI is only ever opened by one person, and never is updated outside of user input. + ui.set_style("syndicate") + ui.open() + +/datum/component/uplink/ui_data(mob/user) + if(!user.mind) + return + var/list/data = list() + data["telecrystals"] = telecrystals + data["lockable"] = lockable + + data["categories"] = list() + for(var/category in uplink_items) + var/list/cat = list( + "name" = category, + "items" = (category == selected_cat ? list() : null)) + if(category == selected_cat) + for(var/item in uplink_items[category]) + var/datum/uplink_item/I = uplink_items[category][item] + if(I.limited_stock == 0) + continue + if(I.restricted_roles.len) + var/is_inaccessible = 1 + for(var/R in I.restricted_roles) + if(R == user.mind.assigned_role) + is_inaccessible = 0 + if(is_inaccessible) + continue + cat["items"] += list(list( + "name" = I.name, + "cost" = I.cost, + "desc" = I.desc, + )) + data["categories"] += list(cat) + return data + +/datum/component/uplink/ui_act(action, params) + if(!active) + return + + switch(action) + if("buy") + var/item = params["item"] + + var/list/buyable_items = list() + for(var/category in uplink_items) + buyable_items += uplink_items[category] + + if(item in buyable_items) + var/datum/uplink_item/I = buyable_items[item] + MakePurchase(usr, I) + . = TRUE + if("lock") + active = FALSE + locked = TRUE + telecrystals += hidden_crystals + hidden_crystals = 0 + SStgui.close_uis(src) + if("select") + selected_cat = params["category"] + return TRUE + +/datum/component/uplink/proc/MakePurchase(mob/user, datum/uplink_item/U) + if(!istype(U)) + return + if (!user || user.incapacitated()) + return + + if(telecrystals < U.cost || U.limited_stock == 0) + return + telecrystals -= U.cost + + U.purchase(user, src) + + if(U.limited_stock > 0) + U.limited_stock -= 1 + + SSblackbox.record_feedback("nested tally", "traitor_uplink_items_bought", 1, list("[initial(U.name)]", "[U.cost]")) + return TRUE + +// Implant signal responses + +/datum/component/uplink/proc/implant_activation() + var/obj/item/implant/implant = parent + locked = FALSE + interact(implant.imp_in) + +/datum/component/uplink/proc/implanting(list/arguments) + var/mob/user = arguments[2] + owner = "[user.key]" + +/datum/component/uplink/proc/old_implant(list/arguments, obj/item/implant/new_implant) + // It kinda has to be weird like this until implants are components + return SEND_SIGNAL(new_implant, COMSIG_IMPLANT_EXISTING_UPLINK, src) + +/datum/component/uplink/proc/new_implant(datum/component/uplink/uplink) + uplink.telecrystals += telecrystals + return COMPONENT_DELETE_NEW_IMPLANT + +// PDA signal responses + +/datum/component/uplink/proc/new_ringtone(mob/living/user, new_ring_text) + var/obj/item/pda/master = parent + if(trim(lowertext(new_ring_text)) != trim(lowertext(master.lock_code))) //why is the lock code stored on the pda? + return + locked = FALSE + interact(user) + to_chat(user, "The PDA softly beeps.") + user << browse(null, "window=pda") + master.mode = 0 + return COMPONENT_STOP_RINGTONE_CHANGE + +// Radio signal responses + +/datum/component/uplink/proc/new_frequency(list/arguments) + var/obj/item/radio/master = parent + var/frequency = arguments[1] + if(frequency != master.traitor_frequency) + return + locked = FALSE + if(ismob(master.loc)) + interact(master.loc) + +// Pen signal responses + +/datum/component/uplink/proc/pen_rotation(degrees, mob/living/carbon/user) + var/obj/item/pen/master = parent + if(degrees != master.traitor_unlock_degrees) + return + locked = FALSE + master.degrees = 0 + interact(user) + to_chat(user, "Your pen makes a clicking noise, before quickly rotating back to 0 degrees!") \ No newline at end of file diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 59953a4ce1..56f2243015 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -96,7 +96,7 @@ else atomsnowflake += "[D]" if(A.dir) - atomsnowflake += "
<< [dir2text(A.dir)] >>" + atomsnowflake += "
<< [dir2text(A.dir)] >>" else atomsnowflake += "[D]" diff --git a/code/datums/diseases/_disease.dm b/code/datums/diseases/_disease.dm index 221dd7e804..f5285de466 100644 --- a/code/datums/diseases/_disease.dm +++ b/code/datums/diseases/_disease.dm @@ -32,6 +32,7 @@ var/list/strain_data = list() //dna_spread special bullshit var/list/infectable_biotypes = list(MOB_ORGANIC) //if the disease can spread on organics, synthetics, or undead var/process_dead = FALSE //if this ticks while the host is dead + var/copy_type = null //if this is null, copies will use the type of the instance being copied /datum/disease/Destroy() . = ..() @@ -141,7 +142,7 @@ "bypasses_immunity", "permeability_mod", "severity", "required_organs", "needs_all_cures", "strain_data", "infectable_biotypes", "process_dead") - var/datum/disease/D = new type() + var/datum/disease/D = copy_type ? new copy_type() : new type() for(var/V in copy_vars) var/val = vars[V] if(islist(val)) diff --git a/code/datums/diseases/advance/presets.dm b/code/datums/diseases/advance/presets.dm index 9574338b51..d2c4b1983f 100644 --- a/code/datums/diseases/advance/presets.dm +++ b/code/datums/diseases/advance/presets.dm @@ -1,52 +1,42 @@ // Cold +/datum/disease/advance/cold + copy_type = /datum/disease/advance /datum/disease/advance/cold/New() name = "Cold" symptoms = list(new/datum/symptom/sneeze) ..() - // Flu +/datum/disease/advance/flu + copy_type = /datum/disease/advance /datum/disease/advance/flu/New() name = "Flu" symptoms = list(new/datum/symptom/cough) ..() +//Randomly generated Disease, for virus crates and events +/datum/disease/advance/random + name = "Experimental Disease" + copy_type = /datum/disease/advance -// Voice Changing +/datum/disease/advance/random/New(max_symptoms, max_level = 8) + if(!max_symptoms) + max_symptoms = rand(1, VIRUS_SYMPTOM_LIMIT) + var/list/datum/symptom/possible_symptoms = list() + for(var/symptom in subtypesof(/datum/symptom)) + var/datum/symptom/S = symptom + if(initial(S.level) > max_level) + continue + if(initial(S.level) <= 0) //unobtainable symptoms + continue + possible_symptoms += S + for(var/i in 1 to max_symptoms) + var/datum/symptom/chosen_symptom = pick_n_take(possible_symptoms) + if(chosen_symptom) + var/datum/symptom/S = new chosen_symptom + symptoms += S + Refresh() -/datum/disease/advance/voice_change/New() - name = "Epiglottis Mutation" - symptoms = list(new/datum/symptom/voice_change) - ..() - - -// Toxin Filter - -/datum/disease/advance/heal/New() - name = "Liver Enhancer" - symptoms = list(new/datum/symptom/heal) - ..() - - -// Hallucigen - -/datum/disease/advance/hallucigen/New() - name = "Second Sight" - symptoms = list(new/datum/symptom/hallucigen) - ..() - -// Sensory Restoration - -/datum/disease/advance/mind_restoration/New() - name = "Intelligence Booster" - symptoms = list(new/datum/symptom/mind_restoration) - ..() - -// Sensory Destruction - -/datum/disease/advance/narcolepsy/New() - name = "Experimental Insomnia Cure" - symptoms = list(new/datum/symptom/narcolepsy) - ..() \ No newline at end of file + name = "Sample #[rand(1,10000)]" \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/confusion.dm b/code/datums/diseases/advance/symptoms/confusion.dm index 4ff69680ce..e7315c6bb1 100644 --- a/code/datums/diseases/advance/symptoms/confusion.dm +++ b/code/datums/diseases/advance/symptoms/confusion.dm @@ -6,7 +6,7 @@ Confusion Little bit hidden. Lowers resistance. Decreases stage speed. - Not very transmittable. + Not very transmissibile. Intense Level. Bonus diff --git a/code/datums/diseases/advance/symptoms/cough.dm b/code/datums/diseases/advance/symptoms/cough.dm index 1633b41352..83d93c55e0 100644 --- a/code/datums/diseases/advance/symptoms/cough.dm +++ b/code/datums/diseases/advance/symptoms/cough.dm @@ -6,7 +6,7 @@ Coughing Noticable. Little Resistance. Doesn't increase stage speed much. - Transmittable. + Transmissibile. Low Level. BONUS diff --git a/code/datums/diseases/advance/symptoms/hallucigen.dm b/code/datums/diseases/advance/symptoms/hallucigen.dm index 5509f8b07b..39ecc61956 100644 --- a/code/datums/diseases/advance/symptoms/hallucigen.dm +++ b/code/datums/diseases/advance/symptoms/hallucigen.dm @@ -50,7 +50,7 @@ Bonus if(1, 2) if(prob(base_message_chance)) if(!fake_healthy) - to_chat(M, "[pick("Something appears in your peripheral vision, then winks out.", "You hear a faint whispher with no source.", "Your head aches.")]") + to_chat(M, "[pick("Something appears in your peripheral vision, then winks out.", "You hear a faint whisper with no source.", "Your head aches.")]") else to_chat(M, "[pick(healthy_messages)]") if(3, 4) diff --git a/code/datums/diseases/advance/symptoms/itching.dm b/code/datums/diseases/advance/symptoms/itching.dm index c1952bf716..1ede16999d 100644 --- a/code/datums/diseases/advance/symptoms/itching.dm +++ b/code/datums/diseases/advance/symptoms/itching.dm @@ -6,7 +6,7 @@ Itching Not noticable or unnoticable. Resistant. Increases stage speed. - Little transmittable. + Little transmissibility. Low Level. BONUS diff --git a/code/datums/diseases/advance/symptoms/shedding.dm b/code/datums/diseases/advance/symptoms/shedding.dm index 8946a83108..06df320496 100644 --- a/code/datums/diseases/advance/symptoms/shedding.dm +++ b/code/datums/diseases/advance/symptoms/shedding.dm @@ -33,7 +33,7 @@ BONUS var/mob/living/M = A.affected_mob if(prob(base_message_chance)) - to_chat(M, "[pick("Your scalp itches.", "Your skin feels flakey.")]") + to_chat(M, "[pick("Your scalp itches.", "Your skin feels flaky.")]") if(ishuman(M)) var/mob/living/carbon/human/H = M switch(A.stage) diff --git a/code/datums/diseases/advance/symptoms/sneeze.dm b/code/datums/diseases/advance/symptoms/sneeze.dm index 3648f5d707..8fe70c542f 100644 --- a/code/datums/diseases/advance/symptoms/sneeze.dm +++ b/code/datums/diseases/advance/symptoms/sneeze.dm @@ -6,7 +6,7 @@ Sneezing Very Noticable. Increases resistance. Doesn't increase stage speed. - Very transmittable. + Very transmissible. Low Level. Bonus diff --git a/code/datums/diseases/advance/symptoms/vomit.dm b/code/datums/diseases/advance/symptoms/vomit.dm index 53e79f0cc1..04b0778ccd 100644 --- a/code/datums/diseases/advance/symptoms/vomit.dm +++ b/code/datums/diseases/advance/symptoms/vomit.dm @@ -6,7 +6,7 @@ Vomiting Very Very Noticable. Decreases resistance. Doesn't increase stage speed. - Little transmittable. + Little transmissibility. Medium Level. Bonus diff --git a/code/datums/diseases/parrotpossession.dm b/code/datums/diseases/parrotpossession.dm index 66395ef5a5..ee58c28761 100644 --- a/code/datums/diseases/parrotpossession.dm +++ b/code/datums/diseases/parrotpossession.dm @@ -9,7 +9,7 @@ cure_chance = 20 agent = "Avian Vengence" viable_mobtypes = list(/mob/living/carbon/human) - desc = "Subject is possesed by the vengeful spirit of a parrot. Call the priest." + desc = "Subject is possessed by the vengeful spirit of a parrot. Call the priest." severity = DISEASE_SEVERITY_MEDIUM infectable_biotypes = list(MOB_ORGANIC, MOB_UNDEAD, MOB_INORGANIC, MOB_ROBOTIC) bypasses_immunity = TRUE //2spook diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 6f51ba6622..2113a99813 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -50,7 +50,10 @@ if(stage5) to_chat(affected_mob, pick(stage5)) if(jobban_isbanned(affected_mob, new_form)) - affected_mob.death(1) + if(!QDELETED(affected_mob)) + affected_mob.death(1) + return + if(QDELETED(affected_mob)) return if(affected_mob.notransform) return diff --git a/code/datums/diseases/tuberculosis.dm b/code/datums/diseases/tuberculosis.dm index e413891e75..788107c4b6 100644 --- a/code/datums/diseases/tuberculosis.dm +++ b/code/datums/diseases/tuberculosis.dm @@ -8,7 +8,7 @@ agent = "Fungal Tubercle bacillus Cosmosis" viable_mobtypes = list(/mob/living/carbon/human) cure_chance = 5//like hell are you getting out of hell - desc = "A rare highly transmittable virulent virus. Few samples exist, rumoured to be carefully grown and cultured by clandestine bio-weapon specialists. Causes fever, blood vomiting, lung damage, weight loss, and fatigue." + desc = "A rare highly transmissible virulent virus. Few samples exist, rumoured to be carefully grown and cultured by clandestine bio-weapon specialists. Causes fever, blood vomiting, lung damage, weight loss, and fatigue." required_organs = list(/obj/item/organ/lungs) severity = DISEASE_SEVERITY_BIOHAZARD bypasses_immunity = TRUE // TB primarily impacts the lungs; it's also bacterial or fungal in nature; viral immunity should do nothing. diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 119363dfa3..9f521dac8a 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -358,7 +358,7 @@ GLOBAL_LIST_EMPTY(explosions) heavy = 5 light = 7 if("Custom Bomb") - dev = input("Devestation range (Tiles):") as num + dev = input("Devastation range (Tiles):") as num heavy = input("Heavy impact range (Tiles):") as num light = input("Light impact range (Tiles):") as num diff --git a/code/datums/holocall.dm b/code/datums/holocall.dm index ef4edbb6cf..9d4b86b5ef 100644 --- a/code/datums/holocall.dm +++ b/code/datums/holocall.dm @@ -178,7 +178,7 @@ if(!connected_holopad) . = world.time < (call_start_time + HOLOPAD_MAX_DIAL_TIME) if(!.) - calling_holopad.say("No answer recieved.") + calling_holopad.say("No answer received.") calling_holopad.temp = "" if(!.) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index f377037301..5beb84a1f6 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -41,14 +41,10 @@ var/special_role var/list/restricted_roles = list() - var/datum/job/assigned_job - var/list/datum/objective/objectives = list() var/list/spell_list = list() // Wizard mode & "Give Spell" badmin button. - var/datum/faction/faction //associated faction - var/datum/changeling/changeling //changeling holder var/linglink var/datum/martial_art/martial_art var/static/default_martial_art = new/datum/martial_art @@ -362,7 +358,7 @@ if(creator.mind.special_role) message_admins("[ADMIN_LOOKUPFLW(current)] has been created by [ADMIN_LOOKUPFLW(creator)], an antagonist.") - to_chat(current, "Despite your creators current allegiances, your true master remains [creator.real_name]. If their loyalities change, so do yours. This will never change unless your creator's body is destroyed.") + to_chat(current, "Despite your creators current allegiances, your true master remains [creator.real_name]. If their loyalties change, so do yours. This will never change unless your creator's body is destroyed.") /datum/mind/proc/show_memory(mob/recipient, window=1) if(!recipient) @@ -686,7 +682,7 @@ if(!(has_antag_datum(/datum/antagonist/traitor))) add_antag_datum(/datum/antagonist/traitor) -/datum/mind/proc/make_Changling() +/datum/mind/proc/make_Changeling() var/datum/antagonist/changeling/C = has_antag_datum(/datum/antagonist/changeling) if(!C) C = add_antag_datum(/datum/antagonist/changeling) @@ -705,7 +701,7 @@ SSticker.mode.add_cultist(src,FALSE,equip=TRUE) special_role = ROLE_CULTIST to_chat(current, "You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy your world is, you see that it should be open to the knowledge of Nar-Sie.") - to_chat(current, "Assist your new bretheren in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") + to_chat(current, "Assist your new brethren in their dark dealings. Their goal is yours, and yours is theirs. You serve the Dark One above all else. Bring It back.") /datum/mind/proc/make_Rev() var/datum/antagonist/rev/head/head = new() diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 485b7aa26d..dbe150b0fa 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -11,7 +11,7 @@ owner.visible_message("[owner] starts having a seizure!", "You have a seizure!") owner.Unconscious(200) owner.Jitter(1000) - owner.SendSignal(COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy) + SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy) addtimer(CALLBACK(src, .proc/jitter_less, owner), 90) /datum/mutation/human/epilepsy/proc/jitter_less(mob/living/carbon/human/owner) @@ -96,7 +96,7 @@ //Tourettes causes you to randomly stand in place and shout. /datum/mutation/human/tourettes - name = "Tourettes Syndrome" + name = "Tourette's Syndrome" quality = NEGATIVE text_gain_indication = "You twitch." diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index d51b7dd891..7bcd056fab 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -14,7 +14,7 @@ owner.add_trait(TRAIT_STUNIMMUNE, TRAIT_HULK) owner.add_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK) owner.update_body_parts() - owner.SendSignal(COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk) + SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk) /datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity) if(proximity) //no telekinetic hulk attack @@ -31,7 +31,7 @@ owner.remove_trait(TRAIT_STUNIMMUNE, TRAIT_HULK) owner.remove_trait(TRAIT_PUSHIMMUNE, TRAIT_HULK) owner.update_body_parts() - owner.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "hulk") + SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk") /datum/mutation/human/hulk/say_mod(message) if(message) diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm index 464d435afd..1f23a92906 100644 --- a/code/datums/mutations/sight.dm +++ b/code/datums/mutations/sight.dm @@ -32,7 +32,7 @@ owner.cure_blind(GENETIC_MUTATION) -//X-Ray Vision lets you see through walls. +//X-ray Vision lets you see through walls. /datum/mutation/human/x_ray name = "X Ray Vision" quality = POSITIVE diff --git a/code/datums/outfit.dm b/code/datums/outfit.dm index ff5a0c921c..1f5c28d3c2 100755 --- a/code/datums/outfit.dm +++ b/code/datums/outfit.dm @@ -28,11 +28,11 @@ var/list/chameleon_extras //extra types for chameleon outfit changes, mostly guns /datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - //to be overriden for customization depending on client prefs,species etc + //to be overridden for customization depending on client prefs,species etc return /datum/outfit/proc/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) - //to be overriden for toggling internals, id binding, access etc + //to be overridden for toggling internals, id binding, access etc return /datum/outfit/proc/equip(mob/living/carbon/human/H, visualsOnly = FALSE) diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index cd03cbed17..f678d93ba2 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -94,6 +94,10 @@ port_id = "ruin" can_be_bought = FALSE +/datum/map_template/shuttle/snowdin + port_id = "snowdin" + can_be_bought = FALSE + // Shuttles start here: /datum/map_template/shuttle/emergency/airless @@ -432,3 +436,11 @@ /datum/map_template/shuttle/ruin/syndicate_fighter suffix = "syndicate_fighter" name = "Syndicate Fighter" + +/datum/map_template/shuttle/snowdin/mining + suffix = "mining" + name = "Snowdin Mining Elevator" + +/datum/map_template/shuttle/snowdin/excavation + suffix = "excavation" + name = "Snowdin Excavation Elevator" diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm index 65cfb85179..ee974a6e6e 100644 --- a/code/datums/status_effects/gas.dm +++ b/code/datums/status_effects/gas.dm @@ -5,6 +5,7 @@ alert_type = /obj/screen/alert/status_effect/freon var/icon/cube var/can_melt = TRUE + var/datum/weakref/redirect_component /obj/screen/alert/status_effect/freon name = "Frozen Solid" @@ -12,6 +13,7 @@ icon_state = "frozen" /datum/status_effect/freon/on_apply() + redirect_component = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST), CALLBACK(src, .proc/owner_resist))) if(!owner.stat) to_chat(owner, "You become frozen in a cube!") cube = icon('icons/effects/freeze.dmi', "ice_cube") @@ -24,12 +26,22 @@ if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL) qdel(src) +/datum/status_effect/freon/proc/owner_resist() + to_chat(owner, "You start breaking out of the ice cube!") + if(do_mob(owner, owner, 40)) + if(!QDELETED(src)) + to_chat(owner, "You break out of the ice cube!") + owner.remove_status_effect(/datum/status_effect/freon) + owner.update_canmove() + /datum/status_effect/freon/on_remove() if(!owner.stat) to_chat(owner, "The cube melts!") owner.cut_overlay(cube) owner.adjust_bodytemperature(100) owner.update_canmove() + qdel(redirect_component.resolve()) + redirect_component = null /datum/status_effect/freon/watcher duration = 8 diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index c940b2083a..655863e0e0 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -47,3 +47,25 @@ /datum/status_effect/syphon_mark/on_remove() get_kill() . = ..() + +/obj/screen/alert/status_effect/in_love + name = "In Love" + desc = "You feel so wonderfully in love!" + icon_state = "in_love" + +/datum/status_effect/in_love + id = "in_love" + duration = -1 + status_type = STATUS_EFFECT_UNIQUE + alert_type = /obj/screen/alert/status_effect/in_love + var/mob/living/date + +/datum/status_effect/in_love/on_creation(mob/living/new_owner, mob/living/love_interest) + . = ..() + if(.) + date = love_interest + linked_alert.desc = "You're in love with [date.real_name]! How lovely." + +/datum/status_effect/in_love/tick() + if(date) + new /obj/effect/temp_visual/love_heart/invisible(get_turf(date.loc), owner) diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index 68e259441f..7bbcbe6171 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -71,7 +71,7 @@ /datum/quirk/family_heirloom/post_add() if(where == "in your backpack") var/mob/living/carbon/human/H = quirk_holder - H.back.SendSignal(COMSIG_TRY_STORAGE_SHOW, H) + SEND_SIGNAL(H.back, COMSIG_TRY_STORAGE_SHOW, H) to_chat(quirk_holder, "There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!") var/list/family_name = splittext(quirk_holder.real_name, " ") @@ -79,11 +79,11 @@ /datum/quirk/family_heirloom/on_process() if(heirloom in quirk_holder.GetAllContents()) - quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing") - quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom) + SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing") + SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom) else - quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom") - quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing) + SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "family_heirloom") + SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing) /datum/quirk/family_heirloom/clone_data() return heirloom @@ -148,9 +148,9 @@ if(quirk_holder.m_intent == MOVE_INTENT_RUN) to_chat(quirk_holder, "Easy, easy, take it slow... you're in the dark...") quirk_holder.toggle_move_intent() - quirk_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "nyctophobia", /datum/mood_event/nyctophobia) + SEND_SIGNAL(quirk_holder, COMSIG_ADD_MOOD_EVENT, "nyctophobia", /datum/mood_event/nyctophobia) else - quirk_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "nyctophobia") + SEND_SIGNAL(quirk_holder, COMSIG_CLEAR_MOOD_EVENT, "nyctophobia") diff --git a/code/datums/weather/weather.dm b/code/datums/weather/weather.dm index 9f4d8f891f..a3b666dcc6 100644 --- a/code/datums/weather/weather.dm +++ b/code/datums/weather/weather.dm @@ -17,7 +17,7 @@ var/weather_overlay var/weather_color = null - var/end_message = "The wind relents its assault." //Displayed once the wather is over + var/end_message = "The wind relents its assault." //Displayed once the weather is over var/end_duration = 300 //In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely var/end_sound var/end_overlay diff --git a/code/game/alternate_appearance.dm b/code/game/alternate_appearance.dm index 484f11fc09..d7c34da34a 100644 --- a/code/game/alternate_appearance.dm +++ b/code/game/alternate_appearance.dm @@ -167,3 +167,16 @@ GLOBAL_LIST_EMPTY(active_alternate_appearances) if(isrevenant(M) || iseminence(M) || iswizard(M)) return TRUE return FALSE + +datum/atom_hud/alternate_appearance/basic/onePerson + var/mob/seer + +/datum/atom_hud/alternate_appearance/basic/onePerson/mobShouldSee(mob/M) + if(M == seer) + return TRUE + return FALSE + +/datum/atom_hud/alternate_appearance/basic/onePerson/New(key, image/I, mob/living/M) + ..(key, I, FALSE) + seer = M + add_hud_to(seer) diff --git a/code/game/area/Space_Station_13_areas.dm b/code/game/area/Space_Station_13_areas.dm index d65d28507c..558c197858 100644 --- a/code/game/area/Space_Station_13_areas.dm +++ b/code/game/area/Space_Station_13_areas.dm @@ -53,7 +53,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station icon_state = "start" requires_power = FALSE dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY //EXTRA @@ -62,7 +62,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station name = "Asteroid" icon_state = "asteroid" requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY blob_allowed = FALSE //Nope, no winning on the asteroid as a blob. Gotta eat the station. valid_territory = FALSE ambientsounds = MINING diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index fade32535e..8aa910b2e2 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -25,7 +25,7 @@ var/lightswitch = TRUE var/requires_power = TRUE - var/always_unpowered = FALSE // This gets overriden to 1 for space in area/Initialize(). + var/always_unpowered = FALSE // This gets overridden to 1 for space in area/Initialize(). var/outdoors = FALSE //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room) @@ -44,7 +44,7 @@ var/static_light = 0 var/static_environ - var/has_gravity = FALSE + var/has_gravity = 0 var/noteleport = FALSE //Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter) var/hidden = FALSE //Hides area from player Teleport function. var/safe = FALSE //Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers @@ -409,8 +409,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) /area/Entered(atom/movable/M) set waitfor = FALSE - SendSignal(COMSIG_AREA_ENTERED, M) - M.SendSignal(COMSIG_ENTER_AREA, src) //The atom that enters the area + SEND_SIGNAL(src, COMSIG_AREA_ENTERED, M) + SEND_SIGNAL(M, COMSIG_ENTER_AREA, src) //The atom that enters the area if(!isliving(M)) return @@ -435,8 +435,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) addtimer(CALLBACK(L.client, /client/proc/ResetAmbiencePlayed), 600) /area/Exited(atom/movable/M) - SendSignal(COMSIG_AREA_EXITED, M) - M.SendSignal(COMSIG_EXIT_AREA, src) //The atom that exits the area + SEND_SIGNAL(src, COMSIG_AREA_EXITED, M) + SEND_SIGNAL(M, COMSIG_EXIT_AREA, src) //The atom that exits the area /client/proc/ResetAmbiencePlayed() played = FALSE @@ -444,16 +444,39 @@ GLOBAL_LIST_EMPTY(teleportlocs) /atom/proc/has_gravity(turf/T) if(!T || !isturf(T)) T = get_turf(src) + + if(!T) + return 0 + + //Gravity forced on the atom + var/datum/component/forced_gravity/FG = GetComponent(/datum/component/forced_gravity) + if(FG) + if(!FG.ignore_space && isspaceturf(T)) + return 0 + else + return FG.gravity + + //Gravity forced on the turf + FG = T.GetComponent(/datum/component/forced_gravity) + if(FG) + if(!FG.ignore_space && isspaceturf(T)) + return 0 + else + return FG.gravity + var/area/A = get_area(T) if(isspaceturf(T)) // Turf never has gravity - return FALSE - else if(A && A.has_gravity) // Areas which always has gravity - return TRUE + return 0 + else if(A.has_gravity) // Areas which always has gravity + return A.has_gravity else // There's a gravity generator on our z level - if(T && GLOB.gravity_generators["[T.z]"] && length(GLOB.gravity_generators["[T.z]"])) - return TRUE - return FALSE + if(GLOB.gravity_generators["[T.z]"]) + var/max_grav = 0 + for(var/obj/machinery/gravity_generator/main/G in GLOB.gravity_generators["[T.z]"]) + max_grav = max(G.setting,max_grav) + return max_grav + return SSmapping.level_trait(T.z, ZTRAIT_GRAVITY) /area/proc/setup(a_name) name = a_name diff --git a/code/game/area/areas/away_content.dm b/code/game/area/areas/away_content.dm index cc2e317d85..b724c92607 100644 --- a/code/game/area/areas/away_content.dm +++ b/code/game/area/areas/away_content.dm @@ -7,7 +7,7 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30" /area/awaymission name = "Strange Location" icon_state = "away" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY ambientsounds = AWAY_MISSION /area/awaymission/beach @@ -15,13 +15,13 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30" icon_state = "away" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg','sound/ambience/ambiodd.ogg','sound/ambience/ambinice.ogg') /area/awaymission/errorroom name = "Super Secret Room" dynamic_lighting = DYNAMIC_LIGHTING_DISABLED - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY /area/awaymission/vr name = "Virtual Reality" diff --git a/code/game/area/areas/centcom.dm b/code/game/area/areas/centcom.dm index c2719f57eb..30de1314c9 100644 --- a/code/game/area/areas/centcom.dm +++ b/code/game/area/areas/centcom.dm @@ -6,7 +6,7 @@ icon_state = "centcom" dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY noteleport = TRUE blob_allowed = FALSE //Should go without saying, no blobs should take over centcom as a win condition. flags_1 = NONE @@ -36,7 +36,7 @@ icon_state = "yellow" dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY flags_1 = NONE /area/tdome/arena @@ -74,7 +74,7 @@ icon_state = "yellow" dynamic_lighting = DYNAMIC_LIGHTING_FORCED requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY noteleport = TRUE flags_1 = NONE @@ -84,7 +84,7 @@ icon_state = "yellow" requires_power = FALSE noteleport = TRUE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY flags_1 = NONE //Syndicates @@ -92,7 +92,7 @@ name = "Syndicate Mothership" icon_state = "syndie-ship" requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY noteleport = TRUE blob_allowed = FALSE //Not... entirely sure this will ever come up... but if the bus makes blobs AND ops, it shouldn't aim for the ops to win. flags_1 = NONE @@ -120,8 +120,7 @@ name = "Capture the Flag" icon_state = "yellow" requires_power = FALSE - has_gravity = TRUE - flags_1 = NO_DEATHRATTLE_1 + has_gravity = STANDARD_GRAVITY /area/ctf/control_room name = "Control Room A" @@ -156,7 +155,7 @@ name = "Reebe" icon_state = "yellow" requires_power = FALSE - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY noteleport = TRUE hidden = TRUE ambientsounds = REEBE diff --git a/code/game/area/areas/mining.dm b/code/game/area/areas/mining.dm index 493f36dd8d..2ca9167bb2 100644 --- a/code/game/area/areas/mining.dm +++ b/code/game/area/areas/mining.dm @@ -2,7 +2,7 @@ /area/mine icon_state = "mining" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY /area/mine/explored name = "Mine" @@ -80,7 +80,7 @@ /area/lavaland icon_state = "mining" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY flags_1 = NONE /area/lavaland/surface diff --git a/code/game/area/areas/ruins/_ruins.dm b/code/game/area/areas/ruins/_ruins.dm index 087842c5d1..b97c3f0ef4 100644 --- a/code/game/area/areas/ruins/_ruins.dm +++ b/code/game/area/areas/ruins/_ruins.dm @@ -3,7 +3,7 @@ /area/ruin name = "\improper Unexplored Location" icon_state = "away" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY hidden = TRUE dynamic_lighting = DYNAMIC_LIGHTING_FORCED ambientsounds = RUINS diff --git a/code/game/area/areas/ruins/space.dm b/code/game/area/areas/ruins/space.dm index c52119361b..00a7fed012 100644 --- a/code/game/area/areas/ruins/space.dm +++ b/code/game/area/areas/ruins/space.dm @@ -5,7 +5,7 @@ blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station. /area/ruin/space/has_grav - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY /area/ruin/space/has_grav/powered requires_power = FALSE @@ -413,13 +413,13 @@ /area/ruin/space/djstation name = "Ruskie DJ Station" icon_state = "DJ" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY blob_allowed = FALSE //Nope, no winning on the DJ station as a blob. Gotta eat the main station. /area/ruin/space/djstation/solars name = "DJ Station Solars" icon_state = "DJ" - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY //ABANDONED TELEPORTER diff --git a/code/game/area/areas/shuttles.dm b/code/game/area/areas/shuttles.dm index 90a6bbd3b6..8e23614db0 100644 --- a/code/game/area/areas/shuttles.dm +++ b/code/game/area/areas/shuttles.dm @@ -6,7 +6,7 @@ name = "Shuttle" requires_power = FALSE dynamic_lighting = DYNAMIC_LIGHTING_FORCED - has_gravity = TRUE + has_gravity = STANDARD_GRAVITY always_unpowered = FALSE valid_territory = FALSE icon_state = "shuttle" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index f81da22d7f..980ba7e7bc 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -20,13 +20,16 @@ var/list/atom_colours //used to store the different colors on an atom //its inherent color, the colored paint applied on it, special color effect etc... - var/list/our_overlays //our local copy of (non-priority) overlays without byond magic. Use procs in SSoverlays to manipulate var/list/priority_overlays //overlays that should remain on top and not normally removed when using cut_overlay functions, like c4. + var/list/remove_overlays // a very temporary list of overlays to remove + var/list/add_overlays // a very temporary list of overlays to add var/datum/proximity_monitor/proximity_monitor var/buckle_message_cooldown = 0 var/fingerprintslast + var/list/filter_data //For handling persistent filters + /atom/New(loc, ...) //atom creation method that preloads variables at creation if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New() @@ -151,7 +154,7 @@ return FALSE /atom/proc/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) - SendSignal(COMSIG_ATOM_HULK_ATTACK, user) + SEND_SIGNAL(src, COMSIG_ATOM_HULK_ATTACK, user) if(does_attack_animation) user.changeNext_move(CLICK_CD_MELEE) add_logs(user, src, "punched", "hulk powers") @@ -220,13 +223,13 @@ return /atom/proc/emp_act(severity) - var/protection = SendSignal(COMSIG_ATOM_EMP_ACT, severity) + var/protection = SEND_SIGNAL(src, COMSIG_ATOM_EMP_ACT, severity) if(!(protection & EMP_PROTECT_WIRES) && istype(wires)) wires.emp_pulse() return protection // Pass the protection value collected here upwards /atom/proc/bullet_act(obj/item/projectile/P, def_zone) - SendSignal(COMSIG_ATOM_BULLET_ACT, P, def_zone) + SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) . = P.on_hit(src, 0, def_zone) /atom/proc/in_contents_of(container)//can take class or object instance as argument @@ -243,7 +246,7 @@ if(article) . = "[article] [src]" override[EXAMINE_POSITION_ARTICLE] = article - if(SendSignal(COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED) + if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED) . = override.Join("") /atom/proc/get_examine_string(mob/user, thats = FALSE) @@ -275,7 +278,7 @@ else to_chat(user, "It's empty.") - SendSignal(COMSIG_PARENT_EXAMINE, user) + SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user) /atom/proc/relaymove(mob/user) if(buckle_message_cooldown <= world.time) @@ -289,14 +292,14 @@ /atom/proc/ex_act(severity, target) set waitfor = FALSE contents_explosion(severity, target) - SendSignal(COMSIG_ATOM_EX_ACT, severity, target) + SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target) /atom/proc/blob_act(obj/structure/blob/B) - SendSignal(COMSIG_ATOM_BLOB_ACT, B) + SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B) return /atom/proc/fire_act(exposed_temperature, exposed_volume) - SendSignal(COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume) + SEND_SIGNAL(src, COMSIG_ATOM_FIRE_ACT, exposed_temperature, exposed_volume) return /atom/proc/hitby(atom/movable/AM, skipcatch, hitpush, blocked) @@ -364,28 +367,28 @@ return /atom/proc/singularity_pull(obj/singularity/S, current_size) - SendSignal(COMSIG_ATOM_SING_PULL, S, current_size) + SEND_SIGNAL(src, COMSIG_ATOM_SING_PULL, S, current_size) /atom/proc/acid_act(acidpwr, acid_volume) - SendSignal(COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) + SEND_SIGNAL(src, COMSIG_ATOM_ACID_ACT, acidpwr, acid_volume) /atom/proc/emag_act() - SendSignal(COMSIG_ATOM_EMAG_ACT) + SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) /atom/proc/rad_act(strength) - SendSignal(COMSIG_ATOM_RAD_ACT, strength) + SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength) /atom/proc/narsie_act() - SendSignal(COMSIG_ATOM_NARSIE_ACT) + SEND_SIGNAL(src, COMSIG_ATOM_NARSIE_ACT) /atom/proc/ratvar_act() - SendSignal(COMSIG_ATOM_RATVAR_ACT) + SEND_SIGNAL(src, COMSIG_ATOM_RATVAR_ACT) /atom/proc/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) return FALSE /atom/proc/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode) - SendSignal(COMSIG_ATOM_RCD_ACT, user, the_rcd, passed_mode) + SEND_SIGNAL(src, COMSIG_ATOM_RCD_ACT, user, the_rcd, passed_mode) return FALSE /atom/proc/storage_contents_dump_act(obj/item/storage/src_object, mob/user) @@ -413,7 +416,7 @@ //This proc is called on the location of an atom when the atom is Destroy()'d /atom/proc/handle_atom_del(atom/A) - SendSignal(COMSIG_ATOM_CONTENTS_DEL, A) + SEND_SIGNAL(src, COMSIG_ATOM_CONTENTS_DEL, A) //called when the turf the atom resides on is ChangeTurfed /atom/proc/HandleTurfChange(turf/T) @@ -432,7 +435,7 @@ //Hook for running code when a dir change occurs /atom/proc/setDir(newdir) - SendSignal(COMSIG_ATOM_DIR_CHANGE, dir, newdir) + SEND_SIGNAL(src, COMSIG_ATOM_DIR_CHANGE, dir, newdir) dir = newdir /atom/proc/mech_melee_attack(obj/mecha/M) @@ -527,10 +530,10 @@ return L.AllowDrop() ? L : get_turf(L) /atom/Entered(atom/movable/AM, atom/oldLoc) - SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc) + SEND_SIGNAL(src, COMSIG_ATOM_ENTERED, AM, oldLoc) /atom/Exited(atom/movable/AM, atom/newLoc) - SendSignal(COMSIG_ATOM_EXITED, AM, newLoc) + SEND_SIGNAL(src, COMSIG_ATOM_EXITED, AM, newLoc) /atom/proc/return_temperature() return @@ -579,3 +582,25 @@ /atom/proc/GenerateTag() return + +// Filter stuff +/atom/movable/proc/add_filter(name,priority,list/params) + if(!filter_data) + filter_data = list() + var/list/p = params.Copy() + p["priority"] = priority + filter_data[name] = p + update_filters() + +/atom/movable/proc/update_filters() + filters = null + sortTim(filter_data,associative = TRUE) + for(var/f in filter_data) + var/list/data = filter_data[f] + var/list/arguments = data.Copy() + arguments -= "priority" + filters += filter(arglist(arguments)) + +/atom/movable/proc/get_filter(name) + if(filter_data && filter_data[name]) + return filters[filter_data.Find(name)] \ No newline at end of file diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index e1493df15b..211bb35263 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -240,7 +240,7 @@ //Called after a successful Move(). By this point, we've already moved /atom/movable/proc/Moved(atom/OldLoc, Dir, Forced = FALSE) - SendSignal(COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced) + SEND_SIGNAL(src, COMSIG_MOVABLE_MOVED, OldLoc, Dir, Forced) if (!inertia_moving) inertia_next_move = world.time + inertia_move_delay newtonian_move(Dir) @@ -278,16 +278,16 @@ // This is automatically called when something enters your square //oldloc = old location on atom, inserted when forceMove is called and ONLY when forceMove is called! /atom/movable/Crossed(atom/movable/AM, oldloc) - SendSignal(COMSIG_MOVABLE_CROSSED, AM) + SEND_SIGNAL(src, COMSIG_MOVABLE_CROSSED, AM) /atom/movable/Uncrossed(atom/movable/AM) - SendSignal(COMSIG_MOVABLE_UNCROSSED, AM) + SEND_SIGNAL(src, COMSIG_MOVABLE_UNCROSSED, AM) //This is tg's equivalent to the byond bump, it used to be called bump with a second arg //to differentiate it, naturally everyone forgot about this immediately and so some things //would bump twice, so now it's called Collide /atom/movable/proc/Collide(atom/A) - SendSignal(COMSIG_MOVABLE_COLLIDE, A) + SEND_SIGNAL(src, COMSIG_MOVABLE_COLLIDE, A) if(A) if(throwing) throwing.hit_atom(A) @@ -354,7 +354,7 @@ loc = null /atom/movable/proc/onTransitZ(old_z,new_z) - SendSignal(COMSIG_MOVABLE_Z_CHANGED, old_z, new_z) + SEND_SIGNAL(src, COMSIG_MOVABLE_Z_CHANGED, old_z, new_z) for (var/item in src) // Notify contents of Z-transition. This can be overridden IF we know the items contents do not care. var/atom/movable/AM = item AM.onTransitZ(old_z,new_z) @@ -397,7 +397,7 @@ /atom/movable/proc/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum) set waitfor = 0 - SendSignal(COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum) + SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, hit_atom, throwingdatum) return hit_atom.hitby(src) /atom/movable/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked) @@ -410,7 +410,7 @@ /atom/movable/proc/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback) //If this returns FALSE then callback will not be called. . = FALSE - if (!target || (flags_1 & NODROP_1) || speed <= 0) + if (!target || speed <= 0) return if (pulledby) @@ -482,7 +482,7 @@ if(spin) SpinAnimation(5, 1) - SendSignal(COMSIG_MOVABLE_THROW, TT, spin) + SEND_SIGNAL(src, COMSIG_MOVABLE_THROW, TT, spin) SSthrowing.processing[src] = TT if (SSthrowing.state == SS_PAUSED && length(SSthrowing.currentrun)) SSthrowing.currentrun[src] = TT @@ -565,6 +565,7 @@ I = image('icons/effects/effects.dmi', A, visual_effect_icon, A.layer + 0.1) else if(used_item) I = image(icon = used_item, loc = A, layer = A.layer + 0.1) + I.plane = GAME_PLANE // Scale the icon. I.transform *= 0.75 diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index e682960e2e..09a9ec9970 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -248,7 +248,7 @@ if("Incarcerated") holder.icon_state = "hudincarcerated" return - if("Parolled") + if("Paroled") holder.icon_state = "hudparolled" return if("Discharged") diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 242eb61478..07e31cb24d 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -52,6 +52,7 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th changeling.restricted_roles = restricted_jobs return 1 else + setup_error = "Not enough changeling candidates" return 0 /datum/game_mode/changeling/post_setup() @@ -82,10 +83,10 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th return if(changelings.len <= (changelingcap - 2) || prob(100 - (csc * 2))) if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE)) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) - character.mind.make_Changling() + character.mind.make_Changeling() changelings += character.mind /datum/game_mode/changeling/generate_report() diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index d2f5accea4..3f5abe531b 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -69,11 +69,13 @@ return if(changelings.len <= (changelingcap - 2) || prob(100 / (csc * 4))) if(ROLE_CHANGELING in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_CHANGELING) && !jobban_isbanned(character, ROLE_SYNDICATE)) + if(!jobban_isbanned(character, ROLE_CHANGELING) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) - character.mind.make_Changling() + character.mind.make_Changeling() changelings += character.mind + if(QDELETED(character)) + return ..() /datum/game_mode/traitor/changeling/generate_report() diff --git a/code/game/gamemodes/clock_cult/clock_cult.dm b/code/game/gamemodes/clock_cult/clock_cult.dm index fc0cfc2879..499d441a57 100644 --- a/code/game/gamemodes/clock_cult/clock_cult.dm +++ b/code/game/gamemodes/clock_cult/clock_cult.dm @@ -146,8 +146,8 @@ Credit where due: var/list/errorList = list() SSmapping.LoadGroup(errorList, "Reebe", "map_files/generic", "City_of_Cogs.dmm", default_traits = ZTRAITS_REEBE, silent = TRUE) if(errorList.len) // reebe failed to load - message_admins("Rebee failed to load!") - log_game("Rebee failed to load!") + message_admins("Reebe failed to load!") + log_game("Reebe failed to load!") return FALSE if(CONFIG_GET(flag/protect_roles_from_antagonist)) restricted_jobs += protected_jobs diff --git a/code/game/gamemodes/clown_ops/bananium_bomb.dm b/code/game/gamemodes/clown_ops/bananium_bomb.dm index c7212a671c..0d5f0691c4 100644 --- a/code/game/gamemodes/clown_ops/bananium_bomb.dm +++ b/code/game/gamemodes/clown_ops/bananium_bomb.dm @@ -42,17 +42,17 @@ var/obj/item/clothing/C if(!H.w_uniform || H.dropItemToGround(H.w_uniform)) C = new /obj/item/clothing/under/rank/clown(H) - C.flags_1 |= NODROP_1 //mwahaha + C.item_flags |= NODROP //mwahaha H.equip_to_slot_or_del(C, SLOT_W_UNIFORM) if(!H.shoes || H.dropItemToGround(H.shoes)) C = new /obj/item/clothing/shoes/clown_shoes(H) - C.flags_1 |= NODROP_1 + C.item_flags |= NODROP H.equip_to_slot_or_del(C, SLOT_SHOES) if(!H.wear_mask || H.dropItemToGround(H.wear_mask)) C = new /obj/item/clothing/mask/gas/clown_hat(H) - C.flags_1 |= NODROP_1 + C.item_flags |= NODROP H.equip_to_slot_or_del(C, SLOT_WEAR_MASK) H.dna.add_mutation(CLOWNMUT) diff --git a/code/game/gamemodes/clown_ops/clown_ops.dm b/code/game/gamemodes/clown_ops/clown_ops.dm index 75df27ffca..12d3106c8d 100644 --- a/code/game/gamemodes/clown_ops/clown_ops.dm +++ b/code/game/gamemodes/clown_ops/clown_ops.dm @@ -48,7 +48,7 @@ /obj/item/reagent_containers/spray/waterflower/lube) implants = list(/obj/item/implant/sad_trombone) - uplink_type = /obj/item/radio/uplink/clownop + uplink_type = /obj/item/uplink/clownop /datum/outfit/syndicate/clownop/no_crystals tc = 0 diff --git a/code/game/gamemodes/clown_ops/clown_weapons.dm b/code/game/gamemodes/clown_ops/clown_weapons.dm index 067bb8c84c..bf401e5ad2 100644 --- a/code/game/gamemodes/clown_ops/clown_weapons.dm +++ b/code/game/gamemodes/clown_ops/clown_weapons.dm @@ -11,10 +11,10 @@ list_reagents = list("lube" = 30) //COMBAT CLOWN SHOES -//Clown shoes with combat stats and noslip. Of course they still squeek. +//Clown shoes with combat stats and noslip. Of course they still squeak. /obj/item/clothing/shoes/clown_shoes/combat name = "combat clown shoes" - desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeek at 100% capacity." + desc = "advanced clown shoes that protect the wearer and render them nearly immune to slipping on their own peels. They also squeak at 100% capacity." clothing_flags = NOSLIP slowdown = SHOES_SLOWDOWN armor = list("melee" = 25, "bullet" = 25, "laser" = 25, "energy" = 25, "bomb" = 50, "bio" = 10, "rad" = 0, "fire" = 70, "acid" = 50) @@ -216,11 +216,11 @@ /obj/item/clothing/mask/fakemoustache/sticky/Initialize() . = ..() - flags_1 |= NODROP_1 + item_flags |= NODROP addtimer(CALLBACK(src, .proc/unstick), unstick_time) /obj/item/clothing/mask/fakemoustache/sticky/proc/unstick() - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP //DARK H.O.N.K. AND CLOWN MECH WEAPONS diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index de9422d6f7..4e9a9cc6e7 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -81,8 +81,11 @@ cultist.restricted_roles = restricted_jobs log_game("[key_name(cultist)] has been selected as a cultist") - - return (cultists_to_cult.len>=required_enemies) + if(cultists_to_cult.len>=required_enemies) + return TRUE + else + setup_error = "Not enough cultist candidates" + return FALSE /datum/game_mode/cult/post_setup() diff --git a/code/game/gamemodes/devil/devil_game_mode.dm b/code/game/gamemodes/devil/devil_game_mode.dm index 2e897539d8..0f2e8f7858 100644 --- a/code/game/gamemodes/devil/devil_game_mode.dm +++ b/code/game/gamemodes/devil/devil_game_mode.dm @@ -45,6 +45,7 @@ antag_candidates.Remove(devil) if(devils.len < required_enemies) + setup_error = "Not enough devil candidates" return 0 return 1 diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index fbf62886e3..5b23abea26 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -49,6 +49,7 @@ var/gamemode_ready = FALSE //Is the gamemode all set up and ready to start checking for ending conditions. var/flipseclevel = FALSE //CIT CHANGE - adds a 10% chance for the alert level to be the opposite of what the gamemode is supposed to have + var/setup_error //What stopepd setting up the mode. /datum/game_mode/proc/announce() //Shows the gamemode's name and a fast description. to_chat(world, "The gamemode is: [name]!") @@ -98,6 +99,7 @@ if(sql) var/datum/DBQuery/query_round_game_mode = SSdbcore.NewQuery("UPDATE [format_table_name("round")] SET [sql] WHERE id = [GLOB.round_id]") query_round_game_mode.Execute() + qdel(query_round_game_mode) if(report) addtimer(CALLBACK(src, .proc/send_intercept, 0), rand(waittime_l, waittime_h)) generate_station_goals() @@ -364,7 +366,7 @@ for(var/mob/dead/new_player/player in players) if(player.client && player.ready == PLAYER_READY_TO_PLAY) if(role in player.client.prefs.be_special) - if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + if(!jobban_isbanned(player, ROLE_SYNDICATE) && !QDELETED(player) && !jobban_isbanned(player, role) && !QDELETED(player)) //Nodrak/Carn: Antag Job-bans if(age_check(player.client)) //Must be older than the minimum age candidates += player.mind // Get a list of all the people who want to be the antagonist for this round @@ -378,7 +380,7 @@ for(var/mob/dead/new_player/player in players) if(player.client && player.ready == PLAYER_READY_TO_PLAY) if(!(role in player.client.prefs.be_special)) // We don't have enough people who want to be antagonist, make a separate list of people who don't want to be one - if(!jobban_isbanned(player, ROLE_SYNDICATE) && !jobban_isbanned(player, role)) //Nodrak/Carn: Antag Job-bans + if(!jobban_isbanned(player, ROLE_SYNDICATE) && !QDELETED(player) && !jobban_isbanned(player, role) && !QDELETED(player) ) //Nodrak/Carn: Antag Job-bans drafted += player.mind if(restricted_jobs) diff --git a/code/game/gamemodes/monkey/monkey.dm b/code/game/gamemodes/monkey/monkey.dm index 8f7bedd4dd..76460ffbb8 100644 --- a/code/game/gamemodes/monkey/monkey.dm +++ b/code/game/gamemodes/monkey/monkey.dm @@ -40,6 +40,7 @@ antag_candidates -= carrier if(!carriers.len) + setup_error = "No monkey candidates" return FALSE return TRUE diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 973de8cde1..4eb5dc1c6e 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -33,6 +33,7 @@ log_game("[key_name(new_op)] has been selected as a nuclear operative") return TRUE else + setup_error = "Not enough nuke op candidates" return FALSE //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// @@ -134,7 +135,7 @@ var/tc = 25 var/command_radio = FALSE - var/uplink_type = /obj/item/radio/uplink/nuclear + var/uplink_type = /obj/item/uplink/nuclear /datum/outfit/syndicate/leader @@ -154,7 +155,7 @@ R.command = TRUE if(tc) - var/obj/item/radio/uplink/U = new uplink_type(H, H.key, tc) + var/obj/item/U = new uplink_type(H, H.key, tc) H.equip_to_slot_or_del(U, SLOT_IN_BACKPACK) var/obj/item/implant/weapons_auth/W = new/obj/item/implant/weapons_auth(H) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 7559e21e21..b32460dabc 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -279,7 +279,7 @@ GLOBAL_LIST_EMPTY(objectives) if(SSshuttle.emergency.mode != SHUTTLE_ENDGAME) return TRUE for(var/mob/living/player in GLOB.player_list) - if(get_area(player) in SSshuttle.emergency.shuttle_areas && player.mind && player.stat != DEAD && ishuman(player)) + if((get_area(player) in SSshuttle.emergency.shuttle_areas) && player.mind && player.stat != DEAD && ishuman(player)) var/mob/living/carbon/human/H = player if(H.dna.species.id != "human") return FALSE @@ -621,7 +621,7 @@ GLOBAL_LIST_EMPTY(possible_items_special) absorbedcount += changeling.absorbedcount for(var/datum/antagonist/changeling/changeling2 in GLOB.antagonists) - if(!changeling2.owner || !changeling2.stored_profiles || changeling2.absorbedcount < absorbedcount) + if(!changeling2.owner || changeling2.owner == owner || !changeling2.stored_profiles || changeling2.absorbedcount < absorbedcount) continue return FALSE return TRUE diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 592d930f7d..e7ea46f573 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -58,6 +58,7 @@ lenin.restricted_roles = restricted_jobs if(headrev_candidates.len < required_enemies) + setup_error = "Not enough headrev candidates" return FALSE return TRUE diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 6884cdee55..b5b5e7a706 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -56,7 +56,13 @@ log_game("[key_name(traitor)] has been selected as a [traitor_name]") antag_candidates.Remove(traitor) - return !traitors_required || pre_traitors.len > 0 + var/enough_tators = !traitors_required || pre_traitors.len > 0 + + if(!enough_tators) + setup_error = "Not enough traitor candidates" + return FALSE + else + return TRUE /datum/game_mode/traitor/post_setup() @@ -79,7 +85,7 @@ return if((SSticker.mode.traitors.len + pre_traitors.len) <= (traitorcap - 2) || prob(100 / (tsc * 2))) if(ROLE_TRAITOR in character.client.prefs.be_special) - if(!jobban_isbanned(character, ROLE_TRAITOR) && !jobban_isbanned(character, ROLE_SYNDICATE)) + if(!jobban_isbanned(character, ROLE_TRAITOR) && !QDELETED(character) && !jobban_isbanned(character, ROLE_SYNDICATE) && !QDELETED(character)) if(age_check(character.client)) if(!(character.job in restricted_jobs)) add_latejoin_traitor(character.mind) diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 32d17fec2c..d27f977575 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -25,11 +25,11 @@ wizard.special_role = ROLE_WIZARD log_game("[key_name(wizard)] has been selected as a Wizard") //TODO: Move these to base antag datum if(GLOB.wizardstart.len == 0) - to_chat(wizard.current, "A starting location for you could not be found, please report this bug!") - return 0 + setup_error = "No wizard starting location found" + return FALSE for(var/datum/mind/wiz in wizards) wiz.current.forceMove(pick(GLOB.wizardstart)) - return 1 + return TRUE /datum/game_mode/wizard/post_setup() diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 7f661b4556..c1adb0e9d0 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -414,12 +414,12 @@ Class Procs: var/obj/item/stack/SN = new SB.merge_type(null,used_amt) component_parts += SN else - if(W.SendSignal(COMSIG_TRY_STORAGE_TAKE, B, src)) + if(SEND_SIGNAL(W, COMSIG_TRY_STORAGE_TAKE, B, src)) component_parts += B B.moveToNullspace() - W.SendSignal(COMSIG_TRY_STORAGE_INSERT, A, null, null, TRUE) + SEND_SIGNAL(W, COMSIG_TRY_STORAGE_INSERT, A, null, null, TRUE) component_parts -= A - to_chat(user, "[A.name] replaced with [B.name].") + to_chat(user, "[capitalize(A.name)] replaced with [B.name].") shouldplaysound = 1 //Only play the sound when parts are actually replaced! break RefreshParts() diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 9a13bde3ff..84059e8029 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -46,7 +46,7 @@ ) /obj/machinery/autolathe/Initialize() - AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), 0, FALSE, null, null, CALLBACK(src, .proc/AfterMaterialInsert)) + AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS), 0, TRUE, null, null, CALLBACK(src, .proc/AfterMaterialInsert)) . = ..() wires = new /datum/wires/autolathe(src) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index f974f1b39b..879be046c9 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -95,7 +95,7 @@ update_icon() return - if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1)) + if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON)) return attack_hand(user) else return ..() diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 5cf652f00d..3e8e3afc98 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -41,6 +41,16 @@ var/internal_light = TRUE //Whether it can light up when an AI views it +/obj/machinery/camera/preset/toxins //Bomb test site in space + name = "Hardened Bomb-Test Camera" + desc = "A specially-reinforced camera with a long lasting battery, used to monitor the bomb testing site. An external light is attached to the top." + c_tag = "Bomb Testing Site" + network = list("rd","toxins") + use_power = NO_POWER_USE //Test site is an unpowered area + invuln = TRUE + light_range = 10 + start_active = TRUE + /obj/machinery/camera/Initialize(mapload, obj/structure/camera_assembly/CA) . = ..() for(var/i in network) diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 7eac36dc96..decfebddb9 100644 --- a/code/game/machinery/camera/camera_assembly.dm +++ b/code/game/machinery/camera/camera_assembly.dm @@ -13,7 +13,7 @@ icon = 'icons/obj/machines/camera.dmi' icon_state = "camera1" max_integrity = 150 - // Motion, EMP-Proof, X-Ray + // Motion, EMP-Proof, X-ray var/static/list/possible_upgrades = typecacheof(list(/obj/item/assembly/prox_sensor, /obj/item/stack/sheet/mineral/plasma, /obj/item/analyzer)) var/list/upgrades var/state = 1 @@ -80,7 +80,7 @@ return FALSE var/obj/U = locate(/obj) in upgrades if(U) - to_chat(user, "You unattach an upgrade from the assembly.") + to_chat(user, "You detach an upgrade from the assembly.") tool.play_tool_sound(src) U.forceMove(drop_location()) upgrades -= U @@ -126,7 +126,7 @@ if(state != 1) return FALSE I.play_tool_sound(src) - to_chat(user, "You unattach the assembly from its place.") + to_chat(user, "You detach the assembly from its place.") new /obj/item/wallframe/camera(drop_location()) qdel(src) return TRUE diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index d9a93a6578..45f0268a00 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -10,6 +10,8 @@ if(!isMotion()) . = PROCESS_KILL return + if(stat & EMPED) + return if (detectTime > 0) var/elapsed = world.time - detectTime if (elapsed > alarm_delay) @@ -63,6 +65,7 @@ for (var/mob/living/silicon/aiPlayer in GLOB.player_list) if (status) aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src) + visible_message("A red light flashes on the [src]!") detectTime = -1 return TRUE diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index f4963102c6..afcc1fee7c 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -2,16 +2,16 @@ // EMP /obj/machinery/camera/emp_proof - start_active = 1 + start_active = TRUE /obj/machinery/camera/emp_proof/Initialize() . = ..() upgradeEmpProof() -// X-RAY +// X-ray /obj/machinery/camera/xray - start_active = 1 + start_active = TRUE icon_state = "xraycam" // Thanks to Krutchen for the icons. /obj/machinery/camera/xray/Initialize() @@ -20,7 +20,7 @@ // MOTION /obj/machinery/camera/motion - start_active = 1 + start_active = TRUE name = "motion-sensitive security camera" /obj/machinery/camera/motion/Initialize() @@ -29,7 +29,7 @@ // ALL UPGRADES /obj/machinery/camera/all - start_active = 1 + start_active = TRUE /obj/machinery/camera/all/Initialize() . = ..() diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 43e736b6ef..5d6c92a97d 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -1,6 +1,6 @@ /obj/machinery/computer/aifixer name = "\improper AI system integrity restorer" - desc = "Used with intelliCards containing nonfunctioning AIs to restore them to working order." + desc = "Used with intelliCards containing nonfunctional AIs to restore them to working order." req_access = list(ACCESS_CAPTAIN, ACCESS_ROBOTICS, ACCESS_HEADS) var/mob/living/silicon/ai/occupier = null var/active = 0 diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 3d4d916961..13da773868 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -72,7 +72,7 @@ Reset() /obj/machinery/computer/arcade/proc/prizevend(mob/user) - user.SendSignal(COMSIG_ADD_MOOD_EVENT, "arcade", /datum/mood_event/arcade) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "arcade", /datum/mood_event/arcade) if(prob(0.0001)) //1 in a million new /obj/item/gun/energy/pulse/prize(src) SSmedals.UnlockMedal(MEDAL_PULSE, usr.client) diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 7b75d06321..696c9442b9 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -132,7 +132,7 @@ /obj/machinery/computer/security/proc/get_available_cameras() var/list/L = list() for (var/obj/machinery/camera/C in GLOB.cameranet.cameras) - if((is_away_level(z) || is_away_level(C.z)) && (C.z != z))//if on away mission, can only recieve feed from same z_level cameras + if((is_away_level(z) || is_away_level(C.z)) && (C.z != z))//if on away mission, can only receive feed from same z_level cameras continue L.Add(C) @@ -152,6 +152,50 @@ D["[C.c_tag][(C.status ? null : " (Deactivated)")]"] = C return D +// SECURITY MONITORS + +/obj/machinery/computer/security/wooden_tv + name = "security camera monitor" + desc = "An old TV hooked into the station's camera network." + icon_state = "television" + icon_keyboard = null + icon_screen = "detective_tv" + clockwork = TRUE //it'd look weird + +/obj/machinery/computer/security/mining + name = "outpost camera console" + desc = "Used to access the various cameras on the outpost." + icon_screen = "mining" + icon_keyboard = "mining_key" + network = list("mine", "auxbase") + circuit = /obj/item/circuitboard/computer/mining + +/obj/machinery/computer/security/research + name = "research camera console" + desc = "Used to access the various cameras in science." + network = list("rd") + circuit = /obj/item/circuitboard/computer/research + +/obj/machinery/computer/security/hos + name = "Head of Security's camera console" + desc = "A custom security console with added access to the labor camp network." + network = list("ss13", "labor") + circuit = null + +/obj/machinery/computer/security/labor + name = "labor camp monitoring" + desc = "Used to access the various cameras on the labor camp." + network = list("labor") + circuit = null + +/obj/machinery/computer/security/qm + name = "Quartermaster's camera console" + desc = "A console with access to the mining, auxillary base and vault camera networks." + network = list("mine", "auxbase", "vault") + circuit = null + +// TELESCREENS + /obj/machinery/computer/security/telescreen name = "\improper Telescreen" desc = "Used for watching an empty arena." @@ -161,7 +205,6 @@ density = FALSE circuit = null clockwork = TRUE //it'd look very weird - light_power = 0 /obj/machinery/computer/security/telescreen/update_icon() @@ -176,28 +219,68 @@ icon = 'icons/obj/status_display.dmi' icon_state = "entertainment" network = list("thunder") - density = FALSE - circuit = null -/obj/machinery/computer/security/wooden_tv - name = "security camera monitor" - desc = "An old TV hooked into the stations camera network." - icon_state = "television" - icon_keyboard = null - icon_screen = "detective_tv" - clockwork = TRUE //it'd look weird +/obj/machinery/computer/security/telescreen/rd + name = "Research Director's telescreen" + desc = "Used for watching the AI and the RD's goons from the safety of his office." + network = list("rd", "aicore", "aiupload", "minisat", "xeno", "test") - -/obj/machinery/computer/security/mining - name = "outpost camera console" - desc = "Used to access the various cameras on the outpost." - icon_screen = "mining" - icon_keyboard = "mining_key" - network = list("mine") - circuit = /obj/item/circuitboard/computer/mining - -/obj/machinery/computer/security/research - name = "research camera console" - desc = "Used to access the various cameras in science." +/obj/machinery/computer/security/telescreen/circuitry + name = "circuitry telescreen" + desc = "Used for watching the other eggheads from the safety of the circuitry lab." network = list("rd") - circuit = /obj/item/circuitboard/computer/research + +/obj/machinery/computer/security/telescreen/ce + name = "Chief Engineer's telescreen" + desc = "Used for watching the engine, telecommunications and the minisat." + network = list("engine", "singularity", "tcomms", "minisat") + +/obj/machinery/computer/security/telescreen/cmo + name = "Chief Medical Officer's telescreen" + desc = "A telescreen with access to the medbay's camera network." + network = list("medbay") + +/obj/machinery/computer/security/telescreen/vault + name = "Vault monitor" + desc = "A telescreen that connects to the vault's camera network." + network = list("vault") + +/obj/machinery/computer/security/telescreen/toxins + name = "Bomb test site monitor" + desc = "A telescreen that connects to the bomb test site's camera." + network = list("toxin") + +/obj/machinery/computer/security/telescreen/engine + name = "engine monitor" + desc = "A telescreen that connects to the engine's camera network." + network = list("engine") + +/obj/machinery/computer/security/telescreen/turbine + name = "turbine monitor" + desc = "A telescreen that connects to the turbine's camera." + network = list("turbine") + +/obj/machinery/computer/security/telescreen/interrogation + name = "interrogation room monitor" + desc = "A telescreen that connects to the interrogation room's camera." + network = list("interrogation") + +/obj/machinery/computer/security/telescreen/prison + name = "prison monitor" + desc = "A telescreen that connects to the permabrig's camera network." + network = list("prison") + +/obj/machinery/computer/security/telescreen/auxbase + name = "auxillary base monitor" + desc = "A telescreen that connects to the auxillary base's camera." + network = list("auxbase") + +/obj/machinery/computer/security/telescreen/minisat + name = "minisat monitor" + desc = "A telescreen that connects to the minisat's camera network." + network = list("minisat") + +/obj/machinery/computer/security/telescreen/aiupload + name = "AI upload monitor" + desc = "A telescreen that connects to the AI upload's camera network." + network = list("aiupload") diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 26a8ac940e..e561c6466f 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -159,7 +159,7 @@ /mob/camera/aiEye/remote/update_remote_sight(mob/living/user) user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras - user.sight = 0 + user.sight = SEE_TURFS | SEE_BLACKNESS user.see_in_dark = 2 return 1 diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index bb47a7ab32..09bf401e12 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -348,6 +348,12 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) /obj/machinery/computer/card/Topic(href, href_list) if(..()) return + + if(!usr.canUseTopic(src, !issilicon(usr)) || !is_operational()) + usr.unset_machine() + usr << browse(null, "window=id_com") + return + usr.set_machine(src) switch(href_list["choice"]) if ("modify") @@ -532,11 +538,12 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) updateUsrDialog() /obj/machinery/computer/card/AltClick(mob/user) - if(user.canUseTopic(src)) - if(scan) - eject_id_scan(user) - if(modify) - eject_id_modify(user) + if(!user.canUseTopic(src, !issilicon(user)) || !is_operational()) + return + if(scan) + eject_id_scan(user) + if(modify) + eject_id_modify(user) /obj/machinery/computer/card/proc/eject_id_scan(mob/user) if(scan) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index d1e3de1248..5e5c08ee99 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -83,7 +83,7 @@ if(obj_flags & EMAGGED) authenticated = 2 auth_id = "Unknown" - to_chat(M, "[src] lets out a quiet alarm as its login is overriden.") + to_chat(M, "[src] lets out a quiet alarm as its login is overridden.") playsound(src, 'sound/machines/terminal_on.ogg', 50, 0) playsound(src, 'sound/machines/terminal_alert.ogg', 25, 0) if(prob(25)) diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 72e17679f5..790d9898b8 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -9,7 +9,7 @@ #define RADIATION_DURATION_MAX 30 #define RADIATION_ACCURACY_MULTIPLIER 3 //larger is less accurate -#define RADIATION_IRRADIATION_MULTIPLIER 1 //multiplier for how much radiation a test subject recieves +#define RADIATION_IRRADIATION_MULTIPLIER 1 //multiplier for how much radiation a test subject receives #define SCANNER_ACTION_SE 1 #define SCANNER_ACTION_UI 2 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index f606494b96..0ee394d889 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -329,7 +329,7 @@ src.active2.fields["mi_dis_d"] = t1 if("ma_dis") if(active2) - var/t1 = stripped_input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) + var/t1 = stripped_input("Please input major disabilities list:", "Med. records", src.active2.fields["ma_dis"], null) if(!canUseMedicalRecordsConsole(usr, t1, null, a2)) return src.active2.fields["ma_dis"] = t1 diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index ec113eb43b..b71f572e68 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -130,4 +130,4 @@ /obj/machinery/computer/pod/old/swf name = "\improper Magix System IV" - desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition." + desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorcerer's Edition." diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 17121c45cf..8a2a06bf1f 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -150,7 +150,7 @@ background = "'background-color:#990000;'" if("Incarcerated") background = "'background-color:#CD6500;'" - if("Parolled") + if("Paroled") background = "'background-color:#CD6500;'" if("Discharged") background = "'background-color:#006699;'" @@ -688,7 +688,7 @@ What a mess.*/ temp += "
  • None
  • " temp += "
  • *Arrest*
  • " temp += "
  • Incarcerated
  • " - temp += "
  • Parolled
  • " + temp += "
  • Paroled
  • " temp += "
  • Discharged
  • " temp += "" if("rank") @@ -722,8 +722,8 @@ What a mess.*/ active2.fields["criminal"] = "*Arrest*" if("incarcerated") active2.fields["criminal"] = "Incarcerated" - if("parolled") - active2.fields["criminal"] = "Parolled" + if("paroled") + active2.fields["criminal"] = "Paroled" if("released") active2.fields["criminal"] = "Discharged" investigate_log("[active1.fields["name"]] has been set from [old_field] to [active2.fields["criminal"]] by [key_name(usr)].", INVESTIGATE_RECORDS) @@ -803,7 +803,7 @@ What a mess.*/ if(3) R.fields["age"] = rand(5, 85) if(4) - R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Parolled", "Discharged") + R.fields["criminal"] = pick("None", "*Arrest*", "Incarcerated", "Paroled", "Discharged") if(5) R.fields["p_stat"] = pick("*Unconscious*", "Active", "Physically Unfit") if(6) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 59bf9f86fd..a709fdbd2a 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -180,7 +180,7 @@ break if(component_check) P.play_tool_sound(src) - var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, 1) + var/obj/machinery/new_machine = new circuit.build_path(loc, 1) new_machine.anchored = anchored new_machine.on_construction() for(var/obj/O in new_machine.component_parts) @@ -219,7 +219,7 @@ req_components[path] -= used_amt else added_components[part] = path - if(replacer.SendSignal(COMSIG_TRY_STORAGE_TAKE, part, src)) + if(SEND_SIGNAL(replacer, COMSIG_TRY_STORAGE_TAKE, part, src)) req_components[path]-- for(var/obj/item/part in added_components) diff --git a/code/game/machinery/defibrillator_mount.dm b/code/game/machinery/defibrillator_mount.dm index 1c72e79363..5a041e6baa 100644 --- a/code/game/machinery/defibrillator_mount.dm +++ b/code/game/machinery/defibrillator_mount.dm @@ -37,7 +37,7 @@ use_power(200) defib.cell.give(180) //90% efficiency, slightly better than the cell charger's 87.5% update_icon() - + /obj/machinery/defibrillator_mount/update_icon() cut_overlays() if(defib) @@ -69,7 +69,7 @@ if(defib) to_chat(user, "There's already a defibrillator in [src]!") return - if(I.flags_1 & NODROP_1 || !user.transferItemToLoc(I, src)) + if(I.item_flags & NODROP || !user.transferItemToLoc(I, src)) to_chat(user, "[I] is stuck to your hand!") return user.visible_message("[user] hooks up [I] to [src]!", \ diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 65d1264030..c108aacdb1 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -192,7 +192,7 @@ /obj/machinery/door/airlock/check_access_ntnet(datum/netdata/data) return !requiresID() || ..() -/obj/machinery/door/airlock/ntnet_recieve(datum/netdata/data) +/obj/machinery/door/airlock/ntnet_receive(datum/netdata/data) // Check if the airlock is powered and can accept control packets. if(!hasPower() || !canAIControl()) return @@ -201,7 +201,7 @@ if(!check_access_ntnet(data)) return - // Handle recieved packet. + // Handle received packet. var/command = lowertext(data.data["data"]) var/command_value = lowertext(data.data["data_secondary"]) switch(command) @@ -1509,7 +1509,7 @@ else if (safe) safe = FALSE else - to_chat(usr, "Firmware reports safeties already overriden.") + to_chat(usr, "Firmware reports safeties already overridden.") . = TRUE if("speed-on") if(wires.is_cut(WIRE_TIMING)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 8b94648ec9..e169c66c24 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -178,7 +178,7 @@ else if(istype(I, /obj/item/weldingtool)) try_to_weld(I, user) return 1 - else if(!(I.flags_1 & NOBLUDGEON_1) && user.a_intent != INTENT_HARM) + else if(!(I.item_flags & NOBLUDGEON) && user.a_intent != INTENT_HARM) try_to_activate_door(user) return 1 return ..() diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index 8b9255b5ac..0036b41804 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -97,7 +97,7 @@ "sigtype" = "command" )) if(memory["pump_status"] == "siphon") - signal.data["stabalize"] = 1 + signal.data["stabilize"] = 1 else if(memory["pump_status"] != "release") signal.data["power"] = 1 post_signal(signal) diff --git a/code/game/machinery/embedded_controller/simple_vent_controller.dm b/code/game/machinery/embedded_controller/simple_vent_controller.dm index 2a5faef0e1..9901d51074 100644 --- a/code/game/machinery/embedded_controller/simple_vent_controller.dm +++ b/code/game/machinery/embedded_controller/simple_vent_controller.dm @@ -15,7 +15,7 @@ post_signal(new /datum/signal(list( "tag" = airpump_tag, "sigtype" = "command", - "stabalize" = 1, + "stabilize" = 1, "power" = 1 ))) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index d20a1059f9..acc0505256 100644 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -40,7 +40,7 @@ if (src.on && !(stat & NOPOWER) ) var/turf/location = src.loc if (isturf(location)) - location.hotspot_expose(1000,500,1) + location.hotspot_expose(700,10,1) return 1 /obj/machinery/igniter/Initialize() @@ -126,7 +126,7 @@ use_power(1000) var/turf/location = src.loc if (isturf(location)) - location.hotspot_expose(1000,500,1) + location.hotspot_expose(1000,100,1) return 1 /obj/machinery/sparker/emp_act(severity) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index f9dbcc85d5..aa847a4624 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -874,7 +874,7 @@ GLOBAL_LIST_EMPTY(allCasters) say("Breaking news from [channel]!") alert = TRUE update_icon() - addtimer(CALLBACK(src,.proc/remove_alert),alert_delay,TIMER_OVERRIDE) + addtimer(CALLBACK(src,.proc/remove_alert),alert_delay,TIMER_UNIQUE|TIMER_OVERRIDE) playsound(loc, 'sound/machines/twobeep.ogg', 75, 1) else say("Attention! Wanted issue distributed!") diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 2ff0a6758d..82ccadf5cc 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -245,7 +245,7 @@ visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.") playsound(src, 'sound/machines/airlockclose.ogg', 25, 1) for(var/obj/item/I in src) //Scorches away blood and forensic evidence, although the SSU itself is unaffected - I.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG) + SEND_SIGNAL(I, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG) var/datum/component/radioactive/contamination = I.GetComponent(/datum/component/radioactive) if(contamination) qdel(contamination) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index fb45d6029f..9d151a8dd1 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -509,7 +509,7 @@ w_class = WEIGHT_CLASS_TINY var/timer = 0 var/detonated = 0 - var/existant = 0 + var/existent = 0 /obj/item/syndicatedetonator/attack_self(mob/user) if(timer < world.time) @@ -517,9 +517,9 @@ if(B.active) B.detonation_timer = world.time + BUTTON_DELAY detonated++ - existant++ + existent++ playsound(user, 'sound/machines/click.ogg', 20, 1) - to_chat(user, "[existant] found, [detonated] triggered.") + to_chat(user, "[existent] found, [detonated] triggered.") if(detonated) var/turf/T = get_turf(src) detonated-- @@ -528,7 +528,7 @@ message_admins(log_str) log_game("[key_name(user)] has remotely detonated [detonated ? "syndicate bombs" : "a syndicate bomb"] using a [name] at [AREACOORD(T)]") detonated = 0 - existant = 0 + existent = 0 timer = world.time + BUTTON_COOLDOWN diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index a5d9e44e81..97c508573b 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -120,7 +120,7 @@ dat += "Data type: Audio File
    " dat += "Source: Unidentifiable
    " dat += "Class: [race]
    " - dat += "Contents: Unintelligble
    " + dat += "Contents: Unintelligible
    " dat += "
    " diff --git a/code/game/machinery/telecomms/machines/allinone.dm b/code/game/machinery/telecomms/machines/allinone.dm index 7a04869b93..2d737b1f24 100644 --- a/code/game/machinery/telecomms/machines/allinone.dm +++ b/code/game/machinery/telecomms/machines/allinone.dm @@ -6,7 +6,7 @@ /obj/machinery/telecomms/allinone name = "telecommunications mainframe" icon_state = "comm_server" - desc = "A compact machine used for portable subspace telecommuniations processing." + desc = "A compact machine used for portable subspace telecommunications processing." density = TRUE use_power = NO_POWER_USE idle_power_usage = 0 diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm index 4fa40910a8..4c74518937 100644 --- a/code/game/machinery/transformer.dm +++ b/code/game/machinery/transformer.dm @@ -28,8 +28,7 @@ /obj/machinery/transformer/examine(mob/user) . = ..() if(cooldown && (issilicon(user) || isobserver(user))) - var/seconds_remaining = (cooldown_timer - world.time) / 10 - to_chat(user, "It will be ready in [max(0, seconds_remaining)] seconds.") + to_chat(user, "It will be ready in [DisplayTimeText(cooldown_timer - world.time)].") /obj/machinery/transformer/Destroy() QDEL_NULL(countdown) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index 8575a6f2dc..56377e5a1f 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -49,7 +49,7 @@ /obj/machinery/washing_machine/proc/wash_cycle() for(var/X in contents) var/atom/movable/AM = X - AM.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(AM, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) AM.machine_wash(src) busy = FALSE diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 3a047b20a1..bc781d1f07 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -78,6 +78,14 @@ name = "\improper KILL CLAMP" desc = "They won't know what clamped them!" energy_drain = 0 + dam_force = 0 + var/real_clamp = FALSE + +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real + desc = "They won't know what clamped them! This time for real!" + energy_drain = 10 + dam_force = 20 + real_clamp = TRUE /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) if(!action_checks(target)) @@ -108,11 +116,41 @@ if(M.stat == DEAD) return if(chassis.occupant.a_intent == INTENT_HARM) - target.visible_message("[chassis] destroys [target] in an unholy fury.", \ - "[chassis] destroys [target] in an unholy fury.") - if(chassis.occupant.a_intent == INTENT_DISARM) - target.visible_message("[chassis] rips [target]'s arms off.", \ - "[chassis] rips [target]'s arms off.") + if(real_clamp) + M.take_overall_damage(dam_force) + if(!M) + return + M.adjustOxyLoss(round(dam_force/2)) + M.updatehealth() + target.visible_message("[chassis] destroys [target] in an unholy fury.", \ + "[chassis] destroys [target] in an unholy fury.") + add_logs(chassis.occupant, M, "attacked", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") + else + target.visible_message("[chassis] destroys [target] in an unholy fury.", \ + "[chassis] destroys [target] in an unholy fury.") + else if(chassis.occupant.a_intent == INTENT_DISARM) + if(real_clamp) + var/mob/living/carbon/C = target + var/play_sound = FALSE + var/limbs_gone = "" + var/obj/item/bodypart/affected = C.get_bodypart(BODY_ZONE_L_ARM) + if(affected != null) + affected.dismember(damtype) + play_sound = TRUE + limbs_gone = ", [affected]" + affected = C.get_bodypart(BODY_ZONE_R_ARM) + if(affected != null) + affected.dismember(damtype) + play_sound = TRUE + limbs_gone = "[limbs_gone], [affected]" + if(play_sound) + playsound(src, get_dismember_sound(), 80, TRUE) + target.visible_message("[chassis] rips [target]'s arms off.", \ + "[chassis] rips [target]'s arms off.") + add_logs(chassis.occupant, M, "dismembered of[limbs_gone],", "[name]", "(INTENT: [uppertext(chassis.occupant.a_intent)]) (DAMTYE: [uppertext(damtype)])") + else + target.visible_message("[chassis] rips [target]'s arms off.", \ + "[chassis] rips [target]'s arms off.") else step_away(M,chassis) target.visible_message("[chassis] tosses [target] like a piece of paper.") diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 89330fa006..6c0795028b 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -193,7 +193,7 @@ //Base ballistic weapon type /obj/item/mecha_parts/mecha_equipment/weapon/ballistic - name = "general ballisic weapon" + name = "general ballistic weapon" fire_sound = 'sound/weapons/gunshot.ogg' var/projectiles var/projectile_energy_cost diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 77b26c4ec0..c1f41ac5c5 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -36,7 +36,7 @@ /obj/machinery/mecha_part_fabricator/Initialize() var/datum/component/material_container/materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 0, - FALSE, list(/obj/item/stack), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) + TRUE, list(/obj/item/stack), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert)) materials.precise_insertion = TRUE stored_research = new return ..() diff --git a/code/game/mecha/mecha_construction_paths.dm b/code/game/mecha/mecha_construction_paths.dm index c6ab4ce2f4..936724af9b 100644 --- a/code/game/mecha/mecha_construction_paths.dm +++ b/code/game/mecha/mecha_construction_paths.dm @@ -225,7 +225,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(11) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") @@ -521,7 +521,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(17) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") @@ -747,7 +747,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(11) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") @@ -1164,7 +1164,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(17) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") @@ -1515,7 +1515,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(20) if(diff==FORWARD) user.visible_message("[user] installs the phase armor layer to [parent].", "You install the phase armor layer to [parent].") @@ -1739,7 +1739,7 @@ if(diff==FORWARD) user.visible_message("[user] secures the power cell.", "You secure the power cell.") else - user.visible_message("[user] prys the power cell from [parent].", "You pry the power cell from [parent].") + user.visible_message("[user] pries the power cell from [parent].", "You pry the power cell from [parent].") if(11) if(diff==FORWARD) user.visible_message("[user] installs the internal armor layer to [parent].", "You install the internal armor layer to [parent].") diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 0daee24925..3f5e4bde66 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -158,12 +158,12 @@ /obj/item/mecha_parts/part/durand_left_leg name = "\improper Durand left leg" - desc = "A Durand left leg. Built particlarly sturdy to support the Durand's heavy weight and defensive needs." + desc = "A Durand left leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs." icon_state = "durand_l_leg" /obj/item/mecha_parts/part/durand_right_leg name = "\improper Durand right leg" - desc = "A Durand right leg. Built particlarly sturdy to support the Durand's heavy weight and defensive needs." + desc = "A Durand right leg. Built particularly sturdy to support the Durand's heavy weight and defensive needs." icon_state = "durand_r_leg" /obj/item/mecha_parts/part/durand_armor diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 1f789281df..645c13292b 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -5,7 +5,7 @@ /obj/structure/mecha_wreckage name = "exosuit wreckage" - desc = "Remains of some unfortunate mecha. Completely unrepairable, but perhaps something can be salvaged." + desc = "Remains of some unfortunate mecha. Completely irreparable, but perhaps something can be salvaged." icon = 'icons/mecha/mecha.dmi' density = TRUE anchored = FALSE diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index 21ecc26905..629de2f697 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -88,6 +88,18 @@ var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill ME.attach(src) +/obj/mecha/working/ripley/deathripley/real + desc = "OH SHIT IT'S THE DEATHSQUAD WE'RE ALL GONNA DIE. FOR REAL" + +/obj/mecha/working/ripley/deathripley/real/Initialize() + . = ..() + for(var/obj/item/mecha_parts/mecha_equipment/E in equipment) + E.detach() + qdel(E) + equipment.Cut() + var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/real + ME.attach(src) + /obj/mecha/working/ripley/mining desc = "An old, dusty mining Ripley." name = "\improper APLU \"Miner\"" diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 3bd1482b3e..9c3df5395f 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -70,7 +70,7 @@ M.throw_alert("buckled", /obj/screen/alert/restrained/buckled) post_buckle_mob(M) - SendSignal(COMSIG_MOVABLE_BUCKLE, M, force) + SEND_SIGNAL(src, COMSIG_MOVABLE_BUCKLE, M, force) return TRUE /obj/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE) @@ -88,7 +88,7 @@ buckled_mob.update_canmove() buckled_mob.clear_alert("buckled") buckled_mobs -= buckled_mob - SendSignal(COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force) + SEND_SIGNAL(src, COMSIG_MOVABLE_UNBUCKLE, buckled_mob, force) post_unbuckle_mob(.) diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm index 035fc845c4..36129f4e4f 100644 --- a/code/game/objects/effects/anomalies.dm +++ b/code/game/objects/effects/anomalies.dm @@ -86,9 +86,6 @@ density = FALSE var/boing = 0 -/obj/effect/anomaly/grav/New() - ..() - /obj/effect/anomaly/grav/anomalyEffect() ..() boing = 1 @@ -121,6 +118,20 @@ A.throw_at(target, 5, 1) boing = 0 +/obj/effect/anomaly/grav/high + var/grav_field + +/obj/effect/anomaly/grav/high/Initialize(mapload, new_lifespan) + . = ..() + setup_grav_field() + +/obj/effect/anomaly/grav/high/proc/setup_grav_field() + grav_field = make_field(/datum/proximity_monitor/advanced/gravity, list("current_range" = 7, "host" = src, "gravity_value" = rand(0,3))) + +/obj/effect/anomaly/grav/high/Destroy() + QDEL_NULL(grav_field) + . = ..() + ///////////////////// /obj/effect/anomaly/flux @@ -131,9 +142,6 @@ var/shockdamage = 20 var/explosive = TRUE -/obj/effect/anomaly/flux/New() - ..() - /obj/effect/anomaly/flux/anomalyEffect() ..() canshock = 1 @@ -179,9 +187,6 @@ icon_state = "bluespace" density = TRUE -/obj/effect/anomaly/bluespace/New() - ..() - /obj/effect/anomaly/bluespace/anomalyEffect() ..() for(var/mob/living/M in range(1,src)) @@ -252,9 +257,6 @@ icon_state = "mustard" var/ticks = 0 -/obj/effect/anomaly/pyro/New() - ..() - /obj/effect/anomaly/pyro/anomalyEffect() ..() ticks++ @@ -287,9 +289,6 @@ icon_state = "bhole3" desc = "That's a nice station you have there. It'd be a shame if something happened to it." -/obj/effect/anomaly/bhole/New() - ..() - /obj/effect/anomaly/bhole/anomalyEffect() ..() if(!isturf(loc)) //blackhole cannot be contained inside anything. Weird stuff might happen diff --git a/code/game/objects/effects/contraband.dm b/code/game/objects/effects/contraband.dm index 31ca7dd307..d76a335888 100644 --- a/code/game/objects/effects/contraband.dm +++ b/code/game/objects/effects/contraband.dm @@ -31,7 +31,7 @@ poster_structure = null . = ..() -// These icon_states may be overriden, but are for mapper's convinence +// These icon_states may be overridden, but are for mapper's convinence /obj/item/poster/random_contraband name = "random contraband poster" poster_type = /obj/structure/sign/poster/contraband/random @@ -127,7 +127,7 @@ // Deny placing posters on currently-diagonal walls, although the wall may change in the future. if (smooth & SMOOTH_DIAGONAL) - for (var/O in our_overlays) + for (var/O in overlays) var/image/I = O if (copytext(I.icon_state, 1, 3) == "d-") return @@ -547,7 +547,7 @@ /obj/structure/sign/poster/official/anniversary_vintage_reprint name = "50th Anniversary Vintage Reprint" - desc = "A reprint of a poster from 2505, commemorating the 50th Aniversery of Nanoposters Manufacturing, a subsidary of Nanotrasen." + desc = "A reprint of a poster from 2505, commemorating the 50th Anniversary of Nanoposters Manufacturing, a subsidiary of Nanotrasen." icon_state = "poster26_legit" /obj/structure/sign/poster/official/fruit_bowl diff --git a/code/game/objects/effects/countdown.dm b/code/game/objects/effects/countdown.dm index 1165ee50a0..8cb48d1874 100644 --- a/code/game/objects/effects/countdown.dm +++ b/code/game/objects/effects/countdown.dm @@ -5,14 +5,14 @@ And maybe we'll come back\n\ To Earth, who can tell?" - var/displayed_text - var/atom/attached_to - color = "#ff0000" - var/text_size = 4 - var/started = FALSE invisibility = INVISIBILITY_OBSERVER anchored = TRUE layer = GHOST_LAYER + color = "#ff0000" // text color + var/text_size = 3 // larger values clip when the displayed text is larger than 2 digits. + var/started = FALSE + var/displayed_text + var/atom/attached_to /obj/effect/countdown/Initialize() . = ..() @@ -135,7 +135,6 @@ /obj/effect/countdown/doomsday name = "doomsday countdown" - text_size = 3 /obj/effect/countdown/doomsday/get_value() var/obj/machinery/doomsday_device/DD = attached_to diff --git a/code/game/objects/effects/effect_system/effects_smoke.dm b/code/game/objects/effects/effect_system/effects_smoke.dm index 472261003f..75aeaa447c 100644 --- a/code/game/objects/effects/effect_system/effects_smoke.dm +++ b/code/game/objects/effects/effect_system/effects_smoke.dm @@ -289,7 +289,7 @@ if(M) more = "[ADMIN_LOOKUPFLW(M)] " message_admins("Smoke: ([whereLink])[contained]. Key: [more ? more : carry.my_atom.fingerprintslast].") - log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last associated key is [carry.my_atom.fingerprintslast].") + log_game("A chemical smoke reaction has taken place in ([where])[contained]. Last touched by [carry.my_atom.fingerprintslast].") else message_admins("Smoke: ([whereLink])[contained]. No associated key.") log_game("A chemical smoke reaction has taken place in ([where])[contained]. No associated key.") diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm index 8453b6438d..49f82e106d 100644 --- a/code/game/objects/effects/effect_system/effects_sparks.dm +++ b/code/game/objects/effects/effect_system/effects_sparks.dm @@ -28,20 +28,20 @@ playsound(src.loc, "sparks", 100, 1) var/turf/T = loc if(isturf(T)) - T.hotspot_expose(1000,100) + T.hotspot_expose(700,5) QDEL_IN(src, 20) /obj/effect/particle_effect/sparks/Destroy() var/turf/T = loc if(isturf(T)) - T.hotspot_expose(1000,100) + T.hotspot_expose(700,1) return ..() /obj/effect/particle_effect/sparks/Move() ..() var/turf/T = loc if(isturf(T)) - T.hotspot_expose(1000,100) + T.hotspot_expose(700,1) /datum/effect_system/spark_spread effect_type = /obj/effect/particle_effect/sparks diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index 2ae4f5e5c5..4bca817e73 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -131,7 +131,7 @@ var/obj/item/twohanded/required/chainsaw/doomslayer/chainsaw = new(victim.loc) add_logs(victim, null, "entered a blood frenzy") - chainsaw.flags_1 |= NODROP_1 + chainsaw.item_flags |= NODROP victim.drop_all_held_items() victim.put_in_hands(chainsaw, forced = TRUE) chainsaw.attack_self(victim) diff --git a/code/game/objects/effects/proximity.dm b/code/game/objects/effects/proximity.dm index 637539e0b1..8cd23f2cf8 100644 --- a/code/game/objects/effects/proximity.dm +++ b/code/game/objects/effects/proximity.dm @@ -1,6 +1,6 @@ /datum/proximity_monitor var/atom/host //the atom we are tracking - var/atom/hasprox_reciever //the atom that will recieve HasProximity calls. + var/atom/hasprox_receiver //the atom that will receive HasProximity calls. var/atom/last_host_loc var/list/checkers //list of /obj/effect/abstract/proximity_checkers var/current_range @@ -16,9 +16,9 @@ /datum/proximity_monitor/proc/SetHost(atom/H,atom/R) if(R) - hasprox_reciever = R - else if(hasprox_reciever == host) //Default case - hasprox_reciever = H + hasprox_receiver = R + else if(hasprox_receiver == host) //Default case + hasprox_receiver = H host = H last_host_loc = host.loc if(movement_tracker) @@ -29,7 +29,7 @@ /datum/proximity_monitor/Destroy() host = null last_host_loc = null - hasprox_reciever = null + hasprox_receiver = null QDEL_LIST(checkers) QDEL_NULL(movement_tracker) return ..() @@ -43,7 +43,7 @@ SetRange(curr_range, TRUE) if(curr_range) testing("HasProx: [host] -> [host]") - hasprox_reciever.HasProximity(host) //if we are processing, we're guaranteed to be a movable + hasprox_receiver.HasProximity(host) //if we are processing, we're guaranteed to be a movable /datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE) if(!force_rebuild && range == current_range) @@ -109,4 +109,4 @@ /obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM) set waitfor = FALSE - monitor.hasprox_reciever.HasProximity(AM) + monitor.hasprox_receiver.HasProximity(AM) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 723852f162..293809efd2 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -142,7 +142,7 @@ return var/obj/machinery/atmospherics/components/unary/vent_pump/exit_vent = pick(vents) if(prob(50)) - visible_message("[src] scrambles into the ventillation ducts!", \ + visible_message("[src] scrambles into the ventilation ducts!", \ "You hear something scampering through the ventilation ducts.") spawn(rand(20,60)) diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 0203cb66c3..7d02d9d383 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -358,6 +358,29 @@ pixel_y = rand(-4,4) animate(src, pixel_y = pixel_y + 32, alpha = 0, time = 25) +/obj/effect/temp_visual/love_heart + name = "love heart" + icon = 'icons/effects/effects.dmi' + icon_state = "heart" + duration = 25 + +/obj/effect/temp_visual/love_heart/Initialize(mapload) + . = ..() + pixel_x = rand(-10,10) + pixel_y = rand(-10,10) + animate(src, pixel_y = pixel_y + 32, alpha = 0, time = duration) + +/obj/effect/temp_visual/love_heart/invisible + icon_state = null + +/obj/effect/temp_visual/love_heart/invisible/Initialize(mapload, mob/seer) + . = ..() + var/image/I = image(icon = 'icons/effects/effects.dmi', icon_state = "heart", layer = ABOVE_MOB_LAYER, loc = src) + add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/onePerson, "heart", I, seer) + I.alpha = 255 + I.appearance_flags = RESET_ALPHA + animate(I, alpha = 0, time = duration) + /obj/effect/temp_visual/bleed name = "bleed" icon = 'icons/effects/bleed.dmi' diff --git a/code/game/objects/effects/temporary_visuals/projectiles/impact.dm b/code/game/objects/effects/temporary_visuals/projectiles/impact.dm index ca7d8ae0d7..abda070f5e 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/impact.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/impact.dm @@ -15,7 +15,7 @@ icon_state = "impact_omni" /obj/effect/projectile/impact/xray - name = "xray impact" + name = "\improper X-ray impact" icon_state = "impact_xray" /obj/effect/projectile/impact/pulse diff --git a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm index f161667843..30dd3dc811 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/projectile_effects.dm @@ -8,7 +8,6 @@ light_range = 2 light_color = "#00ffff" mouse_opacity = MOUSE_OPACITY_TRANSPARENT - flags_1 = ABSTRACT_1 appearance_flags = 0 /obj/effect/projectile/singularity_pull() diff --git a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm index f89674e282..12f56585d9 100644 --- a/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm +++ b/code/game/objects/effects/temporary_visuals/projectiles/tracer.dm @@ -24,7 +24,7 @@ icon_state = "beam_omni" /obj/effect/projectile/tracer/xray - name = "xray laser" + name = "\improper X-ray laser" icon_state = "xray" /obj/effect/projectile/tracer/pulse diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9da8946429..2261cfa2c1 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -137,7 +137,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) stack_trace("Invalid type [embedding.type] found in .embedding during /obj/item Initialize()") /obj/item/Destroy() - flags_1 &= ~DROPDEL_1 //prevent reqdels + item_flags &= ~DROPDEL //prevent reqdels if(ismob(loc)) var/mob/m = loc m.temporarilyRemoveItemFromInventory(src, TRUE) @@ -277,8 +277,17 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(!(interaction_flags_item & INTERACT_ITEM_ATTACK_HAND_PICKUP)) //See if we're supposed to auto pickup. return + //Heavy gravity makes picking up things very slow. + var/grav = user.has_gravity() + if(grav > STANDARD_GRAVITY) + var/grav_power = min(3,grav - STANDARD_GRAVITY) + to_chat(user,"You start picking up [src]...") + if(!do_mob(user,src,30*grav_power)) + return + + //If the item is in a storage item, take it out - loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE) + SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE) if(throwing) throwing.finalize(FALSE) @@ -300,7 +309,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(anchored) return - loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE) + SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, user.loc, TRUE) if(throwing) throwing.finalize(FALSE) @@ -351,14 +360,14 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) for(var/X in actions) var/datum/action/A = X A.Remove(user) - if(DROPDEL_1 & flags_1) + if(item_flags & DROPDEL) qdel(src) item_flags &= ~IN_INVENTORY - SendSignal(COMSIG_ITEM_DROPPED,user) + SEND_SIGNAL(src, COMSIG_ITEM_DROPPED,user) // called just as an item is picked up (loc is not yet changed) /obj/item/proc/pickup(mob/user) - SendSignal(COMSIG_ITEM_PICKUP, user) + SEND_SIGNAL(src, COMSIG_ITEM_PICKUP, user) item_flags |= IN_INVENTORY // called when "found" in pockets and storage items. Returns 1 if the search should end. @@ -371,7 +380,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) // for items that can be placed in multiple slots // note this isn't called during the initial dressing of a player /obj/item/proc/equipped(mob/user, slot) - SendSignal(COMSIG_ITEM_EQUIPPED, user, slot) + SEND_SIGNAL(src, COMSIG_ITEM_EQUIPPED, user, slot) for(var/X in actions) var/datum/action/A = X if(item_action_slot_check(slot, user)) //some items only give their actions buttons when in a specific slot. @@ -472,7 +481,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) else M.take_bodypart_damage(7) - M.SendSignal(COMSIG_ADD_MOOD_EVENT, "eye_stab", /datum/mood_event/eye_stab) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "eye_stab", /datum/mood_event/eye_stab) add_logs(user, M, "attacked", "[src.name]", "(INTENT: [uppertext(user.a_intent)])") @@ -508,7 +517,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) /obj/item/throw_impact(atom/A, datum/thrownthing/throwingdatum) if(A && !QDELETED(A)) - SendSignal(COMSIG_MOVABLE_IMPACT, A, throwingdatum) + SEND_SIGNAL(src, COMSIG_MOVABLE_IMPACT, A, throwingdatum) if(is_hot() && isliving(A)) var/mob/living/L = A L.IgniteMob() @@ -532,8 +541,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) /obj/item/proc/remove_item_from_storage(atom/newLoc) //please use this if you're going to snowflake an item out of a obj/item/storage if(!newLoc) return FALSE - if(loc.SendSignal(COMSIG_CONTAINS_STORAGE)) - return loc.SendSignal(COMSIG_TRY_STORAGE_TAKE, src, newLoc, TRUE) + if(SEND_SIGNAL(loc, COMSIG_CONTAINS_STORAGE)) + return SEND_SIGNAL(loc, COMSIG_TRY_STORAGE_TAKE, src, newLoc, TRUE) return FALSE /obj/item/proc/get_belt_overlay() //Returns the icon used for overlaying the object on a belt @@ -596,7 +605,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) if(success) location = get_turf(M) if(isturf(location)) - location.hotspot_expose(flame_heat, 5) + location.hotspot_expose(flame_heat, 1) /obj/item/proc/ignition_effect(atom/A, mob/user) if(is_hot()) @@ -780,3 +789,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) appearance_flags &= ~NO_CLIENT_COLOR dropped(M) return ..() + +/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, var/datum/callback/callback) + if (item_flags & NODROP) + return + return ..() diff --git a/code/game/objects/items/AI_modules.dm b/code/game/objects/items/AI_modules.dm index 5d41b90dc0..0dfbecf92d 100644 --- a/code/game/objects/items/AI_modules.dm +++ b/code/game/objects/items/AI_modules.dm @@ -193,7 +193,7 @@ AI MODULES /obj/item/aiModule/zeroth/oneHuman/transmitInstructions(datum/ai_laws/law_datum, mob/sender, overflow) if(..()) - return "[targetName], but the AI's existing law 0 cannot be overriden." + return "[targetName], but the AI's existing law 0 cannot be overridden." return targetName diff --git a/code/game/objects/items/RCD.dm b/code/game/objects/items/RCD.dm index 5aeefc2fcd..03225102c2 100644 --- a/code/game/objects/items/RCD.dm +++ b/code/game/objects/items/RCD.dm @@ -15,7 +15,8 @@ RLD opacity = 0 density = FALSE anchored = FALSE - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON force = 0 throwforce = 10 throw_speed = 3 @@ -129,7 +130,7 @@ RLD lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' max_matter = 160 - item_flags = NO_MAT_REDEMPTION + item_flags = NO_MAT_REDEMPTION | NOBLUDGEON has_ammobar = TRUE var/mode = 1 var/ranged = FALSE diff --git a/code/game/objects/items/RSF.dm b/code/game/objects/items/RSF.dm index b894cf8ee5..95638ad5e2 100644 --- a/code/game/objects/items/RSF.dm +++ b/code/game/objects/items/RSF.dm @@ -13,7 +13,7 @@ RSF opacity = 0 density = FALSE anchored = FALSE - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0) var/matter = 0 var/mode = 1 diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index 82c272e7f9..afb2b22076 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -9,7 +9,8 @@ materials = list(MAT_METAL=50, MAT_GLASS=50) - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON slot_flags = ITEM_SLOT_BELT usesound = 'sound/effects/spray2.ogg' diff --git a/code/game/objects/items/cardboard_cutouts.dm b/code/game/objects/items/cardboard_cutouts.dm index bfbb7e67bb..109078f804 100644 --- a/code/game/objects/items/cardboard_cutouts.dm +++ b/code/game/objects/items/cardboard_cutouts.dm @@ -49,7 +49,7 @@ change_appearance(I, user) return // Why yes, this does closely resemble mob and object attack code. - if(I.flags_1 & NOBLUDGEON_1) + if(I.item_flags & NOBLUDGEON) return if(!I.force) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1) diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index 2d30a015e2..227d4b5358 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -78,8 +78,7 @@ item_state = "card-id" lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi' - flags_1 = NOBLUDGEON_1 - item_flags = NO_MAT_REDEMPTION + item_flags = NO_MAT_REDEMPTION | NOBLUDGEON var/prox_check = TRUE //If the emag requires you to be in range /obj/item/card/emag/bluespace @@ -98,7 +97,7 @@ A.emag_act(user) /obj/item/card/emagfake - desc = "It's a card with a magnetic strip attached to some circuitry." + desc = "It's a card with a magnetic strip attached to some circuitry. Closer inspection shows that this card is a poorly made replica, with a \"DonkCo\" logo stamped on the back." name = "cryptographic sequencer" icon_state = "emag" item_state = "card-id" diff --git a/code/game/objects/items/chrono_eraser.dm b/code/game/objects/items/chrono_eraser.dm index d861b515f8..24c48ccecd 100644 --- a/code/game/objects/items/chrono_eraser.dm +++ b/code/game/objects/items/chrono_eraser.dm @@ -48,7 +48,7 @@ icon_state = "chronogun" item_state = "chronogun" w_class = WEIGHT_CLASS_NORMAL - flags_1 = NODROP_1 | DROPDEL_1 + item_flags = NODROP | DROPDEL ammo_type = list(/obj/item/ammo_casing/energy/chrono_beam) can_charge = 0 fire_delay = 50 diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index 15cb7ae0b3..e28d86e7e6 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -575,7 +575,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND user.apply_damage(5, BURN, hitzone) user.visible_message("After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn [user.p_their()] finger in the process.", "You burn yourself while lighting the lighter!") - user.SendSignal(COMSIG_ADD_MOOD_EVENT, "burnt_thumb", /datum/mood_event/burnt_thumb) + SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "burnt_thumb", /datum/mood_event/burnt_thumb) else set_lit(FALSE) diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 6bef0499fd..8d91b3855a 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -215,37 +215,36 @@ name = "Booze-O-Mat Vendor (Machine Board)" desc = "You can turn the \"brand selection\" dial using a screwdriver." build_path = /obj/machinery/vending/boozeomat - req_components = list( - /obj/item/vending_refill/boozeomat = 3) + req_components = list(/obj/item/vending_refill/boozeomat = 1) - var/static/list/vending_names_paths = list(/obj/machinery/vending/boozeomat = "Booze-O-Mat", - /obj/machinery/vending/coffee = "Solar's Best Hot Drinks", - /obj/machinery/vending/snack = "Getmore Chocolate Corp", - /obj/machinery/vending/cola = "Robust Softdrinks", - /obj/machinery/vending/cigarette = "ShadyCigs Deluxe", - /obj/machinery/vending/games = "\improper Good Clean Fun", - /obj/machinery/vending/autodrobe = "AutoDrobe", - /obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe", - /obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe", - /obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe", - /obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe", - /obj/machinery/vending/wardrobe/cargo_wardrobe = "CargoDrobe", - /obj/machinery/vending/wardrobe/robo_wardrobe = "RoboDrobe", - /obj/machinery/vending/wardrobe/science_wardrobe = "SciDrobe", - /obj/machinery/vending/wardrobe/hydro_wardrobe = "HyDrobe", - /obj/machinery/vending/wardrobe/curator_wardrobe = "CuraDrobe", - /obj/machinery/vending/wardrobe/bar_wardrobe = "BarDrobe", - /obj/machinery/vending/wardrobe/chef_wardrobe = "ChefDrobe", - /obj/machinery/vending/wardrobe/jani_wardrobe = "JaniDrobe", - /obj/machinery/vending/wardrobe/law_wardrobe = "LawDrobe", - /obj/machinery/vending/wardrobe/chap_wardrobe = "ChapDrobe", - /obj/machinery/vending/wardrobe/chem_wardrobe = "ChemDrobe", - /obj/machinery/vending/wardrobe/gene_wardrobe = "GeneDrobe", - /obj/machinery/vending/wardrobe/viro_wardrobe = "ViroDrobe", - /obj/machinery/vending/clothing = "ClothesMate", - /obj/machinery/vending/medical = "NanoMed Plus", - /obj/machinery/vending/wallmed = "NanoMed") - needs_anchored = FALSE + var/static/list/vending_names_paths = list( + /obj/machinery/vending/boozeomat = "Booze-O-Mat", + /obj/machinery/vending/coffee = "Solar's Best Hot Drinks", + /obj/machinery/vending/snack = "Getmore Chocolate Corp", + /obj/machinery/vending/cola = "Robust Softdrinks", + /obj/machinery/vending/cigarette = "ShadyCigs Deluxe", + /obj/machinery/vending/games = "\improper Good Clean Fun", + /obj/machinery/vending/autodrobe = "AutoDrobe", + /obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe", + /obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe", + /obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe", + /obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe", + /obj/machinery/vending/wardrobe/cargo_wardrobe = "CargoDrobe", + /obj/machinery/vending/wardrobe/robo_wardrobe = "RoboDrobe", + /obj/machinery/vending/wardrobe/science_wardrobe = "SciDrobe", + /obj/machinery/vending/wardrobe/hydro_wardrobe = "HyDrobe", + /obj/machinery/vending/wardrobe/curator_wardrobe = "CuraDrobe", + /obj/machinery/vending/wardrobe/bar_wardrobe = "BarDrobe", + /obj/machinery/vending/wardrobe/chef_wardrobe = "ChefDrobe", + /obj/machinery/vending/wardrobe/jani_wardrobe = "JaniDrobe", + /obj/machinery/vending/wardrobe/law_wardrobe = "LawDrobe", + /obj/machinery/vending/wardrobe/chap_wardrobe = "ChapDrobe", + /obj/machinery/vending/wardrobe/chem_wardrobe = "ChemDrobe", + /obj/machinery/vending/wardrobe/gene_wardrobe = "GeneDrobe", + /obj/machinery/vending/wardrobe/viro_wardrobe = "ViroDrobe", + /obj/machinery/vending/clothing = "ClothesMate", + /obj/machinery/vending/medical = "NanoMed Plus", + /obj/machinery/vending/wallmed = "NanoMed") /obj/item/circuitboard/machine/vendor/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) @@ -261,7 +260,7 @@ /obj/item/circuitboard/machine/vendor/proc/set_type(obj/machinery/vending/typepath) build_path = typepath name = "[vending_names_paths[build_path]] Vendor (Machine Board)" - req_components = list(initial(typepath.refill_canister) = initial(typepath.refill_count)) + req_components = list(initial(typepath.refill_canister) = 1) /obj/item/circuitboard/machine/vendor/apply_default_parts(obj/machinery/M) for(var/typepath in vending_names_paths) @@ -865,14 +864,14 @@ build_path = /obj/machinery/vending/donksofttoyvendor req_components = list( /obj/item/stack/sheet/glass = 1, - /obj/item/vending_refill/donksoft = 3) + /obj/item/vending_refill/donksoft = 1) /obj/item/circuitboard/machine/vending/syndicatedonksofttoyvendor name = "Syndicate Donksoft Toy Vendor (Machine Board)" build_path = /obj/machinery/vending/toyliberationstation req_components = list( /obj/item/stack/sheet/glass = 1, - /obj/item/vending_refill/donksoft = 3) + /obj/item/vending_refill/donksoft = 1) /obj/item/circuitboard/machine/dish_drive name = "Dish Drive (Machine Board)" diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index cd70ce6732..70b0d93344 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -19,7 +19,7 @@ lefthand_file = 'icons/mob/inhands/equipment/custodial_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' w_class = WEIGHT_CLASS_TINY - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON throwforce = 0 throw_speed = 3 throw_range = 7 @@ -61,7 +61,7 @@ return //I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing. //So this is a workaround. This also makes more sense from an IC standpoint. ~Carn - target.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) + SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) if(user.client && ((target in user.client.screen) && !user.is_holding(target))) to_chat(user, "You need to take that [target.name] off before cleaning it!") else if(istype(target, /obj/effect/decal/cleanable)) @@ -88,7 +88,7 @@ var/obj/effect/decal/cleanable/C = locate() in target qdel(C) target.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - target.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(target, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) target.wash_cream() return @@ -117,7 +117,7 @@ AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50) /obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user) - M.SendSignal(COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk) + SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "honk", /datum/mood_event/honk) return ..() /obj/item/bikehorn/suicide_act(mob/user) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index db86adab07..389934b778 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -19,7 +19,7 @@ GLOBAL_LIST_EMPTY(PDAs) item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_TINY slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 100) @@ -175,12 +175,12 @@ GLOBAL_LIST_EMPTY(PDAs) return attack_self(M) return ..() -/obj/item/pda/attack_self(mob/user) +/obj/item/pda/interact(mob/user) if(!user.IsAdvancedToolUser()) to_chat(user, "You don't have the dexterity to do this!") return - . = ..() + ..() var/datum/asset/spritesheet/assets = get_asset_datum(/datum/asset/spritesheet/simple/pda) assets.send(user) @@ -519,16 +519,11 @@ GLOBAL_LIST_EMPTY(PDAs) if("Ringtone") var/t = input(U, "Please enter new ringtone", name, ttone) as text if(in_range(src, U) && loc == U && t) - GET_COMPONENT(hidden_uplink, /datum/component/uplink) - if(hidden_uplink && (trim(lowertext(t)) == trim(lowertext(lock_code)))) - hidden_uplink.locked = FALSE - hidden_uplink.interact(U) - to_chat(U, "The PDA softly beeps.") + if(SEND_SIGNAL(src, COMSIG_PDA_CHANGE_RINGTONE, U, t) & COMPONENT_STOP_RINGTONE_CHANGE) U << browse(null, "window=pda") - src.mode = 0 + return else - t = copytext(sanitize(t), 1, 20) - ttone = t + ttone = copytext(sanitize(t), 1, 20) else U << browse(null, "window=pda") return diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 4dc5fb166a..217295c872 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -549,7 +549,7 @@ Code: /obj/item/cartridge/Topic(href, href_list) ..() - if (!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr)) + if(!usr.canUseTopic(src, !issilicon(usr))) usr.unset_machine() usr << browse(null, "window=pda") return diff --git a/code/game/objects/items/devices/aicard.dm b/code/game/objects/items/devices/aicard.dm index c1de90f3f0..740f22edb4 100644 --- a/code/game/objects/items/devices/aicard.dm +++ b/code/game/objects/items/devices/aicard.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_BELT - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/flush = FALSE var/mob/living/silicon/ai/AI diff --git a/code/game/objects/items/devices/anomaly_neutralizer.dm b/code/game/objects/items/devices/anomaly_neutralizer.dm index c719059631..ca018a041f 100644 --- a/code/game/objects/items/devices/anomaly_neutralizer.dm +++ b/code/game/objects/items/devices/anomaly_neutralizer.dm @@ -8,7 +8,7 @@ righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' w_class = WEIGHT_CLASS_SMALL slot_flags = ITEM_SLOT_BELT - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON /obj/item/anomaly_neutralizer/afterattack(atom/target, mob/user, proximity) ..() diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index 64a64853b1..e88b906862 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -14,7 +14,7 @@ item_state = "camera_bug" throw_speed = 4 throw_range = 20 - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/obj/machinery/camera/current = null diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 990d6cc038..6544a883f3 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -2,7 +2,8 @@ name = "chameleon-projector" icon = 'icons/obj/device.dmi' icon_state = "shield0" - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON slot_flags = ITEM_SLOT_BELT item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' @@ -49,7 +50,7 @@ return if(iseffect(target)) if(!(istype(target, /obj/effect/decal))) //be a footprint - return + return playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6) to_chat(user, "Scanned [target].") var/obj/temp = new/obj() diff --git a/code/game/objects/items/devices/doorCharge.dm b/code/game/objects/items/devices/doorCharge.dm index 6fa1b9d742..9b009da7a4 100644 --- a/code/game/objects/items/devices/doorCharge.dm +++ b/code/game/objects/items/devices/doorCharge.dm @@ -9,7 +9,7 @@ w_class = WEIGHT_CLASS_SMALL throw_range = 4 throw_speed = 1 - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON force = 3 attack_verb = list("blown up", "exploded", "detonated") materials = list(MAT_METAL=50, MAT_GLASS=30) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 3386b975e3..fee2461760 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -85,7 +85,7 @@ "You direct [src] to [M]'s eyes.") if(M.stat == DEAD || (M.has_trait(TRAIT_BLIND)) || !M.flash_act(visual = 1)) //mob is dead or fully blind to_chat(user, "[M]'s pupils don't react to the light!") - else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-RAY vision + else if(M.dna && M.dna.check_mutation(XRAY)) //mob has X-ray vision to_chat(user, "[M]'s pupils give an eerie glow!") else //they're okay! to_chat(user, "[M]'s pupils narrow.") @@ -399,6 +399,11 @@ to_chat(user, "\The [src] needs time to recharge!") return +/obj/item/flashlight/emp/debug //for testing emp_act() + name = "debug EMP flashlight" + emp_max_charges = 100 + emp_cur_charges = 100 + // Glowsticks, in the uncomfortable range of similar to flares, // but not similar enough to make it worth a refactor /obj/item/flashlight/glowstick @@ -530,5 +535,6 @@ desc = "This shouldn't exist outside of someone's head, how are you seeing this?" brightness_on = 15 flashlight_power = 1 - flags_1 = CONDUCT_1 | DROPDEL_1 + flags_1 = CONDUCT_1 + item_flags = DROPDEL actions_types = list() diff --git a/code/game/objects/items/devices/forcefieldprojector.dm b/code/game/objects/items/devices/forcefieldprojector.dm index bb0914eeec..d8dce7c427 100644 --- a/code/game/objects/items/devices/forcefieldprojector.dm +++ b/code/game/objects/items/devices/forcefieldprojector.dm @@ -5,7 +5,7 @@ icon_state = "signmaker_engi" slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON item_state = "electronic" lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' @@ -105,4 +105,4 @@ /obj/structure/projected_forcefield/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) if(sound_effect) play_attack_sound(damage_amount, damage_type, damage_flag) - generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0) \ No newline at end of file + generator.shield_integrity = max(generator.shield_integrity - damage_amount, 0) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index 1b4bb55f99..fb4f4f8566 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -9,7 +9,7 @@ #define RAD_GRACE_PERIOD 2 /obj/item/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis - name = "geiger counter" + name = "\improper Geiger counter" desc = "A handheld device used for detecting and measuring radiation pulses." icon = 'icons/obj/device.dmi' icon_state = "geiger_off" diff --git a/code/game/objects/items/devices/gps.dm b/code/game/objects/items/devices/gps.dm index 9bdd01ad77..c362d9f7f2 100644 --- a/code/game/objects/items/devices/gps.dm +++ b/code/game/objects/items/devices/gps.dm @@ -34,7 +34,7 @@ GLOBAL_LIST_EMPTY(GPS_list) emped = TRUE cut_overlay("working") add_overlay("emp") - addtimer(CALLBACK(src, .proc/reboot), 300, TIMER_OVERRIDE) //if a new EMP happens, remove the old timer so it doesn't reactivate early + addtimer(CALLBACK(src, .proc/reboot), 300, TIMER_UNIQUE|TIMER_OVERRIDE) //if a new EMP happens, remove the old timer so it doesn't reactivate early SStgui.close_uis(src) //Close the UI control if it is open. /obj/item/gps/proc/reboot() @@ -156,11 +156,11 @@ GLOBAL_LIST_EMPTY(GPS_list) icon_state = "gps-b" 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_1 = NODROP_1 + item_flags = NODROP /obj/item/gps/internal icon_state = null - flags_1 = ABSTRACT_1 + item_flags = ABSTRACT gpstag = "Eerie Signal" desc = "Report to a coder immediately." invisibility = INVISIBILITY_MAXIMUM diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 32a266dbfb..f9ea6a6be4 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -5,7 +5,8 @@ icon_state = "pointer" item_state = "pen" var/pointer_icon_state - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON slot_flags = ITEM_SLOT_BELT materials = list(MAT_METAL=500, MAT_GLASS=500) w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 750e2a9a9b..a59fa11fa6 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -41,7 +41,7 @@ /obj/item/lightreplacer name = "light replacer" - desc = "A device to automatically replace lights. Refill with broken or working lightbulbs, or sheets of glass." + desc = "A device to automatically replace lights. Refill with broken or working light bulbs, or sheets of glass." icon = 'icons/obj/janitor.dmi' icon_state = "lightreplacer0" diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index e11cebdf51..43c2b06d44 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -60,7 +60,7 @@ to_chat(user, "Wiring \the [selected_io.holder]'s [selected_io.name] into itself is rather pointless.") return if(io.io_type != selected_io.io_type) - to_chat(user, "Those two types of channels are incompatable. The first is a [selected_io.io_type], \ + to_chat(user, "Those two types of channels are incompatible. The first is a [selected_io.io_type], \ while the second is a [io.io_type].") return if(io.holder.assembly && io.holder.assembly != selected_io.holder.assembly) diff --git a/code/game/objects/items/devices/paicard.dm b/code/game/objects/items/devices/paicard.dm index 737f71a978..0867033aad 100644 --- a/code/game/objects/items/devices/paicard.dm +++ b/code/game/objects/items/devices/paicard.dm @@ -155,5 +155,5 @@ . = ..() if (. & EMP_PROTECT_SELF) return - if(pai) + if(pai && !pai.holoform) pai.emp_act(severity) diff --git a/code/game/objects/items/devices/pipe_painter.dm b/code/game/objects/items/devices/pipe_painter.dm index a13de183a0..6415b105b5 100644 --- a/code/game/objects/items/devices/pipe_painter.dm +++ b/code/game/objects/items/devices/pipe_painter.dm @@ -3,7 +3,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "labeler1" item_state = "flight" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/paint_color = "grey" materials = list(MAT_METAL=5000, MAT_GLASS=2000) diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index 1734fa5bfb..2f8b111b4b 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -53,8 +53,8 @@ user.put_in_hands(A) A.add_fingerprint(user) - if(src.flags_1 & NODROP_1) - A.flags_1 |= NODROP_1 + if(item_flags & NODROP) + A.item_flags |= NODROP else return ..() diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index b4783d059e..6a6d34340e 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -47,6 +47,7 @@ return BRUTELOSS /obj/item/radio/proc/set_frequency(new_frequency) + SEND_SIGNAL(src, COMSIG_RADIO_NEW_FREQUENCY, args) remove_radio(src, frequency) frequency = add_radio(src, new_frequency) @@ -100,12 +101,11 @@ AddComponent(/datum/component/empprotection, EMP_PROTECT_WIRES) /obj/item/radio/interact(mob/user) - if (..()) - return if(unscrewed && !isAI(user)) wires.interact(user) + add_fingerprint(user) else - ui_interact(user) + ..() /obj/item/radio/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \ datum/tgui/master_ui = null, datum/ui_state/state = GLOB.inventory_state) @@ -160,13 +160,7 @@ tune = tune * 10 . = TRUE if(.) - frequency = sanitize_frequency(tune, freerange) - set_frequency(frequency) - GET_COMPONENT(hidden_uplink, /datum/component/uplink) - if(hidden_uplink && (frequency == traitor_frequency)) - hidden_uplink.locked = FALSE - hidden_uplink.interact(usr) - ui.close() + set_frequency(sanitize_frequency(tune, freerange)) if("listen") listening = !listening . = TRUE diff --git a/code/game/objects/items/devices/reverse_bear_trap.dm b/code/game/objects/items/devices/reverse_bear_trap.dm index 4dc8d04267..2f137861aa 100644 --- a/code/game/objects/items/devices/reverse_bear_trap.dm +++ b/code/game/objects/items/devices/reverse_bear_trap.dm @@ -49,7 +49,7 @@ if(iscarbon(user)) var/mob/living/carbon/C = user if(C.get_item_by_slot(SLOT_HEAD) == src) - if(flags_1 & NODROP_1 && !struggling) + if((item_flags & NODROP) && !struggling) struggling = TRUE var/fear_string switch(time_left) @@ -74,7 +74,7 @@ else user.visible_message("The lock on [user]'s [name] pops open!", \ "You force open the padlock!", "You hear a single, pronounced click!") - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP struggling = FALSE else ..() @@ -116,7 +116,7 @@ /obj/item/reverse_bear_trap/proc/reset() ticking = FALSE - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP soundloop.stop() soundloop2.stop() STOP_PROCESSING(SSprocessing, src) @@ -125,7 +125,7 @@ ticking = TRUE escape_chance = initial(escape_chance) //we keep these vars until re-arm, for tracking purposes time_left = initial(time_left) - flags_1 |= NODROP_1 + item_flags |= NODROP soundloop.start() soundloop2.mid_length = initial(soundloop2.mid_length) soundloop2.start() diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 327af15f43..6acff297c9 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -68,7 +68,8 @@ SLIME SCANNER lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' desc = "A hand-held body scanner able to distinguish vital signs of the subject." - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON slot_flags = ITEM_SLOT_BELT throwforce = 3 w_class = WEIGHT_CLASS_TINY @@ -256,7 +257,32 @@ SLIME SCANNER // Species and body temperature if(ishuman(M)) var/mob/living/carbon/human/H = M - to_chat(user, "Species: [H.dna.species.name]") + var/datum/species/S = H.dna.species + var/mutant = FALSE + if (H.dna.check_mutation(HULK)) + mutant = TRUE + else if (S.mutantlungs != initial(S.mutantlungs)) + mutant = TRUE + else if (S.mutant_brain != initial(S.mutant_brain)) + mutant = TRUE + else if (S.mutant_heart != initial(S.mutant_heart)) + mutant = TRUE + else if (S.mutanteyes != initial(S.mutanteyes)) + mutant = TRUE + else if (S.mutantears != initial(S.mutantears)) + mutant = TRUE + else if (S.mutanthands != initial(S.mutanthands)) + mutant = TRUE + else if (S.mutanttongue != initial(S.mutanttongue)) + mutant = TRUE + else if (S.mutanttail != initial(S.mutanttail)) + mutant = TRUE + else if (S.mutantliver != initial(S.mutantliver)) + mutant = TRUE + else if (S.mutantstomach != initial(S.mutantstomach)) + mutant = TRUE + + to_chat(user, "Species: [S.name][mutant ? "-derived mutant" : ""]") to_chat(user, "Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)") // Time of death @@ -348,7 +374,8 @@ SLIME SCANNER lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' w_class = WEIGHT_CLASS_SMALL - flags_1 = CONDUCT_1 | NOBLUDGEON_1 + flags_1 = CONDUCT_1 + item_flags = NOBLUDGEON slot_flags = ITEM_SLOT_BELT throwforce = 0 throw_speed = 3 @@ -428,7 +455,7 @@ SLIME SCANNER if(user.canUseTopic(src)) if(cooldown) - to_chat(user, "[src]'s barometer function is prepraring itself.") + to_chat(user, "[src]'s barometer function is preparing itself.") return var/turf/T = get_turf(user) @@ -575,4 +602,4 @@ SLIME SCANNER if(T.effectmod) to_chat(user, "Core mutation in progress: [T.effectmod]") to_chat(user, "Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]") - to_chat(user, "========================") \ No newline at end of file + to_chat(user, "========================") diff --git a/code/game/objects/items/dice.dm b/code/game/objects/items/dice.dm index a944230925..cb0d4ec4ac 100644 --- a/code/game/objects/items/dice.dm +++ b/code/game/objects/items/dice.dm @@ -36,7 +36,7 @@ /obj/item/dice //depreciated d6, use /obj/item/dice/d6 if you actually want a d6 name = "die" - desc = "A die with six sides. Basic and servicable." + desc = "A die with six sides. Basic and serviceable." icon = 'icons/obj/dice.dmi' icon_state = "d6" w_class = WEIGHT_CLASS_TINY @@ -111,7 +111,7 @@ /obj/item/dice/d00 name = "d00" - desc = "A die with ten sides. Works better for d100 rolls than a golfball." + desc = "A die with ten sides. Works better for d100 rolls than a golf ball." icon_state = "d00" sides = 10 @@ -123,7 +123,7 @@ /obj/item/dice/d20 name = "d20" - desc = "A die with twenty sides. The prefered die to throw at the GM." + desc = "A die with twenty sides. The preferred die to throw at the GM." icon_state = "d20" sides = 20 diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index a4b9cf708b..ebae70ca05 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -98,12 +98,12 @@ add_mutations_static = list(HULK) /obj/item/dnainjector/xraymut - name = "\improper DNA injector (Xray)" + name = "\improper DNA injector (X-ray)" desc = "Finally you can see what the Captain does." add_mutations_static = list(XRAY) /obj/item/dnainjector/antixray - name = "\improper DNA injector (Anti-Xray)" + name = "\improper DNA injector (Anti-X-ray)" desc = "It will make you see harder." remove_mutations_static = list(XRAY) @@ -160,7 +160,7 @@ /obj/item/dnainjector/antitour name = "\improper DNA injector (Anti-Tour.)" - desc = "Will cure tourrets." + desc = "Will cure Tourette's." remove_mutations_static = list(TOURETTES) /obj/item/dnainjector/tourmut diff --git a/code/game/objects/items/gift.dm b/code/game/objects/items/gift.dm index a09d39072d..af88c74e65 100644 --- a/code/game/objects/items/gift.dm +++ b/code/game/objects/items/gift.dm @@ -95,7 +95,7 @@ GLOBAL_LIST_EMPTY(possible_gifts) var/list/gift_types_list = subtypesof(/obj/item) for(var/V in gift_types_list) var/obj/item/I = V - if((!initial(I.icon_state)) || (!initial(I.item_state)) || (initial(I.flags_1) & ABSTRACT_1)) + if((!initial(I.icon_state)) || (!initial(I.item_state)) || (initial(I.item_flags) & ABSTRACT)) gift_types_list -= V GLOB.possible_gifts = gift_types_list var/gift_type = pick(GLOB.possible_gifts) diff --git a/code/game/objects/items/granters.dm b/code/game/objects/items/granters.dm index 3542afa00e..3699545b41 100644 --- a/code/game/objects/items/granters.dm +++ b/code/game/objects/items/granters.dm @@ -32,7 +32,7 @@ /obj/item/book/granter/action var/granted_action - var/actionname = "catching bugs" //might not seem needed but this makes it so you can safely name aciton buttons toggle this or that without it fucking up the granter, also caps + var/actionname = "catching bugs" //might not seem needed but this makes it so you can safely name action buttons toggle this or that without it fucking up the granter, also caps /obj/item/book/granter/action/attack_self(mob/user) . = ..() @@ -73,7 +73,7 @@ /datum/action/innate/drink_fling name = "Drink Flinging" - desc = "Toggles your ability to satifyingly throw glasses without spilling them." + desc = "Toggles your ability to satisfyingly throw glasses without spilling them." button_icon_state = "drinkfling_off" check_flags = 0 @@ -151,7 +151,7 @@ spellname = "sacred flame" icon_state ="booksacredflame" desc = "Become one with the flames that burn within... and invite others to do so as well." - remarks = list("Well, it's one way to stop an attacker...", "I'm gonna need some good gear to stop myself from burning to death...", "Keep a fire extingusher handy, got it...", "I think I just burned my hand...", "Apply flame directly to chest for proper ignition...", "No pain, no gain...", "One with the flame...") + remarks = list("Well, it's one way to stop an attacker...", "I'm gonna need some good gear to stop myself from burning to death...", "Keep a fire extinguisher handy, got it...", "I think I just burned my hand...", "Apply flame directly to chest for proper ignition...", "No pain, no gain...", "One with the flame...") /obj/item/book/granter/spell/smoke spell = /obj/effect/proc_holder/spell/targeted/smoke @@ -222,7 +222,7 @@ spellname = "forcewall" icon_state ="bookforcewall" desc = "This book has a dedication to mimes everywhere inside the front cover." - remarks = list("I can go through the wall! Neat.", "Why are there so many mime references...?", "This would cause much grief in a hallway...", "This is some suprisingly strong magic to create a wall nobody can pass through...", "Why the dumb stance? It's just a flick of the hand...", "Why are the pages so hard to turn, is this even paper?", "I can't mo Oh, i'm fine...") + remarks = list("I can go through the wall! Neat.", "Why are there so many mime references...?", "This would cause much grief in a hallway...", "This is some surprisingly strong magic to create a wall nobody can pass through...", "Why the dumb stance? It's just a flick of the hand...", "Why are the pages so hard to turn, is this even paper?", "I can't mo Oh, i'm fine...") /obj/item/book/granter/spell/forcewall/recoil(mob/living/user) ..() @@ -253,7 +253,7 @@ if(ishuman(user)) to_chat(user,"HORSIE HAS RISEN") var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead - magichead.flags_1 |= NODROP_1 //curses! + magichead.item_flags |= NODROP //curses! magichead.flags_inv &= ~HIDEFACE //so you can still see their face magichead.voicechange = TRUE //NEEEEIIGHH if(!user.dropItemToGround(user.wear_mask)) diff --git a/code/game/objects/items/grenades/antigravity.dm b/code/game/objects/items/grenades/antigravity.dm new file mode 100644 index 0000000000..43b2f94986 --- /dev/null +++ b/code/game/objects/items/grenades/antigravity.dm @@ -0,0 +1,17 @@ +/obj/item/grenade/antigravity + name = "antigravity grenade" + icon_state = "emp" + item_state = "emp" + + var/range = 7 + var/forced_value = 0 + var/duration = 300 + +/obj/item/grenade/antigravity/prime() + update_mob() + + for(var/turf/T in view(range,src)) + var/datum/component/C = T.AddComponent(/datum/component/forced_gravity,forced_value) + QDEL_IN(C,duration) + + qdel(src) diff --git a/code/game/objects/items/grenades/chem_grenade.dm b/code/game/objects/items/grenades/chem_grenade.dm index bed7ba24e4..c961fca9f2 100644 --- a/code/game/objects/items/grenades/chem_grenade.dm +++ b/code/game/objects/items/grenades/chem_grenade.dm @@ -75,6 +75,9 @@ return to_chat(user, "You add [I] to the [initial(name)] assembly.") beakers += I + var/reagent_list = pretty_string_from_reagent_list(I.reagents) + add_logs(user, src, "inserted [I]", addition = "[reagent_list] inside.") + log_game("[key_name(user)] inserted [I] into [src] containing [reagent_list] ") else to_chat(user, "[I] is empty!") @@ -111,6 +114,11 @@ if(beakers.len) for(var/obj/O in beakers) O.forceMove(drop_location()) + if(!O.reagents) + continue + var/reagent_list = pretty_string_from_reagent_list(O.reagents) + add_logs(user, src, "removed [O]", addition = "[reagent_list] inside.") + log_game("[key_name(user)] removed [O] from [src] containing [reagent_list]") beakers = list() to_chat(user, "You open the [initial(name)] assembly and remove the payload.") return // First use of the wrench remove beakers, then use the wrench to remove the activation mechanism. @@ -155,6 +163,20 @@ if(nadeassembly) nadeassembly.on_found(finder) +/obj/item/grenade/chem_grenade/log_grenade(mob/user, turf/T) + ..() + var/reagent_string = "" + var/beaker_number = 1 + for(var/obj/exploded_beaker in beakers) + if(!exploded_beaker.reagents) + continue + reagent_string += "[exploded_beaker] [beaker_number++] : " + pretty_string_from_reagent_list(exploded_beaker.reagents.reagent_list) + ";" + var/message = "[src] primed by [user] at [ADMIN_VERBOSEJMP(T)] contained [reagent_string]." + GLOB.bombers += message + message_admins(message) + log_game("[src] primed by [user] at [AREACOORD(T)] contained [reagent_string].") + add_logs(user, src, "primed", addition = "[reagent_string] inside.") + /obj/item/grenade/chem_grenade/prime() if(stage != READY) return diff --git a/code/game/objects/items/grenades/clusterbuster.dm b/code/game/objects/items/grenades/clusterbuster.dm index e0a9956f9a..923361de3c 100644 --- a/code/game/objects/items/grenades/clusterbuster.dm +++ b/code/game/objects/items/grenades/clusterbuster.dm @@ -2,7 +2,7 @@ //Clusterbang //////////////////// /obj/item/grenade/clusterbuster - desc = "Use of this weapon may constiute a war crime in your area, consult your local captain." + desc = "Use of this weapon may constitute a war crime in your area, consult your local captain." name = "clusterbang" icon = 'icons/obj/grenade.dmi' icon_state = "clusterbang" diff --git a/code/game/objects/items/grenades/flashbang.dm b/code/game/objects/items/grenades/flashbang.dm index c7b9656dad..ef410ff84b 100644 --- a/code/game/objects/items/grenades/flashbang.dm +++ b/code/game/objects/items/grenades/flashbang.dm @@ -12,7 +12,6 @@ return for(var/mob/living/M in get_hearers_in_view(7, flashbang_turf)) bang(get_turf(M), M) - qdel(src) /obj/item/grenade/flashbang/proc/bang(turf/T , mob/living/M) diff --git a/code/game/objects/items/grenades/plastic.dm b/code/game/objects/items/grenades/plastic.dm index 8e96e97389..37dc206099 100644 --- a/code/game/objects/items/grenades/plastic.dm +++ b/code/game/objects/items/grenades/plastic.dm @@ -5,7 +5,8 @@ item_state = "plastic-explosive" lefthand_file = 'icons/mob/inhands/weapons/bombs_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/bombs_righthand.dmi' - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON + flags_1 = NONE det_time = 10 display_timer = 0 w_class = WEIGHT_CLASS_SMALL @@ -217,7 +218,7 @@ return if(loc == AM) return - if(AM.SendSignal(COMSIG_CONTAINS_STORAGE) && !AM.SendSignal(COMSIG_IS_STORAGE_LOCKED)) + if(SEND_SIGNAL(AM, COMSIG_CONTAINS_STORAGE) && !SEND_SIGNAL(AM, COMSIG_IS_STORAGE_LOCKED)) return to_chat(user, "You start planting the bomb...") diff --git a/code/game/objects/items/grenades/syndieminibomb.dm b/code/game/objects/items/grenades/syndieminibomb.dm index b05da3ab0a..d457224e95 100644 --- a/code/game/objects/items/grenades/syndieminibomb.dm +++ b/code/game/objects/items/grenades/syndieminibomb.dm @@ -13,7 +13,7 @@ /obj/item/grenade/syndieminibomb/concussion name = "HE Grenade" - desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction." + desc = "A compact shrapnel grenade meant to devastate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction." icon_state = "concussion" /obj/item/grenade/syndieminibomb/concussion/prime() diff --git a/code/game/objects/items/handcuffs.dm b/code/game/objects/items/handcuffs.dm index 735bcaeb27..2ed152ee21 100644 --- a/code/game/objects/items/handcuffs.dm +++ b/code/game/objects/items/handcuffs.dm @@ -297,7 +297,8 @@ armed = 1 icon_state = "e_snare" trap_damage = 0 - flags_1 = DROPDEL_1 + item_flags = DROPDEL + flags_1 = NONE /obj/item/restraints/legcuffs/beartrap/energy/New() ..() @@ -361,4 +362,4 @@ var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/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/his_grace.dm b/code/game/objects/items/his_grace.dm index d13d6cc1dd..ed5e763874 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -86,7 +86,7 @@ do_attack_animation(master, null, src) master.emote("scream") master.remove_status_effect(STATUS_EFFECT_HISGRACE) - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP master.Knockdown(60) master.adjustBruteLoss(master.maxHealth) playsound(master, 'sound/effects/splat.ogg', 100, 0) @@ -170,20 +170,20 @@ update_stats() /obj/item/his_grace/proc/update_stats() - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP var/mob/living/master = get_atom_on_turf(src, /mob/living) switch(bloodthirst) if(HIS_GRACE_CONSUME_OWNER to HIS_GRACE_FALL_ASLEEP) if(HIS_GRACE_CONSUME_OWNER > prev_bloodthirst) master.visible_message("[src] enters a frenzy!") if(HIS_GRACE_STARVING to HIS_GRACE_CONSUME_OWNER) - flags_1 |= NODROP_1 + item_flags |= NODROP if(HIS_GRACE_STARVING > prev_bloodthirst) master.visible_message("[src] is starving!", "[src]'s bloodlust overcomes you. [src] must be fed, or you will become His meal.\ [force_bonus < 15 ? " And still, His power grows.":""]") force_bonus = max(force_bonus, 15) if(HIS_GRACE_FAMISHED to HIS_GRACE_STARVING) - flags_1 |= NODROP_1 + item_flags |= NODROP if(HIS_GRACE_FAMISHED > prev_bloodthirst) master.visible_message("[src] is very hungry!", "Spines sink into your hand. [src] must feed immediately.\ [force_bonus < 10 ? " His power grows.":""]") diff --git a/code/game/objects/items/holosign_creator.dm b/code/game/objects/items/holosign_creator.dm index 48504d6e3c..654afba29d 100644 --- a/code/game/objects/items/holosign_creator.dm +++ b/code/game/objects/items/holosign_creator.dm @@ -11,7 +11,7 @@ throwforce = 0 throw_speed = 3 throw_range = 7 - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/list/signs = list() var/max_signs = 10 var/creation_time = 0 //time to create a holosign in deciseconds. @@ -122,4 +122,3 @@ for(var/H in signs) qdel(H) to_chat(user, "You clear all active holograms.") - diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index f79c9ad0e8..4c38752e28 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -229,7 +229,7 @@ righthand_file = 'icons/mob/inhands/items_righthand.dmi' name = "god hand" desc = "This hand of yours glows with an awesome power!" - flags_1 = ABSTRACT_1 | NODROP_1 | DROPDEL_1 + item_flags = ABSTRACT | NODROP | DROPDEL w_class = WEIGHT_CLASS_HUGE hitsound = 'sound/weapons/sear.ogg' damtype = BURN @@ -307,7 +307,7 @@ slot_flags = ITEM_SLOT_BELT /obj/item/nullrod/claymore/katana - name = "hanzo steel" + name = "\improper Hanzo steel" desc = "Capable of cutting clean through a holy claymore." icon_state = "katana" item_state = "katana" @@ -449,7 +449,6 @@ name = "possessed chainsaw sword" desc = "Suffer not a heretic to live." slot_flags = ITEM_SLOT_BELT - force = 30 attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' @@ -473,7 +472,7 @@ lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' w_class = WEIGHT_CLASS_HUGE - flags_1 = NODROP_1 | ABSTRACT_1 + item_flags = NODROP | ABSTRACT sharpness = IS_SHARP attack_verb = list("sawed", "torn", "cut", "chopped", "diced") hitsound = 'sound/weapons/chainsawhit.ogg' @@ -544,7 +543,7 @@ item_state = "arm_blade" lefthand_file = 'icons/mob/inhands/antag/changeling_lefthand.dmi' righthand_file = 'icons/mob/inhands/antag/changeling_righthand.dmi' - flags_1 = ABSTRACT_1 | NODROP_1 + item_flags = ABSTRACT | NODROP w_class = WEIGHT_CLASS_HUGE sharpness = IS_SHARP diff --git a/code/game/objects/items/hot_potato.dm b/code/game/objects/items/hot_potato.dm index de22ac8125..eefa302032 100644 --- a/code/game/objects/items/hot_potato.dm +++ b/code/game/objects/items/hot_potato.dm @@ -4,7 +4,7 @@ desc = "A label on the side of this potato reads \"Product of DonkCo Service Wing. Activate far away from populated areas. Device will only attach to sapient creatures.\" You can attack anyone with it to force it on them instead of yourself!" icon = 'icons/obj/hydroponics/harvest.dmi' icon_state = "potato" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON force = 0 var/icon_off = "potato" var/icon_on = "potato_active" @@ -133,7 +133,7 @@ return update_icon() if(sticky) - flags_1 |= NODROP_1 + item_flags |= NODROP name = "primed [name]" activation_time = timer + world.time detonation_timerid = addtimer(CALLBACK(src, .proc/detonate), delay, TIMER_STOPPABLE) @@ -146,7 +146,7 @@ /obj/item/hot_potato/proc/deactivate() update_icon() name = initial(name) - flags_1 &= ~NODROP_1 + item_flags &= ~NODROP deltimer(detonation_timerid) STOP_PROCESSING(SSfastprocess, src) detonation_timerid = null diff --git a/code/game/objects/items/implants/implant.dm b/code/game/objects/items/implants/implant.dm index d1ff075ef2..7184b956f5 100644 --- a/code/game/objects/items/implants/implant.dm +++ b/code/game/objects/items/implants/implant.dm @@ -8,7 +8,7 @@ item_color = "b" var/allow_multiple = FALSE var/uses = -1 - flags_1 = DROPDEL_1 + item_flags = DROPDEL /obj/item/implant/proc/trigger(emote, mob/living/carbon/source) @@ -18,7 +18,7 @@ return /obj/item/implant/proc/activate() - return + SEND_SIGNAL(src, COMSIG_IMPLANT_ACTIVATED) /obj/item/implant/ui_action_click() activate("action_button") @@ -41,12 +41,26 @@ //return 1 if the implant injects //return 0 if there is no room for implant / it fails /obj/item/implant/proc/implant(mob/living/target, mob/user, silent = FALSE) + if(SEND_SIGNAL(src, COMSIG_IMPLANT_IMPLANTING, args) & COMPONENT_STOP_IMPLANTING) + return LAZYINITLIST(target.implants) if(!target.can_be_implanted() || !can_be_implanted_in(target)) - return 0 + return FALSE for(var/X in target.implants) - if(istype(X, type)) - var/obj/item/implant/imp_e = X + var/obj/item/implant/imp_e = X + var/flags = SEND_SIGNAL(imp_e, COMSIG_IMPLANT_OTHER, args, src) + if(flags & COMPONENT_DELETE_NEW_IMPLANT) + UNSETEMPTY(target.implants) + qdel(src) + return TRUE + if(flags & COMPONENT_DELETE_OLD_IMPLANT) + qdel(imp_e) + continue + if(flags & COMPONENT_STOP_IMPLANTING) + UNSETEMPTY(target.implants) + return FALSE + + if(istype(imp_e, type)) if(!allow_multiple) if(imp_e.uses < initial(imp_e.uses)*2) if(uses == -1) @@ -54,9 +68,9 @@ else imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2) qdel(src) - return 1 + return TRUE else - return 0 + return FALSE forceMove(target) imp_in = target @@ -72,7 +86,7 @@ if(user) add_logs(user, target, "implanted", "\a [name]") - return 1 + return TRUE /obj/item/implant/proc/removed(mob/living/source, silent = FALSE, special = 0) moveToNullspace() diff --git a/code/game/objects/items/implants/implant_abductor.dm b/code/game/objects/items/implants/implant_abductor.dm index 3ba1e7315f..0c50beadea 100644 --- a/code/game/objects/items/implants/implant_abductor.dm +++ b/code/game/objects/items/implants/implant_abductor.dm @@ -8,6 +8,7 @@ var/cooldown = 30 /obj/item/implant/abductor/activate() + . = ..() if(cooldown == initial(cooldown)) home.Retrieve(imp_in,1) cooldown = 0 diff --git a/code/game/objects/items/implants/implant_chem.dm b/code/game/objects/items/implants/implant_chem.dm index 88b7e032f3..b9c85c0728 100644 --- a/code/game/objects/items/implants/implant_chem.dm +++ b/code/game/objects/items/implants/implant_chem.dm @@ -37,6 +37,7 @@ activate(reagents.total_volume) /obj/item/implant/chem/activate(cause) + . = ..() if(!cause || !imp_in) return 0 var/mob/living/carbon/R = imp_in diff --git a/code/game/objects/items/implants/implant_explosive.dm b/code/game/objects/items/implants/implant_explosive.dm index 5aa0e31d08..e749a6c4be 100644 --- a/code/game/objects/items/implants/implant_explosive.dm +++ b/code/game/objects/items/implants/implant_explosive.dm @@ -27,6 +27,7 @@ return dat /obj/item/implant/explosive/activate(cause) + . = ..() if(!cause || !imp_in || active) return 0 if(cause == "action_button" && !popup) diff --git a/code/game/objects/items/implants/implant_freedom.dm b/code/game/objects/items/implants/implant_freedom.dm index 4ba04c9479..f3e66d2c08 100644 --- a/code/game/objects/items/implants/implant_freedom.dm +++ b/code/game/objects/items/implants/implant_freedom.dm @@ -7,6 +7,7 @@ /obj/item/implant/freedom/activate() + . = ..() uses-- to_chat(imp_in, "You feel a faint click.") if(iscarbon(imp_in)) diff --git a/code/game/objects/items/implants/implant_krav_maga.dm b/code/game/objects/items/implants/implant_krav_maga.dm index c2d7d44249..3a751ecd0e 100644 --- a/code/game/objects/items/implants/implant_krav_maga.dm +++ b/code/game/objects/items/implants/implant_krav_maga.dm @@ -15,6 +15,7 @@ return dat /obj/item/implant/krav_maga/activate() + . = ..() var/mob/living/carbon/human/H = imp_in if(!ishuman(H)) return diff --git a/code/game/objects/items/implants/implant_misc.dm b/code/game/objects/items/implants/implant_misc.dm index f17be453f4..24ee6d0966 100644 --- a/code/game/objects/items/implants/implant_misc.dm +++ b/code/game/objects/items/implants/implant_misc.dm @@ -31,6 +31,7 @@ return dat /obj/item/implant/adrenalin/activate() + . = ..() uses-- to_chat(imp_in, "You feel a sudden surge of energy!") imp_in.SetStun(0) @@ -54,6 +55,7 @@ uses = 3 /obj/item/implant/emp/activate() + . = ..() uses-- empulse(imp_in, 3, 5) if(!uses) @@ -88,6 +90,7 @@ icon_state = "walkietalkie" /obj/item/implant/radio/activate() + . = ..() // needs to be GLOB.deep_inventory_state otherwise it won't open radio.ui_interact(usr, "main", null, FALSE, null, GLOB.deep_inventory_state) diff --git a/code/game/objects/items/implants/implant_storage.dm b/code/game/objects/items/implants/implant_storage.dm index 787c246ddf..ec6b4d64c3 100644 --- a/code/game/objects/items/implants/implant_storage.dm +++ b/code/game/objects/items/implants/implant_storage.dm @@ -6,7 +6,8 @@ var/max_slot_stacking = 4 /obj/item/implant/storage/activate() - SendSignal(COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE) + . = ..() + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE) /obj/item/implant/storage/removed(source, silent = FALSE, special = 0) . = ..() diff --git a/code/game/objects/items/implants/implantuplink.dm b/code/game/objects/items/implants/implantuplink.dm index 5fe603c47c..9000fbbe34 100644 --- a/code/game/objects/items/implants/implantuplink.dm +++ b/code/game/objects/items/implants/implantuplink.dm @@ -11,32 +11,6 @@ . = ..() AddComponent(/datum/component/uplink, _owner, TRUE, FALSE, null, starting_tc) -/obj/item/implant/uplink/implant(mob/living/target, mob/user, silent = FALSE) - GET_COMPONENT(hidden_uplink, /datum/component/uplink) - if(hidden_uplink) - for(var/X in target.implants) - if(istype(X, type)) - var/obj/item/implant/imp_e = X - GET_COMPONENT_FROM(their_hidden_uplink, /datum/component/uplink, imp_e) - if(their_hidden_uplink) - their_hidden_uplink.telecrystals += hidden_uplink.telecrystals - qdel(src) - return TRUE - else - qdel(imp_e) //INFERIOR AND EMPTY! - - if(..()) - if(hidden_uplink) - hidden_uplink.owner = "[user.key]" - return TRUE - return FALSE - -/obj/item/implant/uplink/activate() - GET_COMPONENT(hidden_uplink, /datum/component/uplink) - if(hidden_uplink) - hidden_uplink.locked = FALSE - hidden_uplink.interact(usr) - /obj/item/implanter/uplink name = "implanter (uplink)" imp_type = /obj/item/implant/uplink diff --git a/code/game/objects/items/kitchen.dm b/code/game/objects/items/kitchen.dm index c6b2a85d34..bf7b0b1b3b 100644 --- a/code/game/objects/items/kitchen.dm +++ b/code/game/objects/items/kitchen.dm @@ -137,7 +137,7 @@ icon_state = "bone_dagger" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' - desc = "A sharpened bone. The bare mimimum in survival." + desc = "A sharpened bone. The bare minimum in survival." force = 15 throwforce = 15 materials = list() diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 5ceaa9c514..9ad4174b3a 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -31,7 +31,7 @@ /obj/item/melee/synthetic_arm_blade name = "synthetic arm blade" - desc = "A grotesque blade that on closer inspection seems made of synthentic flesh, it still feels like it would hurt very badly as a weapon." + desc = "A grotesque blade that on closer inspection seems made of synthetic flesh, it still feels like it would hurt very badly as a weapon." icon = 'icons/obj/items_and_weapons.dmi' icon_state = "arm_blade" item_state = "arm_blade" @@ -88,6 +88,51 @@ if(istype(B)) playsound(B, 'sound/items/sheath.ogg', 25, 1) +/obj/item/melee/sabre/suicide_act(mob/living/user) + user.visible_message("[user] is trying to cut off all [user.p_their()] limbs with [src]! it looks like [user.p_theyre()] trying to commit suicide!") + var/i = 0 + var/originally_nodropped = item_flags & NODROP + item_flags |= NODROP + if(iscarbon(user)) + var/mob/living/carbon/Cuser = user + var/obj/item/bodypart/holding_bodypart = Cuser.get_holding_bodypart_of_item(src) + var/list/limbs_to_dismember + var/list/arms = list() + var/list/legs = list() + var/obj/item/bodypart/bodypart + + for(bodypart in Cuser.bodyparts) + if(bodypart == holding_bodypart) + continue + if(bodypart.body_part & ARMS) + arms += bodypart + else if (bodypart.body_part & LEGS) + legs += bodypart + + limbs_to_dismember = arms + legs + if(holding_bodypart) + limbs_to_dismember += holding_bodypart + + var/speedbase = abs((4 SECONDS) / limbs_to_dismember.len) + for(bodypart in limbs_to_dismember) + i++ + addtimer(CALLBACK(src, .proc/suicide_dismember, user, bodypart), speedbase * i) + addtimer(CALLBACK(src, .proc/manual_suicide, user, originally_nodropped), (5 SECONDS) * i) + return MANUAL_SUICIDE + +/obj/item/melee/sabre/proc/suicide_dismember(mob/living/user, obj/item/bodypart/affecting) + if(!QDELETED(affecting) && affecting.dismemberable && affecting.owner == user && !QDELETED(user)) + playsound(user, hitsound, 25, 1) + affecting.dismember(BRUTE) + user.adjustBruteLoss(20) + +/obj/item/melee/sabre/proc/manual_suicide(mob/living/user, originally_nodropped) + if(!QDELETED(user)) + user.adjustBruteLoss(200) + user.death(FALSE) + if(!originally_nodropped) + item_flags &= ~NODROP + /obj/item/melee/classic_baton name = "police baton" desc = "A wooden truncheon for beating criminal scum." diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index 19e8560d4d..3601c43651 100644 --- a/code/game/objects/items/mop.dm +++ b/code/game/objects/items/mop.dm @@ -17,6 +17,7 @@ var/mopcap = 5 var/mopspeed = 30 force_string = "robust... against germs" + var/insertable = TRUE /obj/item/mop/New() ..() @@ -25,7 +26,7 @@ /obj/item/mop/proc/clean(turf/A) if(reagents.has_reagent("water", 1) || reagents.has_reagent("holywater", 1) || reagents.has_reagent("vodka", 1) || reagents.has_reagent("cleaner", 1)) - A.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) + SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) for(var/obj/effect/O in A) if(is_cleanable(O)) qdel(O) @@ -62,14 +63,16 @@ /obj/item/mop/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) - J.put_in_cart(src, user) - J.mymop=src - J.update_icon() + if(insertable) + J.put_in_cart(src, user) + J.mymop=src + J.update_icon() + else + to_chat(user, "You are unable to fit your [name] into the [J.name].") + return /obj/item/mop/cyborg - -/obj/item/mop/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J) - return + insertable = FALSE /obj/item/mop/advanced desc = "The most advanced tool in a custodian's arsenal, complete with a condenser for self-wetting! Just think of all the viscera you will clean up with this!" @@ -113,3 +116,6 @@ if(refill_enabled) STOP_PROCESSING(SSobj, src) return ..() + +/obj/item/mop/advanced/cyborg + insertable = FALSE \ No newline at end of file diff --git a/code/game/objects/items/paiwire.dm b/code/game/objects/items/paiwire.dm index 994082c5fa..ef98ed62a1 100644 --- a/code/game/objects/items/paiwire.dm +++ b/code/game/objects/items/paiwire.dm @@ -3,11 +3,11 @@ name = "data cable" icon = 'icons/obj/power.dmi' icon_state = "wire1" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/obj/machinery/machine /obj/item/pai_cable/proc/plugin(obj/machinery/M, mob/living/user) if(!user.transferItemToLoc(src, M)) return user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.") - machine = M \ No newline at end of file + machine = M diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 881b825814..ecf7abe1d3 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -151,7 +151,7 @@ /obj/item/borg/charger name = "power connector" icon_state = "charger_draw" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON var/mode = "draw" var/static/list/charge_machines = typecacheof(list(/obj/machinery/cell_charger, /obj/machinery/recharger, /obj/machinery/recharge_station, /obj/machinery/mech_bay_recharge_port)) var/static/list/charge_items = typecacheof(list(/obj/item/stock_parts/cell, /obj/item/gun/energy)) @@ -194,7 +194,7 @@ M.use_power(200) - to_chat(user, "You stop charging youself.") + to_chat(user, "You stop charging yourself.") else if(is_type_in_list(target, charge_items)) var/obj/item/stock_parts/cell/cell = target @@ -233,7 +233,7 @@ break target.update_icon() - to_chat(user, "You stop charging youself.") + to_chat(user, "You stop charging yourself.") else if(is_type_in_list(target, charge_items)) var/obj/item/stock_parts/cell/cell = target @@ -693,7 +693,7 @@ /obj/item/borg/sight/xray - name = "\proper x-ray vision" + name = "\proper X-ray vision" icon = 'icons/obj/decals.dmi' icon_state = "securearea" sight_mode = BORGXRAY diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 9999a054f6..d280254952 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -181,8 +181,9 @@ to_chat(user, "Sticking a dead brain into the frame would sort of defeat the purpose!") return - if(jobban_isbanned(BM, "Cyborg")) - to_chat(user, "This [M.name] does not seem to fit!") + if(jobban_isbanned(BM, "Cyborg") || QDELETED(src) || QDELETED(BM) || QDELETED(user) || QDELETED(M) || !Adjacent(user)) + if(!QDELETED(M)) + to_chat(user, "This [M.name] does not seem to fit!") return if(!user.temporarilyRemoveItemFromInventory(W)) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 854031b1f4..975908106e 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -193,6 +193,60 @@ R.module.basic_modules += S R.module.add_module(S, FALSE, TRUE) +/obj/item/borg/upgrade/tboh + name = "janitor cyborg trash bag of holding" + desc = "A trash bag of holding replace for the janiborgs standard trash bag." + icon_state = "cyborg_upgrade3" + require_module = 1 + module_type = /obj/item/robot_module/janitor + +/obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R) + . = ..() + if(.) + for(var/obj/item/storage/bag/trash/cyborg/TB in R.module.modules) + R.module.remove_module(TB, TRUE) + + var/obj/item/storage/bag/trash/bluespace/cyborg/B = new /obj/item/storage/bag/trash/bluespace/cyborg(R.module) + R.module.basic_modules += B + R.module.add_module(B, FALSE, TRUE) + +/obj/item/borg/upgrade/tboh/deactivate(mob/living/silicon/robot/R, user = usr) + . = ..() + if(.) + for(var/obj/item/storage/bag/trash/bluespace/cyborg/B in R.module.modules) + R.module.remove_module(B, TRUE) + + var/obj/item/storage/bag/trash/cyborg/TB = new (R.module) + R.module.basic_modules += TB + R.module.add_module(TB, FALSE, TRUE) + +/obj/item/borg/upgrade/amop + name = "janitor cyborg advanced mop" + desc = "An advanced mop replacement from the janiborgs standard mop." + icon_state = "cyborg_upgrade3" + require_module = 1 + module_type = /obj/item/robot_module/janitor + +/obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R) + . = ..() + if(.) + for(var/obj/item/mop/cyborg/M in R.module.modules) + R.module.remove_module(M, TRUE) + + var/obj/item/mop/advanced/cyborg/A = new /obj/item/mop/advanced/cyborg(R.module) + R.module.basic_modules += A + R.module.add_module(A, FALSE, TRUE) + +/obj/item/borg/upgrade/amop/deactivate(mob/living/silicon/robot/R, user = usr) + . = ..() + if(.) + for(var/obj/item/mop/advanced/cyborg/A in R.module.modules) + R.module.remove_module(A, TRUE) + + var/obj/item/mop/cyborg/M = new (R.module) + R.module.basic_modules += M + R.module.add_module(M, FALSE, TRUE) + /obj/item/borg/upgrade/syndicate name = "illegal equipment module" desc = "Unlocks the hidden, deadlier functions of a cyborg." @@ -543,3 +597,20 @@ var/obj/item/pinpointer/crew/PP = locate() in R.module if (PP) R.module.remove_module(PP, TRUE) + +/obj/item/borg/upgrade/transform + name = "borg module picker (Standard)" + desc = "Allows you to to turn a cyborg into a standard cyborg." + icon_state = "cyborg_upgrade3" + var/obj/item/robot_module/new_module = /obj/item/robot_module/standard + +/obj/item/borg/upgrade/transform/action(mob/living/silicon/robot/R, user = usr) + . = ..() + if(.) + R.module.transform_to(new_module) + +/obj/item/borg/upgrade/transform/clown + name = "borg module picker (Clown)" + desc = "Allows you to to turn a cyborg into a clown, honk." + icon_state = "cyborg_upgrade3" + new_module = /obj/item/robot_module/clown diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index d6bb54bddf..1171bd7bf7 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -38,7 +38,7 @@ return ..() /obj/item/shield/riot/roman - name = "roman shield" + name = "\improper Roman shield" desc = "Bears an inscription on the inside: \"Romanes venio domus\"." icon_state = "roman_shield" item_state = "roman_shield" diff --git a/code/game/objects/items/stacks/bscrystal.dm b/code/game/objects/items/stacks/bscrystal.dm index 4da0fd8a44..522e1a1153 100644 --- a/code/game/objects/items/stacks/bscrystal.dm +++ b/code/game/objects/items/stacks/bscrystal.dm @@ -45,7 +45,7 @@ blink_mob(hit_atom) use(1) -//Artifical bluespace crystal, doesn't give you much research. +//Artificial bluespace crystal, doesn't give you much research. /obj/item/stack/ore/bluespace_crystal/artificial name = "artificial bluespace crystal" desc = "An artificially made bluespace crystal, it looks delicate." diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index bee37d1ff9..1cd23c26fa 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -105,7 +105,7 @@ /obj/item/stack/medical/bruise_pack name = "bruise pack" singular_name = "bruise pack" - desc = "A theraputic gel pack and bandages designed to treat blunt-force trauma." + desc = "A therapeutic gel pack and bandages designed to treat blunt-force trauma." icon_state = "brutepack" lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi' diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 996576d8e5..a6e2d255fb 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -110,7 +110,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \ if(QDELETED(src) && replace) user.put_in_hands(RG) else - to_chat(user, "You need one rod and one sheet of plamsa glass to make reinforced plasma glass!") + to_chat(user, "You need one rod and one sheet of plasma glass to make reinforced plasma glass!") return else return ..() @@ -173,7 +173,7 @@ GLOBAL_LIST_INIT(prglass_recipes, list ( \ /obj/item/stack/sheet/plasmarglass name = "reinforced plasma glass" - desc = "A glass sheet made out of a plasma-silicate alloy and a rod matrice. It looks hopelessly tough and nearly fire-proof!" + desc = "A glass sheet made out of a plasma-silicate alloy and a rod matrix. It looks hopelessly tough and nearly fire-proof!" singular_name = "reinforced plasma glass sheet" icon_state = "sheet-prglass" item_state = "sheet-prglass" diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 4eae35a98c..0031839eff 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -149,6 +149,7 @@ GLOBAL_LIST_INIT(leather_recipes, list ( \ new/datum/stack_recipe("leather satchel", /obj/item/storage/backpack/satchel/leather, 5), \ new/datum/stack_recipe("bandolier", /obj/item/storage/belt/bandolier, 5), \ new/datum/stack_recipe("leather jacket", /obj/item/clothing/suit/jacket/leather, 7), \ + new/datum/stack_recipe("leather shoes", /obj/item/clothing/shoes/laceup, 2), \ new/datum/stack_recipe("leather overcoat", /obj/item/clothing/suit/jacket/leather/overcoat, 10), \ )) @@ -187,7 +188,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ singular_name = "hide plate" max_amount = 6 novariants = FALSE - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER @@ -200,7 +201,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ singular_name = "drake plate" max_amount = 10 novariants = FALSE - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_NORMAL layer = MOB_LAYER diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 87d1985b18..8d1562826c 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -310,7 +310,7 @@ GLOBAL_LIST_INIT(titanium_recipes, list ( \ point_value = 45 GLOBAL_LIST_INIT(plastitanium_recipes, list ( \ - new/datum/stack_recipe("plas-titanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \ + new/datum/stack_recipe("plastitanium tile", /obj/item/stack/tile/mineral/plastitanium, 1, 4, 20), \ )) /obj/item/stack/sheet/mineral/plastitanium/Initialize(mapload, new_amount, merge = TRUE) diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 3597a3f4d6..ec1e7b8773 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -6,7 +6,7 @@ icon_state = "telecrystal" w_class = WEIGHT_CLASS_TINY max_amount = 50 - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON /obj/item/stack/telecrystal/attack(mob/target, mob/user) if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. diff --git a/code/game/objects/items/stacks/tiles/tile_mineral.dm b/code/game/objects/items/stacks/tiles/tile_mineral.dm index 38887a0d8b..64be8853a7 100644 --- a/code/game/objects/items/stacks/tiles/tile_mineral.dm +++ b/code/game/objects/items/stacks/tiles/tile_mineral.dm @@ -71,9 +71,9 @@ materials = list(MAT_TITANIUM=500) /obj/item/stack/tile/mineral/plastitanium - name = "plas-titanium tile" - singular_name = "plas-titanium floor tile" - desc = "A tile made of plas-titanium, used for very evil shuttles." + name = "plastitanium tile" + singular_name = "plastitanium floor tile" + desc = "A tile made of plastitanium, used for very evil shuttles." icon_state = "tile_darkshuttle" turf_type = /turf/open/floor/mineral/plastitanium mineralType = "plastitanium" diff --git a/code/game/objects/items/stacks/wrap.dm b/code/game/objects/items/stacks/wrap.dm index fe056d34d8..3e5c9c2ba9 100644 --- a/code/game/objects/items/stacks/wrap.dm +++ b/code/game/objects/items/stacks/wrap.dm @@ -9,7 +9,7 @@ desc = "Wrap packages with this festive paper to make gifts." icon = 'icons/obj/stack_objects.dmi' icon_state = "wrap_paper" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON amount = 25 max_amount = 25 resistance_flags = FLAMMABLE @@ -31,7 +31,7 @@ desc = "You can use this to wrap items in." icon = 'icons/obj/stack_objects.dmi' icon_state = "deliveryPaper" - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON amount = 25 max_amount = 25 resistance_flags = FLAMMABLE diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index a3e4bc112e..11dbf727f1 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -40,6 +40,7 @@ righthand_file = 'icons/mob/inhands/equipment/custodial_righthand.dmi' w_class = WEIGHT_CLASS_BULKY + var/insertable = TRUE /obj/item/storage/bag/trash/ComponentInitialize() . = ..() @@ -64,14 +65,16 @@ else icon_state = "[initial(icon_state)]3" /obj/item/storage/bag/trash/cyborg + insertable = FALSE /obj/item/storage/bag/trash/proc/janicart_insert(mob/user, obj/structure/janitorialcart/J) - J.put_in_cart(src, user) - J.mybag=src - J.update_icon() - -/obj/item/storage/bag/trash/cyborg/janicart_insert(mob/user, obj/structure/janitorialcart/J) - return + if(insertable) + J.put_in_cart(src, user) + J.mybag=src + J.update_icon() + else + to_chat(user, "You are unable to fit your [name] into the [J.name].") + return /obj/item/storage/bag/trash/bluespace name = "trash bag of holding" @@ -85,6 +88,9 @@ STR.max_combined_w_class = 60 STR.max_items = 60 +/obj/item/storage/bag/trash/bluespace/cyborg + insertable = FALSE + // ----------------------------- // Mining Satchel // ----------------------------- @@ -136,7 +142,7 @@ if (box) user.transferItemToLoc(A, box) show_message = TRUE - else if(SendSignal(COMSIG_TRY_STORAGE_INSERT, A, user, TRUE)) + else if(SEND_SIGNAL(src, COMSIG_TRY_STORAGE_INSERT, A, user, TRUE)) show_message = TRUE else if(!spam_protection) diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index db47fd3d0b..1066e1394c 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -100,7 +100,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible", H.visible_message("[user] heals [H] with the power of [deity_name]!") to_chat(H, "May the power of [deity_name] compel you to be healed!") playsound(src.loc, "punch", 25, 1, -1) - H.SendSignal(COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "blessing", /datum/mood_event/blessing) return 1 /obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 7fcbeba268..9ac08aab5d 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -535,7 +535,7 @@ STR.max_items = 8 /obj/item/storage/box/snappops/PopulateContents() - SendSignal(COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/toy/snappop) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/toy/snappop) /obj/item/storage/box/matches name = "matchbox" @@ -553,7 +553,7 @@ STR.can_hold = typecacheof(list(/obj/item/match)) /obj/item/storage/box/matches/PopulateContents() - SendSignal(COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/match) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_FILL_TYPE, /obj/item/match) /obj/item/storage/box/matches/attackby(obj/item/match/W as obj, mob/user as mob, params) if(istype(W, /obj/item/match)) diff --git a/code/game/objects/items/storage/fancy.dm b/code/game/objects/items/storage/fancy.dm index 02a367d2bf..95639918bb 100644 --- a/code/game/objects/items/storage/fancy.dm +++ b/code/game/objects/items/storage/fancy.dm @@ -151,7 +151,7 @@ return var/obj/item/clothing/mask/cigarette/W = locate(/obj/item/clothing/mask/cigarette) in contents if(W && contents.len > 0) - SendSignal(COMSIG_TRY_STORAGE_TAKE, W, user) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, user) user.put_in_hands(W) contents -= W to_chat(user, "You take \a [W] out of the pack.") @@ -190,7 +190,7 @@ if(cig) if(M == user && contents.len > 0 && !user.wear_mask) var/obj/item/clothing/mask/cigarette/W = cig - SendSignal(COMSIG_TRY_STORAGE_TAKE, W, M) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_TAKE, W, M) M.equip_to_slot_if_possible(W, SLOT_WEAR_MASK) contents -= W to_chat(user, "You take \a [W] out of the pack.") @@ -319,13 +319,13 @@ icon_state = "[initial(icon_state)]" /obj/item/storage/fancy/cigarettes/cigars/cohiba - name = "\improper cohiba robusto cigar case" + name = "\improper Cohiba Robusto cigar case" desc = "A case of imported Cohiba cigars, renowned for their strong flavor." icon_state = "cohibacase" spawn_type = /obj/item/clothing/mask/cigarette/cigar/cohiba /obj/item/storage/fancy/cigarettes/cigars/havana - name = "\improper premium havanian cigar case" + name = "\improper premium Havanian cigar case" desc = "A case of classy Havanian cigars." icon_state = "cohibacase" spawn_type = /obj/item/clothing/mask/cigarette/cigar/havana diff --git a/code/game/objects/items/storage/lockbox.dm b/code/game/objects/items/storage/lockbox.dm index e1d65be1b7..bce38548cc 100644 --- a/code/game/objects/items/storage/lockbox.dm +++ b/code/game/objects/items/storage/lockbox.dm @@ -22,18 +22,18 @@ STR.locked = TRUE /obj/item/storage/lockbox/attackby(obj/item/W, mob/user, params) - var/locked = SendSignal(COMSIG_IS_STORAGE_LOCKED) + var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(W.GetID()) if(broken) to_chat(user, "It appears to be broken.") return if(allowed(user)) - SendSignal(COMSIG_TRY_STORAGE_SET_LOCKSTATE, !locked) - locked = SendSignal(COMSIG_IS_STORAGE_LOCKED) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, !locked) + locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) icon_state = icon_locked to_chat(user, "You lock the [src.name]!") - SendSignal(COMSIG_TRY_STORAGE_HIDE_ALL) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_HIDE_ALL) return else icon_state = icon_closed @@ -50,7 +50,7 @@ /obj/item/storage/lockbox/emag_act(mob/user) if(!broken) broken = TRUE - SendSignal(COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) desc += "It appears to be broken." icon_state = src.icon_broken if(user) @@ -107,13 +107,13 @@ /obj/item/storage/lockbox/medal/examine(mob/user) ..() - var/locked = SendSignal(COMSIG_IS_STORAGE_LOCKED) + var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(!locked) to_chat(user, "Alt-click to [open ? "close":"open"] it.") /obj/item/storage/lockbox/medal/AltClick(mob/user) if(user.canUseTopic(src, BE_CLOSE)) - if(!SendSignal(COMSIG_IS_STORAGE_LOCKED)) + if(!SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)) open = (open ? FALSE : TRUE) update_icon() ..() @@ -131,7 +131,7 @@ /obj/item/storage/lockbox/medal/update_icon() cut_overlays() - var/locked = SendSignal(COMSIG_IS_STORAGE_LOCKED) + var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) if(locked) icon_state = "medalbox+l" open = FALSE diff --git a/code/game/objects/items/storage/secure.dm b/code/game/objects/items/storage/secure.dm index 806f22a2dc..20dae54a71 100644 --- a/code/game/objects/items/storage/secure.dm +++ b/code/game/objects/items/storage/secure.dm @@ -35,7 +35,7 @@ to_chat(user, text("The service panel is currently [open ? "unscrewed" : "screwed shut"].")) /obj/item/storage/secure/attackby(obj/item/W, mob/user, params) - if(SendSignal(COMSIG_IS_STORAGE_LOCKED)) + if(SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED)) if (istype(W, /obj/item/screwdriver)) if (W.use_tool(src, user, 20)) open =! open @@ -64,7 +64,7 @@ return ..() /obj/item/storage/secure/attack_self(mob/user) - var/locked = SendSignal(COMSIG_IS_STORAGE_LOCKED) + var/locked = SEND_SIGNAL(src, COMSIG_IS_STORAGE_LOCKED) user.set_machine(src) var/dat = text("[]
    \n\nLock Status: []",src, (locked ? "LOCKED" : "UNLOCKED")) var/message = "Code" @@ -88,7 +88,7 @@ l_code = code l_set = 1 else if ((code == l_code) && (l_set == 1)) - SendSignal(COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, FALSE) cut_overlays() add_overlay(icon_opened) code = null @@ -96,10 +96,10 @@ code = "ERROR" else if ((href_list["type"] == "R") && (!l_setshort)) - SendSignal(COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_SET_LOCKSTATE, TRUE) cut_overlays() code = null - SendSignal(COMSIG_TRY_STORAGE_HIDE_FROM, usr) + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_HIDE_FROM, usr) else code += text("[]", sanitize_text(href_list["type"])) if (length(code) > 5) diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 14b7932f92..527c7ea78e 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -14,9 +14,10 @@ var/stunforce = 140 var/status = 0 - var/obj/item/stock_parts/cell/high/cell + var/obj/item/stock_parts/cell/cell var/hitcost = 1000 var/throw_hit_chance = 35 + var/preload_cell_type //if not empty the baton starts with this type of cell /obj/item/melee/baton/get_cell() return cell @@ -27,6 +28,11 @@ /obj/item/melee/baton/Initialize() . = ..() + if(preload_cell_type) + if(!ispath(preload_cell_type,/obj/item/stock_parts/cell)) + log_world("### MAP WARNING, [src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].") + else + cell = new preload_cell_type(src) update_icon() /obj/item/melee/baton/throw_impact(atom/hit_atom) @@ -35,10 +41,8 @@ if(status && prob(throw_hit_chance) && iscarbon(hit_atom)) baton_stun(hit_atom) -/obj/item/melee/baton/loaded/Initialize() //this one starts with a cell pre-installed. - cell = new(src) - update_icon() - . = ..() +/obj/item/melee/baton/loaded //this one starts with a cell pre-installed. + preload_cell_type = /obj/item/stock_parts/cell/high /obj/item/melee/baton/proc/deductcharge(chrgdeductamt) if(cell) diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 1cf61ab651..be83481231 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -114,7 +114,7 @@ amount_per_transfer_from_this = 50 possible_transfer_amounts = list(25,50,100) volume = 500 - flags_1 = NOBLUDGEON_1 + item_flags = NOBLUDGEON container_type = OPENCONTAINER slot_flags = 0 diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 08d0b8bd30..4707ba9b47 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -129,7 +129,7 @@ if(isOn()) use(1) var/turf/location = get_turf(user) - location.hotspot_expose(700, 50, 1) + location.hotspot_expose(550, 10, 1) if(get_fuel() <= 0) set_light(0) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index ef82c074a6..94ce5d96a5 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -247,8 +247,8 @@ // Copied from /obj/item/melee/transforming/energy/sword/attackby /obj/item/toy/sword/attackby(obj/item/W, mob/living/user, params) if(istype(W, /obj/item/toy/sword)) - if((W.flags_1 & NODROP_1) || (flags_1 & NODROP_1)) - to_chat(user, "\the [flags_1 & NODROP_1 ? src : W] is stuck to your hand, you can't attach it to \the [flags_1 & NODROP_1 ? W : src]!") + if((W.item_flags & NODROP) || (item_flags & NODROP)) + to_chat(user, "\the [item_flags & NODROP ? src : W] is stuck to your hand, you can't attach it to \the [item_flags & NODROP ? W : src]!") return else to_chat(user, "You attach the ends of the two plastic swords, making a single double-bladed toy! You're fake-cool.") diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index 6526eaf561..f1c766e90c 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -121,7 +121,7 @@ name = "offhand" icon_state = "offhand" w_class = WEIGHT_CLASS_HUGE - flags_1 = ABSTRACT_1 + item_flags = ABSTRACT resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF /obj/item/twohanded/offhand/Destroy() @@ -338,7 +338,7 @@ icon_state = "dualsaber[item_color][wielded]" else icon_state = "dualsaber0" - SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) /obj/item/twohanded/dualsaber/attack(mob/target, mob/living/carbon/human/user) if(user.has_dna()) diff --git a/code/game/objects/items/vending_items.dm b/code/game/objects/items/vending_items.dm index 7a43a7d255..3be12abf4f 100755 --- a/code/game/objects/items/vending_items.dm +++ b/code/game/objects/items/vending_items.dm @@ -18,19 +18,34 @@ throw_range = 7 w_class = WEIGHT_CLASS_BULKY armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 70, "acid" = 30) - var/charges = list(0, 0, 0) //how many restocking "charges" the refill has for standard/contraband/coin products - var/init_charges = list(0, 0, 0) + // Built automatically from the corresponding vending machine. + // If null, considered to be full. Otherwise, is list(/typepath = amount). + var/list/products + var/list/contraband + var/list/premium -/obj/item/vending_refill/New(amt = -1) - ..() +/obj/item/vending_refill/Initialize(mapload) + . = ..() name = "\improper [machine_name] restocking unit" - if(isnum(amt) && amt > -1) - charges[1] = amt /obj/item/vending_refill/examine(mob/user) ..() - if(charges[1] > 0) - to_chat(user, "It can restock [charges[1]+charges[2]+charges[3]] item(s).") + var/num = get_part_rating() + if (num == INFINITY) + to_chat(user, "It's sealed tight, completely full of supplies.") + else if (num == 0) + to_chat(user, "It's empty!") else - to_chat(user, "It's empty!") \ No newline at end of file + to_chat(user, "It can restock [num] item\s.") + +/obj/item/vending_refill/get_part_rating() + if (!products || !contraband || !premium) + return INFINITY + . = 0 + for(var/key in products) + . += products[key] + for(var/key in contraband) + . += contraband[key] + for(var/key in premium) + . += premium[key] diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 3ac3a67060..736149c665 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -17,7 +17,11 @@ /obj/item/banhammer/suicide_act(mob/user) user.visible_message("[user] is hitting [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to ban [user.p_them()]self from life.") return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS) - +/* +oranges says: This is a meme relating to the english translation of the ss13 russian wiki page on lurkmore. +mrdoombringer sez: and remember kids, if you try and PR a fix for this item's grammar, you are admitting that you are, indeed, a newfriend. +for further reading, please see: https://github.com/tgstation/tgstation/pull/30173 and https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=%2F%2Flurkmore.to%2FSS13&edit-text=&act=url +*/ /obj/item/banhammer/attack(mob/M, mob/user) if(user.zone_selected == BODY_ZONE_HEAD) M.visible_message("[user] are stroking the head of [M] with a bangammer", "[user] are stroking the head with a bangammer", "you hear a bangammer stroking a head"); @@ -76,7 +80,8 @@ /obj/item/claymore/highlander //ALL COMMENTS MADE REGARDING THIS SWORD MUST BE MADE IN ALL CAPS desc = "THERE CAN BE ONLY ONE, AND IT WILL BE YOU!!!\nActivate it in your hand to point to the nearest victim." - flags_1 = CONDUCT_1 | NODROP_1 | DROPDEL_1 + flags_1 = CONDUCT_1 + item_flags = NODROP | DROPDEL slot_flags = null block_chance = 0 //RNG WON'T HELP YOU NOW, PANSY light_range = 3 @@ -248,7 +253,7 @@ user.put_in_hands(S) to_chat(user, "You fasten the glass shard to the top of the rod with the cable.") - else if(istype(I, /obj/item/assembly/igniter) && !(I.flags_1 & NODROP_1)) + else if(istype(I, /obj/item/assembly/igniter) && !(I.item_flags & NODROP)) var/obj/item/melee/baton/cattleprod/P = new /obj/item/melee/baton/cattleprod remove_item_from_storage(user) @@ -411,7 +416,7 @@ item_state = "mounted_chainsaw" lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi' - flags_1 = NODROP_1 | ABSTRACT_1 | DROPDEL_1 + item_flags = NODROP | ABSTRACT | DROPDEL w_class = WEIGHT_CLASS_HUGE force = 24 throwforce = 0 @@ -591,7 +596,7 @@ icon_state = "madeyoulook" force = 0 throwforce = 0 - flags_1 = DROPDEL_1 | ABSTRACT_1 + item_flags = DROPDEL | ABSTRACT attack_verb = list("bopped") /obj/item/slapper @@ -601,7 +606,7 @@ item_state = "nothing" force = 0 throwforce = 0 - flags_1 = DROPDEL_1 | ABSTRACT_1 + item_flags = DROPDEL | ABSTRACT attack_verb = list("slapped") hitsound = 'sound/effects/snap.ogg' diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 5ce461b5ad..b296ec7f17 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -222,7 +222,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e tesla_zap(src, 3, power_bounced, tesla_flags, shocked_targets) addtimer(CALLBACK(src, .proc/reset_shocked), 10) -//The surgeon general warns that being buckled to certain objects recieving powerful shocks is greatly hazardous to your health +//The surgeon general warns that being buckled to certain objects receiving powerful shocks is greatly hazardous to your health //Only tesla coils and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later. /obj/proc/tesla_buckle_check(var/strength) if(has_buckled_mobs()) @@ -235,7 +235,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e //the obj is deconstructed into pieces, whether through careful disassembly or when destroyed. /obj/proc/deconstruct(disassembled = TRUE) - SendSignal(COMSIG_OBJ_DECONSTRUCT, disassembled) + SEND_SIGNAL(src, COMSIG_OBJ_DECONSTRUCT, disassembled) qdel(src) //what happens when the obj's health is below integrity_failure level. diff --git a/code/game/objects/structures/ai_core.dm b/code/game/objects/structures/ai_core.dm index ed797e4256..be26567c7e 100644 --- a/code/game/objects/structures/ai_core.dm +++ b/code/game/objects/structures/ai_core.dm @@ -63,7 +63,7 @@ /obj/structure/AIcore/latejoin_inactive/attackby(obj/item/P, mob/user, params) if(istype(P, /obj/item/multitool)) active = !active - to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transimtters.") + to_chat(user, "You [active? "activate" : "deactivate"] [src]'s transmitters.") return return ..() @@ -184,8 +184,9 @@ to_chat(user, "Sticking an inactive [M.name] into the frame would sort of defeat the purpose.") return - if(!CONFIG_GET(flag/allow_ai) || jobban_isbanned(M.brainmob, "AI")) - to_chat(user, "This [M.name] does not seem to fit!") + if(!CONFIG_GET(flag/allow_ai) || (jobban_isbanned(M.brainmob, "AI") && !QDELETED(src) && !QDELETED(user) && !QDELETED(M) && !QDELETED(user) && Adjacent(user))) + if(!QDELETED(M)) + to_chat(user, "This [M.name] does not seem to fit!") return if(!M.brainmob.mind) diff --git a/code/game/objects/structures/beds_chairs/chair.dm b/code/game/objects/structures/beds_chairs/chair.dm index a4915f6e1f..4727817945 100644 --- a/code/game/objects/structures/beds_chairs/chair.dm +++ b/code/game/objects/structures/beds_chairs/chair.dm @@ -192,20 +192,11 @@ /obj/structure/chair/comfy/lime color = rgb(255,251,0) -/obj/structure/chair/comfy/shuttle - name = "shuttle seat" - desc = "A comfortable, secure seat. It has a more sturdy looking buckling system, for smoother flights." - icon_state = "shuttle_chair" - -/obj/structure/chair/comfy/shuttle/GetArmrest() - return mutable_appearance('icons/obj/chairs.dmi', "shuttle_chair_armrest") - /obj/structure/chair/office anchored = FALSE buildstackamount = 5 item_chair = null - /obj/structure/chair/office/Moved() . = ..() if(has_gravity()) @@ -418,3 +409,10 @@ . = ..() if(has_gravity()) playsound(src, 'sound/machines/clockcult/integration_cog_install.ogg', 50, TRUE) + +/obj/structure/chair/shuttle + name = "shuttle seat" + desc = "A comfortable, secure seat. It has a more sturdy looking buckling system, for smoother flights." + icon = 'goon/icons/obj/chairs.dmi' + icon_state = "shuttle_chair" //thanks gannets! + diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index ca8d01fc07..93facf2c0c 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -163,18 +163,20 @@ else if(istype(AM, /obj/structure/closet)) return else if(isobj(AM)) - if(!allow_objects && !istype(AM, /obj/item) && !istype(AM, /obj/effect/dummy/chameleon)) + if (istype(AM, /obj/item)) + var/obj/item/I = AM + if (I.item_flags & NODROP) + return + else if(!allow_objects && !istype(AM, /obj/effect/dummy/chameleon)) return if(!allow_dense && AM.density) return - if(AM.anchored || AM.has_buckled_mobs() || (AM.flags_1 & NODROP_1)) + if(AM.anchored || AM.has_buckled_mobs()) return else return AM.forceMove(src) - if(AM.pulledby) - AM.pulledby.stop_pulling() return 1 @@ -245,7 +247,7 @@ if(opened) return welded = !welded - user.visible_message("[user] [welded ? "welds shut" : "unweldeds"] \the [src].", + user.visible_message("[user] [welded ? "welds shut" : "unwelded"] \the [src].", "You [welded ? "weld" : "unwelded"] \the [src] with \the [W].", "You hear welding.") update_icon() @@ -257,7 +259,7 @@ user.visible_message("[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \ "You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \ "You hear a ratchet.") - else if(user.a_intent != INTENT_HARM && !(W.flags_1 & NOBLUDGEON_1)) + else if(user.a_intent != INTENT_HARM && !(W.item_flags & NOBLUDGEON)) if(W.GetID() || !toggle(user)) togglelock(user) else diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index 7ae18a481e..c9a2ad54ff 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -17,7 +17,7 @@ icon_state = "syndicate" /obj/structure/closet/gimmick/russian - name = "russian surplus closet" + name = "\improper Russian surplus closet" desc = "It's a storage unit for Russian standard-issue surplus." /obj/structure/closet/gimmick/russian/PopulateContents() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 4ce98bec52..faf5574374 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -164,7 +164,7 @@ new /obj/item/encryptionkey/headset_med(src) /obj/structure/closet/secure_closet/detective - name = "\proper detective's cabinet" + name = "\improper detective's cabinet" req_access = list(ACCESS_FORENSICS_LOCKERS) icon_state = "cabinet" resistance_flags = FLAMMABLE diff --git a/code/game/objects/structures/crates_lockers/crates/bins.dm b/code/game/objects/structures/crates_lockers/crates/bins.dm index 9f14fff8d0..c0ca1277d3 100644 --- a/code/game/objects/structures/crates_lockers/crates/bins.dm +++ b/code/game/objects/structures/crates_lockers/crates/bins.dm @@ -27,7 +27,7 @@ var/obj/item/storage/bag/trash/T = W to_chat(user, "You fill the bag.") for(var/obj/item/O in src) - T.SendSignal(COMSIG_TRY_STORAGE_INSERT, O, user, TRUE) + SEND_SIGNAL(T, COMSIG_TRY_STORAGE_INSERT, O, user, TRUE) T.update_icon() do_animate() return TRUE diff --git a/code/game/objects/structures/divine.dm b/code/game/objects/structures/divine.dm index a98b800e09..5fd480f6fd 100644 --- a/code/game/objects/structures/divine.dm +++ b/code/game/objects/structures/divine.dm @@ -18,7 +18,7 @@ return to_chat(user, "You attempt to sacrifice [L] by invoking the sacrificial ritual.") L.gib() - message_admins("[ADMIN_LOOKUPFLW(user)] has sacrificed [key_name_admin(L)] on the sacrifical altar at [AREACOORD(src)].") + message_admins("[ADMIN_LOOKUPFLW(user)] has sacrificed [key_name_admin(L)] on the sacrificial altar at [AREACOORD(src)].") /obj/structure/healingfountain name = "healing fountain" diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index f73a206747..aa2f7bed86 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -8,23 +8,23 @@ max_integrity = 200 integrity_failure = 50 var/obj/item/extinguisher/stored_extinguisher - var/opened = 0 + var/opened = FALSE -/obj/structure/extinguisher_cabinet/examine(mob/user) - ..() - to_chat(user, "Alt-click to [opened ? "close":"open"] it.") - -/obj/structure/extinguisher_cabinet/New(loc, ndir, building) - ..() +/obj/structure/extinguisher_cabinet/Initialize(mapload, ndir, building) + . = ..() if(building) setDir(ndir) pixel_x = (dir & 3)? 0 : (dir == 4 ? -27 : 27) pixel_y = (dir & 3)? (dir ==1 ? -30 : 30) : 0 - opened = 1 + opened = TRUE icon_state = "extinguisher_empty" else stored_extinguisher = new /obj/item/extinguisher(src) +/obj/structure/extinguisher_cabinet/examine(mob/user) + ..() + to_chat(user, "Alt-click to [opened ? "close":"open"] it.") + /obj/structure/extinguisher_cabinet/Destroy() if(stored_extinguisher) qdel(stored_extinguisher) diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 0c84c4cf63..448734d917 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -1,19 +1,20 @@ /obj/structure/fireaxecabinet name = "fire axe cabinet" desc = "There is a small label that reads \"For Emergency use only\" along with details for safe use of the axe. As if." - var/obj/item/twohanded/fireaxe/fireaxe = new/obj/item/twohanded/fireaxe icon = 'icons/obj/wallmounts.dmi' icon_state = "fireaxe" anchored = TRUE density = FALSE armor = list("melee" = 50, "bullet" = 20, "laser" = 0, "energy" = 100, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50) - var/locked = TRUE - var/open = FALSE max_integrity = 150 integrity_failure = 50 + var/locked = TRUE + var/open = FALSE + var/obj/item/twohanded/fireaxe/fireaxe /obj/structure/fireaxecabinet/Initialize() . = ..() + fireaxe = new update_icon() /obj/structure/fireaxecabinet/Destroy() diff --git a/code/game/objects/structures/fireplace.dm b/code/game/objects/structures/fireplace.dm index 2735bd7e81..b670fe5cf0 100644 --- a/code/game/objects/structures/fireplace.dm +++ b/code/game/objects/structures/fireplace.dm @@ -111,7 +111,7 @@ playsound(src, 'sound/effects/comfyfire.ogg',50,0, 0, 1) var/turf/T = get_turf(src) - T.hotspot_expose(700, 5) + T.hotspot_expose(500, 5) update_icon() adjust_light() diff --git a/code/game/objects/structures/ghost_role_spawners.dm b/code/game/objects/structures/ghost_role_spawners.dm index 39ae5bfae8..43916182ac 100644 --- a/code/game/objects/structures/ghost_role_spawners.dm +++ b/code/game/objects/structures/ghost_role_spawners.dm @@ -476,7 +476,7 @@ random = TRUE mob_species = /datum/species/human flavour_text = "You are a security officer working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \ - cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artifical Program telling you that you would only be asleep for eight hours. As you open \ + cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \ your eyes, everything seems rusted and broken, a dark feeling sweels in your gut as you climb out of your pod." uniform = /obj/item/clothing/under/rank/security shoes = /obj/item/clothing/shoes/jackboots @@ -500,7 +500,7 @@ random = TRUE mob_species = /datum/species/human flavour_text = "You are an engineer working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \ - cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artifical Program telling you that you would only be asleep for eight hours. As you open \ + cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \ your eyes, everything seems rusted and broken, a dark feeling sweels in your gut as you climb out of your pod." uniform = /obj/item/clothing/under/rank/engineer shoes = /obj/item/clothing/shoes/workboots @@ -524,7 +524,7 @@ random = TRUE mob_species = /datum/species/human flavour_text = "You are a scientist working for Nanotrasen, stationed onboard a state of the art research station. You vaguely recall rushing into a \ - cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artifical Program telling you that you would only be asleep for eight hours. As you open \ + cryogenics pod due to an oncoming radiation storm. The last thing you remember is the station's Artificial Program telling you that you would only be asleep for eight hours. As you open \ your eyes, everything seems rusted and broken, a dark feeling sweels in your gut as you climb out of your pod." uniform = /obj/item/clothing/under/rank/scientist shoes = /obj/item/clothing/shoes/laceup diff --git a/code/game/objects/structures/manned_turret.dm b/code/game/objects/structures/manned_turret.dm index 169132a158..df145baf94 100644 --- a/code/game/objects/structures/manned_turret.dm +++ b/code/game/objects/structures/manned_turret.dm @@ -180,7 +180,7 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "offhand" w_class = WEIGHT_CLASS_HUGE - flags_1 = ABSTRACT_1 | NODROP_1 | NOBLUDGEON_1 | DROPDEL_1 + item_flags = ABSTRACT | NODROP | NOBLUDGEON | DROPDEL resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF var/obj/machinery/manned_turret/turret diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 4d3b19177e..a247f4c125 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -201,7 +201,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an GLOBAL_LIST_EMPTY(crematoriums) /obj/structure/bodycontainer/crematorium name = "crematorium" - desc = "A human incinerator. Works well on barbeque nights." + desc = "A human incinerator. Works well on barbecue nights." icon_state = "crema1" dir = SOUTH var/id = 1 diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 0d7500ebf2..197b031c79 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -116,7 +116,7 @@ if(!ishuman(pushed_mob)) return var/mob/living/carbon/human/H = pushed_mob - H.SendSignal(COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table) + SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "table", /datum/mood_event/table) /obj/structure/table/attackby(obj/item/I, mob/user, params) if(!(flags_1 & NODECONSTRUCT_1)) @@ -136,12 +136,12 @@ if(istype(I, /obj/item/storage/bag/tray)) var/obj/item/storage/bag/tray/T = I if(T.contents.len > 0) // If the tray isn't empty - I.SendSignal(COMSIG_TRY_STORAGE_QUICK_EMPTY, drop_location()) + SEND_SIGNAL(I, COMSIG_TRY_STORAGE_QUICK_EMPTY, drop_location()) user.visible_message("[user] empties [I] on [src].") return // If the tray IS empty, continue on (tray will be placed on the table like other items) - if(user.a_intent != INTENT_HARM && !(I.flags_1 & ABSTRACT_1)) + if(user.a_intent != INTENT_HARM && !(I.item_flags & ABSTRACT)) if(user.transferItemToLoc(I, drop_location())) var/list/click_params = params2list(params) //Center the icon where the user clicked. diff --git a/code/game/objects/structures/transit_tubes/transit_tube.dm b/code/game/objects/structures/transit_tubes/transit_tube.dm index f0e11434f2..56608789f7 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube.dm @@ -42,9 +42,9 @@ for(var/obj/structure/transit_tube_pod/pod in src.loc) to_chat(user, "Remove the pod first!") return - user.visible_message("[user] starts to deattach \the [src].", "You start to deattach the [name]...") + user.visible_message("[user] starts to detach \the [src].", "You start to detach the [name]...") if(W.use_tool(src, user, time_to_unwrench, volume=50)) - to_chat(user, "You deattach the [name].") + to_chat(user, "You detach the [name].") var/obj/structure/c_transit_tube/R = new tube_construction(loc) R.setDir(dir) transfer_fingerprints_to(R) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 4798aae883..9b1bd0ec2c 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -241,7 +241,7 @@ soundloop.start() wash_turf() for(var/atom/movable/G in loc) - G.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) + SEND_SIGNAL(G, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) if(isliving(G)) var/mob/living/L = G wash_mob(L) @@ -314,7 +314,7 @@ /obj/machinery/shower/proc/wash_obj(obj/O) - . = O.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) + . = SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) if(isitem(O)) var/obj/item/I = O @@ -325,7 +325,7 @@ /obj/machinery/shower/proc/wash_turf() if(isturf(loc)) var/turf/tile = loc - tile.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) + SEND_SIGNAL(tile, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) tile.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) for(var/obj/effect/E in tile) if(is_cleanable(E)) @@ -333,12 +333,12 @@ /obj/machinery/shower/proc/wash_mob(mob/living/L) - L.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) + SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) L.wash_cream() L.ExtinguishMob() L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily L.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) - L.SendSignal(COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower) + SEND_SIGNAL(L, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower) if(iscarbon(L)) var/mob/living/carbon/M = L . = TRUE @@ -378,7 +378,7 @@ else if(H.w_uniform && wash_obj(H.w_uniform)) H.update_inv_w_uniform() if(washgloves) - H.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(H, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) if(H.shoes && washshoes && wash_obj(H.shoes)) H.update_inv_shoes() if(H.wear_mask && washmask && wash_obj(H.wear_mask)) @@ -395,9 +395,9 @@ else if(M.wear_mask && wash_obj(M.wear_mask)) M.update_inv_wear_mask(0) - M.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(M, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) else - L.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(L, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) /obj/machinery/shower/proc/contamination_cleanse(atom/movable/thing) var/datum/component/radioactive/healthy_green_glow = thing.GetComponent(/datum/component/radioactive) @@ -493,7 +493,7 @@ H.regenerate_icons() user.drowsyness = max(user.drowsyness - rand(2,3), 0) //Washing your face wakes you up if you're falling asleep else - user.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(user, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) /obj/structure/sink/attackby(obj/item/O, mob/living/user, params) if(busy) @@ -539,7 +539,7 @@ if(!istype(O)) return - if(O.flags_1 & ABSTRACT_1) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand. + if(O.item_flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand. return if(user.a_intent != INTENT_HARM) @@ -549,7 +549,7 @@ busy = FALSE return 1 busy = FALSE - O.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) + SEND_SIGNAL(O, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD) O.acid_level = 0 create_reagents(5) reagents.add_reagent(dispensedreagent, 5) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 38efe39a2d..37abe17121 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -438,7 +438,7 @@ /obj/structure/window/plasma/reinforced name = "reinforced plasma window" - desc = "A window made out of a plasma-silicate alloy and a rod matrice. It looks hopelessly tough to break and is most likely nigh fireproof." + desc = "A window made out of a plasma-silicate alloy and a rod matrix. It looks hopelessly tough to break and is most likely nigh fireproof." icon_state = "plasmarwindow" reinf = TRUE heat_resistance = 50000 diff --git a/code/game/turfs/change_turf.dm b/code/game/turfs/change_turf.dm index e656b2f530..b0e46b8aa4 100644 --- a/code/game/turfs/change_turf.dm +++ b/code/game/turfs/change_turf.dm @@ -70,7 +70,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list( var/list/old_baseturfs = baseturfs var/list/transferring_comps = list() - SendSignal(COMSIG_TURF_CHANGE, path, new_baseturfs, flags, transferring_comps) + SEND_SIGNAL(src, COMSIG_TURF_CHANGE, path, new_baseturfs, flags, transferring_comps) for(var/i in transferring_comps) var/datum/component/comp = i comp.RemoveComponent() diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index db1dba66cf..62ace4c77d 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -31,6 +31,10 @@ /turf/closed/indestructible/acid_act(acidpwr, acid_volume, acid_id) return 0 +/turf/closed/indestructible/Melt() + to_be_destroyed = FALSE + return src + /turf/closed/indestructible/oldshuttle name = "strange shuttle wall" icon = 'icons/turf/shuttleold.dmi' diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm index f334f8e0b3..e1c771ed53 100644 --- a/code/game/turfs/open.dm +++ b/code/game/turfs/open.dm @@ -19,11 +19,15 @@ icon = 'icons/turf/floors.dmi' icon_state = "floor" +/turf/open/indestructible/Melt() + to_be_destroyed = FALSE + return src + /turf/open/indestructible/TerraformTurf(path, defer_change = FALSE, ignore_air = FALSE) return /turf/open/indestructible/sound - name = "squeeky floor" + name = "squeaky floor" var/sound /turf/open/indestructible/sound/Entered(var/mob/AM) @@ -186,7 +190,7 @@ for(var/mob/living/simple_animal/slime/M in src) M.apply_water() - SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) + SEND_SIGNAL(src, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_WEAK) for(var/obj/effect/O in src) if(is_cleanable(O)) qdel(O) @@ -210,7 +214,7 @@ to_chat(C, "You slipped[ O ? " on the [O.name]" : ""]!") playsound(C.loc, 'sound/misc/slip.ogg', 50, 1, -3) - C.SendSignal(COMSIG_ADD_MOOD_EVENT, "slipped", /datum/mood_event/slipped) + SEND_SIGNAL(C, COMSIG_ADD_MOOD_EVENT, "slipped", /datum/mood_event/slipped) for(var/obj/item/I in C.held_items) C.accident(I) @@ -243,7 +247,7 @@ AddComponent(/datum/component/wet_floor, wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent) /turf/open/proc/MakeDry(wet_setting = TURF_WET_WATER, immediate = FALSE, amount = INFINITY) - SendSignal(COMSIG_TURF_MAKE_DRY, wet_setting, immediate, amount) + SEND_SIGNAL(src, COMSIG_TURF_MAKE_DRY, wet_setting, immediate, amount) /turf/open/get_dumping_location() return src diff --git a/code/game/turfs/simulated/floor/light_floor.dm b/code/game/turfs/simulated/floor/light_floor.dm index ffb672e773..48674e5ae4 100644 --- a/code/game/turfs/simulated/floor/light_floor.dm +++ b/code/game/turfs/simulated/floor/light_floor.dm @@ -80,7 +80,7 @@ update_icon() to_chat(user, "You replace the light bulb.") else - to_chat(user, "The lightbulb seems fine, no need to replace it.") + to_chat(user, "The light bulb seems fine, no need to replace it.") //Cycles through all of the colours diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index e5560df6ec..cd82888827 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -133,7 +133,7 @@ .=..() if(!.) if(istype(L)) - squeek() + squeak() /turf/open/floor/mineral/bananium/attackby(obj/item/W, mob/user, params) .=..() @@ -155,7 +155,7 @@ playsound(src, 'sound/items/bikehorn.ogg', 50, 1) spam_flag = world.time + 20 -/turf/open/floor/mineral/bananium/proc/squeek() +/turf/open/floor/mineral/bananium/proc/squeak() if(spam_flag < world.time) playsound(src, "clownstep", 50, 1) spam_flag = world.time + 10 diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index b3929abf91..3b3d4c40ec 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -47,17 +47,17 @@ initial_gas_mix = "TEMP=2.7" /turf/open/floor/circuit/killroom - name = "killroom Floor" + name = "killroom floor" initial_gas_mix = "n2=500;TEMP=80" /turf/open/floor/circuit/telecomms initial_gas_mix = "n2=100;TEMP=80" /turf/open/floor/circuit/telecomms/mainframe - name = "mainframe Base" + name = "mainframe base" /turf/open/floor/circuit/telecomms/server - name = "server Base" + name = "server base" /turf/open/floor/circuit/green icon_state = "gcircuit" @@ -81,7 +81,7 @@ initial_gas_mix = "n2=100;TEMP=80" /turf/open/floor/circuit/green/telecomms/mainframe - name = "mainframe Base" + name = "mainframe base" /turf/open/floor/circuit/red icon_state = "rcircuit" diff --git a/code/game/turfs/simulated/floor/plasteel_floor.dm b/code/game/turfs/simulated/floor/plasteel_floor.dm index 815cb52bd4..1b4f959fc9 100644 --- a/code/game/turfs/simulated/floor/plasteel_floor.dm +++ b/code/game/turfs/simulated/floor/plasteel_floor.dm @@ -60,7 +60,7 @@ /turf/open/floor/plasteel/brown/telecomms initial_gas_mix = "n2=100;TEMP=80" /turf/open/floor/plasteel/brown/telecomms/mainframe - name = "mainframe Floor" + name = "mainframe floor" /turf/open/floor/plasteel/brown/corner icon_state = "browncorner" @@ -349,9 +349,9 @@ /turf/open/floor/plasteel/vault/telecomms initial_gas_mix = "n2=100;TEMP=80" /turf/open/floor/plasteel/vault/telecomms/mainframe - name = "mainframe Floor" + name = "mainframe floor" /turf/open/floor/plasteel/vault/killroom - name = "killroom Floor" + name = "killroom floor" initial_gas_mix = "n2=500;TEMP=80" /turf/open/floor/plasteel/cult diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index 63ff9f6519..a57213a4f9 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -39,7 +39,7 @@ return TRUE if(istype(W, /obj/item/storage/bag/ore)) for(var/obj/item/stack/ore/O in src) - W.SendSignal(COMSIG_PARENT_ATTACKBY, O) + SEND_SIGNAL(W, COMSIG_PARENT_ATTACKBY, O) /turf/open/floor/plating/asteroid/singularity_act() if(is_planet_level(z)) @@ -47,7 +47,7 @@ ScrapeAway() /turf/open/floor/plating/asteroid/ex_act(severity, target) - . = SendSignal(COMSIG_ATOM_EX_ACT, severity, target) + . = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target) contents_explosion(severity, target) /turf/open/floor/plating/lavaland_baseturf diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 987689cb9a..490a6dcaf7 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -466,3 +466,8 @@ var/datum/reagent/consumable/nutri_check = R if(nutri_check.nutriment_factor >0) M.reagents.remove_reagent(R.id,R.volume) + +//Whatever happens after high temperature fire dies out or thermite reaction works. +//Should return new turf +/turf/proc/Melt() + return ScrapeAway() \ No newline at end of file diff --git a/code/game/world.dm b/code/game/world.dm index a22d4345a5..7d7b17b4ac 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -11,7 +11,7 @@ GLOBAL_PROTECT(security_mode) SetupExternalRSC() - GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl + GLOB.config_error_log = GLOB.world_manifest_log = GLOB.world_pda_log = GLOB.world_job_debug_log = GLOB.sql_error_log = GLOB.world_href_log = GLOB.world_runtime_log = GLOB.world_attack_log = GLOB.world_game_log = "data/logs/config_error.log" //temporary file used to record errors with loading config, moved to log directory once logging is set bl CheckSecurityMode() @@ -96,6 +96,7 @@ GLOBAL_PROTECT(security_mode) GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log" GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log" GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log" + GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log" #ifdef UNIT_TESTS GLOB.test_log = file("[GLOB.log_directory]/tests.log") @@ -108,6 +109,7 @@ GLOBAL_PROTECT(security_mode) start_log(GLOB.world_href_log) start_log(GLOB.world_qdel_log) start_log(GLOB.world_runtime_log) + start_log(GLOB.world_job_debug_log) GLOB.changelog_hash = md5('html/changelog.html') //for telling if the changelog has changed recently if(fexists(GLOB.config_error_log))