| Job | Slots | Open job | Close job | Prioritize |
| Job | Slots | +Open job | Close job | Prioritize | |||
| [job.title] | " - dat += "[job.current_positions]/[job.total_positions] | " - dat += "" + dat += {" | [job.title] | +[job.current_positions]/[job.total_positions] | +"}
switch(can_open_job(job))
- if(1)
- if(ID)
+ if(JOB_ALLOWED)
+ if(authenticated == 2)
dat += "Open Position " else dat += "Open Position" - if(-1) - dat += "Denied" - if(-2) + if(JOB_COOLDOWN) var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) var/mins = round(time_to_wait / 60) var/seconds = time_to_wait - (60*mins) dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - if(0) + else dat += "Denied" dat += " | " switch(can_close_job(job)) - if(1) - if(ID) + if(JOB_ALLOWED) + if(authenticated == 2) dat += "Close Position" else dat += "Close Position" - if(-1) - dat += "Denied" - if(-2) + if(JOB_COOLDOWN) var/time_to_wait = round(change_position_cooldown - ((world.time / 10) - GLOB.time_last_changed_position), 1) var/mins = round(time_to_wait / 60) var/seconds = time_to_wait - (60*mins) dat += "Cooldown ongoing: [mins]:[(seconds < 10) ? "0[seconds]" : "[seconds]"]" - if(0) + else dat += "Denied" dat += " | " switch(job.total_positions) if(0) dat += "Denied" else - if(ID) + if(authenticated == 2) if(job in SSjob.prioritized_jobs) dat += "Deprioritize" else @@ -216,57 +251,36 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0) dat += " |
| "
for(var/A in get_region_accesses(i))
- if(A in modify.access)
- accesses += "[replacetext(get_access_desc(A), " ", " ")] "
+ if(A in inserted_modify_id.access)
+ accesses += "[replacetext(get_access_desc(A), " ", " ")] "
else
accesses += "[replacetext(get_access_desc(A), " ", " ")] "
accesses += " " accesses += " | "
accesses += "
You start skimming through the manual...
@@ -270,13 +270,67 @@ "} -/obj/item/book/manual/wiki/chemistry +/obj/item/book/manual/wiki/cit + name = "Citadel infobook" + icon_state ="book8" + author = "Nanotrasen" + title = "Citadel infobook" + page_link = "" + window_size = "1500x800" //Too squashed otherwise + +/obj/item/book/manual/wiki/cit/initialize_wikibook() + var/wikiurl = CONFIG_GET(string/wikiurl) + if(wikiurl) + dat = {" + + + + + + +You start skimming through the manual...
+ + + + + + "} + +/obj/item/book/manual/wiki/cit/chemistry name = "Chemistry Textbook" icon_state ="chemistrybook" author = "Nanotrasen" title = "Chemistry Textbook" + page_link = "main/guides/guide_chemistry" + +/obj/item/book/manual/wiki/cit/chem_recipies + name = "Chemistry Recipies" + icon_state ="chemrecibook" + author = "Chemcat" + title = "Chemistry Recipies" + page_link = "main/guides/chem_recipies" + +/obj/item/book/manual/wiki/chemistry + name = "Outdated Chemistry Textbook" + icon_state ="chemistrybook_old" + author = "Nanotrasen" + title = "Outdated Chemistry Textbook" page_link = "Guide_to_chemistry" +/obj/item/book/manual/wiki/chemistry/Initialize() + ..() + new /obj/item/book/manual/wiki/cit/chemistry(loc) + new /obj/item/book/manual/wiki/cit/chem_recipies(loc) + /obj/item/book/manual/wiki/engineering_construction name = "Station Repairs and Construction" icon_state ="bookEngineering" diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 57b9973aa3..51fd2c50d8 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -28,7 +28,7 @@ /obj/item/melee/transforming/energy/add_blood_DNA(list/blood_dna) return FALSE -/obj/item/melee/transforming/energy/is_sharp() +/obj/item/melee/transforming/energy/get_sharpness() return active * sharpness /obj/item/melee/transforming/energy/process() @@ -46,7 +46,7 @@ STOP_PROCESSING(SSobj, src) set_light(0) -/obj/item/melee/transforming/energy/is_hot() +/obj/item/melee/transforming/energy/get_temperature() return active * heat /obj/item/melee/transforming/energy/ignition_effect(atom/A, mob/user) @@ -233,3 +233,152 @@ desc = "An extremely sharp blade made out of hard light. Packs quite a punch." icon_state = "lightblade" item_state = "lightblade" + +/*///////////////////////////////////////////////////////////////////////// +///////////// The TRUE Energy Sword /////////////////////////// +*////////////////////////////////////////////////////////////////////////// + +/obj/item/melee/transforming/energy/sword/cx + name = "non-eutactic blade" + desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable." + icon_state = "cxsword_hilt" + item_state = "cxsword" + force = 3 + force_on = 21 + throwforce = 5 + throwforce_on = 20 + hitsound = "swing_hit" //it starts deactivated + hitsound_on = 'sound/weapons/nebhit.ogg' + attack_verb_off = list("tapped", "poked") + throw_speed = 3 + throw_range = 5 + sharpness = IS_SHARP + embedding = list("embedded_pain_multiplier" = 6, "embed_chance" = 20, "embedded_fall_chance" = 60) + armour_penetration = 10 + block_chance = 35 + light_color = "#37FFF7" + actions_types = list() + +/obj/item/melee/transforming/energy/sword/cx/pre_altattackby(atom/A, mob/living/user, params) //checks if it can do right click memes + altafterattack(A, user, TRUE, params) + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/altafterattack(atom/target, mob/living/carbon/user, proximity_flag, click_parameters) //does right click memes + if(istype(user)) + user.visible_message("[user] points the tip of [src] at [target].", "You point the tip of [src] at [target].") + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/transform_weapon(mob/living/user, supress_message_text) + active = !active //I'd use a ..() here but it'd inherit from the regular esword's proc instead, so SPAGHETTI CODE + if(active) //also I'd need to rip out the iconstate changing bits + force = force_on + throwforce = throwforce_on + hitsound = hitsound_on + throw_speed = 4 + if(attack_verb_on.len) + attack_verb = attack_verb_on + w_class = w_class_on + START_PROCESSING(SSobj, src) + set_light(brightness_on) + update_icon() + else + force = initial(force) + throwforce = initial(throwforce) + hitsound = initial(hitsound) + throw_speed = initial(throw_speed) + if(attack_verb_off.len) + attack_verb = attack_verb_off + w_class = initial(w_class) + STOP_PROCESSING(SSobj, src) + set_light(0) + update_icon() + transform_messages(user, supress_message_text) + add_fingerprint(user) + return TRUE + +/obj/item/melee/transforming/energy/sword/cx/transform_messages(mob/living/user, supress_message_text) + playsound(user, active ? 'sound/weapons/nebon.ogg' : 'sound/weapons/neboff.ogg', 65, 1) + if(!supress_message_text) + to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") + +/obj/item/melee/transforming/energy/sword/cx/update_icon() + var/mutable_appearance/blade_overlay = mutable_appearance(icon, "cxsword_blade") + var/mutable_appearance/gem_overlay = mutable_appearance(icon, "cxsword_gem") + + if(light_color) + blade_overlay.color = light_color + gem_overlay.color = light_color + + cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other + + add_overlay(gem_overlay) + + if(active) + add_overlay(blade_overlay) + if(ismob(loc)) + var/mob/M = loc + M.update_inv_hands() + +/obj/item/melee/transforming/energy/sword/cx/AltClick(mob/living/user) + if(!in_range(src, user)) //Basic checks to prevent abuse + return + if(user.incapacitated() || !istype(user)) + to_chat(user, "You can't do that right now!") + return + + if(alert("Are you sure you want to recolor your blade?", "Confirm Repaint", "Yes", "No") == "Yes") + var/energy_color_input = input(usr,"","Choose Energy Color",light_color) as color|null + if(energy_color_input) + light_color = sanitize_hexcolor(energy_color_input, desired_format=6, include_crunch=1) + update_icon() + update_light() + +/obj/item/melee/transforming/energy/sword/cx/examine(mob/user) + ..() + to_chat(user, "Alt-click to recolor it.") + +/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file) + . = ..() + if(active) + if(isinhands) + var/mutable_appearance/blade_inhand = mutable_appearance(icon_file, "cxsword_blade") + blade_inhand.color = light_color + . += blade_inhand + +//Broken version. Not a toy, but not as strong. +/obj/item/melee/transforming/energy/sword/cx/broken + name = "misaligned non-eutactic blade" + desc = "The Non-Eutactic Blade utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. This one seems to have a damaged handle and misaligned components, causing the blade to be unstable at best" + force_on = 15 //As strong a survival knife/bone dagger + +/obj/item/melee/transforming/energy/sword/cx/attackby(obj/item/W, mob/living/user, params) + if(istype(W, /obj/item/melee/transforming/energy/sword/cx)) + if(HAS_TRAIT(W, TRAIT_NODROP) || HAS_TRAIT(src, TRAIT_NODROP)) + to_chat(user, "\the [HAS_TRAIT(src, TRAIT_NODROP) ? src : W] is stuck to your hand, you can't attach it to \the [HAS_TRAIT(src, TRAIT_NODROP) ? W : src]!") + return + else + to_chat(user, "You combine the two light swords, making a single supermassive blade! You're cool.") + new /obj/item/twohanded/dualsaber/hypereutactic(user.drop_location()) + qdel(W) + qdel(src) + else + return ..() + +//////// Tatortot NEB /////////////// (same stats as regular esword) +/obj/item/melee/transforming/energy/sword/cx/traitor + name = "\improper Dragon's Tooth Sword" + desc = "The Dragon's Tooth sword is a blackmarket modification of a Non-Eutactic Blade, \ + which utilizes a hardlight blade that is dynamically 'forged' on demand to create a deadly sharp edge that is unbreakable. \ + It appears to have a wooden grip and a shaved down guard." + icon_state = "cxsword_hilt_traitor" + force_on = 30 + armour_penetration = 50 + embedding = list("embedded_pain_multiplier" = 10, "embed_chance" = 75, "embedded_fall_chance" = 0, "embedded_impact_pain_multiplier" = 10) + block_chance = 50 + hitsound_on = 'sound/weapons/blade1.ogg' + light_color = "#37F0FF" + +/obj/item/melee/transforming/energy/sword/cx/traitor/transform_messages(mob/living/user, supress_message_text) + playsound(user, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, 1) + if(!supress_message_text) + to_chat(user, "[src] [active ? "is now active":"can now be concealed"].") diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 10b84917bb..d7c2f7f4f6 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -265,7 +265,7 @@ if (B && !QDELETED(B)) H.internal_organs -= B qdel(B) - new /obj/effect/gibspawner/generic(get_turf(H), H.dna) + H.spawn_gibs() return (BRUTELOSS) /obj/item/melee/classic_baton/telescopic/attack_self(mob/user) diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm index aabb930bb2..7eb35ed06b 100644 --- a/code/game/objects/items/melee/transforming.dm +++ b/code/game/objects/items/melee/transforming.dm @@ -23,7 +23,7 @@ else if(attack_verb_off.len) attack_verb = attack_verb_off - if(is_sharp()) + if(get_sharpness()) AddComponent(/datum/component/butchering, 50, 100, 0, hitsound, !active) /obj/item/melee/transforming/attack_self(mob/living/carbon/user) @@ -65,11 +65,11 @@ icon_state = initial(icon_state) w_class = initial(w_class) total_mass = initial(total_mass) - if(is_sharp()) + if(get_sharpness()) var/datum/component/butchering/BT = LoadComponent(/datum/component/butchering) BT.butchering_enabled = TRUE else - GET_COMPONENT(BT, /datum/component/butchering) + var/datum/component/butchering/BT = GetComponent(/datum/component/butchering) if(BT) BT.butchering_enabled = FALSE transform_messages(user, supress_message_text) diff --git a/code/game/objects/items/mop.dm b/code/game/objects/items/mop.dm index 7524fc9007..3f7fe7ee8d 100644 --- a/code/game/objects/items/mop.dm +++ b/code/game/objects/items/mop.dm @@ -27,6 +27,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)) SEND_SIGNAL(A, COMSIG_COMPONENT_CLEAN_ACT, CLEAN_MEDIUM) + A.clean_blood() for(var/obj/effect/O in A) if(is_cleanable(O)) qdel(O) diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index a73be6e12e..30442d7304 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -122,7 +122,7 @@ if(user.mob_size <= MOB_SIZE_SMALL) to_chat(user, "You poke a limb through [src]'s bars and start fumbling for the lock switch... (This will take some time.)") to_chat(loc, "You see [user] reach through the bars and fumble for the lock switch!") - if(!do_after(user, rand(300, 400), target = user) || open || !locked || !user in occupants) + if(!do_after(user, rand(300, 400), target = user) || open || !locked || !(user in occupants)) return loc.visible_message("[user] flips the lock switch on [src] by reaching through!", null, null, null, user) to_chat(user, "Bingo! The lock pops open!") @@ -132,7 +132,7 @@ else loc.visible_message("[src] starts rattling as something pushes against the door!", null, null, null, user) to_chat(user, "You start pushing out of [src]... (This will take about 20 seconds.)") - if(!do_after(user, 200, target = user) || open || !locked || !user in occupants) + if(!do_after(user, 200, target = user) || open || !locked || !(user in occupants)) return loc.visible_message("[user] shoves out of [src]!", null, null, null, user) to_chat(user, "You shove open [src]'s door against the lock's resistance and fall out!") @@ -185,7 +185,7 @@ occupant_weight += occupant.mob_size /obj/item/pet_carrier/proc/remove_occupant(mob/living/occupant, turf/new_turf) - if(!occupant in occupants || !istype(occupant)) + if(!(occupant in occupants) || !istype(occupant)) return occupant.forceMove(new_turf ? new_turf : drop_location()) occupants -= occupant diff --git a/code/game/objects/items/plushes.dm b/code/game/objects/items/plushes.dm index 48588cf9f3..ffbbea84dc 100644 --- a/code/game/objects/items/plushes.dm +++ b/code/game/objects/items/plushes.dm @@ -117,7 +117,7 @@ to_chat(user, "You try to pet [src], but it has no stuffing. Aww...") /obj/item/toy/plush/attackby(obj/item/I, mob/living/user, params) - if(I.is_sharp()) + if(I.get_sharpness()) if(!grenade) if(!stuffed) to_chat(user, "You already murdered it!") @@ -366,10 +366,10 @@ /obj/item/toy/plush/random name = "Illegal plushie" desc = "Something fucked up" + var/blacklisted_plushes = list(/obj/item/toy/plush/carpplushie/dehy_carp, /obj/item/toy/plush/awakenedplushie, /obj/item/toy/plush/random) /obj/item/toy/plush/random/Initialize() - ..() - var/newtype = pick(subtypesof(/obj/item/toy/plush)) + var/newtype = pick(subtypesof(/obj/item/toy/plush) - typecacheof(blacklisted_plushes)) new newtype(loc) return INITIALIZE_HINT_QDEL @@ -558,6 +558,37 @@ item_state = "almaz" squeak_override = list('modular_citadel/sound/voice/raptor_purr.ogg' = 1) +/obj/item/toy/plush/lizardplushie/garou + icon_state = "garou" + item_state = "garou" + +/obj/item/toy/plush/lizardplushie/augments + icon_state = "augments" + item_state = "augments" + squeak_override = list('modular_citadel/sound/voice/weh.ogg' = 1) //I have no mouth and I must weh + attack_verb = list("hugged", "patted", "snugged", "booped") + +/obj/item/toy/plush/lizardplushie/xekov + icon_state = "xekov" + item_state = "xekov" + +/obj/item/toy/plush/lizardplushie/greg + icon_state = "greg" + item_state = "greg" + +/obj/item/toy/plush/lizardplushie/sin + icon_state = "sin" + item_state = "sin" + desc = "An adorable stuffed toy that resembles a lizardperson.. It faintly smells of sulfur." + +/obj/item/toy/plush/lizardplushie/ends + icon_state = "ends" + item_state = "ends" + +/obj/item/toy/plush/lizardplushie/lyssa + icon_state = "lyssa" + item_state = "lyssa" + /obj/item/toy/plush/snakeplushie name = "snake plushie" desc = "An adorable stuffed toy that resembles a snake. Not to be mistaken for the real thing." @@ -715,6 +746,14 @@ item_state = "bhijn" attack_verb = list("closed", "reworked", "merged") +/obj/item/toy/plush/aiplush + name = "AI plushie" + desc = "A little stuffed toy AI core... it appears to be malfunctioning." + icon_state = "exo" + item_state = "exo" + attack_verb = list("hacked", "detonated", "overloaded") + squeak_override = list('sound/machines/beep.ogg' = 9, 'sound/machines/buzz-two.ogg' = 1) + /obj/item/toy/plush/bird name = "bird plushie" desc = "An adorable stuffed plushie that resembles an avian." @@ -862,6 +901,18 @@ item_state = "redwood" attack_verb = list("ordered", "bapped", "reprimanded") +/obj/item/toy/plush/mammal/marisol + desc = "An adorable stuffed toy resembling a demi-wolf security officer." + icon_state = "marisol" + item_state = "marisol" + attack_verb = list("arrested", "harmbattoned", "lasered") + +/obj/item/toy/plush/mammal/minty + desc = "An adorable stuffed toy resembling some sort of crew member. It smells like mint.." + icon_state = "minty" + item_state = "minty" + attack_verb = list("freshened", "brushed") + /obj/item/toy/plush/mammal/dog desc = "An adorable stuffed toy that resembles a canine." icon_state = "katlin" @@ -929,8 +980,8 @@ /obj/item/toy/plush/catgirl/skylar desc = "An adorable stuffed toy that resembles a degenerate." - icon_state = "skylar" - item_state = "skylar" + icon_state = "skylar2" + item_state = "skylar2" attack_verb = list("powergamed", "merged", "tabled") squeak_override = list('sound/effects/meow1.ogg' = 1) @@ -942,15 +993,15 @@ desc = "A masked stuffed toy that resembles a feline scientist." icon_state = "trilby" item_state = "trilby" - attack_verb = list("pred", "coded", "remembered") + attack_verb = list("PR'd", "coded", "remembered") /obj/item/toy/plush/catgirl/fermis - name = "medcat plushie" - desc = "An affectionate stuffed toy that resembles a certain medcat, comes complete with battery operated wagging tail!! You get the impression she's cheering you on to to find happiness and be kind to people." - icon_state = "fermis" - item_state = "fermis" - attack_verb = list("cuddled", "petpatted", "wigglepurred") - squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1) + name = "medcat plushie" + desc = "An affectionate stuffed toy that resembles a certain medcat, comes complete with battery operated wagging tail!! You get the impression she's cheering you on to to find happiness and be kind to people." + icon_state = "fermis" + item_state = "fermis" + attack_verb = list("cuddled", "petpatted", "wigglepurred") + squeak_override = list('modular_citadel/sound/voice/merowr.ogg' = 1) /obj/item/toy/plush/catgirl/mariaf desc = "An adorable stuffed toy that resembles a very tall cat girl." @@ -963,3 +1014,9 @@ icon_state = "maya" item_state = "maya" attack_verb = list("nuked", "arrested", "harmbatonned") + +/obj/item/toy/plush/catgirl/marisa + desc = "An adorable stuffed toy that resembles a crew member, or maybe a witch. Having it makes you feel you can win." + icon_state = "marisa" + item_state = "marisa" + attack_verb = list("blasted", "sparked", "dazzled") diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm index 8582725cda..7b3dcb1e00 100644 --- a/code/game/objects/items/religion.dm +++ b/code/game/objects/items/religion.dm @@ -82,14 +82,6 @@ /obj/item/banner/security/mundane inspiration_available = FALSE -/datum/crafting_recipe/security_banner - name = "Securistan Banner" - result = /obj/item/banner/security/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/rank/security = 1) - category = CAT_MISC - /obj/item/banner/medical name = "meditopia banner" desc = "The banner of Meditopia, generous benefactors that cure wounds and shelter the weak." @@ -103,14 +95,6 @@ /obj/item/banner/medical/check_inspiration(mob/living/carbon/human/H) return H.stat //Meditopia is moved to help those in need -/datum/crafting_recipe/medical_banner - name = "Meditopia Banner" - result = /obj/item/banner/medical/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/rank/medical = 1) - category = CAT_MISC - /obj/item/banner/medical/special_inspiration(mob/living/carbon/human/H) H.adjustToxLoss(-15) H.setOxyLoss(0) @@ -129,14 +113,6 @@ /obj/item/banner/science/check_inspiration(mob/living/carbon/human/H) return H.on_fire //Sciencia is pleased by dedication to the art of Toxins -/datum/crafting_recipe/science_banner - name = "Sciencia Banner" - result = /obj/item/banner/science/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/rank/scientist = 1) - category = CAT_MISC - /obj/item/banner/cargo name = "cargonia banner" desc = "The banner of the eternal Cargonia, with the mystical power of conjuring any object into existence." @@ -147,14 +123,6 @@ /obj/item/banner/cargo/mundane inspiration_available = FALSE -/datum/crafting_recipe/cargo_banner - name = "Cargonia Banner" - result = /obj/item/banner/cargo/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/rank/cargotech = 1) - category = CAT_MISC - /obj/item/banner/engineering name = "engitopia banner" desc = "The banner of Engitopia, wielders of limitless power." @@ -168,14 +136,6 @@ /obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H) H.radiation = 0 -/datum/crafting_recipe/engineering_banner - name = "Engitopia Banner" - result = /obj/item/banner/engineering/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/rank/engineer = 1) - category = CAT_MISC - /obj/item/banner/command name = "command banner" desc = "The banner of Command, a staunch and ancient line of bueraucratic kings and queens." @@ -189,14 +149,6 @@ /obj/item/banner/command/check_inspiration(mob/living/carbon/human/H) return HAS_TRAIT(H, TRAIT_MINDSHIELD) //Command is stalwart but rewards their allies. -/datum/crafting_recipe/command_banner - name = "Command Banner" - result = /obj/item/banner/command/mundane - time = 40 - reqs = list(/obj/item/stack/rods = 2, - /obj/item/clothing/under/captainparade = 1) - category = CAT_MISC - /obj/item/banner/red name = "red banner" icon_state = "banner-red" @@ -216,7 +168,7 @@ /obj/item/storage/backpack/bannerpack/Initialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 27 //6 more then normal, for the tradeoff of declaring yourself an antag at all times. /obj/item/storage/backpack/bannerpack/red @@ -286,7 +238,6 @@ var/staffcooldown = 0 var/staffwait = 30 - /obj/item/godstaff/afterattack(atom/target, mob/user, proximity_flag, click_parameters) . = ..() if(staffcooldown + staffwait > world.time) @@ -332,19 +283,16 @@ heat_protection = FEET max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT - /obj/item/clothing/shoes/plate/red icon_state = "crusader-red" /obj/item/clothing/shoes/plate/blue icon_state = "crusader-blue" - /obj/item/storage/box/itemset/crusader name = "Crusader's Armour Set" //i can't into ck2 references desc = "This armour is said to be based on the armor of kings on another world thousands of years ago, who tended to assassinate, conspire, and plot against everyone who tried to do the same to them. Some things never change." - /obj/item/storage/box/itemset/crusader/blue/New() ..() contents = list() @@ -354,7 +302,6 @@ new /obj/item/clothing/gloves/plate/blue(src) new /obj/item/clothing/shoes/plate/blue(src) - /obj/item/storage/box/itemset/crusader/red/New() ..() contents = list() @@ -364,7 +311,6 @@ new /obj/item/clothing/gloves/plate/red(src) new /obj/item/clothing/shoes/plate/red(src) - /obj/item/claymore/weak desc = "This one is rusted." force = 30 diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 5454b0fdb8..77bc7ed810 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -313,7 +313,7 @@ if(M.get_ear_protection() == FALSE) M.confused += 6 audible_message("HUMAN HARM") - playsound(get_turf(src), 'sound/ai/harmalarm.ogg', 70, 3) + playsound(get_turf(src), 'sound/effects/harmalarm.ogg', 70, 3) cooldown = world.time + 200 log_game("[key_name(user)] used a Cyborg Harm Alarm in [AREACOORD(user)]") if(iscyborg(user)) @@ -430,7 +430,7 @@ A.BB.nodamage = FALSE A.BB.speed = 0.5 playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - A.fire_casing(target, user, params, 0, 0, null, 0) + A.fire_casing(target, user, params, 0, 0, null, 0, src) user.visible_message("[user] blasts a flying lollipop at [target]!") check_amount() @@ -446,7 +446,7 @@ A.BB.speed = 0.5 A.BB.color = rgb(rand(0, 255), rand(0, 255), rand(0, 255)) playsound(src.loc, 'sound/weapons/bulletflyby3.ogg', 50, 1) - A.fire_casing(target, user, params, 0, 0, null, 0) + A.fire_casing(target, user, params, 0, 0, null, 0, src) user.visible_message("[user] shoots a high-velocity gumball at [target]!") check_amount() @@ -746,3 +746,73 @@ ..() hud = new /obj/item/clothing/glasses/hud/security(src) return + + +/********************************************************************** + Grippers oh god oh fuck +***********************************************************************/ + +/obj/item/weapon/gripper + name = "circuit gripper" + desc = "A simple grasping tool for inserting circuitboards into machinary." + icon = 'icons/obj/device.dmi' + icon_state = "gripper" + + item_flags = NOBLUDGEON + + //Has a list of items that it can hold. + var/list/can_hold = list( + /obj/item/circuitboard + ) + + var/obj/item/wrapped = null // Item currently being held. + +/obj/item/weapon/gripper/attack_self() + if(wrapped) + wrapped.forceMove(get_turf(wrapped)) + wrapped = null + return ..() + +/obj/item/weapon/gripper/afterattack(var/atom/target, var/mob/living/user, proximity, params) + + if(!proximity) + return + + if(!wrapped) + for(var/obj/item/thing in src.contents) + wrapped = thing + break + + if(wrapped) //Already have an item. + //Temporary put wrapped into user so target's attackby() checks pass. + wrapped.loc = user + + //Pass the attack on to the target. This might delete/relocate wrapped. + var/resolved = target.attackby(wrapped,user) + if(!resolved && wrapped && target) + wrapped.afterattack(target,user,1) + //If wrapped was neither deleted nor put into target, put it back into the gripper. + if(wrapped && user && (wrapped.loc == user)) + wrapped.loc = src + else + wrapped = null + return + + else if(istype(target,/obj/item)) + + var/obj/item/I = target + + var/grab = 0 + for(var/typepath in can_hold) + if(istype(I,typepath)) + grab = 1 + break + + //We can grab the item, finally. + if(grab) + to_chat(user, "You collect \the [I].") + I.loc = src + wrapped = I + return + else + to_chat(user, "Your gripper cannot hold \the [target].") diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 9c929a6ebf..a0b78d8b27 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -89,32 +89,36 @@ R.speed = initial(R.speed) /obj/item/borg/upgrade/disablercooler - name = "cyborg rapid disabler cooling module" - desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate." + name = "cyborg rapid energy blaster cooling module" + desc = "Used to cool a mounted energy-based firearm, increasing the potential current in it and thus its recharge rate." icon_state = "cyborg_upgrade3" require_module = 1 /obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R, user = usr) . = ..() if(.) - var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules - if(!T) - to_chat(user, "There's no disabler in this unit!") + var/successflag + for(var/obj/item/gun/energy/T in R.module.modules) + if(T.charge_delay <= 2) + successflag = successflag || 2 + continue + T.charge_delay = max(2, T.charge_delay - 4) + successflag = 1 + if(!successflag) + to_chat(user, "There's no energy-based firearm in this unit!") return FALSE - if(T.charge_delay <= 2) + if(successflag == 2) to_chat(R, "A cooling unit is already installed!") to_chat(user, "There's no room for another cooling unit!") return FALSE - T.charge_delay = max(2 , T.charge_delay - 4) - /obj/item/borg/upgrade/disablercooler/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) - var/obj/item/gun/energy/disabler/cyborg/T = locate() in R.module.modules - if(!T) - return FALSE - T.charge_delay = initial(T.charge_delay) + for(var/obj/item/gun/energy/T in R.module.modules) + T.charge_delay = initial(T.charge_delay) + return . + return FALSE /obj/item/borg/upgrade/thrusters name = "ion thruster upgrade" @@ -199,7 +203,7 @@ desc = "A trash bag of holding replacement for the janiborg's standard trash bag." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = list(/obj/item/robot_module/janitor, /obj/item/robot_module/scrubpup) + module_type = list(/obj/item/robot_module/butler) /obj/item/borg/upgrade/tboh/action(mob/living/silicon/robot/R) . = ..() @@ -226,7 +230,7 @@ desc = "An advanced mop replacement for the janiborg's standard mop." icon_state = "cyborg_upgrade3" require_module = 1 - module_type = list(/obj/item/robot_module/janitor, /obj/item/robot_module/scrubpup) + module_type = list(/obj/item/robot_module/butler) /obj/item/borg/upgrade/amop/action(mob/living/silicon/robot/R) . = ..() @@ -518,8 +522,7 @@ module_type = list( /obj/item/robot_module/medical, /obj/item/robot_module/syndicate_medical, - /obj/item/robot_module/medihound, - /obj/item/robot_module/borgi) + /obj/item/robot_module/medihound) /obj/item/borg/upgrade/advhealth/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -598,25 +601,32 @@ R.update_transform() /obj/item/borg/upgrade/rped - name = "engineering cyborg RPED" + name = "engineering cyborg BSRPED" desc = "A rapid part exchange device for the engineering cyborg." icon = 'icons/obj/storage.dmi' - icon_state = "borgrped" + icon_state = "borg_BS_RPED" require_module = TRUE - module_type = list(/obj/item/robot_module/engineering) + module_type = list(/obj/item/robot_module/engineering, /obj/item/robot_module/saboteur) /obj/item/borg/upgrade/rped/action(mob/living/silicon/robot/R, user = usr) . = ..() if(.) + var/obj/item/storage/part_replacer/bluespace/cyborg/BSRPED = locate() in R var/obj/item/storage/part_replacer/cyborg/RPED = locate() in R - if(RPED) - to_chat(user, "This unit is already equipped with a RPED module.") + if(!RPED) + RPED = locate() in R.module + if(!BSRPED) + BSRPED = locate() in R.module //There's gotta be a smarter way to do this. + if(BSRPED) + to_chat(user, "This unit is already equipped with a BSRPED module.") return FALSE - RPED = new(R.module) - R.module.basic_modules += RPED - R.module.add_module(RPED, FALSE, TRUE) + BSRPED = new(R.module) + SEND_SIGNAL(RPED, COMSIG_TRY_STORAGE_QUICK_EMPTY) + qdel(RPED) + R.module.basic_modules += BSRPED + R.module.add_module(BSRPED, FALSE, TRUE) /obj/item/borg/upgrade/rped/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() @@ -680,7 +690,7 @@ action_icon_state = "Chevron_State_0" var/currentState = 0 - var/maxReduction = 2 + var/maxReduction = 1 /obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) @@ -688,14 +698,14 @@ currentState = (currentState + 1) % 3 - if(usr) + if(istype(self)) switch(currentState) if (0) - self.speed = maxReduction + self.speed = initial(self.speed) if (1) - self.speed -= maxReduction*0.5 + self.speed = initial(self.speed) - maxReduction * 0.5 if (2) - self.speed -= maxReduction*1.25 + self.speed = initial(self.speed) - maxReduction * 1 action.button_icon_state = "Chevron_State_[currentState]" action.UpdateButtonIcon() diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 5610cbad9a..9f3e5f6bd4 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -17,7 +17,6 @@ var/self_delay = 50 /obj/item/stack/medical/attack(mob/living/M, mob/user) - if(M.stat == DEAD && !stop_bleeding) var/t_him = "it" if(M.gender == MALE) @@ -129,7 +128,7 @@ /obj/item/stack/medical/gauze/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/wirecutters) || I.is_sharp()) + if(istype(I, /obj/item/wirecutters) || I.get_sharpness()) if(get_amount() < 2) to_chat(user, "You need at least two gauzes to do this!") return diff --git a/code/game/objects/items/stacks/sheets/leather.dm b/code/game/objects/items/stacks/sheets/leather.dm index 01351ab2e2..7297bb3aae 100644 --- a/code/game/objects/items/stacks/sheets/leather.dm +++ b/code/game/objects/items/stacks/sheets/leather.dm @@ -219,7 +219,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \ //Step one - dehairing. /obj/item/stack/sheet/animalhide/attackby(obj/item/W, mob/user, params) - if(W.is_sharp()) + if(W.get_sharpness()) playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1) user.visible_message("[user] starts cutting hair off \the [src].", "You start cutting the hair off \the [src]...", "You hear the sound of a knife rubbing against flesh.") if(do_after(user, 50, target = src)) diff --git a/code/game/objects/items/stacks/sheets/mineral.dm b/code/game/objects/items/stacks/sheets/mineral.dm index 46c0d47388..96546d6eb6 100644 --- a/code/game/objects/items/stacks/sheets/mineral.dm +++ b/code/game/objects/items/stacks/sheets/mineral.dm @@ -178,11 +178,11 @@ GLOBAL_LIST_INIT(plasma_recipes, list ( \ . = ..() /obj/item/stack/sheet/mineral/plasma/attackby(obj/item/W as obj, mob/user as mob, params) - if(W.is_hot() > 300)//If the temperature of the object is over 300, then ignite + if(W.get_temperature() > 300)//If the temperature of the object is over 300, then ignite var/turf/T = get_turf(src) message_admins("Plasma sheets ignited by [ADMIN_LOOKUPFLW(user)] in [ADMIN_VERBOSEJMP(T)]") log_game("Plasma sheets ignited by [key_name(user)] in [AREACOORD(T)]") - fire_act(W.is_hot()) + fire_act(W.get_temperature()) else return ..() diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index c085306892..c10fb0fa2c 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -10,6 +10,7 @@ * Runed Metal (cult) * Brass (clockwork cult) * Bronze (bake brass) + * Cotton/Duracotton */ /* @@ -186,31 +187,43 @@ GLOBAL_LIST_INIT(plasteel_recipes, list ( \ */ GLOBAL_LIST_INIT(wood_recipes, list ( \ new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \ + new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \ new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \ new/datum/stack_recipe("wood table frame", /obj/structure/table_frame/wood, 2, time = 10), \ + null, \ + new/datum/stack_recipe_list("pews", list( + new /datum/stack_recipe("pew (middle)", /obj/structure/chair/pew, 3, one_per_turf = TRUE, on_floor = TRUE),\ + new /datum/stack_recipe("pew (left)", /obj/structure/chair/pew/left, 3, one_per_turf = TRUE, on_floor = TRUE),\ + new /datum/stack_recipe("pew (right)", /obj/structure/chair/pew/right, 3, one_per_turf = TRUE, on_floor = TRUE),\ + )), + null, \ new/datum/stack_recipe("rifle stock", /obj/item/weaponcrafting/stock, 10, time = 40), \ new/datum/stack_recipe("rolling pin", /obj/item/kitchen/rollingpin, 2, time = 30), \ + new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \ + new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\ + null, \ new/datum/stack_recipe("wooden chair", /obj/structure/chair/wood/, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("winged wooden chair", /obj/structure/chair/wood/wings, 3, time = 10, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("plywood chair", /obj/structure/chair/comfy/plywood, 4, time = 10, one_per_turf = TRUE, on_floor = TRUE), \ + null, \ new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("wooden door", /obj/structure/mineral_door/wood, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("rustic wooden door", /obj/structure/mineral_door/woodrustic, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE), \ + null, \ + new/datum/stack_recipe("wooden barrel", /obj/structure/fermenting_barrel, 10, time = 20, one_per_turf = TRUE, on_floor = TRUE),\ new/datum/stack_recipe("coffin", /obj/structure/closet/crate/coffin, 5, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("book case", /obj/structure/bookcase, 4, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("drying rack", /obj/machinery/smartfridge/drying_rack, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("dog bed", /obj/structure/bed/dogbed, 10, time = 10, one_per_turf = TRUE, on_floor = TRUE), \ new/datum/stack_recipe("dresser", /obj/structure/dresser, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ - new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\ - new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \ - new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ - new/datum/stack_recipe("wooden buckler", /obj/item/shield/riot/buckler, 20, time = 40), \ - new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\ - new/datum/stack_recipe("tiki mask", /obj/item/clothing/mask/gas/tiki_mask, 2), \ - new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\ new/datum/stack_recipe("ore box", /obj/structure/ore_box, 4, time = 50, one_per_turf = TRUE, on_floor = TRUE),\ new/datum/stack_recipe("wooden crate", /obj/structure/closet/crate/wooden, 6, time = 50, one_per_turf = TRUE, on_floor = TRUE),\ - new/datum/stack_recipe("baseball bat", /obj/item/melee/baseball_bat, 5, time = 15),\ + new/datum/stack_recipe("display case chassis", /obj/structure/displaycase_chassis, 5, one_per_turf = TRUE, on_floor = TRUE), \ + new/datum/stack_recipe("loom", /obj/structure/loom, 10, time = 15, one_per_turf = TRUE, on_floor = TRUE), \ + new/datum/stack_recipe("apiary", /obj/structure/beebox, 40, time = 50),\ + null, \ + new/datum/stack_recipe("picture frame", /obj/item/wallframe/picture, 1, time = 10),\ + new/datum/stack_recipe("honey frame", /obj/item/honey_frame, 5, time = 10),\ )) /obj/item/stack/sheet/mineral/wood @@ -272,6 +285,9 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ resistance_flags = FLAMMABLE force = 0 throwforce = 0 + pull_effort = 90 + is_fabric = TRUE + loom_result = /obj/item/stack/sheet/silk merge_type = /obj/item/stack/sheet/cloth /obj/item/stack/sheet/cloth/Initialize(mapload, new_amount, merge = TRUE) @@ -281,6 +297,22 @@ GLOBAL_LIST_INIT(cloth_recipes, list ( \ /obj/item/stack/sheet/cloth/ten amount = 10 +/obj/item/stack/sheet/cloth/thirty + amount = 30 + +/obj/item/stack/sheet/silk + name = "silk" + desc = "A long soft material. This one is just made out of cotton rather then any spiders or wyrms" + singular_name = "silk sheet" + icon_state = "sheet-silk" + item_state = "sheet-cloth" + novariants = TRUE + merge_type = /obj/item/stack/sheet/silk + +//obj/item/stack/sheet/silk/Initialize(mapload, new_amount, merge = TRUE) +// recipes = GLOB.silk_recipes +// return ..() + //Durathread fuck slash-asterisk comments GLOBAL_LIST_INIT(durathread_recipes, list ( \ new/datum/stack_recipe("durathread jumpsuit", /obj/item/clothing/under/durathread, 4, time = 40), @@ -649,6 +681,12 @@ new /datum/stack_recipe("paper frame door", /obj/structure/mineral_door/paperfra pull_effort = 30 loom_result = /obj/item/stack/sheet/cloth +/obj/item/stack/sheet/cotton/ten + amount = 10 + +/obj/item/stack/sheet/cotton/thirty + amount = 30 + /obj/item/stack/sheet/cotton/durathread name = "raw durathread bundle" desc = "A bundle of raw durathread ready to be spun on the loom." diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm index 155d1f1643..7654199cf5 100644 --- a/code/game/objects/items/stacks/stack.dm +++ b/code/game/objects/items/stacks/stack.dm @@ -390,9 +390,9 @@ . = ..() /obj/item/stack/proc/copy_evidences(obj/item/stack/from) - add_blood_DNA(from.return_blood_DNA()) - add_fingerprint_list(from.return_fingerprints()) - add_hiddenprint_list(from.return_hiddenprints()) + blood_DNA = from.blood_DNA + fingerprints = from.fingerprints + fingerprintshidden = from.fingerprintshidden fingerprintslast = from.fingerprintslast //TODO bloody overlay @@ -437,4 +437,4 @@ /datum/stack_recipe_list/New(title, recipes) src.title = title - src.recipes = recipes + src.recipes = recipes \ No newline at end of file diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 7c34ae87bf..9b5ca2b066 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -13,7 +13,7 @@ var/mob/living/L = user for(var/obj/item/implant/uplink/I in L.implants) if(I?.imp_in) - GET_COMPONENT_FROM(hidden_uplink, /datum/component/uplink, I) + var/datum/component/uplink/hidden_uplink = I.GetComponent(/datum/component/uplink) if(hidden_uplink) hidden_uplink.telecrystals += amount use(amount) diff --git a/code/game/objects/items/storage/backpack.dm b/code/game/objects/items/storage/backpack.dm index 7f9403fd51..f6e169a4d5 100644 --- a/code/game/objects/items/storage/backpack.dm +++ b/code/game/objects/items/storage/backpack.dm @@ -23,7 +23,7 @@ /obj/item/storage/backpack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 21 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_items = 21 @@ -34,7 +34,7 @@ /obj/item/storage/backpack/old/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 12 /obj/item/storage/backpack/holding @@ -58,7 +58,7 @@ /obj/item/storage/backpack/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_big_nesting = TRUE STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 35 @@ -87,7 +87,7 @@ /obj/item/storage/backpack/santabag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 60 @@ -260,7 +260,7 @@ /obj/item/storage/backpack/satchel/bone/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 20 STR.max_items = 15 @@ -286,7 +286,7 @@ /obj/item/storage/backpack/satchel/flat/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 6 STR.cant_hold = typecacheof(list(/obj/item/storage/backpack/satchel/flat)) //muh recursive backpacks @@ -338,7 +338,7 @@ /obj/item/storage/backpack/duffelbag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 30 /obj/item/storage/backpack/duffelbag/captain @@ -444,7 +444,7 @@ /obj/item/storage/backpack/duffelbag/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.silent = TRUE /obj/item/storage/backpack/duffelbag/syndie/hitman @@ -594,7 +594,7 @@ // For ClownOps. /obj/item/storage/backpack/duffelbag/clown/syndie/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) slowdown = 0 STR.silent = TRUE diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 232d1bd5c9..eafa79798e 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -21,7 +21,7 @@ /obj/item/storage/bag/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.allow_quick_gather = TRUE STR.allow_quick_empty = TRUE STR.display_numerical_stacking = TRUE @@ -44,11 +44,13 @@ /obj/item/storage/bag/trash/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL STR.max_combined_w_class = 30 STR.max_items = 30 STR.cant_hold = typecacheof(list(/obj/item/disk/nuclear)) + STR.limited_random_access = TRUE + STR.limited_random_access_stack_position = 3 /obj/item/storage/bag/trash/suicide_act(mob/user) user.visible_message("[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!") @@ -85,9 +87,10 @@ /obj/item/storage/bag/trash/bluespace/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 60 STR.max_items = 60 + STR.limited_random_access_stack_position = 5 /obj/item/storage/bag/trash/bluespace/cyborg insertable = FALSE @@ -105,12 +108,12 @@ w_class = WEIGHT_CLASS_NORMAL component_type = /datum/component/storage/concrete/stack var/spam_protection = FALSE //If this is TRUE, the holder won't receive any messages when they fail to pick up ore through crossing it - var/datum/component/mobhook + var/mob/listeningTo rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE /obj/item/storage/bag/ore/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -118,15 +121,17 @@ /obj/item/storage/bag/ore/equipped(mob/user) . = ..() - if (mobhook && mobhook.parent != user) - QDEL_NULL(mobhook) - if (!mobhook) - mobhook = user.AddComponent(/datum/component/redirect, list(COMSIG_MOVABLE_MOVED = CALLBACK(src, .proc/Pickup_ores))) + if(listeningTo == user) + return + if(listeningTo) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/Pickup_ores) + listeningTo = user /obj/item/storage/bag/ore/dropped() . = ..() - if (mobhook) - QDEL_NULL(mobhook) + UnregisterSignal(listeningTo, COMSIG_MOVABLE_MOVED) + listeningTo = null /obj/item/storage/bag/ore/proc/Pickup_ores(mob/living/user) var/show_message = FALSE @@ -136,7 +141,7 @@ return if (istype(user.pulling, /obj/structure/ore_box)) box = user.pulling - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) if(STR) for(var/A in tile) if (!is_type_in_typecache(A, STR.can_hold)) @@ -166,7 +171,7 @@ /obj/item/storage/bag/ore/cyborg/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -178,7 +183,7 @@ /obj/item/storage/bag/ore/large/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/ore)) STR.max_w_class = WEIGHT_CLASS_HUGE @@ -191,7 +196,7 @@ /obj/item/storage/bag/ore/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_items = INFINITY STR.max_combined_w_class = INFINITY STR.max_combined_stack_amount = INFINITY @@ -209,7 +214,7 @@ /obj/item/storage/bag/plants/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 100 STR.max_items = 100 @@ -249,7 +254,7 @@ /obj/item/storage/bag/sheetsnatcher/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.allow_quick_empty = TRUE STR.can_hold = typecacheof(list(/obj/item/stack/sheet)) STR.cant_hold = typecacheof(list(/obj/item/stack/sheet/mineral/sandstone, /obj/item/stack/sheet/mineral/wood)) @@ -266,7 +271,7 @@ /obj/item/storage/bag/sheetsnatcher/borg/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage/concrete/stack) + var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack) STR.max_combined_stack_amount = 500 // ----------------------------- @@ -283,7 +288,7 @@ /obj/item/storage/bag/books/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_NORMAL STR.max_combined_w_class = 21 STR.max_items = 7 @@ -308,15 +313,14 @@ /obj/item/storage/bag/tray/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.insert_preposition = "on" /obj/item/storage/bag/tray/attack(mob/living/M, mob/living/user) . = ..() // Drop all the things. All of them. var/list/obj/item/oldContents = contents.Copy() - GET_COMPONENT(STR, /datum/component/storage) - STR.quick_empty() + SEND_SIGNAL(src, COMSIG_TRY_STORAGE_QUICK_EMPTY) // Make each item scatter a bit for(var/obj/item/I in oldContents) spawn() @@ -362,11 +366,11 @@ /obj/item/storage/bag/chemistry/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 50 STR.insert_preposition = "in" - STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle)) + STR.can_hold = typecacheof(list(/obj/item/reagent_containers/pill, /obj/item/reagent_containers/glass/beaker, /obj/item/reagent_containers/glass/bottle, /obj/item/reagent_containers/syringe/dart)) /* * Biowaste bag (mostly for xenobiologists) @@ -382,7 +386,7 @@ /obj/item/storage/bag/bio/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = 200 STR.max_items = 25 STR.insert_preposition = "in" @@ -397,6 +401,6 @@ /obj/item/storage/bag/bio/holding/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_combined_w_class = INFINITY STR.max_items = 100 diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index a2b497cc07..713dbe4133 100755 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -44,7 +44,7 @@ /obj/item/storage/belt/utility/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) var/static/list/can_hold = typecacheof(list( /obj/item/crowbar, /obj/item/screwdriver, @@ -127,7 +127,7 @@ /obj/item/storage/belt/medical/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_BULKY STR.can_hold = typecacheof(list( /obj/item/healthanalyzer, @@ -199,7 +199,7 @@ /obj/item/storage/belt/security/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( @@ -238,7 +238,7 @@ /obj/item/storage/belt/mining/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY STR.max_combined_w_class = 20 @@ -297,7 +297,7 @@ /obj/item/storage/belt/mining/primitive/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 5 /obj/item/storage/belt/soulstone @@ -308,7 +308,7 @@ /obj/item/storage/belt/soulstone/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list( /obj/item/soulstone @@ -331,7 +331,7 @@ /obj/item/storage/belt/champion/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.can_hold = list( /obj/item/clothing/mask/luchador @@ -346,7 +346,7 @@ /obj/item/storage/belt/military/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_w_class = WEIGHT_CLASS_SMALL /obj/item/storage/belt/military/snack @@ -359,7 +359,7 @@ /obj/item/storage/belt/military/snack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_SMALL STR.can_hold = typecacheof(list( @@ -427,7 +427,7 @@ /obj/item/storage/belt/military/assault/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 /obj/item/storage/belt/durathread @@ -480,7 +480,7 @@ /obj/item/storage/belt/grenade/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 30 STR.display_numerical_stacking = TRUE STR.max_combined_w_class = 60 @@ -533,7 +533,7 @@ /obj/item/storage/belt/wands/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.can_hold = typecacheof(list( /obj/item/gun/magic/wand @@ -559,7 +559,7 @@ /obj/item/storage/belt/janitor/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 6 STR.max_w_class = WEIGHT_CLASS_BULKY // Set to this so the light replacer can fit. STR.can_hold = typecacheof(list( @@ -586,7 +586,7 @@ /obj/item/storage/belt/bandolier/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 18 STR.display_numerical_stacking = TRUE STR.can_hold = typecacheof(list( @@ -602,7 +602,7 @@ /obj/item/storage/belt/bandolier/durathread/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 32 STR.display_numerical_stacking = TRUE STR.can_hold = typecacheof(list( @@ -617,9 +617,12 @@ /obj/item/storage/belt/medolier/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 15 STR.display_numerical_stacking = FALSE + STR.allow_quick_gather = TRUE + STR.allow_quick_empty = TRUE + STR.click_gather = TRUE STR.can_hold = typecacheof(list( /obj/item/reagent_containers/syringe/dart )) @@ -628,6 +631,25 @@ for(var/i in 1 to 16) new /obj/item/reagent_containers/syringe/dart/(src) +/obj/item/storage/belt/medolier/afterattack(obj/target, mob/user , proximity) + if(!(istype(target, /obj/item/reagent_containers/glass/beaker))) + return + if(!proximity) + return + if(!target.reagents) + return + + for(var/obj/item/reagent_containers/syringe/dart/D in contents) + if(round(target.reagents.total_volume, 1) <= 0) + to_chat(user, "You soak as many of the darts as you can with the contents from [target].") + return + if(D.mode == SYRINGE_INJECT) + continue + + D.afterattack(target, user, proximity) + + ..() + /obj/item/storage/belt/holster name = "shoulder holster" desc = "A holster to carry a handgun and ammo. WARNING: Badasses only." @@ -637,7 +659,7 @@ /obj/item/storage/belt/holster/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_NORMAL STR.can_hold = typecacheof(list( @@ -661,7 +683,7 @@ /obj/item/storage/belt/fannypack/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 3 STR.max_w_class = WEIGHT_CLASS_SMALL @@ -728,7 +750,7 @@ /obj/item/storage/belt/sabre/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 STR.rustle_sound = FALSE STR.max_w_class = WEIGHT_CLASS_BULKY diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index 85a06f0c1e..c658eee3d5 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -11,7 +11,7 @@ /obj/item/storage/book/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 1 /obj/item/storage/book/attack_self(mob/user) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index dd6a6b8453..e053ff2a5c 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -398,7 +398,7 @@ /obj/item/storage/box/donkpockets/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/donkpocket)) /obj/item/storage/box/donkpockets/PopulateContents() @@ -413,7 +413,7 @@ /obj/item/storage/box/monkeycubes/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 7 STR.can_hold = typecacheof(list(/obj/item/reagent_containers/food/snacks/monkeycube)) @@ -568,7 +568,7 @@ /obj/item/storage/box/snappops/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.can_hold = typecacheof(list(/obj/item/toy/snappop)) STR.max_items = 8 @@ -586,7 +586,7 @@ /obj/item/storage/box/matches/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 10 STR.can_hold = typecacheof(list(/obj/item/match)) @@ -609,7 +609,7 @@ /obj/item/storage/box/lights/ComponentInitialize() . = ..() - GET_COMPONENT(STR, /datum/component/storage) + var/datum/component/storage/STR = GetComponent(/datum/component/storage) STR.max_items = 21 STR.can_hold = typecacheof(list(/obj/item/light/tube, /obj/item/light/bulb)) STR.max_combined_w_class = 21 @@ -855,7 +855,7 @@ if(SMILEY) desc = "A paper sack with a crude smile etched onto the side." return 0 - else if(W.is_sharp()) + else if(W.get_sharpness()) if(!contents.len) if(item_state == "paperbag_None") user.show_message("You cut eyeholes into [src].", 1) @@ -1144,7 +1144,7 @@ if(can_expire) expiration_date = rand(expiration_date_min, expiration_date_max) desc += "\n