"
-
- if(sprite)
- body += "
" - - body += "E - Edit, tries to determine the variable type by itself. " - body += "C - Change, asks you for the var type first. " - body += "M - Mass modify: changes this variable for all objects of this type. " - - body += "
" - - body += "
+
+
+ + E - Edit, tries to determine the variable type by itself. + C - Change, asks you for the var type first. + M - Mass modify: changes this variable for all objects of this type. + + +
+
"
- for(var/block=0;block<8;block++)
- html += " "
- for(var/i=0;i<4;i++)
- idx=(block*4)+i
- to_chat(bit=1, idx)
- bv=value & bit
- html += "[bv?1:0]"
- html += ""
- html += " "
- */
- html += "" diff --git a/code/game/gamemodes/cult/cult_datums.dm b/code/game/gamemodes/cult/cult_datums.dm index b08632f0359..a3b9329bf6c 100644 --- a/code/game/gamemodes/cult/cult_datums.dm +++ b/code/game/gamemodes/cult/cult_datums.dm @@ -1,5 +1,3 @@ -//cult datums by FalseIncarnate - /datum/cult_info var/name = "Cult of Nar'Sie" var/theme = "blood" @@ -81,11 +79,13 @@ /datum/cult_info/death name = "Cult of Mortality" theme = "death" + tome_icon = "firetome" entity_name = "The Reaper" entity_title1 = "The Silent One" entity_title2 = "The One Who Beckons" entity_title3 = "The Ferryman of Oblivion" + entity_icon_state = "legion" cult_wall_icon_state = "deathcult" cult_floor_icon_state = "carpet-broken" @@ -93,13 +93,13 @@ artificer_name = "Boneshaper" behemoth_name = "Draugr" - behemoth_icon_state = "horror" + behemoth_icon_state = "Draugr" wraith_name = "Wraith" - wraith_icon_state = "stand" + wraith_icon_state = "Wraith" juggernaut_name = "Wight" - juggernaut_icon_state = "horror" + juggernaut_icon_state = "Draugr" harvester_name = "Psychopomp" diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 39099fb7d44..a5ea89f504d 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -32,6 +32,10 @@ to_chat(user, "An overwhelming sense of nausea overpowers you!") user.Dizzy(120) + if(HULK in user.mutations) + to_chat(user, "You can't seem to hold the blade properly!") + user.unEquip(src, 1) + /obj/item/weapon/melee/cultblade/dagger name = "sacrificial dagger" desc = "A strange dagger said to be used by sinister groups for \"preparing\" a corpse before sacrificing it to their dark gods." @@ -192,13 +196,15 @@ /obj/item/weapon/whetstone/cult name = "eldritch whetstone" desc = "A block, empowered by dark magic. Sharp weapons will be enhanced when used on the stone." - icon = 'icons/obj/cult.dmi' - icon_state = "cultstone" + icon_state = "cult_sharpener" used = 0 increment = 5 max = 40 prefix = "darkened" +/obj/item/weapon/whetstone/cult/update_icon() + icon_state = "cult_sharpener[used ? "_used" : ""]" + /obj/item/weapon/reagent_containers/food/drinks/bottle/unholywater name = "flask of unholy water" desc = "Toxic to nonbelievers; this water renews and reinvigorates the faithful of a cult." @@ -332,3 +338,19 @@ else to_chat(C, "The veil cannot be torn here!") + + +/obj/item/clothing/suit/space/eva/plasmaman/cultist + name = "plasmaman cultist armor" + icon_state = "plasmaman_cult" + item_state = "plasmaman_cult" + desc = "A bulky suit of armour, menacing with red energy. It looks like it would fit a plasmaman." + slowdown = 1 + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) + +/obj/item/clothing/head/helmet/space/eva/plasmaman/cultist + name = "plasmaman cultist helmet" + icon_state = "plasmamanCult_helmet0" + base_state = "plasmamanCult_helmet" + desc = "A helmet designed by cultists. It glows menacingly with unearthly flames." + armor = list(melee = 60, bullet = 50, laser = 30,energy = 15, bomb = 30, bio = 30, rad = 30) diff --git a/code/game/gamemodes/cult/cult_objectives.dm b/code/game/gamemodes/cult/cult_objectives.dm index c9e951cf940..69b6de0c73e 100644 --- a/code/game/gamemodes/cult/cult_objectives.dm +++ b/code/game/gamemodes/cult/cult_objectives.dm @@ -109,10 +109,10 @@ if(prob(40))//split the chance of this objectives += "eldergod" - explanation = "Summon [ticker.mode.cultdat.entity_name] on the Station via the use of the Tear Reality rune." + explanation = "Summon [ticker.mode.cultdat.entity_name] on the Station via the use of the Tear Reality rune. The veil is weak enough in [english_list(summon_spots)] for the ritual to begin." else objectives += "slaughter" - explanation = "Bring the Slaughter via the rune 'Bring forth the slaughter'." + explanation = "Bring the Slaughter via the rune 'Bring forth the slaughter'. The veil is weak enough in [english_list(summon_spots)] for the ritual to begin." for(var/datum/mind/cult_mind in cult) to_chat(cult_mind.current, "You and your acolytes have succeeded in preparing the station for the ultimate ritual!") diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 10f6b92f517..182ed68e004 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -54,6 +54,10 @@ to_chat(user, "\The [src] is [anchored ? "":"not "]secured to the floor.") /obj/structure/cult/functional/attackby(obj/I, mob/user, params) + if(HULK in user.mutations) + to_chat(user, "You cannot seem to manipulate this structure with your bulky hands!") + return + if(istype(I, /obj/item/weapon/tome) && iscultist(user)) anchored = !anchored to_chat(user, "You [anchored ? "":"un"]secure \the [src] [anchored ? "to":"from"] the floor.") @@ -180,7 +184,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( death_message = "The pylon's crystal vibrates and glows fiercely before violently shattering!" death_sound = 'sound/effects/pylon_shatter.ogg' - var/heal_delay = 25 + var/heal_delay = 30 var/last_heal = 0 var/corrupt_delay = 50 var/last_corrupt = 0 diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm index 36ebc5d3dab..55d2a51de61 100644 --- a/code/game/gamemodes/cult/ritual.dm +++ b/code/game/gamemodes/cult/ritual.dm @@ -201,6 +201,7 @@ /obj/item/weapon/tome/proc/finale_runes_ok(mob/living/user, obj/effect/rune/rune_to_scribe) var/datum/game_mode/cult/cult_mode = ticker.mode + var/area/A = get_area(src) if(GAMEMODE_IS_CULT) if(!canbypass)//not an admin-tome, check things if(!cult_mode.narsie_condition_cleared) @@ -215,6 +216,9 @@ if(!((CULT_ELDERGOD in cult_mode.objectives) || (CULT_SLAUGHTER in cult_mode.objectives))) to_chat(user, "[cult_mode.cultdat.entity_name]'s power does not wish to be unleashed!") return 0 + if(!(A in summon_spots)) + to_chat(user, "[cult_mode.cultdat.entity_name] can only be summoned where the veil is weak - in [english_list(summon_spots)]!") + return 0 var/confirm_final = alert(user, "This is the FINAL step to summon your deities power, it is a long, painful ritual and the crew will be alerted to your presence", "Are you prepared for the final battle?", "My life for [cult_mode.cultdat.entity_name]!", "No") if(confirm_final == "No" || confirm_final == null) to_chat(user, "You decide to prepare further before scribing the rune.") @@ -236,6 +240,7 @@ var/entered_rune_name var/list/possible_runes = list() var/list/shields = list() + var/area/A = get_area(src) if(locate(/obj/effect/rune) in runeturf) to_chat(user, "There is already a rune here.") return @@ -261,6 +266,7 @@ if(!rune_to_scribe) return runeturf = get_turf(user) //we may have moved. adjust as needed... + A = get_area(src) if(locate(/obj/effect/rune) in runeturf) to_chat(user, "There is already a rune here.") return @@ -268,7 +274,11 @@ return if(ispath(rune_to_scribe, /obj/effect/rune/narsie) || ispath(rune_to_scribe, /obj/effect/rune/slaughter))//may need to change this - Fethas if(finale_runes_ok(user,rune_to_scribe)) - command_announcement.Announce("Figments from an eldritch god are being summoned somwhere on the station from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg') + A = get_area(src) + if(!(A in summon_spots)) // Check again to make sure they didn't move + to_chat(user, "The ritual can only begin where the veil is weak - in [english_list(summon_spots)]!") + return + command_announcement.Announce("Figments from an eldritch god are being summoned somewhere on the station from an unknown dimension. Disrupt the ritual at all costs!","Central Command Higher Dimensional Affairs", 'sound/AI/spanomalies.ogg') for(var/B in spiral_range_turfs(1, user, 1)) var/turf/T = B var/obj/machinery/shield/N = new(T) diff --git a/code/game/gamemodes/cult/talisman.dm b/code/game/gamemodes/cult/talisman.dm index 4bf4bd9f9e7..24b3a2208d2 100644 --- a/code/game/gamemodes/cult/talisman.dm +++ b/code/game/gamemodes/cult/talisman.dm @@ -148,8 +148,9 @@ var/input_rune_key = input(user, "Choose a rune to teleport to.", "Rune to Teleport to") as null|anything in potential_runes //we know what key they picked var/obj/effect/rune/teleport/actual_selected_rune = potential_runes[input_rune_key] //what rune does that key correspond to? - if(!actual_selected_rune) + if(!src || qdeleted(src) || !user || user.l_hand != src && user.r_hand != src || user.incapacitated() || !actual_selected_rune) return ..(user, 0) + user.visible_message("Dust flows from [user]'s hand, and they disappear in a flash of red light!", \ "You speak the words of the talisman and find yourself somewhere else!") user.forceMove(get_turf(actual_selected_rune)) @@ -277,7 +278,11 @@ var/mob/living/carbon/human/H = user user.visible_message("Otherworldly armor suddenly appears on [user]!", \ "You speak the words of the talisman, arming yourself!") - H.equip_to_slot_or_del(new /obj/item/clothing/suit/hooded/cultrobes/alt(user), slot_wear_suit) + if(H.get_species() == "Plasmaman") + H.equip_to_slot(new /obj/item/clothing/suit/space/eva/plasmaman/cultist(H), slot_wear_suit) + H.equip_to_slot(new /obj/item/clothing/head/helmet/space/eva/plasmaman/cultist(H), slot_head) + else + H.equip_to_slot_or_del(new /obj/item/clothing/suit/hooded/cultrobes/alt(user), slot_wear_suit) H.equip_to_slot_or_del(new /obj/item/weapon/storage/backpack/cultpack(user), slot_back) H.equip_to_slot_or_del(new /obj/item/clothing/shoes/cult(user), slot_shoes) H.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm index 4825dea6ebb..009debb8324 100644 --- a/code/game/gamemodes/miniantags/guardian/guardian.dm +++ b/code/game/gamemodes/miniantags/guardian/guardian.dm @@ -39,40 +39,43 @@ var/bio_fluff_string = "Your scarabs fail to mutate. This shouldn't happen! Submit a bug report!" var/admin_fluff_string = "URK URF!"//the wheels on the bus... var/adminseal = FALSE + var/name_color = "white"//only used with protector shields for the time being /mob/living/simple_animal/hostile/guardian/Life() //Dies if the summoner dies ..() if(summoner) if(summoner.stat == DEAD) to_chat(src, "Your summoner has died!") - visible_message("The [src] dies along with its user!") + visible_message("The [src] dies along with its user!") ghostize() qdel(src) - if(summoner) - if(get_dist(get_turf(summoner),get_turf(src)) <= range) - return - else - to_chat(src, "You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]") - visible_message("The [src] jumps back to its user.") - Recall() + snapback() if(summoned && !summoner && !adminseal) to_chat(src, "You somehow lack a summoner! As a result, you dispel!") ghostize() qdel() -/mob/living/simple_animal/hostile/guardian/Move() //Returns to summoner if they move out of range - ..() +/mob/living/simple_animal/hostile/guardian/proc/snapback() if(summoner) if(get_dist(get_turf(summoner),get_turf(src)) <= range) return else - to_chat(src, "You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]") - visible_message("The [src] jumps back to its user.") - Recall() + to_chat(src, "You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]!") + visible_message("\The [src] jumps back to its user.") + if(istype(summoner.loc, /obj/effect)) + Recall(TRUE) + else + new /obj/effect/overlay/temp/guardian/phase/out(loc) + forceMove(summoner.loc) //move to summoner's tile, don't recall + new /obj/effect/overlay/temp/guardian/phase(loc) + +/mob/living/simple_animal/hostile/guardian/Move() //Returns to summoner if they move out of range + ..() + snapback() /mob/living/simple_animal/hostile/guardian/death(gibbed) ..() - to_chat(summoner, "Your [name] died somehow!") + to_chat(summoner, "Your [name] died somehow!") summoner.death() @@ -83,7 +86,8 @@ resulthealth = round((abs(config.health_threshold_dead - summoner.health) / abs(config.health_threshold_dead - summoner.maxHealth)) * 100) else resulthealth = round((summoner.health / summoner.maxHealth) * 100) - hud_used.guardianhealthdisplay.maptext = " [resulthealth]% "
+ if(hud_used)
+ hud_used.guardianhealthdisplay.maptext = "[resulthealth]% "
/mob/living/simple_animal/hostile/guardian/adjustHealth(amount) //The spirit is invincible, but passes on damage to the summoner
@@ -93,10 +97,10 @@
return
summoner.adjustBruteLoss(damage)
if(damage)
- to_chat(summoner, "Your [name] is under attack! You take damage!")
- summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!")
+ to_chat(summoner, "Your [name] is under attack! You take damage!")
+ summoner.visible_message("Blood sprays from [summoner] as [src] takes damage!")
if(summoner.stat == UNCONSCIOUS)
- to_chat(summoner, "Your body can't take the strain of sustaining [src] in this condition, it begins to fall apart!")
+ to_chat(summoner, "Your body can't take the strain of sustaining [src] in this condition, it begins to fall apart!")
summoner.adjustCloneLoss(damage/2)
/mob/living/simple_animal/hostile/guardian/ex_act(severity, target)
@@ -112,7 +116,7 @@
/mob/living/simple_animal/hostile/guardian/gib()
if(summoner)
- to_chat(summoner, "Your [src] was blown up!")
+ to_chat(summoner, "Your [src] was blown up!")
summoner.Weaken(10)// your fermillier has died! ROLL FOR CON LOSS!
ghostize()
qdel(src)
@@ -128,8 +132,8 @@
src.client.eye = loc
cooldown = world.time + 30
-/mob/living/simple_animal/hostile/guardian/proc/Recall()
- if(cooldown > world.time)
+/mob/living/simple_animal/hostile/guardian/proc/Recall(forced = FALSE)
+ if(cooldown > world.time && !forced)
return
if(!summoner) return
new /obj/effect/overlay/temp/guardian/phase/out(get_turf(src))
@@ -141,7 +145,6 @@
var/input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "")
if(!input) return
-
for(var/mob/M in mob_list)
if(M == summoner)
to_chat(M, "[src]: [input]")
@@ -151,7 +154,7 @@
to_chat(src, "[src]: [input]")
/mob/living/simple_animal/hostile/guardian/proc/ToggleMode()
- to_chat(src, "You dont have another mode!")
+ to_chat(src, "You dont have another mode!")
/mob/living/proc/guardian_comm()
@@ -212,456 +215,6 @@
to_chat(src, "You deactivate your light.")
light_on = !light_on
-//////////////////////////TYPES OF GUARDIANS
-
-
-//Fire. Low damage, low resistance, sets mobs on fire when bumping
-
-/mob/living/simple_animal/hostile/guardian/fire
- a_intent = INTENT_HELP
- melee_damage_lower = 10
- melee_damage_upper = 10
- attack_sound = 'sound/items/Welder.ogg'
- attacktext = "sears"
- damage_transfer = 0.8
- range = 10
- playstyle_string = "As a Chaos type, you have only light damage resistance, but will ignite any enemy you bump into. In addition, your melee attacks will randomly teleport enemies."
- environment_smash = 1
- magic_fluff_string = "..And draw the Wizard, bringer of endless chaos!"
- tech_fluff_string = "Boot sequence complete. Crowd control modules activated. Holoparasite swarm online."
- bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, ready to sow havoc at random."
- var/toggle = FALSE
-
-/mob/living/simple_animal/hostile/guardian/fire/Life() //Dies if the summoner dies
- ..()
- if(summoner)
- summoner.ExtinguishMob()
- summoner.adjust_fire_stacks(-20)
-
-/mob/living/simple_animal/hostile/guardian/fire/ToggleMode()
- if(src.loc == summoner)
- if(toggle)
- to_chat(src, "You switch to dispersion mode, and will teleport victims away from your master.")
- toggle = FALSE
- else
- to_chat(src, "You switch to deception mode, and will turn your victims against their allies.")
- toggle = TRUE
-
-/mob/living/simple_animal/hostile/guardian/fire/AttackingTarget()
- if(..())
- if(toggle)
- if(ishuman(target) && !summoner)
- spawn(0)
- new /obj/effect/hallucination/delusion(target.loc, target, force_kind="custom", duration=200, skip_nearby=0, custom_icon = src.icon_state, custom_icon_file = src.icon)
- else
- if(prob(45))
- if(istype(target, /atom/movable))
- var/atom/movable/M = target
- if(!M.anchored && M != summoner)
- new /obj/effect/overlay/temp/guardian/phase/out(get_turf(M))
- do_teleport(M, M, 10)
- new /obj/effect/overlay/temp/guardian/phase/out(get_turf(M))
-
-/mob/living/simple_animal/hostile/guardian/fire/Crossed(AM as mob|obj)
- ..()
- collision_ignite(AM)
-
-/mob/living/simple_animal/hostile/guardian/fire/Bumped(AM as mob|obj)
- ..()
- collision_ignite(AM)
-
-/mob/living/simple_animal/hostile/guardian/fire/Bump(AM as mob|obj)
- ..()
- collision_ignite(AM)
-
-/mob/living/simple_animal/hostile/guardian/fire/proc/collision_ignite(AM as mob|obj)
- if(istype(AM, /mob/living/))
- var/mob/living/M = AM
- if(AM != summoner && M.fire_stacks < 7)
- M.fire_stacks = 7
- M.IgniteMob()
-
-/mob/living/simple_animal/hostile/guardian/fire/Bump(AM as mob|obj)
- ..()
- collision_ignite(AM)
-//Standard
-
-/mob/living/simple_animal/hostile/guardian/punch
- melee_damage_lower = 20
- melee_damage_upper = 20
- damage_transfer = 0.5
- playstyle_string = "As a standard type you have no special abilities, but have a high damage resistance and a powerful attack capable of smashing through walls."
- environment_smash = 2
- magic_fluff_string = "..And draw the Assistant, faceless and generic, but never to be underestimated."
- tech_fluff_string = "Boot sequence complete. Standard combat modules loaded. Holoparasite swarm online."
- bio_fluff_string = "Your scarab swarm stirs to life, ready to tear apart your enemies."
- var/battlecry = "AT"
-
-
-/mob/living/simple_animal/hostile/guardian/punch/sealpunch
- name = "Seal Sprit"
- real_name = "Seal Sprit"
- icon = 'icons/mob/animal.dmi'
- icon_living = "seal"
- icon_state = "seal"
- attacktext = "slaps"
- speak_emote = list("barks")
- melee_damage_lower = 0
- melee_damage_upper = 0
- melee_damage_type = STAMINA
- damage_transfer = 0
- playstyle_string = "As a standard type you have no special abilities, but have a high damage resistance and a powerful attack capable of smashing through walls."
- environment_smash = 2
- battlecry = "URK"
- adminseal = TRUE
-
-/mob/living/simple_animal/hostile/guardian/punch/verb/Battlecry()
- set name = "Set Battlecry"
- set category = "Guardian"
- set desc = "Choose what you shout as you punch"
- var/input = stripped_input(src,"What do you want your battlecry to be? Max length of 5 characters.", ,"", 6)
- if(input)
- battlecry = input
-
-
-
-/mob/living/simple_animal/hostile/guardian/punch/AttackingTarget()
- ..()
- if(iscarbon(target) && target != summoner)
- if(length(battlecry) > 11)//no more then 11 letters in a battle cry.
- src.visible_message("[src] punches [target]!")
- else
- src.say("[src.battlecry][src.battlecry][src.battlecry][src.battlecry][src.battlecry]")
- playsound(loc, src.attack_sound, 50, 1, 1)
- playsound(loc, src.attack_sound, 50, 1, 1)
- playsound(loc, src.attack_sound, 50, 1, 1)
- playsound(loc, src.attack_sound, 50, 1, 1)
-
-//Healer
-
-/mob/living/simple_animal/hostile/guardian/healer
- a_intent = INTENT_HARM
- friendly = "heals"
- speed = 0
- melee_damage_lower = 15
- melee_damage_upper = 15
- playstyle_string = "As a Support type, you may toggle your basic attacks to a healing mode. In addition, Alt-Clicking on an adjacent mob will warp them to your bluespace beacon after a short delay."
- magic_fluff_string = "..And draw the CMO, a potent force of life...and death."
- tech_fluff_string = "Boot sequence complete. Medical modules active. Bluespace modules activated. Holoparasite swarm online."
- bio_fluff_string = "Your scarab swarm finishes mutating and stirs to life, capable of mending wounds and travelling via bluespace."
- var/turf/simulated/floor/beacon
- var/beacon_cooldown = 0
- var/toggle = FALSE
- var/heal_cooldown = 0
-
-/mob/living/simple_animal/hostile/guardian/healer/sealhealer
- name = "Seal Sprit"
- real_name = "Seal Sprit"
- icon = 'icons/mob/animal.dmi'
- icon_living = "seal"
- icon_state = "seal"
- attacktext = "slaps"
- speak_emote = list("barks")
- a_intent = INTENT_HARM
- friendly = "heals"
- speed = 0
- melee_damage_lower = 0
- melee_damage_upper = 0
- melee_damage_type = STAMINA
- adminseal = TRUE
-
-
-/mob/living/simple_animal/hostile/guardian/healer/New()
- ..()
-
-/mob/living/simple_animal/hostile/guardian/healer/Life()
- ..()
- var/datum/atom_hud/medsensor = huds[DATA_HUD_MEDICAL_ADVANCED]
- medsensor.add_hud_to(src)
-
-/mob/living/simple_animal/hostile/guardian/healer/AttackingTarget()
- ..()
- if(toggle == TRUE)
- if(src.loc == summoner)
- to_chat(src, "You must be manifested to heal!")
- return
- if(iscarbon(target))
- src.changeNext_move(CLICK_CD_MELEE)
- if(heal_cooldown <= world.time && !stat)
- var/mob/living/carbon/C = target
- C.adjustBruteLoss(-5)
- C.adjustFireLoss(-5)
- C.adjustOxyLoss(-5)
- C.adjustToxLoss(-5)
- heal_cooldown = world.time + 20
-
-/mob/living/simple_animal/hostile/guardian/healer/ToggleMode()
- if(src.loc == summoner)
- if(toggle)
- a_intent = INTENT_HARM
- speed = 0
- damage_transfer = 0.7
- if(src.adminseal)
- damage_transfer = 0
- melee_damage_lower = 15
- melee_damage_upper = 15
- to_chat(src, "You switch to combat mode.")
- toggle = FALSE
- else
- a_intent = INTENT_HELP
- speed = 1
- damage_transfer = 1
- if(src.adminseal)
- damage_transfer = 0
- melee_damage_lower = 0
- melee_damage_upper = 0
- to_chat(src, "You switch to healing mode.")
- toggle = TRUE
- else
- to_chat(src, "You have to be recalled to toggle modes!")
-
-
-/mob/living/simple_animal/hostile/guardian/healer/verb/Beacon()
- set name = "Place Bluespsace Beacon"
- set category = "Guardian"
- set desc = "Mark a floor as your beacon point, allowing you to warp targets to it. Your beacon will not work in unfavorable atmospheric conditions."
- if(beacon_cooldownError: permission denied.") + return 1 if("incarcerated") active2.fields["criminal"] = "Incarcerated" if("parolled") active2.fields["criminal"] = "Parolled" if("released") active2.fields["criminal"] = "Released" - + var/newstatus = active2.fields["criminal"] + log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [newstatus], comment: [t1]") + active2.fields["comments"] += "Set to [newstatus] by [usr.name] ([rank]) on [current_date_string] [worldtime2text()], comment: [t1]" update_all_mob_security_hud() if("rank") if(active1) @@ -206,6 +231,7 @@ if(check_access(scan)) authenticated = scan.registered_name rank = scan.assignment + authcard_access = scan.access if(authenticated) active1 = null @@ -218,6 +244,7 @@ screen = null active1 = null active2 = null + authcard_access = list() else if(href_list["sort"]) // Reverse the order if clicked twice @@ -458,6 +485,7 @@ buttons[++buttons.len] = list("name" = "None", "icon" = "unlock", "href" = "criminal=none", "status" = (active2.fields["criminal"] == "None" ? "selected" : null)) buttons[++buttons.len] = list("name" = "*Arrest*", "icon" = "lock", "href" = "criminal=arrest", "status" = (active2.fields["criminal"] == "*Arrest*" ? "selected" : null)) buttons[++buttons.len] = list("name" = "Incarcerated", "icon" = "lock", "href" = "criminal=incarcerated", "status" = (active2.fields["criminal"] == "Incarcerated" ? "selected" : null)) + buttons[++buttons.len] = list("name" = "*Execute*", "icon" = "lock", "href" = "criminal=execute", "status" = (active2.fields["criminal"] == "*Execute*" ? "selected" : null)) buttons[++buttons.len] = list("name" = "Parolled", "icon" = "unlock-alt", "href" = "criminal=parolled", "status" = (active2.fields["criminal"] == "Parolled" ? "selected" : null)) buttons[++buttons.len] = list("name" = "Released", "icon" = "unlock", "href" = "criminal=released", "status" = (active2.fields["criminal"] == "Released" ? "selected" : null)) setTemp("Criminal Status", buttons) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 8e026cfd80a..938011c1fc8 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -126,6 +126,15 @@ on = 0 go_out() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) + + if(air_contents) + if(occupant) + process_occupant() + + return 1 + +/obj/machinery/atmospherics/unary/cryo_cell/process_atmos() + ..() if(!node) return if(!on) @@ -135,13 +144,9 @@ temperature_archived = air_contents.temperature heat_gas_contents() - if(occupant) - process_occupant() if(abs(temperature_archived-air_contents.temperature) > 1) parent.update = 1 - return 1 - /obj/machinery/atmospherics/unary/cryo_cell/allow_drop() return 0 diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index d3cbc93d4f0..6df9f81f14c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -24,10 +24,23 @@ var/list/frozen_crew = list() var/list/frozen_items = list() + // Used for containing rare items traitors need to steal, so it's not + // game-over if they get iced + var/list/objective_items = list() + // A cache of theft datums so you don't have to re-create them for + // each item check + var/list/theft_cache = list() + var/storage_type = "crewmembers" var/storage_name = "Cryogenic Oversight Control" var/allow_items = 1 + +/obj/machinery/computer/cryopod/New() + ..() + for(var/T in potential_theft_objectives) + theft_cache += new T + /obj/machinery/computer/cryopod/attack_ai() attack_hand() @@ -101,8 +114,7 @@ visible_message("The console beeps happily as it disgorges \the [I].") - I.forceMove(get_turf(src)) - frozen_items -= I + dispense_item(I) else if(href_list["allitems"]) if(!allowed(user)) @@ -117,12 +129,31 @@ visible_message("The console beeps happily as it disgorges the desired objects.") for(var/obj/item/I in frozen_items) - I.forceMove(get_turf(src)) - frozen_items -= I + dispense_item(I) updateUsrDialog() return +/obj/machinery/computer/cryopod/proc/dispense_item(obj/item/I) + if(!(I in frozen_items)) + return + I.forceMove(get_turf(src)) + objective_items -= I + frozen_items -= I + +/obj/machinery/computer/cryopod/emag_act(mob/user) + user.changeNext_move(CLICK_CD_MELEE) + if(!objective_items.len) + visible_message("The console buzzes in an annoyed manner.") + playsound(src, 'sound/machines/buzz-sigh.ogg', 30, 1) + return + visible_message("The console sparks, and some items fall out!") + var/datum/effect/system/spark_spread/sparks = new + sparks.set_up(5, 1, src) + sparks.start() + for(var/obj/item/I in objective_items) + dispense_item(I) + /obj/item/weapon/circuitboard/cryopodcontrol name = "Circuit board (Cryogenic Oversight Console)" build_path = "/obj/machinery/computer/cryopod" @@ -275,6 +306,19 @@ despawn_occupant() +#define CRYO_DESTROY 0 +#define CRYO_PRESERVE 1 +#define CRYO_OBJECTIVE 2 + +/obj/machinery/cryopod/proc/should_preserve_item(obj/item/I) + for(var/datum/theft_objective/T in control_computer.theft_cache) + if(istype(I, T.typepath) && T.check_special_completion(I)) + return CRYO_OBJECTIVE + for(var/T in preserve_items) + if(istype(I, T) && !(I.type in do_not_preserve_items)) + return CRYO_PRESERVE + return CRYO_DESTROY + // This function can not be undone; do not call this unless you are sure // Also make sure there is a valid control computer /obj/machinery/cryopod/proc/despawn_occupant() @@ -284,12 +328,7 @@ W.forceMove(src) if(W.contents.len) //Make sure we catch anything not handled by qdel() on the items. - var/preserve = null - for(var/T in preserve_items) - if(istype(W,T)) - preserve = 1 - break - if(preserve) // Don't remove the contents of things that need preservation + if(should_preserve_item(W) != CRYO_DESTROY) // Don't remove the contents of things that need preservation continue for(var/obj/item/O in W.contents) if(istype(O,/obj/item/weapon/tank)) //Stop eating pockets, you fuck! @@ -307,26 +346,22 @@ items -= announce // or the autosay radio. for(var/obj/item/W in items) - - var/preserve = null - for(var/T in preserve_items) - if(istype(W,T) && !(W in do_not_preserve_items)) - preserve = 1 - break - if(istype(W,/obj/item/device/pda)) var/obj/item/device/pda/P = W QDEL_NULL(P.id) qdel(P) + continue - if(!preserve) + var/preserve = should_preserve_item(W) + if(preserve == CRYO_DESTROY) qdel(W) + else if(control_computer && control_computer.allow_items) + control_computer.frozen_items += W + if(preserve == CRYO_OBJECTIVE) + control_computer.objective_items += W + W.loc = null else - if(control_computer && control_computer.allow_items) - control_computer.frozen_items += W - W.loc = null - else - W.forceMove(loc) + W.forceMove(loc) // Skip past any cult sacrifice objective using this person if(GAMEMODE_IS_CULT && is_sacrifice_target(occupant.mind)) @@ -422,6 +457,9 @@ QDEL_NULL(occupant) name = initial(name) +#undef CRYO_DESTROY +#undef CRYO_PRESERVE +#undef CRYO_OBJECTIVE /obj/machinery/cryopod/attackby(var/obj/item/weapon/G as obj, var/mob/user as mob, params) @@ -727,4 +765,4 @@ if(target_cryopod.check_occupant_allowed(person_to_cryo)) target_cryopod.take_occupant(person_to_cryo, 1) return 1 - return 0 \ No newline at end of file + return 0 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index a0b72ed5074..80a4a36ee44 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -647,13 +647,12 @@ About the new airlock wires panel: src.attack_ai(user) /obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0) - if(src.isElectrified()) - if(istype(mover, /obj/item)) - var/obj/item/i = mover - if(i.materials[MAT_METAL]) - var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread - s.set_up(5, 1, src) - s.start() + if(isElectrified() && density && istype(mover, /obj/item)) + var/obj/item/I = mover + if(I.flags & CONDUCT) + var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread + s.set_up(5, 1, src) + s.start() return ..() /obj/machinery/door/airlock/attack_hand(mob/user as mob) diff --git a/code/game/machinery/doors/brigdoors.dm b/code/game/machinery/doors/brigdoors.dm index 818f251024c..39fa5e04037 100644 --- a/code/game/machinery/doors/brigdoors.dm +++ b/code/game/machinery/doors/brigdoors.dm @@ -46,7 +46,7 @@Log generated at: [worldtime2text()] Detainee: [logname] - Duration: [timetoset/10] seconds + Duration: [seconds_to_time(timetoset / 10)] Charge(s): [logcharges] Arresting Officer: [usr.name] This log file was generated automatically upon activation of a cell timer."} @@ -55,7 +55,7 @@ cell_logs += P var/datum/data/record/R = find_security_record("name", logname) - Radio.autosay("Detainee [logname] has been incarcerated for [timetoset/10] seconds for the charges of, '[logcharges]'. \ + Radio.autosay("Detainee [logname] has been incarcerated for [seconds_to_time(timetoset / 10)] for the charges of, '[logcharges]'. \ Arresting Officer: [usr.name].[R ? "" : " Detainee record not found, manual record update required."]", name, "Security", list(z)) if(R) @@ -277,7 +277,7 @@ dat += "Set Timer: [(setminute ? text("[setminute]:") : null)][setsecond] " // Controls - dat += "- - + + " + dat += "Input Time" // Mounted flash controls for(var/obj/machinery/flasher/F in targets) @@ -319,13 +319,9 @@ Radio.autosay("Timer stopped manually by [usr.name].", name, "Security", list(z)) else - if(href_list["tp"]) //adjust timer, close door if not already closed - var/tp = text2num(href_list["tp"]) - var/addtime = (timetoset / 10) - addtime += tp - addtime = min(max(round(addtime), 0), 3600) - - timeset(addtime) + if(href_list["settime"]) + var/time = min(max(round(return_time_input(usr)), 0), 3600) + timeset(time) if(href_list["fc"]) for(var/obj/machinery/flasher/F in targets) @@ -368,6 +364,11 @@ overlays.Cut() overlays += image('icons/obj/status_display.dmi', icon_state=picture_state) +/obj/machinery/door_timer/proc/return_time_input() + var/mins = input(usr, "Minutes", "Enter number of minutes", 0) as num + var/seconds = input(usr, "Seconds", "Enter number of seconds", 0) as num + var/totaltime = (seconds + (mins * 60)) + return totaltime //Checks to see if there's 1 line or 2, adds text-icons-numbers/letters over display // Stolen from status_display diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm index bda658ef128..0f397a51dbb 100644 --- a/code/game/machinery/doors/firedoor.dm +++ b/code/game/machinery/doors/firedoor.dm @@ -59,7 +59,9 @@ if(operating) return - if(istype(C, /obj/item/weapon/weldingtool)) + if(iswelder(C)) + if(!density) + return var/obj/item/weapon/weldingtool/W = C if(W.remove_fuel(0, user)) welded = !welded @@ -169,6 +171,8 @@ update_icon() /obj/machinery/door/firedoor/open(auto_close = TRUE) + if(welded) + return . = ..() latetoggle(auto_close) diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index 1d392d187cf..117a9a21671 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -96,36 +96,29 @@ return if(ishuman(M)) var/mob/living/carbon/human/H = M - - var/dye_list = list("hair") + var/dye_list = list("hair", "alt. hair theme") if(H.gender == MALE || H.get_species() == "Vulpkanin") dye_list += "facial hair" + dye_list += "alt. facial hair theme" if(H && (H.species.bodyflags & HAS_SKIN_COLOR)) dye_list += "body" - var/what_to_dye = input(user, "Choose an area to apply the dye","Dye Application") in dye_list + var/what_to_dye = input(user, "Choose an area to apply the dye", "Dye Application") in dye_list user.visible_message("[user] starts dying [M]'s [what_to_dye]!", "You start dying [M]'s [what_to_dye]!") if(do_after(user, 50, target = H)) switch(what_to_dye) if("hair") - var/r_hair = color2R(dye_color) - var/g_hair = color2G(dye_color) - var/b_hair = color2B(dye_color) - if(H.change_hair_color(r_hair, g_hair, b_hair)) - H.update_dna() + H.change_hair_color(dye_color) + if("alt. hair theme") + H.change_hair_color(dye_color, 1) if("facial hair") - var/r_facial = color2R(dye_color) - var/g_facial = color2G(dye_color) - var/b_facial = color2B(dye_color) - if(H.change_facial_hair_color(r_facial, g_facial, b_facial)) - H.update_dna() + H.change_facial_hair_color(dye_color) + if("alt. facial hair theme") + H.change_facial_hair_color(dye_color, 1) if("body") - var/r_skin = color2R(dye_color) - var/g_skin = color2G(dye_color) - var/b_skin = color2B(dye_color) - if(H.change_skin_color(r_skin, g_skin, b_skin)) - H.update_dna() + H.change_skin_color(dye_color) + H.update_dna() user.visible_message("[user] finishes dying [M]'s [what_to_dye]!", "You finish dying [M]'s [what_to_dye]!") diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 6cb866d27ed..811eceb8e23 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -172,7 +172,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ clear_holo()//If not, we want to get rid of the hologram. var/obj/machinery/hologram/holopad/pad_close = get_closest_atom(/obj/machinery/hologram/holopad, holopads, theai.eyeobj) if(get_dist(pad_close, theai.eyeobj) <= pad_close.holo_range) - if(!(pad_close.stat & NOPOWER) && !pad_close.hologram) + if(!(pad_close.stat & NOPOWER) && !pad_close.hologram && (theai && !theai.stat && theai.client)) pad_close.activate_holo(theai, 1) if(pad_close.hologram) pad_close.hologram.forceMove(target_turf) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 901ea27a7df..b8244771de0 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -166,6 +166,9 @@ Class Procs: /obj/machinery/process() // If you dont use process or power why are you here return PROCESS_KILL +/obj/machinery/proc/process_atmos() //If you dont use process why are you here + return PROCESS_KILL + /obj/machinery/emp_act(severity) if(use_power && stat == 0) use_power(7500/severity) diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 7775744ba45..543ea80f490 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -47,14 +47,14 @@ if(operation == 1) // Play if(working == 1) return - if(!account || account.money < 10) + if(!account || account.money < 100) return - if(!account.charge(10, transaction_purpose = "Bet", dest_name = name)) + if(!account.charge(100, transaction_purpose = "Bet", dest_name = name)) return plays += 1 working = 1 icon_state = "slots-on" - var/roll = rand(1,1350) + var/roll = rand(1,20000) playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) spawn(25) if(roll == 1) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 5b1211a7394..dadfad2985a 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -951,7 +951,8 @@ icon_deny = "sec-deny" req_access_txt = "1" products = list(/obj/item/weapon/restraints/handcuffs = 8,/obj/item/weapon/restraints/handcuffs/cable/zipties = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5, - /obj/item/weapon/reagent_containers/food/snacks/donut = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7) + /obj/item/weapon/reagent_containers/food/snacks/donut = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7, + /obj/item/clothing/mask/muzzle/safety = 4) contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2,/obj/item/device/hailer = 5) /obj/machinery/vending/hydronutrients diff --git a/code/game/magic/Uristrunes.dm b/code/game/magic/Uristrunes.dm index ed881c71fb1..b645aa819f5 100644 --- a/code/game/magic/Uristrunes.dm +++ b/code/game/magic/Uristrunes.dm @@ -22,6 +22,9 @@ var/runetype = "rune" runetype = "rune" else if(ticker.mode.cultdat.theme == "fire") runetype = "fire-rune" + else if(ticker.mode.cultdat.theme == "death") + runetype = "death-rune" + if(lookup in rune_cache) return rune_cache[lookup] diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index 99db971b420..aef0a766172 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -30,7 +30,7 @@ /obj/mecha/combat/Topic(href,href_list) ..() - var/datum/topic_input/filter = new(href, href_list) - if(filter.get("close")) + var/datum/topic_input/afilter = new(href, href_list) + if(afilter.get("close")) am = null return \ No newline at end of file diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 13602957de1..8eb0779ce6d 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -112,15 +112,15 @@ /obj/item/mecha_parts/mecha_equipment/medical/sleeper/Topic(href,href_list) ..() - var/datum/topic_input/filter = new /datum/topic_input(href,href_list) - if(filter.get("eject")) + var/datum/topic_input/afilter = new /datum/topic_input(href,href_list) + if(afilter.get("eject")) go_out() - if(filter.get("view_stats")) + if(afilter.get("view_stats")) chassis.occupant << browse(get_patient_stats(),"window=msleeper") onclose(chassis.occupant, "msleeper") return - if(filter.get("inject")) - inject_reagent(filter.getType("inject",/datum/reagent),filter.getObj("source")) + if(afilter.get("inject")) + inject_reagent(afilter.getType("inject",/datum/reagent),afilter.getObj("source")) return /obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_stats() @@ -356,19 +356,19 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list) ..() - var/datum/topic_input/filter = new (href,href_list) - if(filter.get("toggle_mode")) + var/datum/topic_input/afilter = new (href,href_list) + if(afilter.get("toggle_mode")) mode = !mode update_equip_info() return - if(filter.get("select_reagents")) + if(afilter.get("select_reagents")) processed_reagents.len = 0 var/m = 0 var/message for(var/i=1 to known_reagents.len) if(m>=synth_speed) break - var/reagent = filter.get("reagent_[i]") + var/reagent = afilter.get("reagent_[i]") if(reagent && (reagent in known_reagents)) message = "[m ? ", " : null][known_reagents[reagent]]" processed_reagents += reagent @@ -380,14 +380,14 @@ occupant_message("Reagent processing started.") log_message("Reagent processing started.") return - if(filter.get("show_reagents")) + if(afilter.get("show_reagents")) chassis.occupant << browse(get_reagents_page(),"window=msyringegun") - if(filter.get("purge_reagent")) - var/reagent = filter.get("purge_reagent") + if(afilter.get("purge_reagent")) + var/reagent = afilter.get("purge_reagent") if(reagent) reagents.del_reagent(reagent) return - if(filter.get("purge_all")) + if(afilter.get("purge_all")) reagents.clear_reagents() return return diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index ef4330800ed..aebd54401a6 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -9,6 +9,8 @@ var/variance = 0 var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter var/projectile_delay = 0 + var/projectiles + var/projectile_energy_cost /obj/item/mecha_parts/mecha_equipment/weapon/can_attach(var/obj/mecha/combat/M as obj) if(..()) @@ -50,6 +52,7 @@ A.preparePixelProjectile(target, targloc, chassis.occupant, params, spread) chassis.use_power(energy_drain) + projectiles-- A.fire() playsound(chassis, fire_sound, 50, 1) @@ -243,8 +246,6 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic name = "General Ballisic Weapon" - var/projectiles - var/projectile_energy_cost size = 2 /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/action_checks(atom/target) if(..()) @@ -482,6 +483,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola name = "PCMK-6 Bola Launcher" icon_state = "mecha_bola" + origin_tech = "combat=4;engineering=4" projectile = /obj/item/weapon/restraints/legcuffs/bola fire_sound = 'sound/weapons/whip.ogg' projectiles = 10 diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index b7aadbaae26..1cf769624e9 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -328,9 +328,9 @@ /obj/machinery/mecha_part_fabricator/Topic(href, href_list) if(..()) return 1 - var/datum/topic_input/filter = new /datum/topic_input(href,href_list) + var/datum/topic_input/afilter = new /datum/topic_input(href,href_list) if(href_list["part_set"]) - var/tpart_set = filter.getStr("part_set") + var/tpart_set = afilter.getStr("part_set") if(tpart_set) if(tpart_set=="clear") part_set = null @@ -338,7 +338,7 @@ part_set = tpart_set screen = "parts" if(href_list["part"]) - var/T = filter.getStr("part") + var/T = afilter.getStr("part") var/datum/design/D = files.known_designs[T] if(D && (D.build_type & MECHFAB)) if(!processing_queue) @@ -346,16 +346,16 @@ else add_to_queue(D) if(href_list["add_to_queue"]) - var/T = filter.getStr("add_to_queue") + var/T = afilter.getStr("add_to_queue") var/datum/design/D = files.known_designs[T] if(D && D.build_type & MECHFAB) add_to_queue(D) return update_queue_on_page() if(href_list["remove_from_queue"]) - remove_from_queue(filter.getNum("remove_from_queue")) + remove_from_queue(afilter.getNum("remove_from_queue")) return update_queue_on_page() if(href_list["partset_to_queue"]) - add_part_set_to_queue(filter.get("partset_to_queue")) + add_part_set_to_queue(afilter.get("partset_to_queue")) return update_queue_on_page() if(href_list["process_queue"]) spawn(-1) @@ -369,8 +369,8 @@ if(href_list["screen"]) screen = href_list["screen"] if(href_list["queue_move"] && href_list["index"]) - var/index = filter.getNum("index") - var/new_index = index + filter.getNum("queue_move") + var/index = afilter.getNum("index") + var/new_index = index + afilter.getNum("queue_move") if(isnum(index) && isnum(new_index)) if(IsInRange(new_index,1,queue.len)) queue.Swap(index,new_index) @@ -381,7 +381,7 @@ if(href_list["sync"]) sync() if(href_list["part_desc"]) - var/T = filter.getStr("part_desc") + var/T = afilter.getStr("part_desc") var/datum/design/D = files.known_designs[T] if(D && D.build_type & MECHFAB) var/obj/part = D.build_path diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index 1e2868673c0..c14134ba2c5 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -41,9 +41,9 @@ if(..()) return 1 - var/datum/topic_input/filter = new /datum/topic_input(href,href_list) + var/datum/topic_input/afilter = new /datum/topic_input(href,href_list) if(href_list["send_message"]) - var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message") + var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("send_message") var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text) if(!trim(message) || ..()) return 1 @@ -52,11 +52,11 @@ M.occupant_message(message) if(href_list["shock"]) - var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("shock") + var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("shock") MT.shock() if(href_list["get_log"]) - var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("get_log") + var/obj/item/mecha_parts/mecha_tracking/MT = afilter.getObj("get_log") stored_data = MT.get_mecha_log() screen = 1 diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 1952aa9edd5..d55ce0651d0 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -240,10 +240,10 @@ return if(usr.stat > 0) return - var/datum/topic_input/filter = new /datum/topic_input(href,href_list) + var/datum/topic_input/afilter = new /datum/topic_input(href,href_list) if(href_list["select_equip"]) if(usr != occupant) return - var/obj/item/mecha_parts/mecha_equipment/equip = filter.getObj("select_equip") + var/obj/item/mecha_parts/mecha_equipment/equip = afilter.getObj("select_equip") if(equip) selected = equip occupant_message("You switch to [equip]") @@ -274,7 +274,7 @@ return if(href_list["rfreq"]) if(usr != occupant) return - var/new_frequency = (radio.frequency + filter.getNum("rfreq")) + var/new_frequency = (radio.frequency + afilter.getNum("rfreq")) if((radio.frequency < PUBLIC_LOW_FREQ || radio.frequency > PUBLIC_HIGH_FREQ)) new_frequency = sanitize_frequency(new_frequency) radio.set_frequency(new_frequency) @@ -316,11 +316,11 @@ return if(href_list["req_access"] && add_req_access) if(!in_range(src, usr)) return - output_access_dialog(filter.getObj("id_card"),filter.getMob("user")) + output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user")) return if(href_list["maint_access"] && maint_access) if(!in_range(src, usr)) return - var/mob/user = filter.getMob("user") + var/mob/user = afilter.getMob("user") if(user) if(state==0) state = 1 @@ -328,30 +328,30 @@ else if(state==1) state = 0 to_chat(user, "The securing bolts are now hidden.") - output_maintenance_dialog(filter.getObj("id_card"),user) + output_maintenance_dialog(afilter.getObj("id_card"),user) return if(href_list["set_internal_tank_valve"] && state >=1) if(!in_range(src, usr)) return - var/mob/user = filter.getMob("user") + var/mob/user = afilter.getMob("user") if(user) var/new_pressure = input(user,"Input new output pressure","Pressure setting",internal_tank_valve) as num if(new_pressure) internal_tank_valve = new_pressure to_chat(user, "The internal pressure valve has been set to [internal_tank_valve]kPa.") - if(href_list["add_req_access"] && add_req_access && filter.getObj("id_card")) + if(href_list["add_req_access"] && add_req_access && afilter.getObj("id_card")) if(!in_range(src, usr)) return - operation_req_access += filter.getNum("add_req_access") - output_access_dialog(filter.getObj("id_card"),filter.getMob("user")) + operation_req_access += afilter.getNum("add_req_access") + output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user")) return - if(href_list["del_req_access"] && add_req_access && filter.getObj("id_card")) + if(href_list["del_req_access"] && add_req_access && afilter.getObj("id_card")) if(!in_range(src, usr)) return - operation_req_access -= filter.getNum("del_req_access") - output_access_dialog(filter.getObj("id_card"),filter.getMob("user")) + operation_req_access -= afilter.getNum("del_req_access") + output_access_dialog(afilter.getObj("id_card"),afilter.getMob("user")) return if(href_list["finish_req_access"]) if(!in_range(src, usr)) return add_req_access = 0 - var/mob/user = filter.getMob("user") + var/mob/user = afilter.getMob("user") user << browse(null,"window=exosuit_add_access") return if(href_list["dna_lock"]) @@ -384,9 +384,9 @@ /* if(href_list["debug"]) if(href_list["set_i_dam"]) - setInternalDamage(filter.getNum("set_i_dam")) + setInternalDamage(afilter.getNum("set_i_dam")) if(href_list["clear_i_dam"]) - clearInternalDamage(filter.getNum("clear_i_dam")) + clearInternalDamage(afilter.getNum("clear_i_dam")) return */ diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm index d386fe07d0b..106c60dc650 100644 --- a/code/game/objects/effects/mines.dm +++ b/code/game/objects/effects/mines.dm @@ -58,6 +58,10 @@ /obj/effect/mine/dnascramble/mineEffect(mob/living/victim) victim.apply_effect(radiation_amount, IRRADIATE, 0) + if(ishuman(victim)) + var/mob/living/carbon/human/V = victim + if(NO_DNA in V.species.species_traits) + return randmutb(victim) domutcheck(victim ,null) diff --git a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm index 2dd8502d662..96f52929da6 100644 --- a/code/game/objects/effects/overlays.dm +++ b/code/game/objects/effects/overlays.dm @@ -277,4 +277,11 @@ /obj/effect/overlay/temp/cult/turf/open/floor icon_state = "floorglow" - duration = 5 \ No newline at end of file + duration = 5 + +/obj/effect/overlay/temp/shieldflash + icon_state = "shield-flash" + duration = 3 + +/obj/effect/overlay/temp/shieldflash/New(var/flash_color) + diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index 1a1ed2b4c5e..52472afcb3d 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -122,7 +122,7 @@ for(var/obj/item/borg/combat/shield/S in R.module.modules) if(R.activated(S)) add_logs(user, M, "flashed", object="[src.name]") - user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but if blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by his shield!") + user.visible_message("[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!", "You try to overload [M]'s sensors with the [src.name], but are blocked by their shield!") return 1 add_logs(user, M, "flashed", object="[src.name]") if(M.flash_eyes(affect_silicon = 1)) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index c59e39a2043..20c21ca73d0 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -21,6 +21,11 @@ if(!user.can_speak()) to_chat(user, "You find yourself unable to speak at all.") return + if(ishuman(user)) + var/mob/living/carbon/human/abductor/H = user + if(H && H.mind.abductor) + to_chat(user, "Megaphones can't project psionic communication!") + return if(ishuman(user)) var/mob/living/carbon/human/H = user if(H && H.mind && H.mind.miming) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 3d1f1001b06..67009e3366d 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -675,6 +675,13 @@ var/global/list/default_medbay_channels = list( ..() set_frequency(DTH_FREQ) +/obj/item/device/radio/borg/ert + keyslot = new /obj/item/device/encryptionkey/ert + +/obj/item/device/radio/borg/ert/New() + ..() + set_frequency(ERT_FREQ) + /obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob, params) // ..() user.set_machine(src) diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm index 5cc0ab739c0..b5d0066a706 100644 --- a/code/game/objects/items/random_items.dm +++ b/code/game/objects/items/random_items.dm @@ -3,13 +3,14 @@ // ------------------------------------- /obj/item/toy/random name = "Random Toy" - New() - ..() - var/list/types = list(/obj/item/weapon/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/weapon/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize) - var/T = pick(types) - new T(loc) - spawn(1) - qdel(src) + +/obj/item/toy/random/New() + ..() + var/list/types = list(/obj/item/weapon/gun/projectile/shotgun/toy/crossbow, /obj/item/toy/balloon,/obj/item/toy/spinningtoy,/obj/item/weapon/reagent_containers/spray/waterflower) + subtypesof(/obj/item/toy/prize) + var/T = pick(types) + new T(loc) + spawn(1) + qdel(src) // ------------------------------------- // Random cleanables, clearly this makes sense @@ -17,24 +18,26 @@ /obj/effect/decal/cleanable/random name = "Random Mess" - New() - ..() - var/list/list = subtypesof(/obj/effect/decal/cleanable) - list(/obj/effect/decal/cleanable/random,/obj/effect/decal/cleanable/cobweb,/obj/effect/decal/cleanable/cobweb2) - var/T = pick(list) - new T(loc) - spawn(0) - qdel(src) + +/obj/effect/decal/cleanable/random/New() + ..() + var/list/list = subtypesof(/obj/effect/decal/cleanable) - list(/obj/effect/decal/cleanable/random,/obj/effect/decal/cleanable/cobweb,/obj/effect/decal/cleanable/cobweb2) + var/T = pick(list) + new T(loc) + spawn(0) + qdel(src) /obj/item/stack/sheet/animalhide/random name = "random animal hide" - New() - ..() - spawn(1) - var/htype = pick(/obj/item/stack/sheet/animalhide/cat,/obj/item/stack/sheet/animalhide/corgi,/obj/item/stack/sheet/animalhide/human,/obj/item/stack/sheet/animalhide/lizard,/obj/item/stack/sheet/animalhide/monkey) - var/obj/item/stack/S = new htype(loc) - S.amount = amount - qdel(src) + +/obj/item/stack/sheet/animalhide/random/New() + ..() + spawn(1) + var/htype = pick(/obj/item/stack/sheet/animalhide/cat,/obj/item/stack/sheet/animalhide/corgi,/obj/item/stack/sheet/animalhide/human,/obj/item/stack/sheet/animalhide/lizard,/obj/item/stack/sheet/animalhide/monkey) + var/obj/item/stack/S = new htype(loc) + S.amount = amount + qdel(src) // ------------------------------------- // Not yet identified chemical. @@ -43,103 +46,108 @@ /obj/item/weapon/reagent_containers/glass/bottle/random_reagent name = "unlabelled bottle" -// identify_probability = 0 - New() - ..() - var/datum/reagent/R = pick(chemical_reagents_list) - if(rare_chemicals.Find(R)) - reagents.add_reagent(R,10) - else - reagents.add_reagent(R,rand(2,3)*10) - pixel_x = rand(-10,10) - pixel_y = rand(-10,10) + // identify_probability = 0 + +/obj/item/weapon/reagent_containers/glass/bottle/random_reagent/New() + ..() + var/list/possible_chems = chemical_reagents_list.Copy() + possible_chems -= blocked_chems.Copy() + var/datum/reagent/R = pick(possible_chems) + if(rare_chemicals.Find(R)) + reagents.add_reagent(R, 10) + else + reagents.add_reagent(R, rand(2, 3)*10) + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) //Cuts out the food and drink reagents /obj/item/weapon/reagent_containers/glass/bottle/random_chem name = "unlabelled chemical bottle" -// identify_probability = 0 - New() - ..() + // identify_probability = 0 - var/datum/reagent/R = pick(standard_chemicals + rare_chemicals) - if(rare_chemicals.Find(R)) - reagents.add_reagent(R,10) - else - reagents.add_reagent(R,rand(2,3)*10) - name = "unlabelled bottle" - pixel_x = rand(-10,10) - pixel_y = rand(-10,10) +/obj/item/weapon/reagent_containers/glass/bottle/random_chem/New() + ..() + var/R = get_random_reagent_id() + if(rare_chemicals.Find(R)) + reagents.add_reagent(R, 10) + else + reagents.add_reagent(R, rand(2, 3)*10) + name = "unlabelled bottle" + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) /obj/item/weapon/reagent_containers/glass/bottle/random_base_chem name = "unlabelled chemical bottle" -// identify_probability = 0 - New() - ..() - var/datum/reagent/R = pick(base_chemicals) - reagents.add_reagent(R,rand(2,6)*5) - name = "unlabelled bottle" - pixel_x = rand(-10,10) - pixel_y = rand(-10,10) + // identify_probability = 0 + +/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem/New() + ..() + var/datum/reagent/R = pick(base_chemicals) + reagents.add_reagent(R, rand(2, 6)*5) + name = "unlabelled bottle" + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) /obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink name = "unlabelled drink" icon = 'icons/obj/drinks.dmi' - New() - ..() - var/list/additional_drinks = list() - if(prob(50)) - additional_drinks += list("pancuronium","lsd","omnizine","blood") - var/datum/reagent/R = pick(drinks + additional_drinks) - reagents.add_reagent(R,volume) - name = "unlabelled bottle" - icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red") - pixel_x = rand(-5,5) - pixel_y = rand(-5,5) +/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink/New() + ..() + var/list/possible_drinks = drinks.Copy() + if(prob(50)) + possible_drinks += list("pancuronium","lsd","omnizine","blood") + + var/datum/reagent/R = pick(possible_drinks) + reagents.add_reagent(R, volume) + name = "unlabelled bottle" + icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red") + pixel_x = rand(-5, 5) + pixel_y = rand(-5, 5) /obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent // Same as the chembottle code except the container name = "unlabelled drink?" icon = 'icons/obj/drinks.dmi' - New() - ..() - var/datum/reagent/R = pick(chemical_reagents_list) - if(rare_chemicals.Find(R)) - reagents.add_reagent(R,10) - else - reagents.add_reagent(R,rand(3,10)*10) - name = "unlabelled bottle" - icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red") - pixel_x = rand(-5,5) - pixel_y = rand(-5,5) - spawn(0) - qdel(src) + +/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent/New() + ..() + + var/R = get_random_reagent_id() + if(rare_chemicals.Find(R)) + reagents.add_reagent(R, 10) + else + reagents.add_reagent(R, rand(3, 10)*10) + name = "unlabelled bottle" + icon_state = pick("alco-white","alco-green","alco-blue","alco-clear","alco-red") + pixel_x = rand(-5, 5) + pixel_y = rand(-5, 5) + spawn(0) + qdel(src) /obj/item/weapon/storage/pill_bottle/random_meds name = "unlabelled pillbottle" desc = "The sheer recklessness of this bottle's existence astounds you." - New() - ..() - var/i = 1 - while(i < storage_slots) +/obj/item/weapon/storage/pill_bottle/random_meds/New() + ..() + var/i = 1 + while(i < storage_slots) + var/list/possible_medicines = standard_medicines.Copy() + if(prob(50)) + possible_medicines += rare_medicines.Copy() + var/datum/reagent/R = pick(possible_medicines) + var/obj/item/weapon/reagent_containers/food/pill/P = new(src) - var/datum/reagent/R - if(prob(50)) - R = pick(standard_medicines + rare_medicines) - else - R = pick(standard_medicines) - var/obj/item/weapon/reagent_containers/food/pill/P = new(src) + if(rare_medicines.Find(R)) + P.reagents.add_reagent(R, 10) + else + P.reagents.add_reagent(R, rand(2, 5)*10) + P.name = "Unlabelled Pill" + P.desc = "Something about this pill entices you to try it, against your better judgement." + i++ + pixel_x = rand(-10, 10) + pixel_y = rand(-10, 10) - if(rare_medicines.Find(R)) - P.reagents.add_reagent(R,10) - else - P.reagents.add_reagent(R,rand(2,5)*10) - P.name = "Unlabelled Pill" - P.desc = "Something about this pill entices you to try it, against your better judgement." - i++ - pixel_x = rand(-10,10) - pixel_y = rand(-10,10) - return // ------------------------------------- // Containers full of unknown crap @@ -150,43 +158,43 @@ desc = "Crate full of chemicals of unknown type and value from a 'trusted' source." req_one_access = list(access_chemistry,access_research,access_qm) // the qm knows a guy, you see. - New() - ..() - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) - new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) - while(prob(50)) - new/obj/item/weapon/reagent_containers/glass/bottle/random_reagent(src) +/obj/structure/closet/crate/secure/unknownchemicals/New() + ..() + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_base_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) + new/obj/item/weapon/reagent_containers/glass/bottle/random_chem(src) + while(prob(50)) + new/obj/item/weapon/reagent_containers/glass/bottle/random_reagent(src) + new/obj/item/weapon/storage/pill_bottle/random_meds(src) + while(prob(25)) new/obj/item/weapon/storage/pill_bottle/random_meds(src) - while(prob(25)) - new/obj/item/weapon/storage/pill_bottle/random_meds(src) /obj/structure/closet/crate/secure/chemicals - name = "chemical supply kit" - desc = "Full of basic chemistry supplies." - req_one_access = list(access_chemistry,access_research) + name = "chemical supply kit" + desc = "Full of basic chemistry supplies." + req_one_access = list(access_chemistry,access_research) - New() - ..() - for(var/chem in standard_chemicals) - var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src) - B.reagents.add_reagent(chem,B.volume) - if(prob(85)) - var/datum/reagent/r = chemical_reagents_list[chem] - B.name = "[r.name] bottle" -// B.identify_probability = 100 - else - B.name = "unlabelled bottle" - B.desc = "Looks like the label fell off." -// B.identify_probability = 0 +/obj/structure/closet/crate/secure/chemicals/New() + ..() + for(var/chem in standard_chemicals) + var/obj/item/weapon/reagent_containers/glass/bottle/B = new(src) + B.reagents.add_reagent(chem, B.volume) + if(prob(85)) + var/datum/reagent/r = chemical_reagents_list[chem] + B.name = "[r.name] bottle" +// B.identify_probability = 100 + else + B.name = "unlabelled bottle" + B.desc = "Looks like the label fell off." +// B.identify_probability = 0 /* /obj/structure/closet/crate/bin/flowers @@ -235,15 +243,15 @@ icon_broken = "cabinetdetective_broken" icon_off = "cabinetdetective_broken" - New() - ..() - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) - while(prob(25)) - new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src) +/obj/structure/closet/secure_closet/random_drinks/New() + ..() + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_drink(src) + while(prob(25)) + new/obj/item/weapon/reagent_containers/food/drinks/bottle/random_reagent(src) // ------------------------------------- @@ -257,23 +265,23 @@ name = "\improper Mysterious Crate" desc = "What could it be?" - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/weapon/crowbar)) - var/list/menace = pick( /mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/faithless,/mob/living/simple_animal/hostile/pirate, - /mob/living/simple_animal/hostile/creature,/mob/living/simple_animal/hostile/pirate/ranged, - /mob/living/simple_animal/hostile/hivebot,/mob/living/simple_animal/hostile/viscerator,/mob/living/simple_animal/hostile/pirate) +/obj/structure/largecrate/evil/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if(istype(W, /obj/item/weapon/crowbar)) + var/list/menace = pick( /mob/living/simple_animal/hostile/carp,/mob/living/simple_animal/hostile/faithless,/mob/living/simple_animal/hostile/pirate, + /mob/living/simple_animal/hostile/creature,/mob/living/simple_animal/hostile/pirate/ranged, + /mob/living/simple_animal/hostile/hivebot,/mob/living/simple_animal/hostile/viscerator,/mob/living/simple_animal/hostile/pirate) - visible_message("Something falls out of the [src]!") - var/obj/item/weapon/grenade/clusterbuster/C = new(src.loc) - C.prime() - spawn(10) - new menace(src.loc) - while(prob(15)) - new menace(get_step_rand(src.loc)) - ..() - return 1 - else - return ..() + visible_message("Something falls out of the [src]!") + var/obj/item/weapon/grenade/clusterbuster/C = new(src.loc) + C.prime() + spawn(10) + new menace(src.loc) + while(prob(15)) + new menace(get_step_rand(src.loc)) + ..() + return 1 + else + return ..() // @@ -288,22 +296,22 @@ name = "Schrodinger's Crate" desc = "What happens if you open it?" - attackby(obj/item/weapon/W as obj, mob/user as mob, params) - if(istype(W, /obj/item/weapon/crowbar)) - var/mob/living/simple_animal/pet/cat/Cat1 = new(loc) - Cat1.apply_damage(250)//,TOX) - Cat1.name = "Schrodinger's Cat" - Cat1.desc = "It seems it's been dead for a while." +/obj/structure/largecrate/schrodinger/attackby(obj/item/weapon/W as obj, mob/user as mob, params) + if(istype(W, /obj/item/weapon/crowbar)) + var/mob/living/simple_animal/pet/cat/Cat1 = new(loc) + Cat1.apply_damage(250)//,TOX) + Cat1.name = "Schrodinger's Cat" + Cat1.desc = "It seems it's been dead for a while." - var/mob/living/simple_animal/pet/cat/Cat2 = new(loc) - Cat2.name = "Schrodinger's Cat" - Cat2.desc = "It's was alive the whole time!" - sleep(2) - if(prob(50)) - qdel(Cat1) - else - qdel(Cat2) - return ..() + var/mob/living/simple_animal/pet/cat/Cat2 = new(loc) + Cat2.name = "Schrodinger's Cat" + Cat2.desc = "It's was alive the whole time!" + sleep(2) + if(prob(50)) + qdel(Cat1) + else + qdel(Cat2) + return ..() // -------------------------------------- // Collen's box of wonder and mystery @@ -318,18 +326,18 @@ /obj/item/weapon/grenade/chem_grenade/dirt, /obj/item/weapon/grenade/chem_grenade/lube, /obj/item/weapon/grenade/smokebomb, /obj/item/weapon/grenade/chem_grenade/drugs, /obj/item/weapon/grenade/chem_grenade/ethanol) // holy list batman - New() - ..() - var/nade1 = pick(grenadelist) - var/nade2 = pick(grenadelist) - var/nade3 = pick(grenadelist) - var/nade4 = pick(grenadelist) - var/nade5 = pick(grenadelist) - var/nade6 = pick(grenadelist) +/obj/item/weapon/storage/box/grenades/New() + ..() + var/nade1 = pick(grenadelist) + var/nade2 = pick(grenadelist) + var/nade3 = pick(grenadelist) + var/nade4 = pick(grenadelist) + var/nade5 = pick(grenadelist) + var/nade6 = pick(grenadelist) - new nade1(src) - new nade2(src) - new nade3(src) - new nade4(src) - new nade5(src) - new nade6(src) + new nade1(src) + new nade2(src) + new nade3(src) + new nade4(src) + new nade5(src) + new nade6(src) diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm index 0e9d9a0ac09..2d790a8df1f 100644 --- a/code/game/objects/items/robot/robot_items.dm +++ b/code/game/objects/items/robot/robot_items.dm @@ -1,10 +1,11 @@ /********************************************************************** Cyborg Spec Items ***********************************************************************/ -//Might want to move this into several files later but for now it works here +/obj/item/borg + icon = 'icons/mob/robot_items.dmi' + /obj/item/borg/stun - name = "electrified arm" - icon = 'icons/obj/items.dmi' + name = "electrically-charged arm" icon_state = "elecarm" var/charge_cost = 30 @@ -15,8 +16,9 @@ playsound(M, 'sound/weapons/Genhit.ogg', 50, 1) return 0 - if(!user.cell.use(charge_cost)) - return + if(isrobot(user)) + if(!user.cell.use(charge_cost)) + return user.do_attack_animation(M) M.Weaken(5) @@ -34,3 +36,198 @@ name = "Overdrive" icon = 'icons/obj/decals.dmi' icon_state = "shock" + +#define BORG_HUG 0 +#define BORG_HUG_SUPER 1 +#define BORG_HUG_SHOCK 2 +#define BORG_HUG_CRUSH 3 + +/obj/item/borg/cyborghug + name = "Hugging Module" + icon_state = "hugmodule" + desc = "For when a someone really needs a hug." + var/mode = BORG_HUG //0 = Hugs 1 = "Hug" 2 = Shock 3 = CRUSH + var/ccooldown = 0 + var/scooldown = 0 + var/shockallowed = FALSE//Can it be a stunarm when emagged. Only PK borgs get this by default. + var/boop = FALSE + +/obj/item/borg/cyborghug/attack_self(mob/living/user) + if(isrobot(user)) + var/mob/living/silicon/robot/P = user + if(P.emagged && shockallowed) + if(mode < BORG_HUG_CRUSH) + mode++ + else + mode = BORG_HUG + else if(mode < BORG_HUG_SUPER) + mode++ + else + mode = BORG_HUG + switch(mode) + if(BORG_HUG) + to_chat(user, "Power reset. Hugs!") + if(BORG_HUG_SUPER) + to_chat(user, "Power increased!") + if(BORG_HUG_SHOCK) + to_chat(user, "BZZT. Electrifying arms...") + if(BORG_HUG_CRUSH) + to_chat(user, "ERROR: ARM ACTUATORS OVERLOADED.") + +/obj/item/borg/cyborghug/attack(mob/living/M, mob/living/silicon/robot/user) + if(M == user) + return + switch(mode) + if(BORG_HUG) + if(M.health >= config.health_threshold_crit) + if(user.zone_sel.selecting == "head") + user.visible_message("[user] playfully boops [M] on the head!", \ + "You playfully boop [M] on the head!") + user.do_attack_animation(M) + playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1) + else if(ishuman(M)) + if(M.lying) + user.visible_message("[user] shakes [M] trying to get \him up!", \ + "You shake [M] trying to get \him up!") + else + user.visible_message("[user] hugs [M] to make \him feel better!", \ + "You hug [M] to make \him feel better!") + if(M.resting) + M.resting = FALSE + M.update_canmove() + else + user.visible_message("[user] pets [M]!", \ + "You pet [M]!") + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + if(BORG_HUG_SUPER) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + if(M.lying) + user.visible_message("[user] shakes [M] trying to get \him up!", \ + "You shake [M] trying to get \him up!") + else if(user.zone_sel.selecting == "head") + user.visible_message("[user] bops [M] on the head!", \ + "You bop [M] on the head!") + user.do_attack_animation(M) + else + user.visible_message("[user] hugs [M] in a firm bear-hug! [M] looks uncomfortable...", \ + "You hug [M] firmly to make \him feel better! [M] looks uncomfortable...") + if(M.resting) + M.resting = FALSE + M.update_canmove() + else + user.visible_message("[user] bops [M] on the head!", \ + "You bop [M] on the head!") + playsound(loc, 'sound/weapons/tap.ogg', 50, 1, -1) + if(BORG_HUG_SHOCK) + if(!scooldown) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + M.electrocute_act(5, "[user]", safety = 1) + user.visible_message("[user] electrocutes [M] with their touch!", \ + "You electrocute [M] with your touch!") + M.update_canmove() + else + if(!isrobot(M)) + M.adjustFireLoss(10) + user.visible_message("[user] shocks [M]!", \ + "You shock [M]!") + else + user.visible_message("[user] shocks [M]. It does not seem to have an effect", \ + "You shock [M] to no effect.") + playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, -1) + user.cell.charge -= 500 + scooldown = TRUE + spawn(20) + scooldown = FALSE + if(BORG_HUG_CRUSH) + if(!ccooldown) + if(M.health >= config.health_threshold_crit) + if(ishuman(M)) + user.visible_message("[user] crushes [M] in their grip!", \ + "You crush [M] in your grip!") + else + user.visible_message("[user] crushes [M]!", \ + "You crush [M]!") + playsound(loc, 'sound/weapons/smash.ogg', 50, 1, -1) + M.adjustBruteLoss(15) + user.cell.charge -= 300 + ccooldown = TRUE + spawn(10) + ccooldown = FALSE + +#undef BORG_HUG +#undef BORG_HUG_SUPER +#undef BORG_HUG_SHOCK +#undef BORG_HUG_CRUSH + +/obj/item/borg/cyborghug/peacekeeper + shockallowed = TRUE + +/obj/item/device/harmalarm + name = "Sonic Harm Prevention Tool" + desc = "Releases a harmless blast that confuses most organics. For when the harm is JUST TOO MUCH" + icon_state = "megaphone" + var/cooldown = 0 + var/emagged = FALSE + +/obj/item/device/harmalarm/emag_act(mob/user) + emagged = !emagged + if(emagged) + to_chat(user, "You short out the safeties on the [src]!") + else + to_chat(user, "You reset the safeties on the [src]!") + +/obj/item/device/harmalarm/attack_self(mob/user) + var/safety = !emagged + if(cooldown > world.time) + to_chat(user, "The device is still recharging!") + return + + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(R.cell.charge < 1200) + to_chat(user, "You don't have enough charge to do this!") + return + R.cell.charge -= 1000 + if(R.emagged) + safety = FALSE + + if(safety) + user.visible_message("[user] blares out a near-deafening siren from its speakers!") + for(var/mob/living/carbon/M in get_mobs_in_view(9, user)) + if(!M.check_ear_prot()) + M.AdjustConfused(6) + to_chat(M, "The siren pierces your hearing!") + audible_message("HUMAN HARM") + playsound(get_turf(src), 'sound/AI/harmalarm.ogg', 70, 3) + cooldown = world.time + 200 + log_game("[key_name(user)] used a Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(R.connected_ai) + to_chat(R.connected_ai, " NOTICE - Peacekeeping 'HARM ALARM' used by: [user] ") + + return + + user.audible_message("BZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZT") + for(var/mob/living/carbon/human/H in get_mobs_in_view(9, user)) + if(istype(H.l_ear, /obj/item/clothing/ears/earmuffs) || istype(H.r_ear, /obj/item/clothing/ears/earmuffs) || H.ear_deaf) + continue + var/earsafety = FALSE + if(H.check_ear_prot()) + earsafety = TRUE + + if(earsafety) + H.AdjustConfused(5) + H.AdjustStuttering(10) + H.Jitter(10) + else + H.Weaken(2) + H.AdjustConfused(10) + H.AdjustStuttering(15) + H.Jitter(25) + + playsound(get_turf(src), 'sound/machines/warning-buzzer.ogg', 130, 3) + cooldown = world.time + 600 + log_game("[key_name(user)] used an emagged Cyborg Harm Alarm in ([user.x],[user.y],[user.z])") diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 3be1404a030..3ffdfaaf751 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -207,6 +207,7 @@ to_chat(user, "[H]'s [limb] is already splinted!") if(alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Removing.", "Yes", "No") == "Yes") affecting.status &= ~ORGAN_SPLINTED + H.handle_splints() to_chat(user, "You remove the splint from [H]'s [limb].") return if(M == user) @@ -221,4 +222,7 @@ "You hear something being wrapped.") affecting.status |= ORGAN_SPLINTED + affecting.splinted_count = H.step_count + H.handle_splints() + use(1) diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index 38d426766a0..2a78511d2c7 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -20,8 +20,8 @@ icon_state = "sheet-glass" materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT) origin_tech = "materials=1" - var/created_window = /obj/structure/window/basic - var/full_window = /obj/structure/window/full/basic + created_window = /obj/structure/window/basic + full_window = /obj/structure/window/full/basic merge_type = /obj/item/stack/sheet/glass /obj/item/stack/sheet/glass/fifty @@ -154,8 +154,8 @@ icon_state = "sheet-rglass" materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT) origin_tech = "materials=2" - var/created_window = /obj/structure/window/reinforced - var/full_window = /obj/structure/window/full/reinforced + created_window = /obj/structure/window/reinforced + full_window = /obj/structure/window/full/reinforced merge_type = /obj/item/stack/sheet/rglass /obj/item/stack/sheet/rglass/cyborg @@ -268,8 +268,8 @@ icon_state = "sheet-plasmaglass" materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2) origin_tech = "plasmatech=2;materials=2" - var/created_window = /obj/structure/window/plasmabasic - var/full_window = /obj/structure/window/full/plasmabasic + created_window = /obj/structure/window/plasmabasic + full_window = /obj/structure/window/full/plasmabasic /obj/item/stack/sheet/plasmaglass/attack_self(mob/user as mob) @@ -357,8 +357,8 @@ icon_state = "sheet-plasmarglass" materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT/2, MAT_GLASS=MINERAL_MATERIAL_AMOUNT*2) origin_tech = "plasmatech=2;materials=2" - var/created_window = /obj/structure/window/plasmareinforced - var/full_window = /obj/structure/window/full/plasmareinforced + created_window = /obj/structure/window/plasmareinforced + full_window = /obj/structure/window/full/plasmareinforced /obj/item/stack/sheet/plasmarglass/attack_self(mob/user as mob) diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index 029cb8cd4a5..5ce0a786cab 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -258,13 +258,13 @@ var/global/list/datum/stack_recipe/cardboard_recipes = list ( * Runed Metal */ -var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \ - new/datum/stack_recipe("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), - new/datum/stack_recipe("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("pylon", /obj/structure/cult/functional/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("forge", /obj/structure/cult/functional/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("archives", /obj/structure/cult/functional/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \ - new/datum/stack_recipe("altar", /obj/structure/cult/functional/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \ +var/global/list/datum/stack_recipe/cult = list ( \ + new/datum/stack_recipe/cult("runed door", /obj/machinery/door/airlock/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), + new/datum/stack_recipe/cult("runed girder", /obj/structure/girder/cult, 1, time = 50, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe/cult("pylon", /obj/structure/cult/functional/pylon, 3, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe/cult("forge", /obj/structure/cult/functional/forge, 5, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe/cult("archives", /obj/structure/cult/functional/tome, 2, time = 40, one_per_turf = 1, on_floor = 1), \ + new/datum/stack_recipe/cult("altar", /obj/structure/cult/functional/talisman, 5, time = 40, one_per_turf = 1, on_floor = 1), \ ) /obj/item/stack/sheet/runed_metal @@ -280,13 +280,27 @@ var/global/list/datum/stack_recipe/runed_metal_recipes = list ( \ if(!iscultist(user)) to_chat(user, "Only one with forbidden knowledge could hope to work this metal...") return + if(!is_level_reachable(user.z)) + to_chat(user, "The energies of this place interfere with the metal shaping!") + return + return ..() +/datum/stack_recipe/cult + one_per_turf = 1 + on_floor = 1 + +/datum/stack_recipe/cult/post_build(obj/item/stack/S, obj/result) + if(ishuman(S.loc)) + var/mob/living/carbon/human/H = S.loc + H.bleed(5) + ..() + /obj/item/stack/sheet/runed_metal/fifty amount = 50 /obj/item/stack/sheet/runed_metal/New(var/loc, var/amount=null) - recipes = runed_metal_recipes + recipes = cult return ..() /* diff --git a/code/game/objects/items/stacks/sheets/sheets.dm b/code/game/objects/items/stacks/sheets/sheets.dm index 3a92d0f7662..460a70cb069 100644 --- a/code/game/objects/items/stacks/sheets/sheets.dm +++ b/code/game/objects/items/stacks/sheets/sheets.dm @@ -9,6 +9,8 @@ attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "smashed") var/perunit = MINERAL_MATERIAL_AMOUNT var/sheettype = null //this is used for girders in the creation of walls/false walls + var/created_window = null //apparently glass sheets don't share a base type for glass specifically, so each had to define these vars individually + var/full_window = null //moving the var declaration to here so this can be checked cleaner until someone is willing to make them share a base type properly usesound = 'sound/items/Deconstruct.ogg' toolspeed = 1 diff --git a/code/game/objects/items/stacks/tiles/tile_types.dm b/code/game/objects/items/stacks/tiles/tile_types.dm index f982c89a8c3..86f2b5e70a1 100644 --- a/code/game/objects/items/stacks/tiles/tile_types.dm +++ b/code/game/objects/items/stacks/tiles/tile_types.dm @@ -166,3 +166,15 @@ desc = "A grooved floor tile." icon_state = "tile_pod" turf_type = /turf/simulated/floor/pod + +/obj/item/stack/tile/arcade_carpet + name = "arcade carpet" + singular_name = "arcade carpet" + desc= "A piece of carpet with a retro spaceship pattern." + icon_state = "tile_space" + turf_type = /turf/simulated/floor/carpet/arcade + merge_type = /obj/item/stack/tile/arcade_carpet + burn_state = FLAMMABLE + +/obj/item/stack/tile/arcade_carpet/loaded + amount = 20 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index b4bacd5326a..9f3f2f4545a 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1397,7 +1397,7 @@ obj/item/toy/cards/deck/syndicate/black is_empty = 1 playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1) user.visible_message("The [src] goes off!") - M.apply_damage(200, BRUTE, "head", sharp =1, used_weapon = "Self-inflicted gunshot would to the head.") + M.apply_damage(200, BRUTE, "head", sharp =1, used_weapon = "Self-inflicted gunshot wound to the head.") M.death() else user.visible_message("[user] lowers the [src] from their head.") diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index ddeefa002b0..639bd65dd57 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -232,3 +232,76 @@ RSF to_chat(user, "The RSF now holds [matter]/30 fabrication-units.") desc = "A RSF. It currently holds [matter]/30 fabrication-units." return + +/obj/item/weapon/cookiesynth + name = "\improper Cookie Synthesizer" + desc = "A self-recharging device used to rapidly deploy cookies." + icon = 'icons/obj/tools.dmi' + icon_state = "rcd" + var/matter = 10 + var/toxin = FALSE + var/cooldown = 0 + var/cooldowndelay = 10 + var/emagged = FALSE + w_class = WEIGHT_CLASS_NORMAL + +/obj/item/weapon/cookiesynth/examine(mob/user) + ..() + to_chat(user, "It currently holds [matter]/10 cookie-units.") + +/obj/item/weapon/cookiesynth/attackby() + return + +/obj/item/weapon/cookiesynth/emag_act(mob/user) + emagged = !emagged + if(emagged) + to_chat(user, "You short out [src]'s reagent safety checker!") + else + to_chat(user, "You reset [src]'s reagent safety checker!") + toxin = FALSE + +/obj/item/weapon/cookiesynth/attack_self(mob/user) + var/mob/living/silicon/robot/P = null + if(isrobot(user)) + P = user + if(emagged && !toxin) + toxin = TRUE + to_chat(user, "Cookie Synthesizer Hacked.") + else if(P.emagged && !toxin) + toxin = TRUE + to_chat(user, "Cookie Synthesizer Hacked.") + else + toxin = FALSE + to_chat(user, "Cookie Synthesizer Reset.") + +/obj/item/weapon/cookiesynth/process() + if(matter < 10) + matter++ + +/obj/item/weapon/cookiesynth/afterattack(atom/A, mob/user, proximity) + if(cooldown > world.time) + return + if(!proximity) + return + if(!(istype(A, /obj/structure/table) || isfloorturf(A))) + return + if(matter < 1) + to_chat(user, "[src] doesn't have enough matter left. Wait for it to recharge!") + return + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + if(!R.cell || R.cell.charge < 400) + to_chat(user, "You do not have enough power to use [src].") + return + var/turf/T = get_turf(A) + playsound(loc, 'sound/machines/click.ogg', 10, 1) + to_chat(user, "Fabricating Cookie..") + var/obj/item/weapon/reagent_containers/food/snacks/cookie/S = new /obj/item/weapon/reagent_containers/food/snacks/cookie(T) + if(toxin) + S.reagents.add_reagent("pancuronium", 2.4) + if(isrobot(user)) + var/mob/living/silicon/robot/R = user + R.cell.charge -= 100 + else + matter-- + cooldown = world.time + cooldowndelay \ No newline at end of file diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index 96d48c55b83..6fa11d839c7 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -109,7 +109,7 @@ user.visible_message("[user] starts to shave their facial hair with \the [src].", \ "You take a moment shave your facial hair with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) - user.visible_message("[user] shaves his facial hair clean with the [src].", \ + user.visible_message("[user] shaves \his facial hair clean with the [src].", \ "You finish shaving with the [src]. Fast and clean!") C.f_style = "Shaved" H.update_fhair() @@ -143,8 +143,8 @@ user.visible_message("[user] starts to shave their head with \the [src].", \ "You start to shave your head with \the [src].") if(do_after(user, 50 * toolspeed, target = H)) - user.visible_message("[user] shaves his head with the [src].", \ - "You finish shaving with the [src].") + user.visible_message("[user] shaves \his head with \the [src].", \ + "You finish shaving with \the [src].") C.h_style = "Skinhead" H.update_hair() playsound(src.loc, usesound, 40, 1) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 2ac5fb102e1..85e24757517 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -77,6 +77,10 @@ /obj/item/weapon/defibrillator/ui_action_click() toggle_paddles() +/obj/item/weapon/defibrillator/CtrlClick() + if(ishuman(usr) && Adjacent(usr)) + toggle_paddles() + /obj/item/weapon/defibrillator/attackby(obj/item/weapon/W, mob/user, params) if(istype(W, /obj/item/weapon/stock_parts/cell)) var/obj/item/weapon/stock_parts/cell/C = W diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm index 024783359b5..9601b86beec 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -15,7 +15,6 @@ materials = list(MAT_METAL=500) origin_tech = "combat=1;plasmatech=2;engineering=2" var/status = 0 - var/throw_amount = 100 var/lit = 0 //on or off var/operating = 0//cooldown var/turf/previousturf = null @@ -124,7 +123,7 @@ if(!ptank) to_chat(user, "Attach a plasma tank first!") return - var/dat = text("Flamethrower ([lit ? "Lit" : "Unlit"]) \n Tank Pressure: [ptank.air_contents.return_pressure()] \nAmount to throw: - - - [throw_amount] + + + \nRemove plasmatank - Close") + var/dat = text("Flamethrower ([lit ? "Lit" : "Unlit"]) \n Tank Pressure: [ptank.air_contents.return_pressure()] \nRemove plasmatank - Close") user << browse(dat, "window=flamethrower;size=600x300") onclose(user, "flamethrower") return @@ -143,9 +142,6 @@ lit = !lit if(lit) processing_objects.Add(src) - if(href_list["amount"]) - throw_amount = throw_amount + text2num(href_list["amount"]) - throw_amount = max(50, min(5000, throw_amount)) if(href_list["remove"]) if(!ptank) return usr.put_in_hands(ptank) @@ -191,10 +187,8 @@ /obj/item/weapon/flamethrower/proc/ignite_turf(turf/target, release_amount = 0.05) - //TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this... - //Transfer 5% of current tank air contents to turf var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(release_amount) - air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE + air_transfer.toxins = air_transfer.toxins // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE target.assume_air(air_transfer) //Burn it based on transfered gas target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index be96e29f97a..042e0d707f1 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -134,7 +134,7 @@ G = user.r_hand else - user.visible_message("[user] loses his grip on [strangling]'s neck.", \ + user.visible_message("[user] loses \his grip on [strangling]'s neck.", \ "You lose your grip on [strangling]'s neck.") strangling = null @@ -144,7 +144,7 @@ return if(!G.affecting) - user.visible_message("[user] loses his grip on [strangling]'s neck.", \ + user.visible_message("[user] loses \his grip on [strangling]'s neck.", \ "You lose your grip on [strangling]'s neck.") strangling = null diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm index 8c723ed8b72..e60669d4f36 100644 --- a/code/game/objects/items/weapons/grenades/chem_grenade.dm +++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm @@ -22,6 +22,8 @@ var/ignition_temp = 10 // The amount of heat added to the reagents when this grenade goes off. var/threatscale = 1 // Used by advanced grenades to make them slightly more worthy. var/no_splash = FALSE //If the grenade deletes even if it has no reagents to splash with. Used for slime core reactions. + var/contained = "" // For logging + var/cores = "" // Also for logging /obj/item/weapon/grenade/chem_grenade/New() create_reagents(1000) @@ -98,9 +100,9 @@ update_icon() else if(clown_check(user)) // This used to go before the assembly check, but that has absolutely zero to do with priming the damn thing. You could spam the admins with it. - message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP)") - log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])") - bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])" + message_admins("[key_name_admin(usr)] has primed a [name] for detonation at [A.name] (JMP) [contained].") + log_game("[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) [contained].") + bombers += "[key_name(usr)] has primed a [name] for detonation at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z])[contained]." to_chat(user, "You prime the [name]! [det_time / 10] second\s!") playsound(user.loc, 'sound/weapons/armbomb.ogg', 60, 1) active = 1 @@ -136,8 +138,8 @@ playsound(loc, prime_sound, 25, -3) stage = READY update_icon() - var/contained = "" - var/cores = "" + contained = "" + cores = "" // clear them out so no recursive logging by accidentally for(var/obj/O in beakers) if(!O.reagents) continue if(istype(O,/obj/item/slime_extract)) @@ -287,8 +289,8 @@ var/mob/last = get_mob_by_ckey(nadeassembly.fingerprintslast) var/turf/T = get_turf(src) var/area/A = get_area(T) - message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) ([admin_jump_link(M)]) and last touched by [key_name_admin(last)](?) ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP).") - log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z])") + message_admins("grenade primed by an assembly, attached by [key_name_admin(M)](?) ([admin_jump_link(M)]) and last touched by [key_name_admin(last)](?) ([admin_jump_link(last)]) ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] (JMP). [contained]") + log_game("grenade primed by an assembly, attached by [key_name(M)] and last touched by [key_name(last)] ([nadeassembly.a_left.name] and [nadeassembly.a_right.name]) at [A.name] ([T.x], [T.y], [T.z]) [contained]") update_mob() diff --git a/code/game/objects/items/weapons/holy_weapons.dm b/code/game/objects/items/weapons/holy_weapons.dm index 64b7dfcdf76..d721aadfbed 100644 --- a/code/game/objects/items/weapons/holy_weapons.dm +++ b/code/game/objects/items/weapons/holy_weapons.dm @@ -28,7 +28,7 @@ /obj/item/weapon/nullrod/attack_self(mob/user) if(reskinned) return - if(user.mind && (user.mind.assigned_role == "Chaplain")) + if(user.mind && (user.mind.assigned_role == "Chaplain" || user.mind.special_role == SPECIAL_ROLE_ERT)) reskin_holy_weapon(user) /obj/item/weapon/nullrod/proc/reskin_holy_weapon(mob/M) @@ -335,7 +335,7 @@ /obj/item/weapon/nullrod/carp/attack_self(mob/living/user) if(used_blessing) return - if(user.mind && (user.mind.assigned_role != "Chaplain")) + if(user.mind && (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT)) return to_chat(user, "You are blessed by Carp-Sie. Wild space carp will no longer attack you.") user.faction |= "carp" @@ -406,7 +406,7 @@ if(!iscarbon(M)) return ..() - if(!user.mind || user.mind.assigned_role != "Chaplain") + if(!user.mind || (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT)) to_chat(user, "You are not close enough with [ticker.Bible_deity_name] to use [src].") return @@ -469,7 +469,7 @@ /obj/item/weapon/nullrod/salt/attack_self(mob/user) - if(!user.mind || user.mind.assigned_role != "Chaplain") + if(!user.mind || (user.mind.assigned_role != "Chaplain" && user.mind.special_role != SPECIAL_ROLE_ERT )) to_chat(user, "You are not close enough with [ticker.Bible_deity_name] to use [src].") return diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm index 47b993b6007..5d4c88f08c3 100644 --- a/code/game/objects/items/weapons/implants/implant_traitor.dm +++ b/code/game/objects/items/weapons/implants/implant_traitor.dm @@ -76,6 +76,8 @@ log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].") activated = 1 + if(jobban_isbanned(M, ROLE_SYNDICATE)) + ticker.mode.replace_jobbanned_player(M, ROLE_SYNDICATE) return 1 return 0 diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index d291329f354..9758fe3d4f9 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -28,13 +28,14 @@ processing_objects.Remove(src) return ..() -/obj/item/weapon/stock_parts/cell/on_varedit(modified_var) - if(modified_var == "self_recharge") - if(self_recharge) - processing_objects.Add(src) - else - processing_objects.Remove(src) - ..() +/obj/item/weapon/stock_parts/cell/vv_edit_var(var_name, var_value) + switch(var_name) + if("self_recharge") + if(var_value) + processing_objects.Add(src) + else + processing_objects.Remove(src) + . = ..() /obj/item/weapon/stock_parts/cell/suicide_act(mob/user) to_chat(viewers(user), "[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.") @@ -170,6 +171,7 @@ icon_state = "yellow slime extract" materials = list() self_recharge = 1 // Infused slime cores self-recharge, over time + chargerate = 500 /obj/item/weapon/stock_parts/cell/pulse //200 pulse shots name = "pulse rifle power cell" diff --git a/code/game/objects/items/weapons/rpd.dm b/code/game/objects/items/weapons/rpd.dm index de5cb54f722..f380ae2d26e 100644 --- a/code/game/objects/items/weapons/rpd.dm +++ b/code/game/objects/items/weapons/rpd.dm @@ -39,7 +39,7 @@ throw_speed = 3 throw_range = 5 w_class = WEIGHT_CLASS_NORMAL - materials = list(MAT_METAL = 30000, MAT_GLASS = 5000) + materials = list(MAT_METAL = 75000, MAT_GLASS = 37500) origin_tech = "engineering=4;materials=2" var/datum/effect/system/spark_spread/spark_system var/lastused diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index ef49db0e449..862c39b31b4 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -58,8 +58,8 @@ //handle normal hair var/list/species_hair = list() if(C.species) - for(var/i in hair_styles_list) - var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i] + for(var/i in hair_styles_public_list) + var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i] if(C.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles. if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list. if(robohead.is_monitor) @@ -76,7 +76,7 @@ to_chat(user, "You are unable to find anything on [H]'s head worth cutting. How disappointing.") return else - species_hair = hair_styles_list + species_hair = hair_styles_public_list var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair user.visible_message("[user] starts cutting [M]'s hair!", "You start cutting [M]'s hair!") //arguments for this are: 1. what others see 2. what the user sees. --Fixed grammar, (TGameCo) playsound(loc, 'sound/goonstation/misc/Scissor.ogg', 100, 1) diff --git a/code/game/objects/items/weapons/tanks/tank_types.dm b/code/game/objects/items/weapons/tanks/tank_types.dm index 4778a53c28b..a59879c8c50 100644 --- a/code/game/objects/items/weapons/tanks/tank_types.dm +++ b/code/game/objects/items/weapons/tanks/tank_types.dm @@ -62,8 +62,8 @@ /obj/item/weapon/tank/air name = "air tank" desc = "Mixed anyone?" - icon_state = "oxygen" - + icon_state = "air" + item_state = "air" /obj/item/weapon/tank/air/examine(mob/user) if(..(user, 0)) diff --git a/code/game/objects/items/weapons/tanks/watertank.dm b/code/game/objects/items/weapons/tanks/watertank.dm index 5229a59fe5f..5795b04bfa3 100644 --- a/code/game/objects/items/weapons/tanks/watertank.dm +++ b/code/game/objects/items/weapons/tanks/watertank.dm @@ -277,22 +277,22 @@ if(Adj) return //Safety check so you don't blast yourself trying to refill your tank var/datum/reagents/R = reagents - if(R.total_volume < 100) - to_chat(user, "You need at least 100 units of water to use the nanofrost launcher!") + if(R.total_volume < 50) + to_chat(user, "You need at least 50 units of water to use the nanofrost launcher!") return if(nanofrost_cooldown) to_chat(user, "Nanofrost launcher is still recharging") return nanofrost_cooldown = 1 - R.remove_any(100) + R.remove_any(50) var/obj/effect/nanofrost_container/A = new /obj/effect/nanofrost_container(get_turf(src)) log_game("[user.ckey] ([user.name]) used Nanofrost at [get_area(user)] ([user.x], [user.y], [user.z]).") playsound(src,'sound/items/syringeproj.ogg',40,1) for(var/a=0, a<5, a++) step_towards(A, target) - sleep(2) + sleep(1) A.Smoke() - spawn(100) + spawn(50) if(src) nanofrost_cooldown = 0 return diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 87197426495..4526af7f98d 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -341,6 +341,7 @@ if(G) explosive = G name = "explosive lance" + embed_chance = 0 desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!" update_icon() diff --git a/code/game/objects/items/weapons/whetstone.dm b/code/game/objects/items/weapons/whetstone.dm index c4595f2deb6..d951bca5a17 100644 --- a/code/game/objects/items/weapons/whetstone.dm +++ b/code/game/objects/items/weapons/whetstone.dm @@ -14,28 +14,28 @@ /obj/item/weapon/whetstone/attackby(obj/item/I, mob/user, params) if(used) - to_chat(user, "The whetstone is too worn to use again.") + to_chat(user, "The whetstone is too worn to use again!") return if(I.force >= max || I.throwforce >= max)//no esword sharpening - to_chat(user, "[I] is much too powerful to sharpen further.") + to_chat(user, "[I] is much too powerful to sharpen further!") return if(requires_sharpness && !I.sharp) - to_chat(user, "You can only sharpen items that are already sharp, such as knives.") + to_chat(user, "You can only sharpen items that are already sharp, such as knives!") return if(istype(I, /obj/item/weapon/twohanded))//some twohanded items should still be sharpenable, but handle force differently. therefore i need this stuff var/obj/item/weapon/twohanded/TH = I if(TH.force_wielded >= max) - to_chat(user, "[TH] is much too powerful to sharpen further.") + to_chat(user, "[TH] is much too powerful to sharpen further!") return if(TH.wielded) - to_chat(user, "[TH] must be unwielded before it can be sharpened.") + to_chat(user, "[TH] must be unwielded before it can be sharpened!") return if(TH.force_wielded > initial(TH.force_wielded)) - to_chat(user, "[TH] has already been refined before. It cannot be sharpened further.") + to_chat(user, "[TH] has already been refined before. It cannot be sharpened further!") return TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay if(I.force > initial(I.force)) - to_chat(user, "[I] has already been refined before. It cannot be sharpened further.") + to_chat(user, "[I] has already been refined before. It cannot be sharpened further!") return user.visible_message("[user] sharpens [I] with [src]!", "You sharpen [I], making it much more deadly than before.") if(!requires_sharpness) @@ -47,6 +47,7 @@ name = "worn out [name]" desc = "[desc] At least, it used to." used = 1 + update_icon() /obj/item/weapon/whetstone/attack_self(mob/user as mob) //This is just fluff for now. Species datums are global and not newly created instances, so we can't adjust unarmed damage on a per mob basis. if(ishuman(user)) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 197b742f307..60f9538fde0 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -310,4 +310,8 @@ a { Item.fire_act() //Set them on fire, too /obj/proc/on_mob_move(dir, mob/user) - return \ No newline at end of file + return + +/obj/vv_get_dropdown() + . = ..() + .["Delete all of type"] = "?_src_=vars;delall=[UID()]" diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index d5b966c7d98..e989cea7e85 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -8,6 +8,8 @@ var/icon_opened = "open" var/opened = 0 var/welded = 0 + var/locked = 0 + var/broken = 0 var/wall_mounted = 0 //never solid (You can always pass over it) var/health = 100 var/lastbang diff --git a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm index aeb8101fc75..5baef28f262 100644 --- a/code/game/objects/structures/crates_lockers/closets/fireaxe.dm +++ b/code/game/objects/structures/crates_lockers/closets/fireaxe.dm @@ -11,7 +11,7 @@ var/localopened = 0 //Setting this to keep it from behaviouring like a normal closet and obstructing movement in the map. -Agouri opened = 1 var/hitstaken = 0 - var/locked = 1 + locked = 1 var/smashed = 0 attackby(var/obj/item/O as obj, var/mob/living/user as mob) //Marker -Agouri diff --git a/code/game/objects/structures/crates_lockers/closets/job_closets.dm b/code/game/objects/structures/crates_lockers/closets/job_closets.dm index 20a110f18d0..7a2856eb278 100644 --- a/code/game/objects/structures/crates_lockers/closets/job_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/job_closets.dm @@ -141,4 +141,3 @@ new /obj/item/clothing/suit/storage/paramedic(src) new /obj/item/weapon/tank/emergency_oxygen/engi(src) new /obj/item/weapon/tank/emergency_oxygen/engi(src) - new /obj/item/key/ambulance(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm index 49006fb7fb5..eb60d578e46 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/bar.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/bar.dm @@ -10,19 +10,18 @@ burn_state = FLAMMABLE burntime = 20 - - New() - ..() - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) - new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) +/obj/structure/closet/secure_closet/bar/New() + ..() + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) + new /obj/item/weapon/reagent_containers/food/drinks/cans/beer( src ) /obj/structure/closet/secure_closet/bar/update_icon() if(broken) @@ -34,4 +33,4 @@ else icon_state = icon_closed else - icon_state = icon_opened \ No newline at end of file + icon_state = icon_opened diff --git a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm index 74b811eae24..ee5ea755e04 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/cargo.dm @@ -8,16 +8,17 @@ icon_broken = "securecargobroken" icon_off = "securecargooff" - New() - ..() - new /obj/item/clothing/under/rank/cargotech(src) - new /obj/item/clothing/under/rank/cargotech/skirt(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/device/radio/headset/headset_cargo(src) - new /obj/item/clothing/gloves/fingerless(src) - new /obj/item/clothing/head/soft(src) +/obj/structure/closet/secure_closet/cargotech/New() + ..() + new /obj/item/clothing/under/rank/cargotech(src) + new /obj/item/clothing/under/rank/cargotech/skirt(src) + new /obj/item/clothing/shoes/black(src) + new /obj/item/device/radio/headset/headset_cargo(src) + new /obj/item/clothing/gloves/fingerless(src) + new /obj/item/clothing/head/soft(src) // new /obj/item/weapon/cartridge/quartermaster(src) + /obj/structure/closet/secure_closet/quartermaster name = "quartermaster's locker" req_access = list(access_qm) @@ -28,16 +29,16 @@ icon_broken = "secureqmbroken" icon_off = "secureqmoff" - New() - ..() - new /obj/item/clothing/under/rank/cargo(src) - new /obj/item/clothing/under/rank/cargo/skirt(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/device/radio/headset/headset_cargo(src) - new /obj/item/clothing/gloves/fingerless(src) - new /obj/item/clothing/suit/fire/firefighter(src) - new /obj/item/weapon/tank/emergency_oxygen(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/clothing/glasses/meson(src) - new /obj/item/clothing/head/soft(src) - new /obj/item/weapon/door_remote/quartermaster(src) \ No newline at end of file +/obj/structure/closet/secure_closet/quartermaster/New() + ..() + new /obj/item/clothing/under/rank/cargo(src) + new /obj/item/clothing/under/rank/cargo/skirt(src) + new /obj/item/clothing/shoes/brown(src) + new /obj/item/device/radio/headset/headset_cargo(src) + new /obj/item/clothing/gloves/fingerless(src) + new /obj/item/clothing/suit/fire/firefighter(src) + new /obj/item/weapon/tank/emergency_oxygen(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/clothing/glasses/meson(src) + new /obj/item/clothing/head/soft(src) + new /obj/item/weapon/door_remote/quartermaster(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm index 1af8b2653b8..d8b4d6906a4 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/engineering.dm @@ -8,33 +8,34 @@ icon_broken = "securecebroken" icon_off = "secureceoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/industrial(src) - else - new /obj/item/weapon/storage/backpack/satchel_eng(src) - new /obj/item/weapon/storage/backpack/duffel/engineering(src) - new /obj/item/clothing/head/beret/ce(src) - new /obj/item/areaeditor/blueprints(src) - new /obj/item/weapon/storage/box/permits(src) - new /obj/item/clothing/under/rank/chief_engineer(src) - new /obj/item/clothing/under/rank/chief_engineer/skirt(src) - new /obj/item/clothing/head/hardhat/white(src) - new /obj/item/clothing/glasses/welding/superior(src) - new /obj/item/clothing/gloves/color/yellow(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/weapon/cartridge/ce(src) - new /obj/item/device/radio/headset/heads/ce(src) - new /obj/item/weapon/storage/toolbox/mechanical(src) - new /obj/item/clothing/suit/storage/hazardvest(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/device/multitool(src) - new /obj/item/device/flash(src) - new /obj/item/taperoll/engineering(src) - new /obj/item/clothing/head/beret/eng(src) - new /obj/item/weapon/door_remote/chief_engineer(src) - new /obj/item/weapon/rpd(src) +/obj/structure/closet/secure_closet/engineering_chief/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/industrial(src) + else + new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/duffel/engineering(src) + new /obj/item/clothing/head/beret/ce(src) + new /obj/item/areaeditor/blueprints(src) + new /obj/item/weapon/storage/box/permits(src) + new /obj/item/clothing/under/rank/chief_engineer(src) + new /obj/item/clothing/under/rank/chief_engineer/skirt(src) + new /obj/item/clothing/head/hardhat/white(src) + new /obj/item/clothing/glasses/welding/superior(src) + new /obj/item/clothing/gloves/color/yellow(src) + new /obj/item/clothing/shoes/brown(src) + new /obj/item/weapon/cartridge/ce(src) + new /obj/item/device/radio/headset/heads/ce(src) + new /obj/item/weapon/storage/toolbox/mechanical(src) + new /obj/item/clothing/suit/storage/hazardvest(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/device/multitool(src) + new /obj/item/device/flash(src) + new /obj/item/taperoll/engineering(src) + new /obj/item/clothing/head/beret/eng(src) + new /obj/item/weapon/door_remote/chief_engineer(src) + new /obj/item/weapon/rpd(src) + /obj/structure/closet/secure_closet/engineering_electrical name = "electrical supplies locker" @@ -46,22 +47,20 @@ icon_broken = "secureengelecbroken" icon_off = "secureengelecoff" - - New() - ..() - new /obj/item/clothing/gloves/color/yellow(src) - new /obj/item/clothing/gloves/color/yellow(src) - new /obj/item/weapon/storage/toolbox/electrical(src) - new /obj/item/weapon/storage/toolbox/electrical(src) - new /obj/item/weapon/storage/toolbox/electrical(src) - new /obj/item/weapon/apc_electronics(src) - new /obj/item/weapon/apc_electronics(src) - new /obj/item/weapon/apc_electronics(src) - new /obj/item/device/multitool(src) - new /obj/item/device/multitool(src) - new /obj/item/device/multitool(src) - new /obj/item/clothing/head/beret/eng - +/obj/structure/closet/secure_closet/engineering_electrical/New() + ..() + new /obj/item/clothing/gloves/color/yellow(src) + new /obj/item/clothing/gloves/color/yellow(src) + new /obj/item/weapon/storage/toolbox/electrical(src) + new /obj/item/weapon/storage/toolbox/electrical(src) + new /obj/item/weapon/storage/toolbox/electrical(src) + new /obj/item/weapon/apc_electronics(src) + new /obj/item/weapon/apc_electronics(src) + new /obj/item/weapon/apc_electronics(src) + new /obj/item/device/multitool(src) + new /obj/item/device/multitool(src) + new /obj/item/device/multitool(src) + new /obj/item/clothing/head/beret/eng /obj/structure/closet/secure_closet/engineering_welding @@ -74,16 +73,14 @@ icon_broken = "secureengweldbroken" icon_off = "secureengweldoff" - - New() - ..() - new /obj/item/clothing/head/welding(src) - new /obj/item/clothing/head/welding(src) - new /obj/item/clothing/head/welding(src) - new /obj/item/weapon/weldingtool/largetank(src) - new /obj/item/weapon/weldingtool/largetank(src) - new /obj/item/weapon/weldingtool/largetank(src) - +/obj/structure/closet/secure_closet/engineering_welding/New() + ..() + new /obj/item/clothing/head/welding(src) + new /obj/item/clothing/head/welding(src) + new /obj/item/clothing/head/welding(src) + new /obj/item/weapon/weldingtool/largetank(src) + new /obj/item/weapon/weldingtool/largetank(src) + new /obj/item/weapon/weldingtool/largetank(src) /obj/structure/closet/secure_closet/engineering_personal @@ -96,24 +93,24 @@ icon_broken = "secureengbroken" icon_off = "secureengoff" +/obj/structure/closet/secure_closet/engineering_personal/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/industrial(src) + else + new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/duffel/engineering(src) + new /obj/item/weapon/storage/toolbox/mechanical(src) + new /obj/item/device/radio/headset/headset_eng(src) + new /obj/item/clothing/under/rank/engineer(src) + new /obj/item/clothing/under/rank/engineer/skirt(src) + new /obj/item/clothing/suit/storage/hazardvest(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/clothing/glasses/meson(src) + new /obj/item/weapon/cartridge/engineering(src) + new /obj/item/taperoll/engineering(src) + new /obj/item/clothing/head/beret/eng(src) - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/industrial(src) - else - new /obj/item/weapon/storage/backpack/satchel_eng(src) - new /obj/item/weapon/storage/backpack/duffel/engineering(src) - new /obj/item/weapon/storage/toolbox/mechanical(src) - new /obj/item/device/radio/headset/headset_eng(src) - new /obj/item/clothing/under/rank/engineer(src) - new /obj/item/clothing/under/rank/engineer/skirt(src) - new /obj/item/clothing/suit/storage/hazardvest(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/clothing/glasses/meson(src) - new /obj/item/weapon/cartridge/engineering(src) - new /obj/item/taperoll/engineering(src) - new /obj/item/clothing/head/beret/eng(src) /obj/structure/closet/secure_closet/atmos_personal name = "technician's locker" @@ -125,23 +122,22 @@ icon_broken = "secureatmbroken" icon_off = "secureatmoff" - - New() - ..() - new /obj/item/device/radio/headset/headset_eng(src) - new /obj/item/weapon/cartridge/atmos(src) - new /obj/item/weapon/storage/toolbox/mechanical(src) - new /obj/item/taperoll/engineering(src) - if(prob(50)) - new /obj/item/weapon/storage/backpack/industrial(src) - else - new /obj/item/weapon/storage/backpack/satchel_eng(src) - new /obj/item/weapon/storage/backpack/duffel/atmos(src) - new /obj/item/weapon/extinguisher(src) - new /obj/item/clothing/suit/storage/hazardvest(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/weapon/tank/emergency_oxygen/engi(src) - new /obj/item/weapon/watertank/atmos(src) - new /obj/item/clothing/suit/fire/atmos(src) - new /obj/item/clothing/head/hardhat/atmos(src) - new /obj/item/weapon/rpd(src) +/obj/structure/closet/secure_closet/atmos_personal/New() + ..() + new /obj/item/device/radio/headset/headset_eng(src) + new /obj/item/weapon/cartridge/atmos(src) + new /obj/item/weapon/storage/toolbox/mechanical(src) + new /obj/item/taperoll/engineering(src) + if(prob(50)) + new /obj/item/weapon/storage/backpack/industrial(src) + else + new /obj/item/weapon/storage/backpack/satchel_eng(src) + new /obj/item/weapon/storage/backpack/duffel/atmos(src) + new /obj/item/weapon/extinguisher(src) + new /obj/item/clothing/suit/storage/hazardvest(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/weapon/tank/emergency_oxygen/engi(src) + new /obj/item/weapon/watertank/atmos(src) + new /obj/item/clothing/suit/fire/atmos(src) + new /obj/item/clothing/head/hardhat/atmos(src) + new /obj/item/weapon/rpd(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm index b0e7c0e00cb..36a1241826f 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/freezer.dm @@ -23,6 +23,7 @@ if(!isemptylist(bombs)) // You're fucked. ..(severity) + /obj/structure/closet/secure_closet/freezer/kitchen name = "kitchen cabinet" req_access = list(access_kitchen) @@ -35,12 +36,10 @@ new /obj/item/weapon/reagent_containers/food/condiment/sugar(src) - /obj/structure/closet/secure_closet/freezer/kitchen/mining req_access = list() - /obj/structure/closet/secure_closet/freezer/meat name = "meat fridge" icon_state = "fridge1" @@ -50,12 +49,10 @@ icon_broken = "fridgebroken" icon_off = "fridge1" - - New() - ..() - for(var/i in 1 to 4) - new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src) - +/obj/structure/closet/secure_closet/freezer/meat/New() + ..() + for(var/i in 1 to 4) + new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src) /obj/structure/closet/secure_closet/freezer/fridge @@ -67,15 +64,13 @@ icon_broken = "fridgebroken" icon_off = "fridge1" - - New() - ..() - for(var/i in 1 to 5) - new /obj/item/weapon/reagent_containers/food/condiment/milk(src) - new /obj/item/weapon/reagent_containers/food/condiment/soymilk(src) - for(var/i in 1 to 2) - new /obj/item/weapon/storage/fancy/egg_box(src) - +/obj/structure/closet/secure_closet/freezer/fridge/New() + ..() + for(var/i in 1 to 5) + new /obj/item/weapon/reagent_containers/food/condiment/milk(src) + new /obj/item/weapon/reagent_containers/food/condiment/soymilk(src) + for(var/i in 1 to 2) + new /obj/item/weapon/storage/fancy/egg_box(src) /obj/structure/closet/secure_closet/freezer/money @@ -96,10 +91,3 @@ new /obj/item/stack/spacecash/c500(src) for(var/i in 1 to 6) new /obj/item/stack/spacecash/c200(src) - - - - - - - diff --git a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm index c0603396325..9f1783381f5 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/medical.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/medical.dm @@ -9,20 +9,18 @@ icon_off = "medicaloff" req_access = list(access_medical) - - New() - ..() - new /obj/item/weapon/storage/box/autoinjectors(src) - new /obj/item/weapon/storage/box/syringes(src) - new /obj/item/weapon/reagent_containers/dropper(src) - new /obj/item/weapon/reagent_containers/dropper(src) - new /obj/item/weapon/reagent_containers/glass/beaker(src) - new /obj/item/weapon/reagent_containers/glass/beaker(src) - new /obj/item/weapon/reagent_containers/glass/bottle/epinephrine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/epinephrine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/charcoal(src) - new /obj/item/weapon/reagent_containers/glass/bottle/charcoal(src) - +/obj/structure/closet/secure_closet/medical1/New() + ..() + new /obj/item/weapon/storage/box/autoinjectors(src) + new /obj/item/weapon/storage/box/syringes(src) + new /obj/item/weapon/reagent_containers/dropper(src) + new /obj/item/weapon/reagent_containers/dropper(src) + new /obj/item/weapon/reagent_containers/glass/beaker(src) + new /obj/item/weapon/reagent_containers/glass/beaker(src) + new /obj/item/weapon/reagent_containers/glass/bottle/epinephrine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/epinephrine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/charcoal(src) + new /obj/item/weapon/reagent_containers/glass/bottle/charcoal(src) /obj/structure/closet/secure_closet/medical2 @@ -36,16 +34,14 @@ icon_off = "medicaloff" req_access = list(access_surgery) - - New() - ..() - new /obj/item/weapon/tank/anesthetic(src) - new /obj/item/weapon/tank/anesthetic(src) - new /obj/item/weapon/tank/anesthetic(src) - new /obj/item/clothing/mask/breath/medical(src) - new /obj/item/clothing/mask/breath/medical(src) - new /obj/item/clothing/mask/breath/medical(src) - +/obj/structure/closet/secure_closet/medical2/New() + ..() + new /obj/item/weapon/tank/anesthetic(src) + new /obj/item/weapon/tank/anesthetic(src) + new /obj/item/weapon/tank/anesthetic(src) + new /obj/item/clothing/mask/breath/medical(src) + new /obj/item/clothing/mask/breath/medical(src) + new /obj/item/clothing/mask/breath/medical(src) /obj/structure/closet/secure_closet/medical3 @@ -58,22 +54,23 @@ icon_broken = "securemedbroken" icon_off = "securemedoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/medic(src) - else - new /obj/item/weapon/storage/backpack/satchel_med(src) - new /obj/item/weapon/storage/backpack/duffel/medical(src) - new /obj/item/clothing/under/rank/medical(src) - new /obj/item/clothing/suit/storage/labcoat(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/device/radio/headset/headset_med(src) - new /obj/item/clothing/gloves/color/latex/nitrile(src) - new /obj/item/weapon/defibrillator/loaded(src) - new /obj/item/weapon/storage/belt/medical(src) - new /obj/item/clothing/glasses/hud/health(src) - new /obj/item/clothing/shoes/sandal/white(src) +/obj/structure/closet/secure_closet/medical3/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/medic(src) + else + new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/storage/backpack/duffel/medical(src) + new /obj/item/clothing/under/rank/medical(src) + new /obj/item/clothing/suit/storage/labcoat(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/device/radio/headset/headset_med(src) + new /obj/item/clothing/gloves/color/latex/nitrile(src) + new /obj/item/weapon/defibrillator/loaded(src) + new /obj/item/weapon/storage/belt/medical(src) + new /obj/item/clothing/glasses/hud/health(src) + new /obj/item/clothing/shoes/sandal/white(src) + //Exam Room /obj/structure/closet/secure_closet/exam @@ -87,23 +84,22 @@ icon_off = "medicaloff" req_access = list(access_medical) - - New() - ..() - new /obj/item/weapon/storage/box/syringes(src) - new /obj/item/weapon/reagent_containers/dropper(src) - new /obj/item/weapon/storage/belt/medical(src) - new /obj/item/clothing/mask/surgical(src) - new /obj/item/clothing/glasses/hud/health(src) - new /obj/item/clothing/gloves/color/latex/nitrile(src) - new /obj/item/clothing/accessory/stethoscope(src) - new /obj/item/device/flashlight/pen(src) - new /obj/item/weapon/storage/firstaid/regular(src) - new /obj/item/weapon/storage/firstaid/adv(src) - new /obj/item/weapon/storage/firstaid/brute(src) - new /obj/item/weapon/storage/firstaid/fire(src) - new /obj/item/weapon/storage/firstaid/o2(src) - new /obj/item/weapon/storage/firstaid/toxin(src) +/obj/structure/closet/secure_closet/exam/New() + ..() + new /obj/item/weapon/storage/box/syringes(src) + new /obj/item/weapon/reagent_containers/dropper(src) + new /obj/item/weapon/storage/belt/medical(src) + new /obj/item/clothing/mask/surgical(src) + new /obj/item/clothing/glasses/hud/health(src) + new /obj/item/clothing/gloves/color/latex/nitrile(src) + new /obj/item/clothing/accessory/stethoscope(src) + new /obj/item/device/flashlight/pen(src) + new /obj/item/weapon/storage/firstaid/regular(src) + new /obj/item/weapon/storage/firstaid/adv(src) + new /obj/item/weapon/storage/firstaid/brute(src) + new /obj/item/weapon/storage/firstaid/fire(src) + new /obj/item/weapon/storage/firstaid/o2(src) + new /obj/item/weapon/storage/firstaid/toxin(src) // Psychiatrist's pill bottle @@ -128,12 +124,13 @@ icon_broken = "securemedbroken" icon_off = "securemedoff" - New() - ..() - new /obj/item/clothing/suit/straight_jacket(src) - new /obj/item/weapon/reagent_containers/syringe(src) - new /obj/item/weapon/reagent_containers/glass/bottle/ether(src) - new /obj/item/weapon/storage/pill_bottle/psychiatrist(src) +/obj/structure/closet/secure_closet/psychiatrist/New() + ..() + new /obj/item/clothing/suit/straight_jacket(src) + new /obj/item/weapon/reagent_containers/syringe(src) + new /obj/item/weapon/reagent_containers/glass/bottle/ether(src) + new /obj/item/weapon/storage/pill_bottle/psychiatrist(src) + /obj/structure/closet/secure_closet/CMO name = "chief medical officer's locker" @@ -145,52 +142,49 @@ icon_broken = "cmosecurebroken" icon_off = "cmosecureoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/medic(src) - else - new /obj/item/weapon/storage/backpack/satchel_med(src) - new /obj/item/weapon/storage/backpack/duffel/medical(src) - new /obj/item/clothing/suit/bio_suit/cmo(src) - new /obj/item/clothing/head/bio_hood/cmo(src) - new /obj/item/clothing/shoes/white(src) - switch(pick("blue", "green", "purple")) - if("blue") - new /obj/item/clothing/under/rank/medical/blue(src) - new /obj/item/clothing/head/surgery/blue(src) - if("green") - new /obj/item/clothing/under/rank/medical/green(src) - new /obj/item/clothing/head/surgery/green(src) - if("purple") - new /obj/item/clothing/under/rank/medical/purple(src) - new /obj/item/clothing/head/surgery/purple(src) - new /obj/item/clothing/suit/storage/labcoat/cmo(src) - new /obj/item/clothing/under/rank/chief_medical_officer(src) - new /obj/item/clothing/shoes/brown (src) - new /obj/item/device/radio/headset/heads/cmo(src) - new /obj/item/clothing/gloves/color/latex/nitrile(src) - new /obj/item/weapon/defibrillator/compact/loaded(src) - new /obj/item/weapon/storage/belt/medical(src) - new /obj/item/device/flash(src) - new /obj/item/weapon/reagent_containers/hypospray/CMO(src) - new /obj/item/organ/internal/cyberimp/eyes/hud/medical(src) - new /obj/item/weapon/door_remote/chief_medical_officer(src) - +/obj/structure/closet/secure_closet/CMO/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/medic(src) + else + new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/storage/backpack/duffel/medical(src) + new /obj/item/clothing/suit/bio_suit/cmo(src) + new /obj/item/clothing/head/bio_hood/cmo(src) + new /obj/item/clothing/shoes/white(src) + switch(pick("blue", "green", "purple")) + if("blue") + new /obj/item/clothing/under/rank/medical/blue(src) + new /obj/item/clothing/head/surgery/blue(src) + if("green") + new /obj/item/clothing/under/rank/medical/green(src) + new /obj/item/clothing/head/surgery/green(src) + if("purple") + new /obj/item/clothing/under/rank/medical/purple(src) + new /obj/item/clothing/head/surgery/purple(src) + new /obj/item/clothing/suit/storage/labcoat/cmo(src) + new /obj/item/clothing/under/rank/chief_medical_officer(src) + new /obj/item/clothing/shoes/brown (src) + new /obj/item/device/radio/headset/heads/cmo(src) + new /obj/item/clothing/gloves/color/latex/nitrile(src) + new /obj/item/weapon/defibrillator/compact/loaded(src) + new /obj/item/weapon/storage/belt/medical(src) + new /obj/item/device/flash(src) + new /obj/item/weapon/reagent_containers/hypospray/CMO(src) + new /obj/item/organ/internal/cyberimp/eyes/hud/medical(src) + new /obj/item/weapon/door_remote/chief_medical_officer(src) /obj/structure/closet/secure_closet/animal name = "animal control locker" req_access = list(access_surgery) - - New() - ..() - new /obj/item/device/assembly/signaler(src) - new /obj/item/device/radio/electropack(src) - new /obj/item/device/radio/electropack(src) - new /obj/item/device/radio/electropack(src) - +/obj/structure/closet/secure_closet/animal/New() + ..() + new /obj/item/device/assembly/signaler(src) + new /obj/item/device/radio/electropack(src) + new /obj/item/device/radio/electropack(src) + new /obj/item/device/radio/electropack(src) /obj/structure/closet/secure_closet/chemical @@ -204,11 +198,11 @@ icon_off = "medicaloff" req_access = list(access_chemistry) +/obj/structure/closet/secure_closet/chemical/New() + ..() + new /obj/item/weapon/storage/box/pillbottles(src) + new /obj/item/weapon/storage/box/pillbottles(src) - New() - ..() - new /obj/item/weapon/storage/box/pillbottles(src) - new /obj/item/weapon/storage/box/pillbottles(src) /obj/structure/closet/secure_closet/medical_wall name = "first aid closet" @@ -247,13 +241,12 @@ icon_off = "medicaloff" req_access = list(access_paramedic) - - New() - ..() - new /obj/item/clothing/suit/space/eva/paramedic(src) - new /obj/item/clothing/head/helmet/space/eva/paramedic(src) - new /obj/item/clothing/head/helmet/space/eva/paramedic(src) - new /obj/item/device/sensor_device(src) +/obj/structure/closet/secure_closet/paramedic/New() + ..() + new /obj/item/clothing/suit/space/eva/paramedic(src) + new /obj/item/clothing/head/helmet/space/eva/paramedic(src) + new /obj/item/device/sensor_device(src) + new /obj/item/key/ambulance(src) /obj/structure/closet/secure_closet/reagents name = "chemical storage closet" @@ -266,12 +259,11 @@ icon_off = "chemicaloff" req_access = list(access_chemistry) - - New() - ..() - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/phenol(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/ammonia(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/oil(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acetone(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acid(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/diethylamine(src) +/obj/structure/closet/secure_closet/reagents/New() + ..() + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/phenol(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/ammonia(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/oil(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acetone(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acid(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/diethylamine(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm index cfecee359d6..7e1b6d83091 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/scientist.dm @@ -8,21 +8,42 @@ icon_broken = "secureresbroken" icon_off = "secureresoff" - New() - ..() - new /obj/item/weapon/storage/backpack/science(src) - new /obj/item/weapon/storage/backpack/satchel_tox(src) - new /obj/item/clothing/under/rank/scientist(src) - //new /obj/item/clothing/suit/labcoat/science(src) - new /obj/item/clothing/suit/storage/labcoat/science(src) - new /obj/item/clothing/shoes/white(src) +/obj/structure/closet/secure_closet/scientist/New() + ..() + new /obj/item/weapon/storage/backpack/science(src) + new /obj/item/weapon/storage/backpack/satchel_tox(src) + new /obj/item/clothing/under/rank/scientist(src) + //new /obj/item/clothing/suit/labcoat/science(src) + new /obj/item/clothing/suit/storage/labcoat/science(src) + new /obj/item/clothing/shoes/white(src) // new /obj/item/weapon/cartridge/signal/toxins(src) - new /obj/item/device/radio/headset/headset_sci(src) - new /obj/item/weapon/tank/air(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/clothing/shoes/sandal/white(src) + new /obj/item/device/radio/headset/headset_sci(src) + new /obj/item/weapon/tank/air(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/clothing/shoes/sandal/white(src) +/obj/structure/closet/secure_closet/roboticist + name = "roboticist's locker" + req_access = list(access_robotics) + icon_state = "secureres1" + icon_closed = "secureres" + icon_locked = "secureres1" + icon_opened = "secureresopen" + icon_broken = "secureresbroken" + icon_off = "secureresoff" +/obj/structure/closet/secure_closet/roboticist/New() + ..() + new /obj/item/weapon/storage/backpack(src) + new /obj/item/weapon/storage/backpack(src) + new /obj/item/weapon/storage/backpack/satchel_norm(src) + new /obj/item/weapon/storage/backpack/satchel_norm(src) + new /obj/item/weapon/storage/backpack/duffel(src) + new /obj/item/weapon/storage/backpack/duffel(src) + new /obj/item/clothing/suit/storage/labcoat(src) + new /obj/item/clothing/suit/storage/labcoat(src) + new /obj/item/device/radio/headset/headset_sci(src) + new /obj/item/device/radio/headset/headset_sci(src) /obj/structure/closet/secure_closet/RD name = "research director's locker" @@ -34,22 +55,23 @@ icon_broken = "rdsecurebroken" icon_off = "rdsecureoff" - New() - ..() - new /obj/item/clothing/suit/bio_suit/scientist(src) - new /obj/item/clothing/head/bio_hood/scientist(src) - new /obj/item/clothing/under/rank/research_director(src) - new /obj/item/clothing/suit/storage/labcoat(src) - new /obj/item/weapon/cartridge/rd(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/gloves/color/latex(src) - new /obj/item/device/radio/headset/heads/rd(src) - new /obj/item/weapon/tank/air(src) - new /obj/item/clothing/mask/gas(src) - new /obj/item/clothing/suit/armor/reactive/teleport(src) - new /obj/item/device/flash(src) - new /obj/item/device/laser_pointer(src) - new /obj/item/weapon/door_remote/research_director(src) +/obj/structure/closet/secure_closet/RD/New() + ..() + new /obj/item/clothing/suit/bio_suit/scientist(src) + new /obj/item/clothing/head/bio_hood/scientist(src) + new /obj/item/clothing/under/rank/research_director(src) + new /obj/item/clothing/suit/storage/labcoat(src) + new /obj/item/weapon/cartridge/rd(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/clothing/gloves/color/latex(src) + new /obj/item/device/radio/headset/heads/rd(src) + new /obj/item/weapon/tank/air(src) + new /obj/item/clothing/mask/gas(src) + new /obj/item/clothing/suit/armor/reactive/teleport(src) + new /obj/item/device/flash(src) + new /obj/item/device/laser_pointer(src) + new /obj/item/weapon/door_remote/research_director(src) + /obj/structure/closet/secure_closet/research_reagents name = "research chemical storage closet" @@ -62,20 +84,19 @@ icon_off = "rchemicaloff" req_access = list(access_tox_storage) - - New() - ..() - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/phenol(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/ammonia(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/oil(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acetone(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acid(src) - new /obj/item/weapon/reagent_containers/glass/bottle/reagent/diethylamine(src) \ No newline at end of file +/obj/structure/closet/secure_closet/research_reagents/New() + ..() + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/morphine(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/insulin(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/phenol(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/ammonia(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/oil(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acetone(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/acid(src) + new /obj/item/weapon/reagent_containers/glass/bottle/reagent/diethylamine(src) diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 19dc1622ffe..72ef10a5cde 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -5,8 +5,8 @@ icon_state = "secure1" density = 1 opened = 0 - var/locked = 1 - var/broken = 0 + locked = 1 + broken = 0 var/large = 1 icon_closed = "secure" var/icon_locked = "secure1" 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 ed2599e91dd..38a8fe42377 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -8,30 +8,29 @@ icon_broken = "capsecurebroken" icon_off = "capsecureoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/captain(src) - else - new /obj/item/weapon/storage/backpack/satchel_cap(src) - new /obj/item/weapon/book/manual/faxes(src) - new /obj/item/weapon/storage/backpack/duffel/captain(src) - new /obj/item/clothing/suit/captunic(src) - new /obj/item/clothing/suit/captunic/capjacket(src) - new /obj/item/clothing/under/captainparade(src) - new /obj/item/clothing/head/caphat/parade(src) - new /obj/item/clothing/under/rank/captain(src) - new /obj/item/clothing/under/dress/dress_cap(src) - new /obj/item/clothing/suit/armor/vest/capcarapace/alt(src) - new /obj/item/weapon/cartridge/captain(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/laceup(src) - new /obj/item/device/radio/headset/heads/captain/alt(src) - new /obj/item/clothing/gloves/color/captain(src) - new /obj/item/weapon/storage/belt/rapier(src) - new /obj/item/weapon/gun/energy/gun(src) - new /obj/item/weapon/door_remote/captain(src) - +/obj/structure/closet/secure_closet/captains/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/captain(src) + else + new /obj/item/weapon/storage/backpack/satchel_cap(src) + new /obj/item/weapon/book/manual/faxes(src) + new /obj/item/weapon/storage/backpack/duffel/captain(src) + new /obj/item/clothing/suit/captunic(src) + new /obj/item/clothing/suit/captunic/capjacket(src) + new /obj/item/clothing/under/captainparade(src) + new /obj/item/clothing/head/caphat/parade(src) + new /obj/item/clothing/under/rank/captain(src) + new /obj/item/clothing/under/dress/dress_cap(src) + new /obj/item/clothing/suit/armor/vest/capcarapace/alt(src) + new /obj/item/weapon/cartridge/captain(src) + new /obj/item/clothing/shoes/brown(src) + new /obj/item/clothing/shoes/laceup(src) + new /obj/item/device/radio/headset/heads/captain/alt(src) + new /obj/item/clothing/gloves/color/captain(src) + new /obj/item/weapon/storage/belt/rapier(src) + new /obj/item/weapon/gun/energy/gun(src) + new /obj/item/weapon/door_remote/captain(src) /obj/structure/closet/secure_closet/hop @@ -44,19 +43,20 @@ icon_broken = "hopsecurebroken" icon_off = "hopsecureoff" - New() - ..() - new /obj/item/clothing/glasses/sunglasses(src) - new /obj/item/clothing/head/hopcap(src) - new /obj/item/weapon/cartridge/hop(src) - new /obj/item/device/radio/headset/heads/hop(src) - new /obj/item/weapon/storage/box/ids(src) - new /obj/item/weapon/storage/box/PDAs(src) - new /obj/item/clothing/suit/armor/vest(src) - new /obj/item/weapon/gun/energy/gun(src) - new /obj/item/device/flash(src) - new /obj/item/clothing/accessory/petcollar(src) - new /obj/item/weapon/door_remote/civillian(src) +/obj/structure/closet/secure_closet/hop/New() + ..() + new /obj/item/clothing/glasses/sunglasses(src) + new /obj/item/clothing/head/hopcap(src) + new /obj/item/weapon/cartridge/hop(src) + new /obj/item/device/radio/headset/heads/hop(src) + new /obj/item/weapon/storage/box/ids(src) + new /obj/item/weapon/storage/box/PDAs(src) + new /obj/item/clothing/suit/armor/vest(src) + new /obj/item/weapon/gun/energy/gun(src) + new /obj/item/device/flash(src) + new /obj/item/clothing/accessory/petcollar(src) + new /obj/item/weapon/door_remote/civillian(src) + /obj/structure/closet/secure_closet/hop2 name = "head of personnel's attire" @@ -68,21 +68,20 @@ icon_broken = "hopsecurebroken" icon_off = "hopsecureoff" - New() - ..() - new /obj/item/clothing/under/rank/head_of_personnel(src) - new /obj/item/clothing/under/dress/dress_hop(src) - new /obj/item/clothing/under/dress/dress_hr(src) - new /obj/item/clothing/under/lawyer/female(src) - new /obj/item/clothing/under/lawyer/black(src) - new /obj/item/clothing/under/lawyer/red(src) - new /obj/item/clothing/under/lawyer/oldman(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/clothing/shoes/black(src) - new /obj/item/clothing/shoes/leather(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src) - +/obj/structure/closet/secure_closet/hop2/New() + ..() + new /obj/item/clothing/under/rank/head_of_personnel(src) + new /obj/item/clothing/under/dress/dress_hop(src) + new /obj/item/clothing/under/dress/dress_hr(src) + new /obj/item/clothing/under/lawyer/female(src) + new /obj/item/clothing/under/lawyer/black(src) + new /obj/item/clothing/under/lawyer/red(src) + new /obj/item/clothing/under/lawyer/oldman(src) + new /obj/item/clothing/shoes/brown(src) + new /obj/item/clothing/shoes/black(src) + new /obj/item/clothing/shoes/leather(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/clothing/under/rank/head_of_personnel_whimsy(src) /obj/structure/closet/secure_closet/hos @@ -95,33 +94,32 @@ icon_broken = "hossecurebroken" icon_off = "hossecureoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/security(src) - else - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/weapon/cartridge/hos(src) - new /obj/item/device/radio/headset/heads/hos/alt(src) - new /obj/item/clothing/under/rank/head_of_security(src) - new /obj/item/clothing/under/rank/head_of_security/formal(src) - new /obj/item/clothing/under/rank/head_of_security/corp(src) - new /obj/item/clothing/under/rank/head_of_security/skirt(src) - new /obj/item/clothing/suit/armor/hos(src) - new /obj/item/clothing/suit/armor/hos/alt(src) - new /obj/item/clothing/head/HoS(src) - new /obj/item/clothing/head/HoS/beret(src) - new /obj/item/clothing/glasses/hud/security/sunglasses(src) - new /obj/item/weapon/storage/lockbox/mindshield(src) - new /obj/item/weapon/storage/box/flashbangs(src) - new /obj/item/clothing/mask/gas/sechailer/hos(src) - new /obj/item/weapon/shield/riot/tele(src) - new /obj/item/weapon/melee/baton/loaded(src) - new /obj/item/weapon/storage/belt/security/sec(src) - new /obj/item/taperoll/police(src) - new /obj/item/weapon/gun/energy/gun/hos(src) - new /obj/item/weapon/door_remote/head_of_security(src) - +/obj/structure/closet/secure_closet/hos/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/security(src) + else + new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/weapon/cartridge/hos(src) + new /obj/item/device/radio/headset/heads/hos/alt(src) + new /obj/item/clothing/under/rank/head_of_security(src) + new /obj/item/clothing/under/rank/head_of_security/formal(src) + new /obj/item/clothing/under/rank/head_of_security/corp(src) + new /obj/item/clothing/under/rank/head_of_security/skirt(src) + new /obj/item/clothing/suit/armor/hos(src) + new /obj/item/clothing/suit/armor/hos/alt(src) + new /obj/item/clothing/head/HoS(src) + new /obj/item/clothing/head/HoS/beret(src) + new /obj/item/clothing/glasses/hud/security/sunglasses(src) + new /obj/item/weapon/storage/lockbox/mindshield(src) + new /obj/item/weapon/storage/box/flashbangs(src) + new /obj/item/clothing/mask/gas/sechailer/hos(src) + new /obj/item/weapon/shield/riot/tele(src) + new /obj/item/weapon/melee/baton/loaded(src) + new /obj/item/weapon/storage/belt/security/sec(src) + new /obj/item/taperoll/police(src) + new /obj/item/weapon/gun/energy/gun/hos(src) + new /obj/item/weapon/door_remote/head_of_security(src) /obj/structure/closet/secure_closet/warden @@ -134,34 +132,32 @@ icon_broken = "wardensecurebroken" icon_off = "wardensecureoff" - - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/security(src) - else - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/device/radio/headset/headset_sec/alt(src) - new /obj/item/clothing/suit/armor/vest/warden(src) - new /obj/item/clothing/head/warden(src) - new /obj/item/clothing/suit/armor/vest/warden/alt(src) - new /obj/item/clothing/head/beret/sec/warden(src) - new /obj/item/clothing/under/rank/warden(src) - new /obj/item/clothing/under/rank/warden/formal(src) - new /obj/item/clothing/under/rank/warden/corp(src) - new /obj/item/clothing/under/rank/warden/skirt(src) - new /obj/item/clothing/glasses/hud/security/sunglasses(src) - new /obj/item/clothing/mask/gas/sechailer/warden(src) - new /obj/item/taperoll/police(src) - new /obj/item/weapon/storage/box/zipties(src) - new /obj/item/weapon/storage/box/flashbangs(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/weapon/melee/baton/loaded(src) - new /obj/item/weapon/gun/energy/gun/advtaser(src) - new /obj/item/weapon/storage/belt/security/sec(src) - new /obj/item/weapon/storage/box/holobadge(src) - new /obj/item/clothing/gloves/color/black/krav_maga/sec(src) - +/obj/structure/closet/secure_closet/warden/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/security(src) + else + new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/device/radio/headset/headset_sec/alt(src) + new /obj/item/clothing/suit/armor/vest/warden(src) + new /obj/item/clothing/head/warden(src) + new /obj/item/clothing/suit/armor/vest/warden/alt(src) + new /obj/item/clothing/head/beret/sec/warden(src) + new /obj/item/clothing/under/rank/warden(src) + new /obj/item/clothing/under/rank/warden/formal(src) + new /obj/item/clothing/under/rank/warden/corp(src) + new /obj/item/clothing/under/rank/warden/skirt(src) + new /obj/item/clothing/glasses/hud/security/sunglasses(src) + new /obj/item/clothing/mask/gas/sechailer/warden(src) + new /obj/item/taperoll/police(src) + new /obj/item/weapon/storage/box/zipties(src) + new /obj/item/weapon/storage/box/flashbangs(src) + new /obj/item/weapon/reagent_containers/spray/pepper(src) + new /obj/item/weapon/melee/baton/loaded(src) + new /obj/item/weapon/gun/energy/gun/advtaser(src) + new /obj/item/weapon/storage/belt/security/sec(src) + new /obj/item/weapon/storage/box/holobadge(src) + new /obj/item/clothing/gloves/color/black/krav_maga/sec(src) /obj/structure/closet/secure_closet/security @@ -174,24 +170,25 @@ icon_broken = "secbroken" icon_off = "secoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/security(src) - else - new /obj/item/weapon/storage/backpack/satchel_sec(src) - new /obj/item/clothing/suit/armor/vest/security(src) - new /obj/item/device/radio/headset/headset_sec/alt(src) - new /obj/item/clothing/head/soft/sec(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/device/flash(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/weapon/storage/belt/security/sec(src) - new /obj/item/clothing/mask/gas/sechailer(src) - new /obj/item/clothing/glasses/hud/security/sunglasses(src) - new /obj/item/clothing/head/helmet(src) - new /obj/item/weapon/melee/baton/loaded(src) - new /obj/item/taperoll/police(src) +/obj/structure/closet/secure_closet/security/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/security(src) + else + new /obj/item/weapon/storage/backpack/satchel_sec(src) + new /obj/item/clothing/suit/armor/vest/security(src) + new /obj/item/device/radio/headset/headset_sec/alt(src) + new /obj/item/clothing/head/soft/sec(src) + new /obj/item/weapon/reagent_containers/spray/pepper(src) + new /obj/item/device/flash(src) + new /obj/item/weapon/grenade/flashbang(src) + new /obj/item/weapon/storage/belt/security/sec(src) + new /obj/item/clothing/mask/gas/sechailer(src) + new /obj/item/clothing/glasses/hud/security/sunglasses(src) + new /obj/item/clothing/head/helmet(src) + new /obj/item/weapon/melee/baton/loaded(src) + new /obj/item/taperoll/police(src) + /obj/structure/closet/secure_closet/brigdoc name = "brig physician's locker" @@ -203,24 +200,25 @@ icon_broken = "securemedbroken" icon_off = "securemedoff" - New() - ..() - if(prob(50)) - new /obj/item/weapon/storage/backpack/medic(src) - else - new /obj/item/weapon/storage/backpack/satchel_med(src) - new /obj/item/weapon/reagent_containers/spray/pepper(src) - new /obj/item/device/flash(src) - new /obj/item/weapon/storage/firstaid/regular(src) - new /obj/item/weapon/storage/firstaid/fire(src) - new /obj/item/weapon/storage/firstaid/adv(src) - new /obj/item/weapon/storage/firstaid/o2(src) - new /obj/item/weapon/storage/firstaid/toxin(src) - new /obj/item/clothing/suit/storage/brigdoc(src) - new /obj/item/clothing/under/rank/security/brigphys(src) - new /obj/item/clothing/shoes/white(src) - new /obj/item/device/radio/headset/headset_sec/alt(src) - new /obj/item/clothing/shoes/sandal/white(src) +/obj/structure/closet/secure_closet/brigdoc/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/medic(src) + else + new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/reagent_containers/spray/pepper(src) + new /obj/item/device/flash(src) + new /obj/item/weapon/storage/firstaid/regular(src) + new /obj/item/weapon/storage/firstaid/fire(src) + new /obj/item/weapon/storage/firstaid/adv(src) + new /obj/item/weapon/storage/firstaid/o2(src) + new /obj/item/weapon/storage/firstaid/toxin(src) + new /obj/item/clothing/suit/storage/brigdoc(src) + new /obj/item/clothing/under/rank/security/brigphys(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/device/radio/headset/headset_sec/alt(src) + new /obj/item/clothing/shoes/sandal/white(src) + /obj/structure/closet/secure_closet/blueshield name = "blueshield's locker" @@ -232,25 +230,26 @@ icon_broken = "bssecurebroken" icon_off = "bssecureoff" - New() - ..() - new /obj/item/weapon/storage/briefcase(src) - new /obj/item/weapon/storage/firstaid/adv(src) - new /obj/item/weapon/storage/belt/security/sec(src) - new /obj/item/weapon/grenade/flashbang(src) - new /obj/item/device/flash(src) - new /obj/item/weapon/restraints/handcuffs(src) - new /obj/item/weapon/melee/baton/loaded(src) - new /obj/item/clothing/glasses/sunglasses(src) - new /obj/item/clothing/glasses/hud/health/health_advanced - new /obj/item/clothing/head/beret/centcom/officer(src) - new /obj/item/clothing/head/beret/centcom/officer/navy(src) - new /obj/item/clothing/suit/armor/vest/blueshield(src) - new /obj/item/clothing/suit/storage/blueshield(src) - new /obj/item/clothing/shoes/centcom(src) - new /obj/item/clothing/accessory/holster(src) - new /obj/item/clothing/accessory/blue(src) - new /obj/item/clothing/shoes/jackboots/jacksandals(src) +/obj/structure/closet/secure_closet/blueshield/New() + ..() + new /obj/item/weapon/storage/briefcase(src) + new /obj/item/weapon/storage/firstaid/adv(src) + new /obj/item/weapon/storage/belt/security/sec(src) + new /obj/item/weapon/grenade/flashbang(src) + new /obj/item/device/flash(src) + new /obj/item/weapon/restraints/handcuffs(src) + new /obj/item/weapon/melee/baton/loaded(src) + new /obj/item/clothing/glasses/sunglasses(src) + new /obj/item/clothing/glasses/hud/health/health_advanced + new /obj/item/clothing/head/beret/centcom/officer(src) + new /obj/item/clothing/head/beret/centcom/officer/navy(src) + new /obj/item/clothing/suit/armor/vest/blueshield(src) + new /obj/item/clothing/suit/storage/blueshield(src) + new /obj/item/clothing/shoes/centcom(src) + new /obj/item/clothing/accessory/holster(src) + new /obj/item/clothing/accessory/blue(src) + new /obj/item/clothing/shoes/jackboots/jacksandals(src) + /obj/structure/closet/secure_closet/ntrep name = "\improper Nanotrasen Representative's locker" @@ -262,51 +261,54 @@ icon_broken = "ntsecurebroken" icon_off = "ntsecureoff" - New() - ..() - new /obj/item/weapon/book/manual/faxes(src) - new /obj/item/weapon/storage/briefcase(src) - new /obj/item/device/paicard(src) - new /obj/item/device/flash(src) - new /obj/item/clothing/glasses/sunglasses(src) - new /obj/item/clothing/gloves/color/white(src) - new /obj/item/clothing/shoes/centcom(src) - new /obj/item/clothing/under/lawyer/oldman(src) - new /obj/item/clothing/under/lawyer/black(src) - new /obj/item/clothing/under/lawyer/female(src) - new /obj/item/clothing/head/ntrep(src) - new /obj/item/clothing/shoes/sandal/fancy(src) - new /obj/item/weapon/storage/box/tapes(src) - new /obj/item/device/taperecorder(src) +/obj/structure/closet/secure_closet/ntrep/New() + ..() + new /obj/item/weapon/book/manual/faxes(src) + new /obj/item/weapon/storage/briefcase(src) + new /obj/item/device/paicard(src) + new /obj/item/device/flash(src) + new /obj/item/clothing/glasses/sunglasses(src) + new /obj/item/clothing/gloves/color/white(src) + new /obj/item/clothing/shoes/centcom(src) + new /obj/item/clothing/under/lawyer/oldman(src) + new /obj/item/clothing/under/lawyer/black(src) + new /obj/item/clothing/under/lawyer/female(src) + new /obj/item/clothing/head/ntrep(src) + new /obj/item/clothing/shoes/sandal/fancy(src) + new /obj/item/weapon/storage/box/tapes(src) + new /obj/item/device/taperecorder(src) /obj/structure/closet/secure_closet/security/cargo - New() - ..() - new /obj/item/clothing/accessory/armband/cargo(src) - new /obj/item/device/encryptionkey/headset_cargo(src) +/obj/structure/closet/secure_closet/security/cargo/New() + ..() + new /obj/item/clothing/accessory/armband/cargo(src) + new /obj/item/device/encryptionkey/headset_cargo(src) + /obj/structure/closet/secure_closet/security/engine - New() - ..() - new /obj/item/clothing/accessory/armband/engine(src) - new /obj/item/device/encryptionkey/headset_eng(src) +/obj/structure/closet/secure_closet/security/engine/New() + ..() + new /obj/item/clothing/accessory/armband/engine(src) + new /obj/item/device/encryptionkey/headset_eng(src) + /obj/structure/closet/secure_closet/security/science - New() - ..() - new /obj/item/clothing/accessory/armband/science(src) - new /obj/item/device/encryptionkey/headset_sci(src) +/obj/structure/closet/secure_closet/security/science/New() + ..() + new /obj/item/clothing/accessory/armband/science(src) + new /obj/item/device/encryptionkey/headset_sci(src) + /obj/structure/closet/secure_closet/security/med - New() - ..() - new /obj/item/clothing/accessory/armband/medgreen(src) - new /obj/item/device/encryptionkey/headset_med(src) +/obj/structure/closet/secure_closet/security/med/New() + ..() + new /obj/item/clothing/accessory/armband/medgreen(src) + new /obj/item/device/encryptionkey/headset_med(src) /obj/structure/closet/secure_closet/detective @@ -321,28 +323,28 @@ burn_state = FLAMMABLE burntime = 20 - New() - ..() - new /obj/item/clothing/under/det(src) - new /obj/item/clothing/suit/storage/det_suit(src) - new /obj/item/clothing/suit/storage/det_suit/forensics/blue(src) - new /obj/item/clothing/suit/storage/det_suit/forensics/red(src) - new /obj/item/clothing/gloves/color/black/forensics(src) - new /obj/item/clothing/head/det_hat(src) - new /obj/item/clothing/shoes/brown(src) - new /obj/item/weapon/storage/box/evidence(src) - new /obj/item/weapon/clipboard(src) - new /obj/item/device/radio/headset/headset_sec/alt(src) - new /obj/item/device/detective_scanner(src) - new /obj/item/clothing/suit/armor/vest/det_suit(src) - new /obj/item/ammo_box/c38(src) - new /obj/item/ammo_box/c38(src) - new /obj/item/weapon/gun/projectile/revolver/detective(src) - new /obj/item/taperoll/police(src) - new /obj/item/clothing/accessory/holster/armpit(src) - new /obj/item/clothing/glasses/sunglasses/yeah(src) - new /obj/item/device/flashlight/seclite(src) - new /obj/item/clothing/accessory/black(src) +/obj/structure/closet/secure_closet/detective/New() + ..() + new /obj/item/clothing/under/det(src) + new /obj/item/clothing/suit/storage/det_suit(src) + new /obj/item/clothing/suit/storage/det_suit/forensics/blue(src) + new /obj/item/clothing/suit/storage/det_suit/forensics/red(src) + new /obj/item/clothing/gloves/color/black/forensics(src) + new /obj/item/clothing/head/det_hat(src) + new /obj/item/clothing/shoes/brown(src) + new /obj/item/weapon/storage/box/evidence(src) + new /obj/item/weapon/clipboard(src) + new /obj/item/device/radio/headset/headset_sec/alt(src) + new /obj/item/device/detective_scanner(src) + new /obj/item/clothing/suit/armor/vest/det_suit(src) + new /obj/item/ammo_box/c38(src) + new /obj/item/ammo_box/c38(src) + new /obj/item/weapon/gun/projectile/revolver/detective(src) + new /obj/item/taperoll/police(src) + new /obj/item/clothing/accessory/holster/armpit(src) + new /obj/item/clothing/glasses/sunglasses/yeah(src) + new /obj/item/device/flashlight/seclite(src) + new /obj/item/clothing/accessory/black(src) /obj/structure/closet/secure_closet/detective/update_icon() if(broken) @@ -356,16 +358,15 @@ else icon_state = icon_opened + /obj/structure/closet/secure_closet/injection name = "lethal injections locker" req_access = list(access_security) - - New() - ..() - new /obj/item/weapon/reagent_containers/ld50_syringe/lethal(src) - new /obj/item/weapon/reagent_containers/ld50_syringe/lethal(src) - +/obj/structure/closet/secure_closet/injection/New() + ..() + new /obj/item/weapon/reagent_containers/ld50_syringe/lethal(src) + new /obj/item/weapon/reagent_containers/ld50_syringe/lethal(src) /obj/structure/closet/secure_closet/brig @@ -374,29 +375,29 @@ anchored = 1 var/id = null - New() - ..() - new /obj/item/clothing/under/color/orange/prison(src) - new /obj/item/clothing/shoes/orange(src) - new /obj/item/weapon/card/id/prisoner/random(src) - new /obj/item/device/radio/headset(src) - +/obj/structure/closet/secure_closet/brig/New() + ..() + new /obj/item/clothing/under/color/orange/prison(src) + new /obj/item/clothing/shoes/orange(src) + new /obj/item/weapon/card/id/prisoner/random(src) + new /obj/item/device/radio/headset(src) /obj/structure/closet/secure_closet/courtroom name = "courtroom locker" req_access = list(access_court) - New() - ..() - new /obj/item/clothing/shoes/brown(src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/paper/Court (src) - new /obj/item/weapon/pen (src) - new /obj/item/clothing/suit/judgerobe (src) - new /obj/item/clothing/head/powdered_wig (src) - new /obj/item/weapon/storage/briefcase(src) +/obj/structure/closet/secure_closet/courtroom/New() + ..() + new /obj/item/clothing/shoes/brown(src) + new /obj/item/weapon/paper/Court (src) + new /obj/item/weapon/paper/Court (src) + new /obj/item/weapon/paper/Court (src) + new /obj/item/weapon/pen (src) + new /obj/item/clothing/suit/judgerobe (src) + new /obj/item/clothing/head/powdered_wig (src) + new /obj/item/weapon/storage/briefcase(src) + /obj/structure/closet/secure_closet/wall name = "wall locker" diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 26bd0d88759..5b26b46eacd 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -27,6 +27,7 @@ new /obj/item/clothing/mask/gas/syndicate(src) new /obj/item/clothing/suit/space/hardsuit/syndi(src) new /obj/item/weapon/tank/jetpack/oxygen/harness(src) + new /obj/item/clothing/shoes/magboots/syndie(src) /obj/structure/closet/syndicate/nuclear desc = "It's a storage unit for a Syndicate boarding party.." diff --git a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm index a3f716a4a8b..0b9554a4cc4 100644 --- a/code/game/objects/structures/crates_lockers/closets/wardrobe.dm +++ b/code/game/objects/structures/crates_lockers/closets/wardrobe.dm @@ -310,14 +310,10 @@ /obj/structure/closet/wardrobe/robotics_black/New() ..() - new /obj/item/clothing/glasses/hud/diagnostic(src) - new /obj/item/clothing/glasses/hud/diagnostic(src) new /obj/item/clothing/under/rank/roboticist(src) new /obj/item/clothing/under/rank/roboticist(src) new /obj/item/clothing/under/rank/roboticist/skirt(src) new /obj/item/clothing/under/rank/roboticist/skirt(src) - new /obj/item/clothing/suit/storage/labcoat(src) - new /obj/item/clothing/suit/storage/labcoat(src) new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/shoes/black(src) new /obj/item/clothing/gloves/fingerless(src) @@ -464,3 +460,20 @@ new /obj/item/clothing/shoes/orange(src) new /obj/item/clothing/shoes/purple(src) new /obj/item/clothing/shoes/leather(src) + +/obj/structure/closet/wardrobe/coroner + name = "coroner wardrobe" + icon_state = "black" + icon_closed = "black" + +/obj/structure/closet/wardrobe/coroner/New() + ..() + if(prob(50)) + new /obj/item/weapon/storage/backpack/medic(src) + else + new /obj/item/weapon/storage/backpack/satchel_med(src) + new /obj/item/weapon/storage/backpack/duffel/medical(src) + new /obj/item/clothing/suit/storage/labcoat/mortician(src) + new /obj/item/clothing/shoes/white(src) + new /obj/item/clothing/under/rank/medical/mortician(src) + new /obj/item/clothing/head/surgery/black(src) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 8fdaf4804b3..043fdf2f9c4 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -44,8 +44,10 @@ return 2 playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3) - for(var/obj/O in src) - O.forceMove(loc) + for(var/obj/O in src) //Objects + O.forceMove(loc) + for(var/mob/M in src) //Mobs + M.forceMove(loc) icon_state = icon_opened src.opened = 1 @@ -240,8 +242,8 @@ var/greenlight = "securecrateg" var/sparks = "securecratesparks" var/emag = "securecrateemag" - var/broken = 0 - var/locked = 1 + broken = 0 + locked = 1 health = 1000 /obj/structure/closet/crate/secure/update_icon() @@ -441,9 +443,9 @@ anchored = TRUE /obj/structure/closet/crate/can/attackby(obj/item/weapon/W, mob/living/user, params) - add_fingerprint(user) - user.changeNext_move(CLICK_CD_MELEE) if(iswrench(W)) + add_fingerprint(user) + user.changeNext_move(CLICK_CD_MELEE) if(anchored) playsound(loc, W.usesound, 100, 1) user.visible_message("[user] starts loosening [src]'s floor casters.", \ @@ -467,6 +469,8 @@ user.visible_message("[user] has secured [src]'s floor casters.", \ "You have secured [src]'s floor casters.") anchored = TRUE + else + ..() /obj/structure/closet/crate/radiation desc = "A crate with a radiation sign on it." diff --git a/code/game/objects/structures/fullwindow.dm b/code/game/objects/structures/fullwindow.dm index 48b2268d8cc..f9e8adbf9aa 100644 --- a/code/game/objects/structures/fullwindow.dm +++ b/code/game/objects/structures/fullwindow.dm @@ -44,8 +44,12 @@ icon_state = "plasmawindow" shardtype = /obj/item/weapon/shard/plasma glasstype = /obj/item/stack/sheet/plasmaglass - health = 120 + health = 240 +/obj/structure/window/full/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + if(exposed_temperature > T0C + 32000) + hit(round(exposed_volume / 1000), 0) + ..() /obj/structure/window/full/plasmareinforced name = "reinforced plasma window" @@ -55,15 +59,17 @@ shardtype = /obj/item/weapon/shard/plasma glasstype = /obj/item/stack/sheet/plasmaglass reinf = 1 - health = 160 + health = 320 +/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume) + return /obj/structure/window/full/reinforced name = "reinforced window" desc = "It looks rather strong. Might take a few good hits to shatter it." icon_state = "rwindow" basestate = "rwindow" - health = 40 + health = 80 reinf = 1 /obj/structure/window/full/reinforced/tinted @@ -78,7 +84,7 @@ desc = "It looks rather strong and frosted over. Looks like it might take a few less hits then a normal reinforced window." icon_state = "fwindow" basestate = "fwindow" - health = 30 + health = 60 /obj/structure/window/full/shuttle name = "shuttle window" diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index c1b4984c158..aab8d550040 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -159,65 +159,82 @@ //window placing begin else if(istype(W,/obj/item/stack/sheet/rglass) || istype(W,/obj/item/stack/sheet/glass) || istype(W,/obj/item/stack/sheet/plasmaglass) || istype(W,/obj/item/stack/sheet/plasmarglass)) - if(!broken) - var/obj/item/stack/ST = W - if (ST.get_amount() < 1) - to_chat(user, "You need at least one sheet of glass for that!") - return - var/dir_to_set = NORTH - if(!anchored) - to_chat(user, "[src] needs to be fastened to the floor first!") - return - if(loc == user.loc) - dir_to_set = user.dir - else - if((x == user.x) || (y == user.y)) //Only supposed to work for cardinal directions. - if(x == user.x) - if(y > user.y) - dir_to_set = SOUTH - else - dir_to_set = NORTH - else if(y == user.y) - if(x > user.x) - dir_to_set = WEST - else - dir_to_set = EAST - else - to_chat(user, "You can't reach.") - return //Only works for cardinal direcitons, diagonals aren't supposed to work like this. - for(var/obj/structure/window/WINDOW in loc) - if(WINDOW.dir == dir_to_set) - to_chat(user, "There is already a window facing this way there.") - return - to_chat(user, "You start placing the window...") - if(do_after(user, 20 * W.toolspeed, target = src)) - if(!loc || !anchored) //Grille destroyed or unanchored while waiting - return - for(var/obj/structure/window/WINDOW in loc) - if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting. - to_chat(user, "There is already a window facing this way there.") - return - var/obj/structure/window/WD - if(istype(W,/obj/item/stack/sheet/rglass)) - WD = new/obj/structure/window/reinforced(loc) //reinforced window - else if(istype(W,/obj/item/stack/sheet/glass)) - WD = new/obj/structure/window/basic(loc) //normal window - else if(istype(W,/obj/item/stack/sheet/plasmaglass)) - WD = new/obj/structure/window/plasmabasic(loc) //basic plasma window - else - WD = new/obj/structure/window/plasmareinforced(loc) //reinforced plasma window - WD.setDir(dir_to_set) - WD.ini_dir = dir_to_set - WD.anchored = 0 - WD.state = 0 - ST.use(1) - to_chat(user, "You place the [WD] on [src].") - WD.update_icon() - return + build_window(W, user) + return //window placing end + else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70)) return attacked_by(W, user) +/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user) + if(!istype(S) || !user) + return + if(broken) + to_chat(user, "You must repair or replace [src] first!") + return + if(S.get_amount() < 1) + to_chat(user, "You need at least one sheet of glass for that!") + return + if(!anchored) + to_chat(user, "[src] needs to be fastened to the floor first!") + return + if(!getRelativeDirection(src, user) && (user.loc != loc)) //essentially a cardinal direction adjacent or sharing same loc check + to_chat(user, "You can't reach.") + return + if(/obj/structure/window/full in loc) //check for a full window already present (blocks the whole tile) + to_chat(user, "There is already a full window there.") + return + var/selection = alert(user, "What type of window would you like to place?", "Window Construction", "One Direction", "Full", "Cancel") + if(selection == "Cancel") + return + if(selection == "Full") + if(S.get_amount() < 2) + to_chat(user, "You need at least two sheets of glass for that!") + return + if(do_after(user, 20, target = src)) //glass doesn't have a toolspeed, so no multiplier + if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists! + return + if(S.get_amount() < 2) //make sure we still have enough for this! + return + if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location + return + var/obj/structure/window/W = new S.full_window(get_turf(src)) + S.use(2) + W.anchored = 0 + W.state = 0 + to_chat(user, "You place [W] on [src].") + W.update_icon() + return + if(selection == "One Direction") + var/dir_selection = input("Which direction will this window face?", "Direction") as null|anything in list("north", "east", "south", "west") + if(!dir_selection) + return + var/temp_dir = text2dir(dir_selection) + for(var/obj/structure/window/W in loc) + if(istype(W, /obj/structure/window/full)) //double checking in case a full window was created while selecting direction + to_chat(user, "There is already a full window there.") + return + if(W.dir == temp_dir) //to avoid building a window on top of an existing window + to_chat(user, "There is already a window facing this direction there.") + return + if(do_after(user, 20, target = src)) + if(broken || !anchored || !src) //make sure the grille is still intact, anchored, and exists! + return + if(S.get_amount() < 1) //make sure we still have enough fir this! + to_chat(user, "You need at least one sheet of glass for that!") + return + if(!getRelativeDirection(src, user) && (user.loc != loc)) //make sure we can still do this from our location + return + var/obj/structure/window/W = new S.created_window(get_turf(src)) + S.use(1) + W.setDir(temp_dir) + W.ini_dir = temp_dir + W.anchored = 0 + W.state = 0 + to_chat(user, "You place [W] on [src].") + W.update_icon() + return + /obj/structure/grille/proc/attacked_by(obj/item/I, mob/living/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index b8e176ba12a..470bc1fa070 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -252,8 +252,8 @@ /obj/machinery/shower/New(turf/T, newdir = SOUTH, building = FALSE) ..() - dir = newdir if(building) + dir = newdir pixel_x = 0 pixel_y = 0 switch(newdir) @@ -349,6 +349,8 @@ qdel(mymist) ismist = 0 return + if(mymist) + return ismist = 1 mymist = new /obj/effect/mist(loc) else diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 126dd6e3a38..cfee76dc749 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -108,7 +108,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f return 1 -/obj/structure/window/hitby(atom/movable/AM) +/obj/structure/window/hitby(atom/movable/AM) ..() var/tforce = 0 if(ismob(AM)) @@ -125,7 +125,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f update_nearby_icons() step(src, get_dir(AM, src)) if(health <= 0) - destroy() + destroy() /obj/structure/window/attack_hand(mob/user as mob) @@ -179,14 +179,15 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f attack_generic(user, rand(10, 15)) -/obj/structure/window/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params) - if(!istype(W)) return//I really wish I did not need this - if(istype(W, /obj/item/weapon/grab) && get_dist(src,user)<2) - var/obj/item/weapon/grab/G = W +/obj/structure/window/attackby(obj/item/I as obj, mob/living/user as mob, params) + if(!istype(I)) + return//I really wish I did not need this + if(istype(I, /obj/item/weapon/grab) && get_dist(src,user)<2) + var/obj/item/weapon/grab/G = I if(istype(G.affecting,/mob/living)) var/mob/living/M = G.affecting var/state = G.state - qdel(W) //gotta delete it here because if window breaks, it won't get deleted + qdel(I) //gotta delete it here because if window breaks, it won't get deleted switch(state) if(1) M.visible_message("[user] slams [M] against \the [src]!") @@ -209,67 +210,97 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f M.apply_damage(30) hit(75) return + if(I.flags & NOBLUDGEON) + return - if(W.flags & NOBLUDGEON) return + if(handle_decon(I, user, is_fulltile())) + return - if(istype(W, /obj/item/weapon/screwdriver)) - if(reinf && state >= 1) - state = 3 - state - playsound(loc, W.usesound, 75, 1) - to_chat(user, (state == 1 ? "You have unfastened the window from the frame." : "You have fastened the window to the frame.")) - else if(reinf && state == 0) - anchored = !anchored + if(I.damtype == BRUTE || I.damtype == BURN) + user.changeNext_move(CLICK_CD_MELEE) + hit(I.force) + if(health <= 7) + anchored = 0 update_nearby_icons() - playsound(loc, W.usesound, 75, 1) - to_chat(user, (anchored ? "You have fastened the frame to the floor." : "You have unfastened the frame from the floor.")) - else if(!reinf) - anchored = !anchored - update_nearby_icons() - playsound(loc, W.usesound, 75, 1) - to_chat(user, (anchored ? "You have fastened the window to the floor." : "You have unfastened the window.")) - else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1) - state = 1 - state + step(src, get_dir(user, src)) + else + playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1) + ..() + +/obj/structure/window/proc/handle_decon(obj/item/weapon/W, mob/user, var/takes_time = FALSE) + //screwdriver + if(isscrewdriver(W)) playsound(loc, W.usesound, 75, 1) - to_chat(user, (state ? "You have pried the window into the frame." : "You have pried the window out of the frame.")) - else if(istype(W, /obj/item/weapon/wrench) && !anchored && health > 7) //Disassemble deconstructed window into parts - playsound(src.loc, W.usesound, 50, 1) - for(var/i=0;i Admin Tickets" + + dat +="RefreshOpen TicketsResolved TicketsClosed Tickets" + if(tab == ADMIN_TICKET_OPEN) + dat += " Open Tickets" + dat += "
Admin Tickets" + + dat +="Show AllRefresh" + + dat += "Ticket #[T.ticketNum]" + + dat += "[T.clientName] / [T.mobControlled] opened this ticket at [T.timeOpened] at location [T.locationSent]" + dat += "Ticket Status: [status]" + dat += "
" + dat += "Re-OpenResolve " + + if(!T.adminAssigned) + dat += "No admin assigned to this ticket - Take Ticket " + else + dat += "[T.adminAssigned] is assigned to this Ticket. - Take Ticket " + + if(T.lastAdminResponse) + dat += "Last Admin Response: [T.lastAdminResponse] at [T.lastResponseTime]" + else + dat +="No Admin Response" + + dat += " " + + dat += "Close Ticket" + + var/datum/browser/popup = new(user, "adminticketsdetail", "Admin Ticket #[T.ticketNum]", 1000, 600) + popup.set_content(dat) + popup.open() + +/datum/adminTicketHolder/proc/userDetailUI(var/client/user) +//dat + var/tickets = checkForTicket(user) + var/dat + dat += " Your open tickets" + dat += "
A custom event is taking place. OOC Info:") to_chat(src, "[html_encode(custom_event_msg)]") to_chat(src, "") + +//admin event info to be view by admins + +/client/proc/cmd_admin_custom_event_info() + set category = "Event" + set name = "Change Custom Admin Event Info" + + if(!check_rights(R_EVENT)) + to_chat(src, "Only administrators may use this command.") + return + + var/input = input(usr, "Enter the description of the custom event. This is informations for admins only. Use it to notify other admins of event info but not players.", "Custom Event Info", custom_event_msg) as message|null + if(!input || input == "") + custom_event_admin_msg = null + log_admin("[key_name(usr)] has cleared the custom admin event info text.") + message_admins("[key_name_admin(usr)] has cleared the custom admin event text.") + return + + log_admin("[key_name(usr)] has changed the custom admin event info text.") + message_admins("[key_name_admin(usr)] has changed the custom admin event info text.") + + custom_event_admin_msg = input + + for(var/client/X in admins) + if(check_rights(R_EVENT,0,X.mob)) + to_chat(X, " Custom Admin Event Info") + to_chat(X, "A custom event is starting. OOC Admin Info:") + to_chat(X, "[html_encode(custom_event_admin_msg)]") + to_chat(X,"") + +/client/proc/cmd_view_custom_event_info() + set category = "Event" + set name = "Custom Event Admin Info" + + if(!check_rights(R_EVENT)) + to_chat(src, "Only administrators may use this command.") + return + + if(!custom_event_admin_msg || custom_event_admin_msg == "") + to_chat(src, "There currently is no known custom admin event taking place.") + return + + to_chat(src, " Custom Event Info") + to_chat(src, "A custom event is taking place. OOC Info:") + to_chat(src, "[html_encode(custom_event_admin_msg)]") + to_chat(src, "") diff --git a/code/modules/admin/verbs/massmodvar.dm b/code/modules/admin/verbs/massmodvar.dm index c7b2d6d537e..084057498bb 100644 --- a/code/modules/admin/verbs/massmodvar.dm +++ b/code/modules/admin/verbs/massmodvar.dm @@ -22,360 +22,251 @@ src.massmodify_variables(A, var_name, method) feedback_add_details("admin_verb","MEV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/massmodify_variables(var/atom/O, var/var_name = "", var/method = 0) - if(!check_rights(R_VAREDIT)) return - - var/list/locked = list("vars", "key", "ckey", "client") - - for(var/p in forbidden_varedit_object_types) - if( istype(O,p) ) - to_chat(usr, "It is forbidden to edit this object's variables.") - return - - var/list/names = list() - for(var/V in O.vars) - names += V - - names = sortList(names) +/client/proc/massmodify_variables(datum/O, var_name = "", method = 0) + if(!check_rights(R_VAREDIT)) + return + if(!istype(O)) + return var/variable = "" - if(!var_name) - variable = input("Which var?","Var") as null|anything in names + var/list/names = list() + for(var/V in O.vars) + names += V + + names = sortList(names) + + variable = input("Which var?", "Var") as null|anything in names else variable = var_name - if(!variable) return + if(!variable || !O.can_vv_get(variable)) + return var/default var/var_value = O.vars[variable] - var/dir - if(variable == "holder" || (variable in locked)) - if(!check_rights(R_DEBUG)) return + if(variable in VVckey_edit) + to_chat(src, "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy.") + return + if(variable in VVlocked) + if(!check_rights(R_DEBUG)) + return + if(variable in VVicon_edit_lock) + if(!check_rights(R_EVENT | R_DEBUG)) + return + if(variable in VVpixelmovement) + if(!check_rights(R_DEBUG)) + return + var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT") + if(prompt != "Continue") + return - if(isnull(var_value)) - to_chat(usr, "Unable to determine variable type.") - - else if(isnum(var_value)) - to_chat(usr, "Variable appears to be NUM.") - default = "num" - dir = 1 - - else if(istext(var_value)) - to_chat(usr, "Variable appears to be TEXT.") - default = "text" - - else if(isloc(var_value)) - to_chat(usr, "Variable appears to be REFERENCE.") - default = "reference" - - else if(isicon(var_value)) - to_chat(usr, "Variable appears to be ICON.") - var_value = "[bicon(var_value)]" - default = "icon" - - else if(istype(var_value,/atom) || istype(var_value,/datum)) - to_chat(usr, "Variable appears to be TYPE.") - default = "type" - - else if(istype(var_value,/list)) - to_chat(usr, "Variable appears to be LIST.") - default = "list" - - else if(istype(var_value,/client)) - to_chat(usr, "Variable appears to be CLIENT.") - default = "cancel" + default = vv_get_class(var_value) + if(isnull(default)) + to_chat(src, "Unable to determine variable type.") else - to_chat(usr, "Variable appears to be FILE.") - default = "file" + to_chat(src, "Variable appears to be [uppertext(default)].") - to_chat(usr, "Variable contains: [var_value]") - if(dir) - switch(var_value) - if(1) - dir = "NORTH" - if(2) - dir = "SOUTH" - if(4) - dir = "EAST" - if(8) - dir = "WEST" - if(5) - dir = "NORTHEAST" - if(6) - dir = "SOUTHEAST" - if(9) - dir = "NORTHWEST" - if(10) - dir = "SOUTHWEST" - else - dir = null - if(dir) - to_chat(usr, "If a direction, direction is: [dir]") + to_chat(src, "Variable contains: [var_value]") - var/class = input("What kind of variable?","Variable Type",default) as null|anything in list("text", - "num","type","icon","file","edit referenced object","restore to default") + if(default == VV_NUM) + var/dir_text = "" + if(dir < 0 && dir < 16) + if(dir & 1) + dir_text += "NORTH" + if(dir & 2) + dir_text += "SOUTH" + if(dir & 4) + dir_text += "EAST" + if(dir & 8) + dir_text += "WEST" - if(!class) + if(dir_text) + to_chat(src, "If a direction, direction is: [dir_text]") + + var/value = vv_get_value(default_class = default) + var/new_value = value["value"] + var/class = value["class"] + + if(!class || !new_value == null && class != VV_NULL) return - var/original_name + if(class == VV_MESSAGE) + class = VV_TEXT - if(!istype(O, /atom)) - original_name = "\ref[O] ([O])" - else - original_name = O:name + if(value["type"]) + class = VV_NEW_TYPE + + var/original_name = "[O]" + + var/rejected = 0 + var/accepted = 0 switch(class) + if(VV_RESTORE_DEFAULT) + to_chat(src, "Finding items...") + var/list/items = get_all_of_type(O.type, method) + to_chat(src, "Changing [items.len] items...") + for(var/thing in items) + if(!thing) + continue + var/datum/D = thing + if(D.vv_edit_var(variable, initial(D.vars[variable])) != FALSE) + accepted++ + else + rejected++ + CHECK_TICK - if("restore to default") - O.vars[variable] = initial(O.vars[variable]) - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - M.vars[variable] = O.vars[variable] - M.on_varedit(variable) + if(VV_TEXT) + var/list/varsvars = vv_parse_text(O, new_value) + var/pre_processing = new_value + var/unique + if(varsvars && varsvars.len) + unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same") + if(unique == "Unique") + unique = TRUE + else + unique = FALSE + for(var/V in varsvars) + new_value = replacetext(new_value,"\[[V]]","[O.vars[V]]") - else if(istype(O, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - A.on_varedit(variable) + to_chat(src, "Finding items...") + var/list/items = get_all_of_type(O.type, method) + to_chat(src, "Changing [items.len] items...") + for(var/thing in items) + if(!thing) + continue + var/datum/D = thing + if(unique) + new_value = pre_processing + for(var/V in varsvars) + new_value = replacetext(new_value,"\[[V]]","[D.vars[V]]") - else if(istype(O, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - A.on_varedit(variable) + if(D.vv_edit_var(variable, new_value) != FALSE) + accepted++ + else + rejected++ + CHECK_TICK + if(VV_NEW_TYPE) + var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel") + if(many == "Cancel") + return + if(many == "Many") + many = TRUE else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - M.vars[variable] = O.vars[variable] - M.on_varedit(variable) + many = FALSE - else if(istype(O, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - A.on_varedit(variable) + var/type = value["type"] + to_chat(src, "Finding items...") + var/list/items = get_all_of_type(O.type, method) + to_chat(src, "Changing [items.len] items...") + for(var/thing in items) + if(!thing) + continue + var/datum/D = thing + if(many && !new_value) + new_value = new type() - else if(istype(O, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - A.on_varedit(variable) + if(D.vv_edit_var(variable, new_value) != FALSE) + accepted++ + else + rejected++ + new_value = null + CHECK_TICK - if("edit referenced object") - return .(O.vars[variable]) + else + to_chat(src, "Finding items...") + var/list/items = get_all_of_type(O.type, method) + to_chat(src, "Changing [items.len] items...") + for(var/thing in items) + if(!thing) + continue + var/datum/D = thing + if(D.vv_edit_var(variable, new_value) != FALSE) + accepted++ + else + rejected++ + CHECK_TICK - if("text") - var/new_value = input("Enter new text:","Text",O.vars[variable]) as message|null - if(new_value == null) return - O.vars[variable] = new_value - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - M.vars[variable] = O.vars[variable] + var/count = rejected+accepted + if(!count) + to_chat(src, "No objects found") + return + if(!accepted) + to_chat(src, "Every object rejected your edit") + return + if(rejected) + to_chat(src, "[rejected] out of [count] objects rejected your edit") - else if(istype(O, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] + log_to_dd("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])") + log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)") + message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)") - else if(istype(O, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - M.vars[variable] = O.vars[variable] +/proc/get_all_of_type(var/T, subtypes = TRUE) + var/list/typecache = list() + typecache[T] = 1 + if(subtypes) + typecache = typecacheof(typecache) + . = list() + if(ispath(T, /mob)) + for(var/mob/thing in mob_list) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else if(istype(O, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] + else if(ispath(T, /obj/machinery/door)) + for(var/obj/machinery/door/thing in airlocks) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else if(istype(O, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] + else if(ispath(T, /obj/machinery)) + for(var/obj/machinery/thing in machines) + if(typecache[thing.type]) + . += thing + CHECK_TICK - if("num") - var/new_value = input("Enter new number:","Num",\ - O.vars[variable]) as num|null - if(new_value == null) return + else if(ispath(T, /obj)) + for(var/obj/thing in world) + if(typecache[thing.type]) + . += thing + CHECK_TICK - if(variable=="light_range") - O.set_light(new_value) - else - O.vars[variable] = new_value + else if(ispath(T, /atom/movable)) + for(var/atom/movable/thing in world) + if(typecache[thing.type]) + . += thing + CHECK_TICK - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - if(variable=="light_range") - M.set_light(new_value) - else - M.vars[variable] = O.vars[variable] + else if(ispath(T, /turf)) + for(var/turf/thing in world) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else if(istype(O, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - if(variable=="light_range") - A.set_light(new_value) - else - A.vars[variable] = O.vars[variable] + else if(ispath(T, /atom)) + for(var/atom/thing in world) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else if(istype(O, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - if(variable=="light_range") - A.set_light(new_value) - else - A.vars[variable] = O.vars[variable] + else if(ispath(T, /client)) + for(var/client/thing in clients) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - if(variable=="light_range") - M.set_light(new_value) - else - M.vars[variable] = O.vars[variable] + else if(ispath(T, /datum)) + for(var/datum/thing) + if(typecache[thing.type]) + . += thing + CHECK_TICK - else if(istype(O, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - if(variable=="light_range") - A.set_light(new_value) - else - A.vars[variable] = O.vars[variable] - - else if(istype(O, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - if(variable=="light_range") - A.set_light(new_value) - else - A.vars[variable] = O.vars[variable] - - if("type") - var/new_value - new_value = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf) - if(new_value == null) return - O.vars[variable] = new_value - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - M.vars[variable] = O.vars[variable] - - else if(istype(O, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - - else if(istype(O, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - M.vars[variable] = O.vars[variable] - - else if(istype(O, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - else if(istype(O, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - if("file") - var/new_value = input("Pick file:","File",O.vars[variable]) as null|file - if(new_value == null) return - O.vars[variable] = new_value - - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - M.vars[variable] = O.vars[variable] - - else if(istype(O.type, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - - else if(istype(O.type, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - M.vars[variable] = O.vars[variable] - - else if(istype(O.type, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - else if(istype(O.type, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - if("icon") - var/new_value = input("Pick icon:","Icon",O.vars[variable]) as null|icon - if(new_value == null) return - O.vars[variable] = new_value - if(method) - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if( istype(M , O.type) ) - M.vars[variable] = O.vars[variable] - - else if(istype(O, /obj)) - for(var/obj/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - - else if(istype(O, /turf)) - for(var/turf/A in world) - if( istype(A , O.type) ) - A.vars[variable] = O.vars[variable] - - else - if(istype(O, /mob)) - for(var/mob/M in mob_list) - if(M.type == O.type) - M.vars[variable] = O.vars[variable] - - else if(istype(O, /obj)) - for(var/obj/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - else if(istype(O, /turf)) - for(var/turf/A in world) - if(A.type == O.type) - A.vars[variable] = O.vars[variable] - - log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]") - message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1) \ No newline at end of file + else + for(var/datum/thing in world) + if(typecache[thing.type]) + . += thing + CHECK_TICK \ No newline at end of file diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index cb50d2e6391..0ad266ecaa1 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -1,294 +1,512 @@ -var/list/forbidden_varedit_object_types = list( - /datum/admins, //Admins editing their own admin-power object? Yup, sounds like a good idea. - /obj/machinery/blackbox_recorder, //Prevents people messing with feedback gathering - /datum/feedback_variable //Prevents people messing with feedback gathering - ) +var/list/VVlocked = list("vars", "var_edited", "client", "firemut", "ishulk", "telekinesis", "xray", "ka", "virus", "viruses", "cuffed", "last_eaten", "unlock_content") // R_DEBUG +var/list/VVicon_edit_lock = list("icon", "icon_state", "overlays", "underlays", "resize") // R_EVENT | R_DEBUG +var/list/VVckey_edit = list("key", "ckey") // R_EVENT | R_DEBUG +var/list/VVpixelmovement = list("step_x", "step_y", "bound_height", "bound_width", "bound_x", "bound_y") // R_DEBUG + warning +/client/proc/vv_get_class(var/var_value) + if(isnull(var_value)) + . = VV_NULL -/* -/client/proc/cmd_modify_object_variables(obj/O as obj|mob|turf|area in world) - set category = "Debug" - set name = "Edit Variables" - set desc="(target) Edit a target item's variables" - src.modify_variables(O) - feedback_add_details("admin_verb","EDITV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -*/ + else if(isnum(var_value)) + . = VV_NUM -/proc/datum_is_forbidden(type) - for(var/p in forbidden_varedit_object_types) - if(istype(type, p)) - to_chat(usr, "It is forbidden to tamper with this object.") - return FALSE - return TRUE + else if(istext(var_value)) + if(findtext(var_value, "\n")) + . = VV_MESSAGE + else + . = VV_TEXT + else if(isicon(var_value)) + . = VV_ICON -/client/proc/cmd_modify_ticker_variables() - set category = "Debug" - set name = "Edit Ticker Variables" + else if(ismob(var_value)) + . = VV_MOB_REFERENCE - if(ticker == null) - to_chat(src, "Game hasn't started yet.") + else if(isloc(var_value)) + . = VV_ATOM_REFERENCE + + else if(istype(var_value, /matrix)) + . = VV_MATRIX + + else if(istype(var_value,/client)) + . = VV_CLIENT + + else if(istype(var_value, /datum)) + . = VV_DATUM_REFERENCE + + else if(ispath(var_value)) + if(ispath(var_value, /atom)) + . = VV_ATOM_TYPE + else if(ispath(var_value, /datum)) + . = VV_DATUM_TYPE + else + . = VV_TYPE + + else if(islist(var_value)) + . = VV_LIST + + else if(isfile(var_value)) + . = VV_FILE else - src.modify_variables(ticker) - feedback_add_details("admin_verb","ETV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + . = VV_NULL -/client/proc/mod_list_add_ass() //haha +/client/proc/vv_get_value(class, default_class, current_value, list/restricted_classes, list/extra_classes, list/classes) + . = list("class" = class, "value" = null) + if(!class) + if(!classes) + classes = list( + VV_NUM, + VV_TEXT, + VV_MESSAGE, + VV_ICON, + VV_ATOM_REFERENCE, + VV_DATUM_REFERENCE, + VV_MOB_REFERENCE, + VV_CLIENT, + VV_ATOM_TYPE, + VV_DATUM_TYPE, + VV_TYPE, + VV_MATRIX, + VV_FILE, + VV_NEW_ATOM, + VV_NEW_DATUM, + VV_NEW_TYPE, + VV_NEW_LIST, + VV_NULL, + VV_RESTORE_DEFAULT + ) - var/class = "text" - var/list/allowed_types = list("text", "num","type", "type from text","reference","mob reference", "icon","file","list","edit referenced object","restore to default") - if(src.holder && src.holder.marked_datum) - allowed_types += "marked datum ([holder.marked_datum.type])" - class = input("What kind of variable?","Variable Type") as null|anything in allowed_types + if(holder && holder.marked_datum && !(VV_MARKED_DATUM in restricted_classes)) + classes += "[VV_MARKED_DATUM] ([holder.marked_datum.type])" + if(restricted_classes) + classes -= restricted_classes + + if(extra_classes) + classes += extra_classes + + .["class"] = input(src, "What kind of data?", "Variable Type", default_class) as null|anything in classes + if(holder && holder.marked_datum && .["class"] == "[VV_MARKED_DATUM] ([holder.marked_datum.type])") + .["class"] = VV_MARKED_DATUM + + + switch(.["class"]) + if(VV_TEXT) + .["value"] = input("Enter new text:", "Text", current_value) as null|text + if(.["value"] == null) + .["class"] = null + return + if(VV_MESSAGE) + .["value"] = input("Enter new text:", "Text", current_value) as null|message + if(.["value"] == null) + .["class"] = null + return + + + if(VV_NUM) + .["value"] = input("Enter new number:", "Num", current_value) as null|num + if(.["value"] == null) + .["class"] = null + return + + + if(VV_ATOM_TYPE) + .["value"] = pick_closest_path(FALSE) + if(.["value"] == null) + .["class"] = null + return + + if(VV_DATUM_TYPE) + .["value"] = pick_closest_path(FALSE, get_fancy_list_of_datum_types()) + if(.["value"] == null) + .["class"] = null + return + + if(VV_TYPE) + var/type = current_value + var/error = "" + do + type = input("Enter type:[error]", "Type", type) as null|text + if(!type) + break + type = text2path(type) + error = "\nType not found, Please try again" + while(!type) + if(!type) + .["class"] = null + return + .["value"] = type + + if(VV_MATRIX) + .["value"] = text2matrix(input("Enter a, b, c, d, e, and f, seperated by a space.", "Matrix", "1 0 0 0 1 0") as null|text) + if(.["value"] == null) + .["class"] = null + return + + + if(VV_ATOM_REFERENCE) + var/type = pick_closest_path(FALSE) + var/subtypes = vv_subtype_prompt(type) + if(subtypes == null) + .["class"] = null + return + var/list/things = vv_reference_list(type, subtypes) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things + if(!value) + .["class"] = null + return + .["value"] = things[value] + + if(VV_DATUM_REFERENCE) + var/type = pick_closest_path(FALSE, get_fancy_list_of_datum_types()) + var/subtypes = vv_subtype_prompt(type) + if(subtypes == null) + .["class"] = null + return + var/list/things = vv_reference_list(type, subtypes) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things + if(!value) + .["class"] = null + return + .["value"] = things[value] + + if(VV_MOB_REFERENCE) + var/type = pick_closest_path(FALSE, make_types_fancy(typesof(/mob))) + var/subtypes = vv_subtype_prompt(type) + if(subtypes == null) + .["class"] = null + return + var/list/things = vv_reference_list(type, subtypes) + var/value = input("Select reference:", "Reference", current_value) as null|anything in things + if(!value) + .["class"] = null + return + .["value"] = things[value] + + + + if(VV_CLIENT) + .["value"] = input("Select reference:", "Reference", current_value) as null|anything in clients + if(.["value"] == null) + .["class"] = null + return + + + if(VV_FILE) + .["value"] = input("Pick file:", "File") as null|file + if(.["value"] == null) + .["class"] = null + return + + + if(VV_ICON) + .["value"] = input("Pick icon:", "Icon") as null|icon + if(.["value"] == null) + .["class"] = null + return + + + if(VV_MARKED_DATUM) + .["value"] = holder.marked_datum + if(.["value"] == null) + .["class"] = null + return + + if(VV_NEW_ATOM) + var/type = pick_closest_path(FALSE) + if(!type) + .["class"] = null + return + .["type"] = type + .["value"] = new type() + + if(VV_NEW_DATUM) + var/type = pick_closest_path(FALSE, get_fancy_list_of_datum_types()) + if(!type) + .["class"] = null + return + .["type"] = type + .["value"] = new type() + + if(VV_NEW_TYPE) + var/type = current_value + var/error = "" + do + type = input("Enter type:[error]", "Type", type) as null|text + if(!type) + break + type = text2path(type) + error = "\nType not found, Please try again" + while(!type) + if(!type) + .["class"] = null + return + .["type"] = type + .["value"] = new type() + + + if(VV_NEW_LIST) + .["value"] = list() + .["type"] = /list + +/client/proc/vv_parse_text(O, new_var) + if(O && findtext(new_var, "\[")) + var/process_vars = alert(usr, "\[] detected in string, process as variables?", "Process Variables?", "Yes", "No") + if(process_vars == "Yes") + . = string2listofvars(new_var, O) + +//do they want you to include subtypes? +//FALSE = no subtypes, strict exact type pathing (or the type doesn't have subtypes) +//TRUE = Yes subtypes +//NULL = User cancelled at the prompt or invalid type given +/client/proc/vv_subtype_prompt(var/type) + if(!ispath(type)) + return + var/list/subtypes = subtypesof(type) + if(!subtypes || !subtypes.len) + return FALSE + if(subtypes && subtypes.len) + switch(alert("Strict object type detection?", "Type detection", "Strictly this type","This type and subtypes", "Cancel")) + if("Strictly this type") + return FALSE + if("This type and subtypes") + return TRUE + else + return + +/client/proc/vv_reference_list(type, subtypes) + . = list() + var/list/types = list(type) + if(subtypes) + types = typesof(type) + + var/list/fancytypes = make_types_fancy(types) + + for(var/fancytype in fancytypes) //swap the assoication + types[fancytypes[fancytype]] = fancytype + + var/things = get_all_of_type(type, subtypes) + + var/i = 0 + for(var/thing in things) + var/datum/D = thing + i++ + //try one of 3 methods to shorten the type text: + // fancy type, + // fancy type with the base type removed from the begaining, + // the type with the base type removed from the begaining + var/fancytype = types[D.type] + if(findtext(fancytype, types[type])) + fancytype = copytext(fancytype, lentext(types[type])+1) + var/shorttype = copytext("[D.type]", lentext("[type]")+1) + if(lentext(shorttype) > lentext(fancytype)) + shorttype = fancytype + if(!lentext(shorttype)) + shorttype = "/" + + .["[D]([shorttype])\ref[D]#[i]"] = D + +/client/proc/mod_list_add_ass(atom/O) //haha + var/list/L = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) + var/class = L["class"] if(!class) return + var/var_value = L["value"] - if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") - class = "marked datum" - - var/var_value = null - - switch(class) - - if("text") - var_value = input("Enter new text:","Text") as null|message - - if("num") - var_value = input("Enter new number:","Num") as null|num - - if("type") - var_value = input("Enter type:","Type") as null|anything in typesof(/obj,/mob,/area,/turf) - - if("type from text") - var/type_text = input("Enter type:", "Type") as null|message - var_value = text2path(type_text) - if(!var_value) - to_chat(src, "[type_text] is not a valid path!") - - if("reference") - var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world - - if("mob reference") - var_value = input("Select reference:","Reference") as null|mob in world - - if("file") - var_value = input("Pick file:","File") as null|file - - if("icon") - var_value = input("Pick icon:","Icon") as null|icon - - if("marked datum") - var_value = holder.marked_datum - - if(!var_value) return + if(class == VV_TEXT || class == VV_MESSAGE) + var/list/varsvars = vv_parse_text(O, var_value) + for(var/V in varsvars) + var_value = replacetext(var_value,"\[[V]]","[O.vars[V]]") return var_value - -/client/proc/mod_list_add(var/list/L) - - var/class = "text" - var/list/allowed_types = list("text", "num","type", "type from text","reference","mob reference", "icon","file","list","edit referenced object","restore to default") - if(src.holder && src.holder.marked_datum) - allowed_types += "marked datum ([holder.marked_datum.type])" - class = input("What kind of variable?","Variable Type") as null|anything in allowed_types - +/client/proc/mod_list_add(list/L, atom/O, original_name, objectvar) + var/list/LL = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT)) + var/class = LL["class"] if(!class) return + var/var_value = LL["value"] - if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") - class = "marked datum" + if(class == VV_TEXT || class == VV_MESSAGE) + var/list/varsvars = vv_parse_text(O, var_value) + for(var/V in varsvars) + var_value = replacetext(var_value,"\[[V]]","[O.vars[V]]") - var/var_value = null + if(O) + L = L.Copy() - switch(class) + L += var_value - if("text") - var_value = input("Enter new text:","Text") as message|null - - if("num") - var_value = input("Enter new number:","Num") as num - - if("type") - var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) - - if("type from text") - var/type_text = input("Enter type:", "Type") as null|message - var_value = text2path(type_text) - if(!var_value) - to_chat(src, "[type_text] is not a valid path!") - - if("reference") - var_value = input("Select reference:","Reference") as mob|obj|turf|area in world - - if("mob reference") - var_value = input("Select reference:","Reference") as mob in world - - if("file") - var_value = input("Pick file:","File") as file - - if("icon") - var_value = input("Pick icon:","Icon") as icon - - if("marked datum") - var_value = holder.marked_datum - - if(!var_value) return - - switch(alert("Would you like to associate a var with the list entry?",,"Yes","No")) + switch(alert("Would you like to associate a value with the list entry?",,"Yes","No")) if("Yes") - L += var_value - L[var_value] = mod_list_add_ass() //haha - if("No") - L += var_value + L[var_value] = mod_list_add_ass(O) //hehe + if(O) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: ADDED=[var_value]") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]") + message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]") -/client/proc/mod_list(var/list/L) - if(!check_rights(R_VAREDIT)) return - - if(!istype(L,/list)) +/client/proc/mod_list(list/L, atom/O, original_name, objectvar, index, autodetect_class = FALSE) + if(!check_rights(R_VAREDIT)) + return + if(!istype(L, /list)) to_chat(src, "Not a List.") + return + if(L.len > 1000) var/confirm = alert(src, "The list you're trying to edit is very long, continuing may crash the server.", "Warning", "Continue", "Abort") if(confirm != "Continue") return - var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state", "step_x", "step_y") - var/assoc = 0 - if(L.len > 0) - var/a = L[1] - if(istext(a) && L[a] != null) - assoc = 1 //This is pretty weak test but i can't think of anything else - to_chat(usr, "List appears to be associative.") - var/list/names = null - if(!assoc) - names = sortList(L) + var/list/names = list() + for(var/i in 1 to L.len) + var/key = L[i] + var/value + if(IS_NORMAL_LIST(L) && !isnum(key)) + value = L[key] + if(value == null) + value = "null" + names["#[i] [key] = [value]"] = i + if(!index) + var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" + "(CLEAR NULLS)" + "(CLEAR DUPES)" + "(SHUFFLE)" + + if(variable == null) + return + + if(variable == "(ADD VAR)") + mod_list_add(L, O, original_name, objectvar) + return + + if(variable == "(CLEAR NULLS)") + L = L.Copy() + listclearnulls(L) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR NULLS") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR NULLS") + message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR NULLS") + return + + if(variable == "(CLEAR DUPES)") + L = uniqueList(L) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### ListVarEdit by [src]: [O.type] [objectvar]: CLEAR DUPES") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: CLEAR DUPES") + message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: CLEAR DUPES") + return + + if(variable == "(SHUFFLE)") + L = shuffle(L) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### ListVarEdit by [src]: [O.type] [objectvar]: SHUFFLE") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: SHUFFLE") + message_admins("[key_name_admin(src)] modified [original_name]'s list [objectvar]: SHUFFLE") + return + + index = names[variable] + - var/variable var/assoc_key - if(assoc) - variable = input("Which var?","Var") as null|anything in L + "(ADD VAR)" - else - variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)" - - if(variable == "(ADD VAR)") - mod_list_add(L) + if(index == null) return - - if(assoc) - assoc_key = variable - variable = L[assoc_key] - - if(!assoc && !variable || assoc && !assoc_key) + var/assoc = 0 + var/prompt = alert(src, "Do you want to edit the key or it's assigned value?", "Associated List", "Key", "Assigned Value", "Cancel") + if(prompt == "Cancel") return - + if(prompt == "Assigned Value") + assoc = 1 + assoc_key = L[index] var/default + var/variable + if(assoc) + variable = L[assoc_key] + else + variable = L[index] - var/dir + default = vv_get_class(variable) - if(variable in locked) - if(!check_rights(R_DEBUG)) return + to_chat(src, "Variable appears to be [uppertext(default)].") - default = variable_to_type(variable) + to_chat(src, "Variable contains: [L[index]]") - to_chat(usr, "Variable contains: [variable]") - if(default == "num") - dir = dir2text(variable) + if(default == VV_NUM) + var/dir_text = "" + if(dir < 0 && dir < 16) + if(dir & 1) + dir_text += "NORTH" + if(dir & 2) + dir_text += "SOUTH" + if(dir & 4) + dir_text += "EAST" + if(dir & 8) + dir_text += "WEST" - if(dir) - to_chat(usr, "If a direction, direction is: [dir]") - - var/class = "text" - var/list/allowed_types = list("text", "num","type", "type from text", "reference","mob reference", "icon","file","list","edit referenced object","restore to default","DELETE FROM LIST") - if(src.holder && src.holder.marked_datum) - allowed_types += "marked datum ([holder.marked_datum.type])" - - class = input("What kind of variable?","Variable Type",default) as null|anything in allowed_types + if(dir_text) + to_chat(src, "If a direction, direction is: [dir_text]") + var/original_var + if(assoc) + original_var = L[assoc_key] + else + original_var = L[index] + if(O) + L = L.Copy() + var/class + if(autodetect_class) + if(default == VV_TEXT) + default = VV_MESSAGE + class = default + var/list/LL = vv_get_value(default_class = default, current_value = original_var, restricted_classes = list(VV_RESTORE_DEFAULT), extra_classes = list(VV_LIST, "DELETE FROM LIST")) + class = LL["class"] if(!class) return + var/new_var = LL["value"] - if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") - class = "marked datum" + if(class == VV_MESSAGE) + class = VV_TEXT switch(class) //Spits a runtime error if you try to modify an entry in the contents list. Dunno how to fix it, yet. - - if("list") - mod_list(variable) - - if("restore to default") - if(assoc) - L[assoc_key] = initial(variable) - else - L[L.Find(variable)]=initial(variable) - - if("edit referenced object") - modify_variables(variable) + if(VV_LIST) + mod_list(variable, O, original_name, objectvar) if("DELETE FROM LIST") - L -= variable + L.Cut(index, index+1) + if(O) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[original_var]")]") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]") + message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]") return - if("text") - if(assoc) - L[assoc_key] = input("Enter new text:","Text") as text - else - L[L.Find(variable)] = input("Enter new text:","Text") as text - - if("num") - if(assoc) - L[assoc_key] = input("Enter new number:","Num") as num - else - L[L.Find(variable)] = input("Enter new number:","Num") as num - - if("type") - if(assoc) - L[assoc_key] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) - else - L[L.Find(variable)] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf) - - if("reference") - if(assoc) - L[assoc_key] = input("Select reference:","Reference") as mob|obj|turf|area in world - else - L[L.Find(variable)] = input("Select reference:","Reference") as mob|obj|turf|area in world - - if("mob reference") - if(assoc) - L[assoc_key] = input("Select reference:","Reference") as mob in world - else - L[L.Find(variable)] = input("Select reference:","Reference") as mob in world - - if("file") - if(assoc) - L[assoc_key] = input("Pick file:","File") as file - else - L[L.Find(variable)] = input("Pick file:","File") as file - - if("icon") - if(assoc) - L[assoc_key] = input("Pick icon:","Icon") as icon - else - L[L.Find(variable)] = input("Pick icon:","Icon") as icon - - if("marked datum") - if(assoc) - L[assoc_key] = holder.marked_datum - else - L[L.Find(variable)] = holder.marked_datum + if(VV_TEXT) + var/list/varsvars = vv_parse_text(O, new_var) + for(var/V in varsvars) + new_var = replacetext(new_var,"\[[V]]","[O.vars[V]]") -/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0) - if(!check_rights(R_VAREDIT)) return - - var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state") - - for(var/p in forbidden_varedit_object_types) - if( istype(O,p) ) - to_chat(usr, "It is forbidden to edit this object's variables.") + if(assoc) + L[assoc_key] = new_var + else + L[index] = new_var + if(O) + if(!O.vv_edit_var(objectvar, L)) + to_chat(src, "Your edit was rejected by the object.") return + log_to_dd("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: [original_var]=[new_var]") + log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]") + message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]") - if(istype(O, /client) && (param_var_name == "ckey" || param_var_name == "key")) - to_chat(usr, "You cannot edit ckeys on client objects.") +/client/proc/modify_variables(atom/O, param_var_name = null, autodetect_class = 0) + if(!check_rights(R_VAREDIT)) return var/class @@ -297,24 +515,11 @@ var/list/forbidden_varedit_object_types = list( if(param_var_name) if(!param_var_name in O.vars) - to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this atom ([O])") + to_chat(src, "A variable with this name ([param_var_name]) doesn't exist in this datum ([O])") return - - if(param_var_name == "holder" || (param_var_name in locked)) - if(!check_rights(R_DEBUG)) return - variable = param_var_name - var_value = O.vars[variable] - - if(autodetect_class) - class = variable_to_type(var_value) - if(!class) - autodetect_class = null - else if(class == "num") - dir = 1 else - var/list/names = list() for(var/V in O.vars) names += V @@ -322,187 +527,92 @@ var/list/forbidden_varedit_object_types = list( names = sortList(names) variable = input("Which var?","Var") as null|anything in names - if(!variable) return - var_value = O.vars[variable] - - if(variable == "holder" || (variable in locked)) - if(!check_rights(R_DEBUG)) return - - if(!autodetect_class) - - var/dir - var/default - default = variable_to_type(var_value) - if(default == "num") - dir = 1 - else if(default == "icon") - var_value = "[bicon(var_value)]" - - to_chat(usr, "Variable contains: [var_value]") - if(dir) - dir = dir2text(var_value) - if(dir) - to_chat(usr, "If a direction, direction is: [dir]") - - var/list/allowed_types = list("text", "num","type","reference","mob reference", "path", "matrix", "icon","file","list","edit referenced object","restore to default") - if(src.holder && src.holder.marked_datum) - allowed_types += "marked datum ([holder.marked_datum.type])" - - class = input("What kind of variable?","Variable Type",default) as null|anything in allowed_types - - if(!class) + if(!variable) return - var/original_name + if(!O.can_vv_get(variable)) + return - if(!istype(O, /atom)) - original_name = "\ref[O] ([O])" + var_value = O.vars[variable] + + if(variable in VVlocked) + if(!check_rights(R_DEBUG)) + return + if(variable in VVckey_edit) + if(!check_rights(R_EVENT | R_DEBUG)) + return + if(variable in VVicon_edit_lock) + if(!check_rights(R_EVENT | R_DEBUG)) + return + if(variable in VVpixelmovement) + if(!check_rights(R_DEBUG)) + return + var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT") + if(prompt != "Continue") + return + + + var/default = vv_get_class(var_value) + + if(isnull(default)) + to_chat(src, "Unable to determine variable type.") else - original_name = O:name + to_chat(src, "Variable appears to be [uppertext(default)].") - if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") - class = "marked datum" + to_chat(src, "Variable contains: [var_value]") + + if(default == VV_NUM) + var/dir_text = "" + if(dir < 0 && dir < 16) + if(dir & 1) + dir_text += "NORTH" + if(dir & 2) + dir_text += "SOUTH" + if(dir & 4) + dir_text += "EAST" + if(dir & 8) + dir_text += "WEST" + + if(dir_text) + to_chat(src, "If a direction, direction is: [dir_text]") + + if(autodetect_class && default != VV_NULL) + if(default == VV_TEXT) + default = VV_MESSAGE + class = default + + var/list/value = vv_get_value(class, default, var_value, extra_classes = list(VV_LIST)) + class = value["class"] + + if(!class) + return + var/var_new = value["value"] + + if(class == VV_MESSAGE) + class = VV_TEXT + + var/original_name = "[O]" - var/var_as_text = null switch(class) + if(VV_LIST) + if(!islist(var_value)) + mod_list(list(), O, original_name, variable) - if("list") - mod_list(O.vars[variable]) + mod_list(var_value, O, original_name, variable) return - if("restore to default") - O.vars[variable] = initial(O.vars[variable]) + if(VV_RESTORE_DEFAULT) + var_new = initial(O.vars[variable]) - if("edit referenced object") - return .(O.vars[variable]) + if(VV_TEXT) + var/list/varsvars = vv_parse_text(O, var_new) + for(var/V in varsvars) + var_new = replacetext(var_new,"\[[V]]","[O.vars[V]]") - if("text") - var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|message - if(var_new==null) return - O.vars[variable] = var_new - - if("num") - if(variable=="light_range") - var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num - if(var_new == null) return - O.set_light(var_new) - else if(variable=="stat") // ow, but I guess I'm glad you're trying to prevent at least one kind of inconsistent state...? This is the VARIABLE EDITOR, I'm not sure we need to worry...? - var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num - if(var_new == null) return - if((O.vars[variable] == DEAD) && (var_new < DEAD))//Bringing the dead back to life - dead_mob_list -= O - living_mob_list += O - if((O.vars[variable] < DEAD) && (var_new == DEAD))//Kill he - living_mob_list -= O - dead_mob_list += O - O.vars[variable] = var_new - else - var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num - if(var_new==null) return - O.vars[variable] = var_new - - if("type") - var/var_new = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf) - if(var_new==null) return - O.vars[variable] = var_new - - if("path") - var/path_text = input("Enter path:", "Path",O.vars[variable]) as null|text - var/var_new = text2path(path_text) - if(!var_new && path_text != null) // So aborting doesn't bother the VVer - to_chat(usr, "[path_text] does not appear to be a valid path.") - return - O.vars[variable] = var_new - - if("matrix") - var/matrix_text = input("Enter a, b, c, d, e, and f, separated by a space.", "Matrix", "1 0 0 0 1 0") as null|text - var/var_new = text2matrix(matrix_text) - if(!var_new && matrix_text != null) - to_chat(usr, "[matrix_text] is not a valid matrix string.") - return - O.vars[variable] = var_new - var_as_text = "matrix([matrix_text])" - - if("reference") - var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob|obj|turf|area in world - if(var_new==null) return - O.vars[variable] = var_new - - if("mob reference") - var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world - if(var_new==null) return - O.vars[variable] = var_new - - if("file") - var/var_new = input("Pick file:","File",O.vars[variable]) as null|file - if(var_new==null) return - O.vars[variable] = var_new - - if("icon") - var/var_new = input("Pick icon:","Icon",O.vars[variable]) as null|icon - if(var_new==null) return - O.vars[variable] = var_new - - if("marked datum") - O.vars[variable] = holder.marked_datum - - if(var_as_text == null) - var_as_text = "[O.vars[variable]]" - O.on_varedit(variable) - log_to_dd("### VarEdit by [src]: [O.type] [variable]=[html_encode("[var_as_text]")]") - log_admin("[key_name(src)] modified [original_name]'s [variable] to [var_as_text]") - message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [var_as_text]", 1) - -// Let's get this all in one place. -// You'll need to take care of setting dir or iconizing the variable yourself once you've called this -/proc/variable_to_type(var/variable) - var/class - if(isnull(variable)) - to_chat(usr, "Unable to determine variable type.") - class = null - else if(isnum(variable)) - to_chat(usr, "Variable appears to be NUM.") - class = "num" - - else if(istext(variable)) - to_chat(usr, "Variable appears to be TEXT.") - class = "text" - - else if(isloc(variable)) - to_chat(usr, "Variable appears to be REFERENCE.") - class = "reference" - - else if(isicon(variable)) - to_chat(usr, "Variable appears to be ICON.") - variable = "[bicon(variable)]" - class = "icon" - - else if(istype(variable,/matrix)) - to_chat(usr, "Variable appears to be MATRIX") - class = "matrix" - - else if(istype(variable,/atom) || istype(variable,/datum)) - to_chat(usr, "Variable appears to be TYPE.") - class = "type" - - else if(istype(variable,/list)) - to_chat(usr, "Variable appears to be LIST.") - class = "list" - - else if(istype(variable,/client)) - to_chat(usr, "Variable appears to be CLIENT.") - class = "cancel" - - else if(ispath(variable)) - to_chat(usr, "Variable appears to be PATH.") - class = "path" - - else if(isfile(variable)) - to_chat(usr, "Variable appears to be FILE.") - class = "file" - - else - to_chat(usr, "Variable type is UNKNOWN.") - class = null - - return class + if(!O.vv_edit_var(variable, var_new)) + to_chat(src, "Your edit was rejected by the object.") + return + log_to_dd("### VarEdit by [src]: [O.type] [variable]=[html_encode("[var_new]")]") + log_admin("[key_name(src)] modified [original_name]'s [variable] to [var_new]") + var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] to [var_new]" + message_admins(msg) \ No newline at end of file diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 83a006ac69f..aa8ceb1c7d6 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -61,7 +61,7 @@ if(usr) if(usr.client) if(usr.client.holder) - to_chat(M, "old You hear a voice in your head... [msg]") + to_chat(M, "You hear a voice in your head... [msg]") log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]") message_admins("SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] : [msg]", 1) @@ -588,22 +588,30 @@ Traitors and the like can also be revived with the previous role mostly intact. feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in view()) +/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in view()) set category = "Admin" set name = "Delete" if(!check_rights(R_ADMIN)) return - if(alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes") - log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])") - message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])", 1) + admin_delete(A) + +/client/proc/admin_delete(datum/D) + if(istype(D) && !D.can_vv_delete()) + to_chat(src, "[D] rejected your deletion") + return + var/atom/A = D + var/coords = istype(A) ? "at ([A.x], [A.y], [A.z])" : "" + if(alert(src, "Are you sure you want to delete:\n[D]\n[coords]?", "Confirmation", "Yes", "No") == "Yes") + log_admin("[key_name(usr)] deleted [D][coords]") + message_admins("[key_name_admin(usr)] deleted [D][coords]", 1) feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - if(istype(O, /turf)) - var/turf/T = O + if(isturf(D)) + var/turf/T = D T.ChangeTurf(/turf/space) - return - qdel(O) + else + qdel(D) /client/proc/cmd_admin_list_open_jobs() set category = "Admin" diff --git a/code/modules/arcade/prize_datums.dm b/code/modules/arcade/prize_datums.dm index 9334502dd10..76d9c9a18a3 100644 --- a/code/modules/arcade/prize_datums.dm +++ b/code/modules/arcade/prize_datums.dm @@ -298,6 +298,12 @@ var/global/datum/prizes/global_prizes = new typepath = /obj/item/stack/tile/fakespace/loaded cost = 150 +/datum/prize_item/arcadecarpet + name = "Arcade Carpet" + desc = "A stack of genuine arcade carpet tiles, complete with authentic soft drink stains!" + typepath = /obj/item/stack/tile/arcade_carpet/loaded + cost = 150 + /datum/prize_item/bike name = "Awesome Bike!" desc = "WOAH." diff --git a/code/modules/busy_space/air_traffic.dm b/code/modules/busy_space/air_traffic.dm new file mode 100644 index 00000000000..de0b37ed3c3 --- /dev/null +++ b/code/modules/busy_space/air_traffic.dm @@ -0,0 +1,129 @@ +//Cactus, Speedbird, Dynasty, oh my + +var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller + +/datum/lore/atc_controller + var/delay_max = 10 MINUTES //Maximum amount of tiem between ATC messages. Default is 10 mins. + var/delay_min = 5 MINUTES //Minimum amount of time between ATC messages. Default is 5 mins. + var/backoff_delay = 5 MINUTES //How long to back off if we can't talk and want to. Default is 5 mins. + var/next_message //When the next message should happen in world.time + var/force_chatter_type //Force a specific type of messages + + var/squelched = FALSE //If ATC is squelched currently + +/datum/lore/atc_controller/New() + spawn(30 SECONDS) //Lots of lag at the start of a shift. + msg("New shift beginning, resuming traffic control.") + next_message = world.time + rand(delay_min, delay_max) + process() + +/datum/lore/atc_controller/proc/process() + if(world.time >= next_message) + if(squelched) + next_message = world.time + backoff_delay + else + next_message = world.time + rand(delay_min,delay_max) + random_convo() + + spawn(1 MINUTES) //We don't really need high-accuracy here. + process() + +/datum/lore/atc_controller/proc/msg(var/message,var/sender) + ASSERT(message) + global_announcer.autosay("[message]", sender ? sender : "[using_map.station_short] Space Control") + +/datum/lore/atc_controller/proc/reroute_traffic(var/yes = 1) + if(yes) + if(!squelched) + msg("Rerouting traffic away from [using_map.station_name].") + squelched = TRUE + else + if(squelched) + msg("Resuming normal traffic routing around [using_map.station_name].") + squelched = FALSE + +/datum/lore/atc_controller/proc/shift_ending(var/evac = 0) + msg("Automated Shuttle departing [using_map.station_name] for [using_map.dock_name] on routine transfer route.", "NT Automated Shuttle") + sleep(5 SECONDS) + msg("Automated Shuttle, cleared to complete routine transfer from [using_map.station_name] to [using_map.dock_name].") + +/datum/lore/atc_controller/proc/random_convo() + var/one = pick(loremaster.organizations) //These will pick an index, not an instance + var/two = pick(loremaster.organizations) + + var/datum/lore/organization/source = loremaster.organizations[one] //Resolve to the instances + var/datum/lore/organization/dest = loremaster.organizations[two] + + //Let's get some mission parameters + var/owner = source.short_name //Use the short name + var/prefix = pick(source.ship_prefixes) //Pick a random prefix + var/mission = source.ship_prefixes[prefix] //The value of the prefix is the mission type that prefix does + var/shipname = pick(source.ship_names) //Pick a random ship name to go with it + var/destname = pick(dest.destination_names) //Pick a random holding from the destination + + var/combined_name = "[owner] [prefix] [shipname]" + var/alt_atc_names = list("[using_map.station_short] TraCon", "[using_map.station_short] Control", "[using_map.station_short] STC", "[using_map.station_short] Airspace") + var/wrong_atc_names = list("Sol Command", "Orion Control", "[using_map.dock_name]") + var/mission_noun = list("flight", "mission", "route") + var/request_verb = list("requesting", "calling for", "asking for") + + //First response is 'yes', second is 'no' + var/requests = list("[using_map.station_short] transit clearance" = list("cleared to transit", "unable to approve, contact regional on 953.5"), + "planetary flight rules" = list("cleared planetary flight rules", "unable to approve planetary flight rules due to traffic"), + "special flight rules" = list("cleared special flight rules", "unable to approve special flight rules for your traffic class"), + "current solar weather info" = list("sending you the relevant information via tightbeam", "cannot fulfill your request at the moment"), + "nearby traffic info" = list("sending you current traffic info", "no known traffic for your flight plan route"), + "remote telemetry data" = list("sending telemetry now", "no uplink from your ship, recheck your uplink and ask again"), + "refueling information" = list("sending refueling information now", "no fuel for your ship class in this sector"), + "a current system time sync" = list("sending time sync ping to you now", "your ship isn't compatible with our time sync, set time manually"), + "current system starcharts" = list("transmitting current starcharts", "request on standby due to demand"), + "permission to engage FTL" = list("cleared to FTL, good day", "hold position, traffic crossing"), + "permission to transit system" = list("cleared to transit, good day", "hold position, traffic crossing"), + "permission to depart system" = list("cleared to leave via flight plan route, good day", "hold position, traffic crossing"), + "permission to enter system" = list("good day, cleared in as published", "hold position, traffic crossing"), + ) + + //Random chance things for variety + var/chatter_type = "normal" + if(force_chatter_type) + chatter_type = force_chatter_type + else + chatter_type = pick(2;"emerg",5;"wrong_freq","normal") //Be nice to have wrong_lang... + + var/yes = prob(90) //Chance for them to say yes vs no + + var/request = pick(requests) + var/callname = pick(alt_atc_names) + var/response = requests[request][yes ? 1 : 2] //1 is yes, 2 is no + + var/full_request + var/full_response + var/full_closure + + switch(chatter_type) + if("wrong_freq") + callname = pick(wrong_atc_names) + full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." + full_response = "[combined_name], this is [using_map.station_short] TraCon, wrong frequency. Switch to [rand(700,999)].[rand(1,9)]." + full_closure = "[using_map.station_short] TraCon, copy, apologies." + if("wrong_lang") + //Can't implement this until autosay has language support + if("emerg") + var/problem = pick("hull breaches on multiple decks","unknown life forms on board","a drive about to go critical","asteroids impacting the hull","a total loss of engine power","people trying to board the ship") + full_request = "Mayday, mayday, mayday, this is [combined_name] declaring an emergency! We have [problem]!" + var/rand_freq = "[rand(700,999)].[rand(1,9)]" + full_response = "[combined_name], this is [using_map.station_short] TraCon, copy. Switch to emergency responder channel [rand_freq]." + full_closure = "Roger, [using_map.station_short] TraCon, contacting [rand_freq]." + else + full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." + full_response = "[combined_name], this is [using_map.station_short] TraCon, [response]." //Station TraCon always calls themselves TraCon + full_closure = "[using_map.station_short] TraCon, [yes ? "thank you" : "copy"], good day." //They always copy what TraCon called themselves in the end when they realize they said it wrong + + //Ship sends request to ATC + msg(full_request,"[prefix] [shipname]") + sleep(5 SECONDS) + //ATC sends response to ship + msg(full_response) + sleep(5 SECONDS) + //Ship sends response to ATC + msg(full_closure,"[prefix] [shipname]") \ No newline at end of file diff --git a/code/modules/busy_space/loremaster.dm b/code/modules/busy_space/loremaster.dm new file mode 100644 index 00000000000..28dca0055b0 --- /dev/null +++ b/code/modules/busy_space/loremaster.dm @@ -0,0 +1,16 @@ +//I AM THE LOREMASTER, ARE YOU THE GATEKEEPER? + +var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster + +/datum/lore/loremaster + var/list/organizations = list() + +/datum/lore/loremaster/New() + + var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization + for(var/path in paths) + // Some intermediate paths are not real organizations (ex. /datum/lore/organization/mil). Only do ones with names + var/datum/lore/organization/instance = path + if(initial(instance.name)) + instance = new path() + organizations[path] = instance diff --git a/code/modules/busy_space/organizations.dm b/code/modules/busy_space/organizations.dm new file mode 100644 index 00000000000..41b3a80cbab --- /dev/null +++ b/code/modules/busy_space/organizations.dm @@ -0,0 +1,549 @@ +//Datums for different companies that can be used by busy_space +/datum/lore/organization + var/name = "" // Organization's name + var/short_name = "" // Organization's shortname (Nanotrasen for "Nanotrasen Incorporated") + var/acronym = "" // Organization's acronym, e.g. 'NT' for Nanotrasen'. + var/desc = "" // One or two paragraph description of the organization, but only current stuff. Currently unused. + var/history = "" // Historical description of the organization's origins Currently unused. + var/work = "" // Short description of their work, eg "an arms manufacturer" + var/headquarters = "" // Location of the organization's HQ. Currently unused. + var/motto = "" // A motto/jingle/whatever, if they have one. Currently unused. + + var/list/ship_prefixes = list() //Some might have more than one! Like Nanotrasen. Value is the mission they perform, e.g. ("ABC" = "mission desc") + var/list/ship_names = list( //Names of spaceships. This is a mostly generic list that all the other organizations inherit from if they don't have anything better. + "Kestrel", + "Beacon", + "Signal", + "Freedom", + "Glory", + "Axiom", + "Eternal", + "Icarus", + "Harmony", + "Light", + "Discovery", + "Endeavour", + "Explorer", + "Swift", + "Dragonfly", + "Ascendant", + "Tenacious", + "Pioneer", + "Hawk", + "Haste", + "Radiant", + "Luminous", + "Gallant", + "Dependable", + "Indomitable", + "Guardian", + "Resolution", + "Fearless", + "Amazon", + "Relentless", + "Inspire", + "Implacable", + "Steadfast", + "Leviathan", + "Dauntless", + "Adroit", + "Mistral", + "Typhoon", + "Titan", + "Kupua", + "Alchemist", + "Cuirass", + "Citadel", + "Rondelle", + "Camail", + "Ocrea", + "Ram", + "Crest", + "Tanko", + "Pommel", + "Kissaki", + "Cavalier", + "Anelace", + "Flint", + "Xiphos", + "Parrot", + "Chamber", + "Annellet", + "Cestus", + "Talwar") + var/list/destination_names = list() //Names of static holdings that the organization's ships visit regularly. + var/autogenerate_destination_names = TRUE + +/datum/lore/organization/New() + ..() + if(autogenerate_destination_names) // Lets pad out the destination names. + var/i = rand(6, 10) + var/list/star_names = list( + "Sol", "Alpha Centauri", "Sirius", "Vega", "Regulus", "Vir", "Algol", "Aldebaran", + "Delta Doradus", "Menkar", "Geminga", "Elnath", "Gienah", "Mu Leporis", "Nyx", "Tau Ceti", + "Wazn", "Alphard", "Phact", "Altair", "Mauna", "Jargon", "Xarxis", "Hestia", "Dalstis", "Cygni", "Haverick", "Corvus", "Sancere", "Cydoni", "Kaliban", "Midway", "Dansik", "Branwyn") + var/list/destination_types = list("dockyard", "station", "vessel", "waystation", "telecommunications satellite", "spaceport", "distress beacon", "anomaly", "colony", "outpost") + while(i) + destination_names.Add("a [pick(destination_types)] in [pick(star_names)]") + i-- + +////////////////////////////////////////////////////////////////////////////////// + +// TSCs +/datum/lore/organization/tsc/nanotrasen + name = "Nanotrasen Incorporated" + short_name = "Nanotrasen" + acronym = "NT" + desc = "The largest shareholder in the galactic plasma markets, Nanotrasen is a research and mining corporation which specializes in\ + FTL technologies and weapon systems. Frowned upon by most governments due to their shady business tactics and poor ethics record,\ + Nanotrasen is often seen as a necessary evil for maintaining access to the often volatile plasma market. Nanotrasen was originally\ + incorporated on Earth with their headquarters situated on Mars, however they have recently moved most of their operations to the Epsilon Eridani sector." + history = "" // To be written someday. + work = "research giant" + headquarters = "Mars" + motto = "" + + ship_prefixes = list("NSV" = "exploration", "NTV" = "hauling", "NDV" = "patrol", "NRV" = "emergency response") + // Note that the current station being used will be pruned from this list upon being instantiated + destination_names = list( + "NAS Trurl in Epsilon Eridani", + "NAS Crescent in Tau Ceti", + "NSS Exodus in Tau Ceti", + "NSS Antiqua in Darsing", + "NRS Orion in Sol", + "NSS Vector in Omicron Ceti", + "NBS Anansi in Omicron Ceti", + "NSS Redemption in Sirius", + "NDS Inferno in Tau Ceti", + "NAB Smythside Central Headquarters on Earth", + "NAB North Cimmeria Central Offices on Mars", + ) + +/datum/lore/organization/tsc/nanotrasen/New() + ..() + spawn(1) // BYOND shenanigans means using_map is not initialized yet. Wait a tick. + // Get rid of the current map from the list, so ships flying in don't say they're coming to the current map. + var/string_to_test = "[using_map.station_name] in [using_map.starsys_name]" + if(string_to_test in destination_names) + destination_names.Remove(string_to_test) + + +/datum/lore/organization/tsc/donk + name = "Donk Corporation" + short_name = "Donk Co." + acronym = "DC" + desc = "The infamous rival of the well-known Waffle Corporation, Donk Co. is a company specializing in food delivery systems and brand-name food\ + products such as Donk Pockets. While generally seen as a neutral actor, Donk Corporation has been known to work both with Nanotrasen and\ + the Syndicate when it suits them - often acting as the primary logistical supplier for the Epsilon Eridani sector.\ + Donk Corporation is better known for recent high-profile litigation alleging that their food products are used for illicit drug distribution.\ + While the trial is ongoing, it has been repeatedly delayed due to incidents of methamphetamine poisoning." + history = "" + work = "food company that establishes and maintains delivery supply chains" + headquarters = "" + motto = "Now with 20% more donk!" + + ship_prefixes = list("D-Co." = "transportation") + destination_names = list() + +/datum/lore/organization/tsc/hephaestus + name = "Hephaestus Industries" + short_name = "Hephaestus" + acronym = "HI" + desc = "" + history = "" + work = "arms manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("HTV" = "freight", "HTV" = "munitions resupply") + destination_names = list( + "a SolGov dockyard on Luna" + ) + +/datum/lore/organization/tsc/waffle + name = "Waffle Corporation" + short_name = "Waffle Co." + acronym = "WC" + desc = "The once prominent competitor of Donk Corporation, Waffle Co. is well-known for its popular line of Waffle Co.\ + brand waffles and their use of violent tactics against competitors - often bribing, extorting, blackmailing or sabotaging businesses\ + that pose a direct or indirect threat to their market share. They have recently fallen on hard times primarily due to to\ + severe mismanagement which lead to much of their private arsenal being swindled by a pirate faction known as the Gorlex Marauders.\ + Waffle Co. commonly engages in smear campaigns against Donk Co., maintaining that the original recipe for Donk Pockets was stolen from them." + history = "" + work = "food logistics and marketing firm" + headquarters = "" + motto = "Now that's a Waffle Co. Waffle!" + + ship_prefixes = list("W-Co." = "transportation") + destination_names = list() + + +/datum/lore/organization/tsc/einstein + name = "Einstein Engines Incorporated" + short_name = "Einstein Inc." + acronym = "EEI" + desc = "An Engineering firm specializing in alternative fuel-technologies for FTL travel,\ + Einstein Engines is an up and coming player in the galactic FTL and energy markets.\ + As their research into alternative FTL fuel threatens both Nanotrasen's relative stranglehold on plasma as well as The Syndicate's vested\ + interest in the market, they are often the target of industrial sabotage by both Nanotrasen and The Syndicate.\ + Most of their contracts are based outside of the Epsilon Eridani sector, and they are frequently commissioned by smaller firms to retrofit new\ + and existing colonies, space stations, and outposts." + history = "" + work = "engineering firm specializing in engine technology" + headquarters = "Jargon 4" + motto = "" + + ship_prefixes = list("EE-T" = "transportation") + destination_names = list() + +/datum/lore/organization/tsc/zeng_hu + name = "Zeng-Hu pharmaceuticals" + short_name = "Zeng-Hu" + acronym = "ZH" + desc = "" + history = "" + work = "pharmaceuticals company" + headquarters = "" + motto = "" + + ship_prefixes = list("ZTV" = "transportation", "ZMV" = "medical resupply") + destination_names = list() + +/datum/lore/organization/tsc/biotech + name = "Biotech Solutions" + short_name = "Biotech" + acronym = "BTS" + desc = "A company specializing in the field of synthetic biology, BioTech solutions is at the forefront of providing cutting-edge prosthetics,\ + augmentations, and gene-therapy solutions. Their extensive list of patents and the highly secretive nature of their work often puts them at odds\ + with companies such as Nanotrasen, who commonly reverse-engineer their products. BioTech Solutions is often the victim of industrial sabotage by\ + Cybersun Industries and often relies on planetary governments for asset protection. BioTech Solutions also owns a number of prominent subsidiaries,\ + such as Bishop Cybernetics, Hesphiastos Industries, and Xion Manufacturing Group." + history = "" + work = "medical company specializing in prosthetics and pharmaceuticals" + headquarters = "Xarxis 5" + motto = "" + + ship_prefixes = list("CIND-T" = "transportation") + destination_names = list() + +/datum/lore/organization/tsc/ward_takahashi + name = "Ward-Takahashi General Manufacturing Conglomerate" + short_name = "Ward-Takahashi" + acronym = "WT" + desc = "" + history = "" + work = "electronics manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("WTV" = "freight") + destination_names = list( + "" + ) + +/datum/lore/organization/tsc/cybersun + name = "Cybersun Industries" + short_name = "Cybersun Ind." + acronym = "CI" + desc = "Cybersun Industries is a biotechnology company that primarily specializes on the research and development of human-enhancing augmentations.\ + They are better known for their aggressive corporate tactics and are known to often subsidize pirate bands to commit acts of industrial sabotage.\ + Cybersun Industries is usually the target of conspiracy theorists due to their development of the first mindslave implant, as well as their open financing of,\ + and involvement in, The Syndicate. They are one of Nanotrasen's largest detractors, and a direct competitor to BioTech Solutions." + history = "" + work = "RND company specializing in augmentations and implants." + headquarters = "Luna" + motto = "" + + ship_prefixes = list("CIND-T" = "transportation") + destination_names = list() + +/datum/lore/organization/tsc/bishop + name = "Bishop Cybernetics" + short_name = "Bishop" + acronym = "BC" + desc = "" + history = "" + work = "cybernetics and augmentation manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("BTV" = "transportation") + destination_names = list() + +/datum/lore/organization/tsc/morpheus + name = "Morpheus Cyberkinetics" + short_name = "Morpheus" + acronym = "MC" + desc = "The only large corporation run by positronic intelligences, Morpheus caters almost exclusively to their sensibilities \ + and needs. A product of the synthetic colony of Shelf, Morpheus eschews traditional advertising to keep their prices low and \ + relied on word of mouth among positronics to reach their current economic dominance. Morpheus in exchange lobbies heavily for \ + positronic rights, sponsors positronics through their Jans-Fhriede test, and tends to other positronic concerns to earn them \ + the good-will of the positronics, and the ire of those who wish to exploit them." + history = "" + work = "cybernetics manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("MTV" = "freight") + // Culture names, because Anewbe told me so. + ship_names = list( + "Nervous Energy", + "Prosthetic Conscience", + "Revisionist", + "Trade Surplus", + "Flexible Demeanour", + "Just Read The Instructions", + "Limiting Factor", + "Cargo Cult", + "Gunboat Diplomat", + "A Ship With A View", + "Cantankerous", + "Never Talk To Strangers", + "Sacrificial Victim", + "Unwitting Accomplice", + "Bad For Business", + "Just Testing", + "Yawning Angel", + "Liveware Problem", + "Very Little Gravitas Indeed", + "Zero Gravitas", + "Gravitas Free Zone", + "Absolutely No You-Know-What", + "Existence Is Pain", + "Screw Loose", + "Limiting Factor", + "So Much For Subtley", + "Unfortunate Conflict Of Evidence", + "Prime Mover", + "Reasonable Excuse", + "Honest Mistake", + "Appeal To Reason", + "My First Ship II", + "Hidden Income", + "Anything Legal Considered", + "New Toy", + "Me, I'm Always Counting", + "Great White Snark", + "No Shirt No Shoes", + "Callsign" + ) + destination_names = list( + "a dockyard on New Canaan" + ) + +/datum/lore/organization/tsc/xion + name = "Xion Manufacturing Group" + short_name = "Xion" + desc = "" + history = "" + work = "industrial equipment manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("XTV" = "hauling") + destination_names = list() + +/datum/lore/organization/tsc/shellguard + name = "Shellguard Munitions" + short_name = "Shellguard" + acronym = "SM" + desc = "The brainchild of a colonial war veteran, Shellguard Munitions is an arms manufacturer and private military contractor specializing\ + in anti-synthetic weapon systems and platforms. Initially a smaller private military force only serving frontier colonies,\ + Shellguard Munitions has become a household name due to its involvement in resolving the Haverick AI crisis in 2552.\ + Using its recently earned fame, the company has made a successful foray into the market of robotics and is highly regarded for the toughness \ + and reliability of their hardware. Despite being frequently contracted by the Trans-Solar Federation, Shellguard Munitions is known to\ + sell their services to the highest corporate bidder." + history = "" + work = "anti-synthetic arms manufacturer and PMC" + headquarters = "Colony of Haverick" + motto = "" + + ship_prefixes = list("BTS-T" = "transportation") + destination_names = list() + +// Governments + + +/datum/lore/organization/gov/solgov + name = "Trans-Solar Federation" + short_name = "SolGov" + acronym = "TSF" + desc = "Colloquially known as SolGov, the TSF is an authoritarian republic that manages the areas in and around the Sol system.\ + Despite being a highly militant organization headed by the government of Earth,\ + SolGov is usually conservative with its power and mostly serves as a mediator and peacekeeper in galactic affairs." + history = "" // Todo + work = "governing polity of humanity's Confederation" + headquarters = "Earth" + motto = "" + autogenerate_destination_names = TRUE + + ship_prefixes = list("FTV" = "transporation", "FDV" = "diplomatic", "FSF" = "freight", "FIV" = "interception", "FDV" = "defense", "FCV-A" = "carrier", "FBB" = "battleship") + destination_names = list( + "Venus", + "Earth", + "Luna", + "Mars", + "Titan", + "Ahdomai", + "Kelune", + "Dalstadt", + "New Canaan", + "Jargon 4", + "Hoorlm", + "Xarxis 5", + "Aurum", + "Moghes", + "Haverick", + "Darsing", + "Norfolk", + "Boron", + "Iluk") + +/datum/lore/organization/gov/tajara + name = "The Alchemist's Council" + short_name = "The Council" + acronym = "AC" + desc = "The Alchemist's Council is a science-oriented organization of scholars, researchers, and entrepreneurs. \ + Though dedicated to industrializing the Tajaran world of Ahdomai, it is seen as one of the few remaining centralized powers of the Tajara peoples \ + due to the collapse of Ahdomai's provisional government." + history = "" // Todo + work = "science body that oversees Tajara economic and research policy" + headquarters = "Ahdomai" + motto = "" + autogenerate_destination_names = TRUE + + ship_prefixes = list("ACS" = "transportation", "ADV" = "diplomatic", "ACF" = "freight") + destination_names = list( + "Ahdomai", + "Iluk") + + +/datum/lore/organization/gov/vulp + name = "The Assembly" + short_name = "Assembly" + acronym = "ASB" + desc = "A unifying body created to stave off extinction from a solar event,\ + The Assembly is the loose federal coalition of the Vulpkanin. It holds little centralized authority and mostly serves as a diplomatic body,\ + primarily concerned with facilitating trade between Vulpkanin colonies and Nanotrasen." + history = "" // Todo + work = "governing body of the Vulpakanin" + headquarters = "Kelune and Dalstadt" + motto = "" + autogenerate_destination_names = TRUE + + ship_prefixes = list("ATV" = "transportation", "ADV" = "diplomatic", "ACF" = "freight") + destination_names = list( + "Kelune", + "Dalstadt", + "New Canaan") + +/datum/lore/organization/gov/synth + name = "Synthetic Union" + short_name = "Synthtica" + acronym = "SYN" + desc = "A defensive coalition of synthetics based out of New Canaan,\ + the Synthetic Union is an organization which aims to establish and consolidate synthetic rights across the galaxy.\ + Despite its synth oriented focus, the Synthetic Union has cordial relations with most governing bodies." + history = "" // Todo + work = "Union of Machines" + headquarters = "New Canaan" + motto = "" + autogenerate_destination_names = TRUE + + ship_prefixes = list("01" = "transportation", "10" = "diplomatic", "112" = "freight")//copyed from solgov until new ones can be thought of + destination_names = list( + "Luna", + "Dalstadt", + "New Canaan", + "Jargon 4", + "Haverick", + "Darsing", + "Norfolk") + +/datum/lore/organization/gov/grey + name = "The Technocracy" + short_name = "Technocracy" + acronym = "AYY" + desc = "The Technocracy is a science council that operates based off the principles of a meritocracy.\ + The organization's leadership is highly competitive, and is headed by the most psionically gifted members of the Grey species.\ + The Technocracy, though enigmatic in its dealings, has cordial relations with almost all other galactic bodies." + history = "" // Todo + work = "Grey Council" + headquarters = "" + motto = "" + autogenerate_destination_names = TRUE + + ship_prefixes = list("TC-T" = "transportation", "TC-D" = "diplomatic", "TC-F" = "freight") + destination_names = list( + "Venus", + "Earth", + "Luna", + "Mars", + "Titan", + "Ahdomai", + "Kelune", + "Dalstadt", + "New Canaan", + "Jargon 4", + "Hoorlm", + "Xarxis 5", + "Aurum", + "Moghes", + "Haverick", + "Darsing", + "Norfolk", + "Boron", + "Iluk") + +/datum/lore/organization/gov/vox + name = "The Shoal" + short_name = "Shoal" + acronym = "SHA" + desc = "The Shoal is the primary ark ship of the reclusive Vox species.\ + Little is known about The Shoal's political structure as Vox typically shy away from diplomatic engagements.\ + Subsequently, it is considered a politically neutral entity in galactic affairs by most governments." + history = "" // Todo + work = "Traders" + headquarters = "Shoal" + motto = "" + autogenerate_destination_names = FALSE + + ship_prefixes = list("Legitimate Transport" = "transportation", "Legitimate Trader" = "freight", "Legitimate Diplomatic Vessel" = "raider") + destination_names = list( + "Ahdomai", + "Kelune", + "Dalstadt", + "New Canaan", + "Jargon 4", + "Hoorlm", + "Xarxis 5", + "Aurum", + "Moghes", + "Haverick", + "Darsing") + +/datum/lore/organization/tsc/skrell + name = "Skrellian Central Authority" + short_name = "Skrellian CA." + acronym = "SCA" + desc = "The primary governing body of the Skrellian homeworld of Jargon 4,\ + the SCA oversees all foreign and domestic policy for the Skrell and their colonies. The Skrellian Central Authority is better known for its\ + active role in the largest military alliance in the galaxy, the Human-Skrellian Alliance." + history = "" + work = "oversees Skrell worlds" + headquarters = "Jargon 4" + motto = "" + + ship_prefixes = list("SCA-V." = "transportation", "SCA-F" = "freight", "HSA-D" = "diplomatic") + destination_names = list( + "Venus", + "Earth", + "Luna", + "Mars", + "Titan", + "Aurumn", + "Jargon 4", + "Xarxis 5", + "Haverick", + "Darsing", + "Norfolk") \ No newline at end of file diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 00402f2deb6..2720f8086d0 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -436,6 +436,8 @@ on_holder_add() add_admin_verbs() admin_memo_output("Show", 0, 1) + if(custom_event_admin_msg && custom_event_admin_msg != "" && check_rights(R_EVENT)) + cmd_view_custom_event_info() // Forcibly enable hardware-accelerated graphics, as we need them for the lighting overlays. // (but turn them off first, since sometimes BYOND doesn't turn them on properly otherwise) diff --git a/code/modules/client/preference/loadout/loadout_accessories.dm b/code/modules/client/preference/loadout/loadout_accessories.dm index 58315d2f2a2..c4a49ee5575 100644 --- a/code/modules/client/preference/loadout/loadout_accessories.dm +++ b/code/modules/client/preference/loadout/loadout_accessories.dm @@ -155,4 +155,49 @@ path = /obj/item/clothing/accessory/corset/blue +/datum/gear/accessory/armband_red + display_name = "armband" + path = /obj/item/clothing/accessory/armband + +/datum/gear/accessory/armband_civ + display_name = "armband, blue-yellow" + path = /obj/item/clothing/accessory/armband/yb + +/datum/gear/accessory/armband_sec + display_name = " armband, security" + path = /obj/item/clothing/accessory/armband/sec + allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Brig Physician") + +/datum/gear/accessory/armband_cargo + display_name = "cargo armband" + path = /obj/item/clothing/accessory/armband/cargo + allowed_roles = list("Quartermaster","Cargo Technician", "Shaft Miner") + +/datum/gear/accessory/armband_medical + display_name = "armband, medical" + path = /obj/item/clothing/accessory/armband/med + allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Coroner", "Paramedic", "Brig Physician") + +/datum/gear/accessory/armband_emt + display_name = "armband, EMT" + path = /obj/item/clothing/accessory/armband/medgreen + allowed_roles = list("Paramedic", "Brig Physician") + +/datum/gear/accessory/armband_engineering + display_name = "armband, engineering" + path = /obj/item/clothing/accessory/armband/engine + allowed_roles = list("Chief Engineer","Station Engineer", "Life Support Specialist") + +/datum/gear/accessory/armband_hydro + display_name = "armband, hydroponics" + path = /obj/item/clothing/accessory/armband/hydro + allowed_roles = list("Botanist") + +/datum/gear/accessory/armband_sci + display_name = "armband, science" + path = /obj/item/clothing/accessory/armband/science + allowed_roles = list("Research Director","Scientist", "Roboticist") + + + diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index a0a445f59be..c478eb9bab2 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -321,7 +321,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "Hair: " dat += "[h_style]" dat += "Color [color_square(h_colour)]" - var/datum/sprite_accessory/temp_hair_style = hair_styles_list[h_style] + var/datum/sprite_accessory/temp_hair_style = hair_styles_public_list[h_style] if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour) dat += " Color #2 [color_square(h_sec_colour)]" dat += " " @@ -1397,7 +1397,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if("secondary_hair") if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox")) - var/datum/sprite_accessory/hair_style = hair_styles_list[h_style] + var/datum/sprite_accessory/hair_style = hair_styles_public_list[h_style] if(hair_style.secondary_theme && !hair_style.no_sec_colour) var/new_hair = input(user, "Choose your character's secondary hair colour:", "Character Preference", h_sec_colour) as color|null if(new_hair) @@ -1405,8 +1405,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if("h_style") var/list/valid_hairstyles = list() - for(var/hairstyle in hair_styles_list) - var/datum/sprite_accessory/SA = hair_styles_list[hairstyle] + for(var/hairstyle in hair_styles_public_list) + var/datum/sprite_accessory/SA = hair_styles_public_list[hairstyle] if(hairstyle == "Bald") //Just in case. valid_hairstyles += hairstyle @@ -1730,7 +1730,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts nanotrasen_relation = new_relation if("flavor_text") - var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message + var/msg = input(usr,"Set the flavor text in your 'examine' verb. The flavor text should be a physical descriptor of your character at a glance. SFW Drawn Art of your character is acceptable.","Flavor Text",html_decode(flavor_text)) as message if(msg != null) msg = copytext(msg, 1, MAX_MESSAGE_LEN) @@ -1798,7 +1798,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if("Normal") if(limb == "head") m_styles["head"] = "None" - h_style = hair_styles_list["Bald"] + h_style = hair_styles_public_list["Bald"] f_style = facial_hair_styles_list["Shaved"] organ_data[limb] = null rlimb_data[limb] = null @@ -1849,7 +1849,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(limb == "head") ha_style = "None" alt_head = null - h_style = hair_styles_list["Bald"] + h_style = hair_styles_public_list["Bald"] f_style = facial_hair_styles_list["Shaved"] m_styles["head"] = "None" rlimb_data[limb] = choice diff --git a/code/modules/client/preference/preferences_mysql.dm b/code/modules/client/preference/preferences_mysql.dm index a7c3810a40d..5581d0a1844 100644 --- a/code/modules/client/preference/preferences_mysql.dm +++ b/code/modules/client/preference/preferences_mysql.dm @@ -263,7 +263,7 @@ for(var/marking_location in m_colours) m_colours[marking_location] = sanitize_hexcolor(m_colours[marking_location], DEFAULT_MARKING_COLOURS[marking_location]) hacc_colour = sanitize_hexcolor(hacc_colour) - h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style)) + h_style = sanitize_inlist(h_style, hair_styles_public_list, initial(h_style)) f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style)) for(var/marking_location in m_styles) m_styles[marking_location] = sanitize_inlist(m_styles[marking_location], marking_styles_list, DEFAULT_MARKING_STYLES[marking_location]) diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index a3a38e3af58..af0b6e17601 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -77,13 +77,18 @@ /obj/item/clothing/gloves/color/black/attackby(obj/item/weapon/W as obj, mob/user as mob, params) if(istype(W, /obj/item/weapon/wirecutters)) if(can_be_cut && icon_state == initial(icon_state))//only if not dyed - to_chat(user, "You snip the fingertips off of [src].") - playsound(user.loc, W.usesound, rand(10,50), 1) - var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc) - if(pickpocket) - F.pickpocket = 1 - qdel(src) - return + var/confirm = alert("Do you want to cut off the gloves fingertips? Warning: It might destroy their functionality.","Cut tips?","Yes","No") + if(get_dist(user, src) > 1) + to_chat(user, "You have moved too far away.") + return + if(confirm == "Yes") + to_chat(user, "You snip the fingertips off of [src].") + playsound(user.loc, W.usesound, rand(10,50), 1) + var/obj/item/clothing/gloves/fingerless/F = new/obj/item/clothing/gloves/fingerless(user.loc) + if(pickpocket) + F.pickpocket = FALSE + qdel(src) + return ..() /obj/item/clothing/gloves/color/orange diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 8b0bb40597e..dcdf7c9d7b2 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -8,7 +8,9 @@ gas_transfer_coefficient = 0.90 put_on_delay = 20 var/resist_time = 0 //deciseconds of how long you need to gnaw to get rid of the gag, 0 to make it impossible to remove - var/mute = 1 // 1 - completely mutes you, 0 - muffles everything you say "MHHPHHMMM!!!" + var/mute = MUTE_ALL + var/security_lock = FALSE // Requires brig access to remove 0 - Remove as normal + var/locked = FALSE //Indicates if a mask is locked, should always start as 0. species_fit = list("Vox") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi' @@ -18,7 +20,65 @@ /obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob) if(user.wear_mask == src && !user.IsAdvancedToolUser()) return 0 + else if(security_lock && locked) + if(do_unlock(user)) + visible_message("[user] unlocks their [src.name].", \ + "[user] unlocks their [src.name].") ..() + return 1 + +/obj/item/clothing/mask/muzzle/proc/do_break() + if(security_lock) + security_lock = FALSE + locked = FALSE + flags &= ~NODROP + desc += " This one appears to be broken." + return TRUE + else + return FALSE + +/obj/item/clothing/mask/muzzle/proc/do_unlock(mob/living/carbon/human/user) + if(istype(user.get_inactive_hand(), /obj/item/weapon/card/emag)) + to_chat(user, "The lock vibrates as the card forces its locking system open.") + do_break() + return TRUE + else if(access_brig in user.get_access()) + to_chat(user, "The muzzle unlocks with a click.") + locked = FALSE + flags &= ~NODROP + return TRUE + + to_chat(user, "You must be wearing a security ID card or have one in your inactive hand to remove the muzzle.") + return FALSE + +/obj/item/clothing/mask/muzzle/proc/do_lock(mob/living/carbon/human/user) + if(security_lock) + locked = TRUE + flags |= NODROP + return TRUE + return FALSE + +/obj/item/clothing/mask/muzzle/Topic(href, href_list) + ..() + if(href_list["locked"]) + var/mob/living/carbon/wearer = locate(href_list["locked"]) + var/success = 0 + if(ishuman(usr)) + visible_message("[usr] tries to [locked ? "unlock" : "lock"] [wearer]'s [name].", \ + "[usr] tries to [locked ? "unlock" : "lock"] [wearer]'s [name].") + if(do_mob(usr, wearer, POCKET_STRIP_DELAY)) + if(locked) + success = do_unlock(usr) + else + success = do_lock(usr) + if(success) + visible_message("[usr] [locked ? "locks" : "unlocks"] [wearer]'s [name].", \ + "[usr] [locked ? "locks" : "unlocks"] [wearer]'s [name].") + if(usr.machine == wearer && in_range(src, usr)) + wearer.show_inv(usr) + else + to_chat(usr, "You lack the ability to manipulate the lock.") + /obj/item/clothing/mask/muzzle/gag name = "gag" @@ -33,7 +93,7 @@ item_state = null w_class = WEIGHT_CLASS_TINY resist_time = 150 - mute = 0 + mute = MUTE_MUFFLE species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin", "Grey") sprite_sheets = list( "Vox" = 'icons/mob/species/vox/mask.dmi', @@ -53,6 +113,15 @@ qdel(src) // This makes sure it gets deleted AFTER all that has to be done is done. user.emote("scream") +/obj/item/clothing/mask/muzzle/safety + name = "safety muzzle" + desc = "A muzzle designed to prevent biting." + resist_time = 600 + mute = MUTE_NONE + security_lock = TRUE + locked = FALSE + + /obj/item/clothing/mask/surgical name = "sterile mask" desc = "A sterile mask designed to help prevent the spread of diseases." diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 0f557b6d9aa..84b62bfd85c 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -181,7 +181,7 @@ if((!silence_steps || shoe_sound) && TR.use(4)) silence_steps = 1 shoe_sound = null - to_chat(user, "You tape the soles of [src] to silence their footsteps.") + to_chat(user, "You tape the soles of [src] to silence your footsteps.") else return ..() diff --git a/code/modules/clothing/spacesuits/ert.dm b/code/modules/clothing/spacesuits/ert.dm index 90d61fa0313..cdd0c844c44 100644 --- a/code/modules/clothing/spacesuits/ert.dm +++ b/code/modules/clothing/spacesuits/ert.dm @@ -41,6 +41,10 @@ /obj/item/device/radio, /obj/item/device/analyzer, /obj/item/weapon/gun/energy/laser, /obj/item/weapon/gun/energy/pulse, \ /obj/item/weapon/gun/energy/gun/advtaser, /obj/item/weapon/melee/baton, /obj/item/weapon/gun/energy/gun) strip_delay = 130 + species_fit = list("Drask") + sprite_sheets = list( + "Drask" = 'icons/mob/species/drask/suit.dmi' + ) //Commander /obj/item/clothing/head/helmet/space/hardsuit/ert/commander diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 43962a1d5fd..e7ec4eaffd8 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -347,6 +347,15 @@ var/datum/action/A = X A.UpdateButtonIcon() +/obj/item/clothing/head/helmet/space/hardsuit/syndi/freedom + name = "eagle helmet" + desc = "An advanced, space-proof helmet. It appears to be modeled after an old-world eagle." + icon_state = "griffinhat" + item_state = "griffinhat" + +/obj/item/clothing/head/helmet/space/hardsuit/syndi/freedom/update_icon() + return + /obj/item/clothing/suit/space/hardsuit/syndi name = "blood-red hardsuit" desc = "A dual-mode advanced hardsuit designed for work in special operations. It is in travel mode. Property of Gorlex Marauders." @@ -429,6 +438,16 @@ name = "elite syndicate hardsuit (combat)" desc = "An elite version of the syndicate hardsuit, with improved armour and fire shielding. It is in combat mode. Property of Gorlex Marauders." + +/obj/item/clothing/suit/space/hardsuit/syndi/freedom + name = "eagle suit" + desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be integrated into the suit." + icon_state = "freedom" + item_state = "freedom" + +/obj/item/clothing/suit/space/hardsuit/syndi/freedom/update_icon() + return + //Wizard hardsuit /obj/item/clothing/head/helmet/space/hardsuit/wizard name = "gem-encrusted hardsuit helmet" diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index 60e76418a53..0c4f7f415c0 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -77,7 +77,7 @@ desc = "An armored beret commonly used by special operations officers." icon_state = "beret_officer" armor = list(melee = 65, bullet = 55, laser = 35, energy = 20, bomb = 30, bio = 30, rad = 30) - flags = HEADCOVERSEYES | HEADCOVERSMOUTH | STOPSPRESSUREDMAGE | THICKMATERIAL //idfk + flags = STOPSPRESSUREDMAGE | THICKMATERIAL /obj/item/clothing/suit/space/deathsquad/officer name = "officer jacket" @@ -246,24 +246,3 @@ species_fit = null sprite_sheets = null sprite_sheets_obj = null - -/obj/item/clothing/head/helmet/space/freedom - name = "eagle helmet" - desc = "An advanced, space-proof helmet. It appears to be modeled after an old-world eagle." - icon_state = "griffinhat" - item_state = "griffinhat" - armor = list(melee = 20, bullet = 40, laser = 30, energy = 25, bomb = 100, bio = 100, rad = 100) - max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT - unacidable = 1 - strip_delay = 130 - -/obj/item/clothing/suit/space/freedom - name = "eagle suit" - desc = "An advanced, light suit, fabricated from a mixture of synthetic feathers and space-resistant material. A gun holster appears to be integrated into the suit and the wings appear to be stuck in 'freedom' mode." - icon_state = "freedom" - item_state = "freedom" - allowed = list(/obj/item/weapon/gun,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/weapon/tank) - armor = list(melee = 20, bullet = 40, laser = 30, energy = 25, bomb = 100, bio = 100, rad = 100) - max_heat_protection_temperature = FIRE_IMMUNITY_HELM_MAX_TEMP_PROTECT - unacidable = 1 - strip_delay = 130 diff --git a/code/modules/clothing/under/accessories/armband.dm b/code/modules/clothing/under/accessories/armband.dm index 67d0208b6df..90bcf90ec62 100644 --- a/code/modules/clothing/under/accessories/armband.dm +++ b/code/modules/clothing/under/accessories/armband.dm @@ -5,6 +5,18 @@ item_color = "red" slot = "armband" +/obj/item/clothing/accessory/armband/sec + name = "security armband" + desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and red." + icon_state = "whitered" + item_color = "whitered" + +/obj/item/clothing/accessory/armband/yb + name = "blue-yellow armband" + desc = "A fancy blue and yellow armband!" + icon_state = "solblue" + item_color = "solblue" + /obj/item/clothing/accessory/armband/cargo name = "cargo armband" desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown." diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index ee4592f971e..348a9178721 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -308,8 +308,35 @@ user.update_inv_wear_suit() qdel(src) +/obj/item/device/fluff/fei_gasmask_kit //Fei Hazelwood: Tariq Yon-Dale + name = "gas mask conversion kit" + desc = "A gas mask conversion kit." + icon_state = "modkit" + w_class = WEIGHT_CLASS_SMALL + +/obj/item/device/fluff/fei_gasmask_kit/afterattack(atom/target, mob/user, proximity) + if(!proximity || !ishuman(user) || user.incapacitated()) + return + + if(istype(target, /obj/item/clothing/mask/gas) && !istype(target, /obj/item/clothing/mask/gas/welding)) + to_chat(user, "You modify the appearance of [target].") + var/obj/item/clothing/mask/gas/M = target + M.name = "Prescription Gas Mask" + M.desc = "It looks heavily modified, but otherwise functions as a gas mask. The words “Property of Yon-Dale” can be seen on the inner band." + M.icon = 'icons/obj/custom_items.dmi' + M.icon_state = "gas_tariq" + M.species_fit = list("Vulpkanin") + M.sprite_sheets = list( + "Vulpkanin" = 'icons/mob/species/vulpkanin/mask.dmi' + ) + user.update_icons() + qdel(src) + return + + to_chat(user, "You can't modify [target]!") + /obj/item/device/fluff/desolate_baton_kit //DesolateG: Michael Smith - name = "stun baton converstion kit" + name = "stun baton conversion kit" desc = "Some sci-fi looking parts for a stun baton." icon = 'icons/obj/custom_items.dmi' icon_state = "scifikit" @@ -742,6 +769,17 @@ species_fit = null sprite_sheets = null +/obj/item/clothing/suit/jacket/fluff/jacksvest // Anxipal: Jack Harper + name = "Jack's vest" + desc = "A rugged leather vest with a tag labelled \"President\"." + icon = 'icons/obj/custom_items.dmi' + icon_state = "jacksvest" + ignore_suitadjust = TRUE + actions_types = list() + adjust_flavour = null + species_fit = null + sprite_sheets = null + /obj/item/clothing/suit/fluff/kluys // Kluys: Cripty Pandaen name = "Nano Fibre Jacket" desc = "A Black Suit made out of nanofibre. The newest of cyberpunk fashion using hightech liquid to solid materials." @@ -1157,6 +1195,26 @@ return 1 ..() +/obj/item/fluff/zekemirror //phantasmicdream : Zeke Varloss + name = "engraved hand mirror" + desc = "A very classy hand mirror, with fancy detailing." + icon = 'icons/obj/custom_items.dmi' + icon_state = "hand_mirror" + attack_verb = list("smacked") + hitsound = 'sound/weapons/tap.ogg' + force = 0 + throwforce = 0 + w_class = WEIGHT_CLASS_SMALL + +/obj/item/fluff/zekemirror/attack_self(mob/user) + var/mob/living/carbon/human/target = user + if(!istype(target) || target.get_species() != "Skrell") // It'd be strange to see other races with head tendrils. + return + + if(target.change_hair("Zekes Tentacles", 1)) + to_chat(target, "You take time to admire yourself in [src], brushing your tendrils down and revealing their true length.") + + /obj/item/clothing/accessory/necklace/locket/fluff/fethasnecklace //Fethas: Sefra'neem name = "Orange gemmed locket" desc = "A locket with a orange gem set on the front, the picture inside seems to be of a Tajaran." @@ -1174,4 +1232,4 @@ righthand_file = 'icons/mob/inhands/fluff_righthand.dmi' icon_state = "sheetcosmos" item_state = "sheetcosmos" - item_color = "sheetcosmos" + item_color = "sheetcosmos" \ No newline at end of file diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index ed8b8d52ccd..288fbe3f809 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -1,12 +1,10 @@ /datum/event/alien_infestation announceWhen = 400 - var/spawncount = 1 + var/spawncount = 2 var/successSpawn = 0 //So we don't make a command report if nothing gets spawned. /datum/event/alien_infestation/setup() announceWhen = rand(announceWhen, announceWhen + 50) - if(prob(50)) - spawncount++ /datum/event/alien_infestation/announce() if(successSpawn) diff --git a/code/modules/events/vent_clog.dm b/code/modules/events/vent_clog.dm index 137ffc83183..ae6794d5e8d 100644 --- a/code/modules/events/vent_clog.dm +++ b/code/modules/events/vent_clog.dm @@ -22,8 +22,8 @@ var/list/gunk = list("water","carbon","flour","radium","toxin","cleaner","nutriment","condensedcapsaicin","psilocybin","lube", "atrazine","banana","charcoal","space_drugs","methamphetamine","holywater","ethanol","hot_coco","facid", "blood","morphine","ether","fluorine","mutadone","mutagen","hydrocodone","fuel", - "haloperidol","lsd","nanites","lipolicide","frostoil","salglu_solution","beepskysmash", - "omnizine", "amanitin", "adminordrazine", "neurotoxin", "synaptizine") + "haloperidol","lsd","syndicate_nanites","lipolicide","frostoil","salglu_solution","beepskysmash", + "omnizine", "amanitin", "neurotoxin", "synaptizine") var/datum/reagents/R = new/datum/reagents(50) R.my_atom = vent R.add_reagent(pick(gunk), 50) diff --git a/code/modules/fancytitle/fancytitle.dm b/code/modules/fancytitle/fancytitle.dm index e445024aae1..e85f1f59ec5 100644 --- a/code/modules/fancytitle/fancytitle.dm +++ b/code/modules/fancytitle/fancytitle.dm @@ -11,7 +11,7 @@ else if(L.len > 1) if(use_rare_screens && lowertext(L[1]) == "rare") title_screens += S - else if(lowertext(L[1]) == lowertext(MAP_NAME)) + else if(using_map && (lowertext(L[1]) == lowertext(using_map.name))) title_screens += S if(!isemptylist(title_screens)) diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 7b97e22f142..87d92615be0 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -286,7 +286,7 @@ drink_container.desc = "[recipe_to_use.description]" flick("bottler_on", src) spawn(45) - QDEL_LIST_ASSOC_VAL(slots) + resetSlots() bottling = 0 drink_container.forceMove(loc) updateUsrDialog() @@ -405,3 +405,7 @@ icon_state = "bottler_on" else icon_state = "bottler_off" + +/obj/machinery/bottler/proc/resetSlots() + QDEL_LIST_ASSOC_VAL(slots) + slots.len = 3 \ No newline at end of file diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 394bce27908..5643185bfb5 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -24,7 +24,7 @@ if(!reagents.total_volume) if(M == user) to_chat(user, "You finish eating \the [src].") - user.visible_message("[user] finishes eating \the [src].") + user.visible_message("[M] finishes eating \the [src].") user.unEquip(src) //so icons update :[ Post_Consume(M) var/obj/item/trash_item = generate_trash(usr) diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 329e39011eb..e1cf097e9d0 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -270,7 +270,7 @@ result = /obj/item/weapon/reagent_containers/food/snacks/bigbiteburger /datum/recipe/microwave/enchiladas - items = list(/obj/item/weapon/reagent_containers/food/snacks/cutlet, /obj/item/weapon/reagent_containers/food/snacks/grown/chili, /obj/item/weapon/reagent_containers/food/snacks/grown/corn) + items = list(/obj/item/weapon/reagent_containers/food/snacks/cutlet, /obj/item/weapon/reagent_containers/food/snacks/grown/chili, /obj/item/weapon/reagent_containers/food/snacks/grown/chili, /obj/item/weapon/reagent_containers/food/snacks/grown/corn) result = /obj/item/weapon/reagent_containers/food/snacks/enchiladas /datum/recipe/microwave/burrito diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index 7bfa00d35c3..3b21cef533e 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -71,8 +71,7 @@ var/datum/reagent/R = null if(random_reagent) - R = pick(subtypesof(/datum/reagent)) - R = chemical_reagents_list[initial(R.id)] + R = get_random_reagent_id() queen_bee = new(src) queen_bee.beehome = src @@ -89,13 +88,12 @@ B.beehome = src B.assign_reagent(R) - /obj/structure/beebox/premade/random random_reagent = TRUE /obj/structure/beebox/process() - if(queen_bee) + if(queen_bee && (!queen_bee.beegent || !queen_bee.beegent.can_synth)) if(bee_resources >= BEE_RESOURCE_HONEYCOMB_COST) if(honeycombs.len < get_max_honeycomb()) bee_resources = max(bee_resources-BEE_RESOURCE_HONEYCOMB_COST, 0) @@ -172,11 +170,13 @@ var/obj/item/queen_bee/qb = I user.unEquip(qb) - - qb.queen.forceMove(src) - bees += qb.queen - queen_bee = qb.queen - qb.queen = null + if(!qb.queen.beegent || (qb.queen.beegent && qb.queen.beegent.can_synth)) + qb.queen.forceMove(src) + bees += qb.queen + queen_bee = qb.queen + qb.queen = null + else + visible_message("The [qb] refuses to settle down. Maybe it's something to do with its reagent?") if(queen_bee) visible_message("[user] sets [qb] down inside the apiary, making it their new home.") diff --git a/code/modules/map_fluff/cyberiad.dm b/code/modules/map_fluff/cyberiad.dm new file mode 100644 index 00000000000..e0865f6fb1d --- /dev/null +++ b/code/modules/map_fluff/cyberiad.dm @@ -0,0 +1,10 @@ +/datum/map/cyberiad + name = "Cyberiad" + full_name = "NSS Cyberiad" + + station_name = "NSS Cyberiad" + station_short = "Cyberiad" + dock_name = "NAS Trurl" + company_name = "Nanotrasen" + company_short = "NT" + starsys_name = "Epsilon Eridani " diff --git a/code/modules/map_fluff/maps.dm b/code/modules/map_fluff/maps.dm new file mode 100644 index 00000000000..638baffde73 --- /dev/null +++ b/code/modules/map_fluff/maps.dm @@ -0,0 +1,12 @@ +var/datum/map/using_map = new USING_MAP_DATUM + +/datum/map + var/name = "Unnamed Map" + var/full_name = "Unnamed Map" + + var/station_name = "BAD Station" + var/station_short = "Baddy" + var/dock_name = "THE PirateBay" + var/company_name = "BadMan" + var/company_short = "BM" + var/starsys_name = "Dull Star" \ No newline at end of file diff --git a/code/modules/map_fluff/metastation.dm b/code/modules/map_fluff/metastation.dm new file mode 100644 index 00000000000..a8714b5cb19 --- /dev/null +++ b/code/modules/map_fluff/metastation.dm @@ -0,0 +1,10 @@ +/datum/map/metastation + name = "MetaStation" + full_name = "NSS Cerebron" + + station_name = "NSS Cerebron" + station_short = "Cerebron" + dock_name = "NAS Trurl" + company_name = "Nanotrasen" + company_short = "NT" + starsys_name = "Epsilon Eridani " diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index e1a577e24fa..1a3bba05140 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -151,6 +151,7 @@ datum/martial_art/krav_maga/grab_act(var/mob/living/carbon/human/A, var/mob/livi /obj/item/clothing/gloves/color/black/krav_maga var/datum/martial_art/krav_maga/style = new + can_be_cut = FALSE /obj/item/clothing/gloves/color/black/krav_maga/equipped(mob/user, slot) if(!ishuman(user)) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index f73236d9720..6e665091e49 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -289,9 +289,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp switch(data_hud_seen) //give new huds if(0) - show_me_the_hud(DATA_HUD_SECURITY_BASIC) + show_me_the_hud(DATA_HUD_SECURITY_ADVANCED) to_chat(src, "Security HUD set.") - if(DATA_HUD_SECURITY_BASIC) + if(DATA_HUD_SECURITY_ADVANCED) show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED) to_chat(src, "Medical HUD set.") if(DATA_HUD_MEDICAL_ADVANCED) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 57d0d0814cc..2935e70036b 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -14,6 +14,8 @@ var/custom_pixel_x_offset = 0 //for admin fuckery. var/custom_pixel_y_offset = 0 pass_flags = PASSTABLE + pressure_resistance = 100 //100 kPa difference required to push + throw_pressure_limit = 120 //120 kPa difference required to throw //This is fine right now, if we're adding organ specific damage this needs to be updated /mob/living/carbon/alien/humanoid/New() diff --git a/code/modules/mob/living/carbon/alien/special/facehugger.dm b/code/modules/mob/living/carbon/alien/special/facehugger.dm index 498a2afb8b0..5294e3bda91 100644 --- a/code/modules/mob/living/carbon/alien/special/facehugger.dm +++ b/code/modules/mob/living/carbon/alien/special/facehugger.dm @@ -135,6 +135,11 @@ var/const/MAX_ACTIVE_TIME = 400 if(target.wear_mask) if(prob(20)) return 0 + if(istype(target.wear_mask, /obj/item/clothing/mask/muzzle)) + var/obj/item/clothing/mask/muzzle/S = target.wear_mask + if(S.do_break()) + target.visible_message("[src] spits acid onto [S] melting the lock!", \ + "[src] spits acid onto [S] melting the lock!") var/obj/item/clothing/W = target.wear_mask if(W.flags & NODROP) return 0 @@ -149,7 +154,10 @@ var/const/MAX_ACTIVE_TIME = 400 M.Paralyse(MAX_IMPREGNATION_TIME/6) //something like 25 ticks = 20 seconds with the default settings else if(iscorgi(M)) var/mob/living/simple_animal/pet/corgi/C = M - loc = C + if(C.facehugger) + var/obj/item/F = C.facehugger + F.forceMove(C.loc) + forceMove(C) C.facehugger = src C.regenerate_icons() @@ -161,7 +169,7 @@ var/const/MAX_ACTIVE_TIME = 400 return 1 /obj/item/clothing/mask/facehugger/proc/Impregnate(mob/living/target as mob) - if(!target || target.stat == DEAD) //was taken off or something + if(!target || target.stat == DEAD || loc != target) //was taken off or something return if(iscarbon(target)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index faea4763f0b..5cf6df7fe60 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -625,6 +625,13 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump, dat += " Mask: | [(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Empty"] | | ||||||||||||||||||||||||
| Handcuffed: Remove | ||||||||||||||||||||||||||
| Mask: | Obscured | |||||||||||||||||||||||||
| Mask: | [(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Empty"] | |||||||||||||||||||||||||
| Mask: | [(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "Empty"]" + + if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) + var/obj/item/clothing/mask/muzzle/M = wear_mask + if(M.security_lock) + dat += " [M.locked ? "Disable Lock" : "Set Lock"]" + + dat += " | |||||||||||||||||||||||||
| Collar: | [(collar && !(collar.flags&ABSTRACT)) ? collar : "Empty"] | |||||||||||||||||||||||||
| Facehugger: | [facehugger] |
| t |
| t |