Merge remote-tracking branch 'ParadiseSS13/master' into id_computer_demote_terminate_freejob

This commit is contained in:
Kyep
2020-08-01 17:39:30 -07:00
1235 changed files with 71688 additions and 375044 deletions
+7 -7
View File
@@ -11,7 +11,7 @@
/atom/movable/attack_hand(mob/living/user)
. = ..()
if(can_buckle && has_buckled_mobs())
if(buckled_mobs.len > 1)
if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return TRUE
@@ -26,15 +26,12 @@
return TRUE
/atom/movable/proc/has_buckled_mobs()
if(!buckled_mobs)
return FALSE
if(buckled_mobs.len)
return TRUE
return length(buckled_mobs)
/atom/movable/attack_robot(mob/living/user)
. = ..()
if(can_buckle && has_buckled_mobs() && Adjacent(user)) // attack_robot is called on all ranges, so the Adjacent check is needed
if(buckled_mobs.len > 1)
if(length(buckled_mobs) > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?", "Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return TRUE
@@ -54,7 +51,7 @@
if(check_loc && M.loc != loc)
return FALSE
if((!can_buckle && !force) || M.buckled || (buckled_mobs.len >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
if((!can_buckle && !force) || M.buckled || (length(buckled_mobs) >= max_buckled_mobs) || (buckle_requires_restraints && !M.restrained()) || M == src)
return FALSE
M.buckling = src
if(!M.can_buckle() && !force)
@@ -69,6 +66,9 @@
if(buckle_prevents_pull)
M.pulledby.stop_pulling()
for(var/obj/item/grab/G in M.grabbed_by)
qdel(G)
if(!check_loc && M.loc != loc)
M.forceMove(loc)
@@ -86,7 +86,7 @@ GLOBAL_LIST_EMPTY(splatter_cache)
user.blood_DNA |= blood_DNA.Copy()
user.bloody_hands += taken
user.hand_blood_color = basecolor
user.update_inv_gloves(1)
user.update_inv_gloves()
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
/obj/effect/decal/cleanable/blood/can_bloodcrawl_in()
@@ -28,6 +28,12 @@
icon_state = "remainsrobot"
anchored = TRUE
/obj/effect/decal/remains/robot/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["glass"] += 2
C.stored_comms["metal"] += 3
qdel(src)
return TRUE
/obj/effect/decal/remains/slime
name = "You shouldn't see this"
desc = "Noooooooooooooooooooooo"
+1 -1
View File
@@ -1134,7 +1134,7 @@ would spawn and follow the beaker, even if it is carried or thrown.
qdel(src)
/obj/structure/foamedmetal/attack_alien(mob/living/carbon/alien/humanoid/M)
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>");
M.visible_message("<span class='danger'>[M] tears apart \the [src]!</span>")
qdel(src)
/obj/structure/foamedmetal/CanPass(atom/movable/mover, turf/target, height=1.5)
@@ -49,6 +49,8 @@ would spawn and follow the beaker, even if it is carried or thrown.
holder = atom
/datum/effect_system/proc/start()
if(QDELETED(src))
return
for(var/i in 1 to number)
if(total_effects > 20)
return
@@ -68,7 +70,8 @@ would spawn and follow the beaker, even if it is carried or thrown.
for(var/j in 1 to steps_amt)
sleep(5)
step(E,direction)
addtimer(CALLBACK(src, .proc/decrement_total_effect), 20)
if(!QDELETED(src))
addtimer(CALLBACK(src, .proc/decrement_total_effect), 20)
/datum/effect_system/proc/decrement_total_effect()
total_effects--
+2 -1
View File
@@ -10,7 +10,8 @@
/obj/effect/manifest/proc/manifest()
var/dat = "<B>Crew Manifest</B>:<BR>"
for(var/mob/living/carbon/human/M in GLOB.mob_list)
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/M = thing
dat += text(" <B>[]</B> - []<BR>", M.name, M.get_assignment())
var/obj/item/paper/P = new /obj/item/paper( src.loc )
P.info = dat
+1 -1
View File
@@ -88,7 +88,7 @@
name = "horrific experiment"
desc = "Some sort of pod filled with blood and vicerea. You swear you can see it moving..."
icon = 'icons/obj/cloning.dmi'
icon_state = "pod_g"
icon_state = "pod_mess"
//Makes a tile fully lit no matter what
@@ -7,6 +7,7 @@
var/list/loot //a list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
/obj/effect/spawner/lootdrop/New()
..()
if(loot && loot.len)
for(var/i = lootcount, i > 0, i--)
if(!loot.len) break
@@ -15,7 +16,7 @@
loot.Remove(lootspawn)
if(lootspawn)
new lootspawn(get_turf(src))
new lootspawn(loc)
qdel(src)
/obj/effect/spawner/lootdrop/armory_contraband
@@ -21,6 +21,7 @@
if(i == lowBoundX || i == hiBoundX || j == lowBoundY || j == hiBoundY)
new /turf/simulated/wall/vault(locate(i,j,z),type)
else
new /turf/simulated/floor/vault(locate(i,j,z),type)
var/turf/T = new /turf/simulated/floor/vault(locate(i, j, z))
T.icon_state = "[type]vault"
qdel(src)
+11
View File
@@ -98,6 +98,7 @@
pixel_x = rand(6,-6)
pixel_y = rand(6,-6)
START_PROCESSING(SSobj, src)
AddComponent(/datum/component/swarming)
/obj/structure/spider/spiderling/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -189,6 +190,16 @@
to_chat(S, "<span class='biggerdanger'>You are a spider who is loyal to [S.master_commander], obey [S.master_commander]'s every order and assist [S.master_commander.p_them()] in completing [S.master_commander.p_their()] goals at any cost.</span>")
qdel(src)
/obj/structure/spider/spiderling/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(!istype(user, /mob/living/silicon/robot/drone))
user.visible_message("<span class='notice'>[user] sucks [src] into its decompiler. There's a horrible crunching noise.</span>", \
"<span class='warning'>It's a bit of a struggle, but you manage to suck [user] into your decompiler. It makes a series of visceral crunching noises.</span>")
C.stored_comms["wood"] += 2
C.stored_comms["glass"] += 2
qdel(src)
return TRUE
return ..()
/obj/effect/decal/cleanable/spiderling_remains
name = "spiderling remains"
desc = "Green squishy mess."
+1 -1
View File
@@ -51,7 +51,7 @@
var/list/affecting = list()
/obj/effect/step_trigger/thrower/Trigger(atom/A)
if(!A || !ismovableatom(A))
if(!A || !ismovable(A))
return
var/atom/movable/AM = A
var/curtiles = 0
+2 -2
View File
@@ -88,7 +88,7 @@
var/turf/T = A
if(!T)
continue
var/dist = hypotenuse(T.x, T.y, x0, y0)
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
if(config.reactionary_explosions)
var/turf/Trajectory = T
@@ -209,7 +209,7 @@
var/list/wipe_colours = list()
for(var/turf/T in spiral_range_turfs(max_range, epicenter))
wipe_colours += T
var/dist = hypotenuse(T.x, T.y, x0, y0)
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
if(newmode == "Yes")
var/turf/TT = T
+4 -22
View File
@@ -19,6 +19,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
can_be_hit = FALSE
suicidal_hands = TRUE
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/hitsound = null
var/usesound = null
var/throwhitsound
@@ -98,15 +99,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
var/trip_verb = TV_TRIP
var/trip_chance = 0
var/trip_stun = 0
var/trip_weaken = 0
var/trip_any = FALSE
var/trip_walksafe = TRUE
var/trip_tiles = 0
//Tooltip vars
var/in_inventory = FALSE //is this item equipped into an inventory slot or hand of a mob?
var/tip_timer = 0
@@ -133,10 +125,10 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
return ..()
/obj/item/proc/check_allowed_items(atom/target, not_inside, target_self)
if(((src in target) && !target_self) || ((!istype(target.loc, /turf)) && (!istype(target, /turf)) && (not_inside)))
return 0
if(((src in target) && !target_self) || (!isturf(target.loc) && !isturf(target) && not_inside))
return FALSE
else
return 1
return TRUE
/obj/item/blob_act(obj/structure/blob/B)
if(B && B.loc == loc)
@@ -606,16 +598,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
/obj/item/proc/is_equivalent(obj/item/I)
return I == src
/obj/item/Crossed(atom/movable/AM, oldloc)
. = ..()
if(prob(trip_chance) && ishuman(AM))
var/mob/living/carbon/human/H = AM
on_trip(H)
/obj/item/proc/on_trip(mob/living/carbon/human/H)
if(H.slip(src, trip_stun, trip_weaken, trip_tiles, trip_walksafe, trip_any, trip_verb))
return TRUE
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
return
+2 -2
View File
@@ -56,7 +56,7 @@
desc = "Huh."
allow_wrap = FALSE
/obj/item/storage/pill_bottle/random_drug_bottle/New()
..()
/obj/item/storage/pill_bottle/random_drug_bottle/Initialize(mapload)
. = ..()
for(var/i in 1 to 5)
new /obj/item/reagent_containers/food/pill/random_drugs(src)
@@ -0,0 +1,81 @@
// Airlock painter
/obj/item/airlock_painter
name = "airlock painter"
desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on a completed airlock to change its paintjob."
icon = 'icons/obj/device.dmi'
icon_state = "airlock_painter"
item_state = "airlock_painter"
flags = CONDUCT | NOBLUDGEON
usesound = 'sound/effects/spray2.ogg'
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
materials = list(MAT_METAL = 3000, MAT_GLASS = 1000)
var/paint_setting
// All the different paint jobs that an airlock painter can apply.
// If the airlock you're using it on is glass, the new paint job will also be glass
var/list/available_paint_jobs = list(
"Atmospherics" = /obj/machinery/door/airlock/atmos,
"Command" = /obj/machinery/door/airlock/command,
"Engineering" = /obj/machinery/door/airlock/engineering,
"External" = /obj/machinery/door/airlock/external,
"External Maintenance"= /obj/machinery/door/airlock/maintenance/external,
"Freezer" = /obj/machinery/door/airlock/freezer,
"Maintenance" = /obj/machinery/door/airlock/maintenance,
"Medical" = /obj/machinery/door/airlock/medical,
"Mining" = /obj/machinery/door/airlock/mining,
"Public" = /obj/machinery/door/airlock/public,
"Research" = /obj/machinery/door/airlock/research,
"Science" = /obj/machinery/door/airlock/science,
"Security" = /obj/machinery/door/airlock/security,
"Standard" = /obj/machinery/door/airlock,
)
//Only call this if you are certain that the painter will be used right after this check!
/obj/item/airlock_painter/proc/paint(mob/user)
playsound(loc, usesound, 30, TRUE)
return TRUE
/obj/item/airlock_painter/attack_self(mob/user)
paint_setting = input(user, "Please select a paintjob for this airlock.") as null|anything in available_paint_jobs
if(!paint_setting)
return
to_chat(user, "<span class='notice'>The [paint_setting] paint setting has been selected.</span>")
/obj/item/airlock_painter/suicide_act(mob/user)
var/obj/item/organ/internal/lungs/L = user.get_organ_slot("lungs")
var/lungs_name = "\improper[L.name]"
if(L)
user.visible_message("<span class='suicide'>[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
// Once you've inhaled the toner, you throw up your lungs
// and then die.
// they managed to lose their lungs between then and now. Good job.
if(!L)
return FALSE
L.remove(user)
// make some colorful reagent, and apply it to the lungs
L.create_reagents(10)
L.reagents.add_reagent("colorful_reagent", 10)
L.reagents.reaction(L, REAGENT_TOUCH, 1)
user.emote("scream")
user.visible_message("<span class='suicide'>[user] vomits out [user.p_their()] [lungs_name]!</span>")
playsound(user.loc, 'sound/effects/splat.ogg', 50, TRUE)
// make some vomit under the player, and apply colorful reagent
var/obj/effect/decal/cleanable/vomit/V = new(get_turf(user))
V.create_reagents(10)
V.reagents.add_reagent("colorful_reagent", 10)
V.reagents.reaction(V, REAGENT_TOUCH, 1)
L.forceMove(get_turf(user))
return OXYLOSS
else
return SHAME
+10 -12
View File
@@ -54,21 +54,21 @@
user.set_machine(src)
interact(user)
/obj/item/camera_bug/check_eye(var/mob/user as mob)
if(user.stat || loc != user || !user.canmove || !user.has_vision() || !current)
user.reset_perspective(null)
/obj/item/camera_bug/check_eye(mob/user)
if(loc != user || user.incapacitated() || !user.has_vision() || !current)
user.unset_machine()
return null
var/turf/T = get_turf(user.loc)
if(T.z != current.z || !current.can_use())
return FALSE
var/turf/T_user = get_turf(user.loc)
var/turf/T_current = get_turf(current)
if(!atoms_share_level(T_user, T_current) || !current.can_use())
to_chat(user, "<span class='danger'>[src] has lost the signal.</span>")
current = null
user.reset_perspective(null)
user.unset_machine()
return null
return FALSE
return TRUE
return 1
/obj/item/camera_bug/on_unset_machine(mob/user)
user.reset_perspective(null)
/obj/item/camera_bug/proc/get_cameras()
if(world.time > (last_net_update + 100))
@@ -182,7 +182,6 @@
/obj/item/camera_bug/Topic(var/href,var/list/href_list)
if(usr != loc)
usr.unset_machine()
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
usr.set_machine(src)
@@ -233,7 +232,6 @@
interact()
else
usr.unset_machine()
usr.reset_perspective(null)
usr << browse(null, "window=camerabug")
return
else
@@ -241,6 +241,7 @@
user.base_icon = disguise
user.icon_state = disguise
user.cham_proj = src
user.bubble_icon = "robot"
active = TRUE
user.update_icons()
@@ -249,6 +250,7 @@
S = user
user.base_icon = initial(user.base_icon)
user.icon_state = initial(user.icon_state)
user.bubble_icon = "syndibot"
active = FALSE
user.update_icons()
@@ -76,7 +76,7 @@
new G(T) //Spawns the switch-selected engine on the chosen beacon's turf
var/ailist[] = list()
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.alive_mob_list)
ailist += A
if(ailist.len)
var/mob/living/silicon/ai/announcer = pick(ailist)
+7 -16
View File
@@ -67,20 +67,22 @@
times_used = max(0, times_used) //sanity
/obj/item/flash/proc/try_use_flash(var/mob/user = null)
/obj/item/flash/proc/try_use_flash(mob/user = null)
flash_recharge(user)
if(broken)
return 0
return FALSE
playsound(src.loc, use_sound, 100, 1)
playsound(loc, use_sound, 100, 1)
flick("[initial(icon_state)]2", src)
set_light(2, 1, COLOR_WHITE)
addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2)
times_used++
if(user && !clown_check(user))
return 0
return FALSE
return 1
return TRUE
/obj/item/flash/proc/flash_carbon(var/mob/living/carbon/M, var/mob/user = null, var/power = 5, targeted = 1)
@@ -111,7 +113,6 @@
/obj/item/flash/attack(mob/living/M, mob/user)
if(!try_use_flash(user))
return 0
if(iscarbon(M))
flash_carbon(M, user, 5, 1)
if(overcharged)
@@ -119,22 +120,12 @@
M.IgniteMob()
burn_out()
return 1
else if(issilicon(M))
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.module) // Perhaps they didn't choose a module yet
for(var/obj/item/borg/combat/shield/S in R.module.modules)
if(R.activated(S))
add_attack_logs(user, M, "Flashed with [src]")
user.visible_message("<span class='disarm'>[user] tries to overloads [M]'s sensors with the [src.name], but is blocked by [M]'s shield!</span>", "<span class='danger'>You try to overload [M]'s sensors with the [src.name], but are blocked by [M.p_their()] shield!</span>")
return 1
add_attack_logs(user, M, "Flashed with [src]")
if(M.flash_eyes(affect_silicon = 1))
M.Weaken(rand(5,10))
user.visible_message("<span class='disarm'>[user] overloads [M]'s sensors with the [src.name]!</span>", "<span class='danger'>You overload [M]'s sensors with the [src.name]!</span>")
return 1
user.visible_message("<span class='disarm'>[user] fails to blind [M] with the [src.name]!</span>", "<span class='warning'>You fail to blind [M] with the [src.name]!</span>")
@@ -74,7 +74,7 @@
if(istype(H)) //robots and aliens are unaffected
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
if(M.stat == DEAD || !eyes || (BLINDNESS in M.mutations)) //mob is dead or fully blind
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
@@ -167,7 +167,7 @@
// Negative numbers will subtract
/obj/item/lightreplacer/proc/AddUses(amount = 1)
uses = Clamp(uses + amount, 0, max_uses)
uses = clamp(uses + amount, 0, max_uses)
/obj/item/lightreplacer/proc/AddShards(amount = 1, user)
bulb_shards += amount
@@ -33,8 +33,6 @@
if(H && H.mind && H.mind.miming)
to_chat(user, "<span class='warning'>Your vow of silence prevents you from speaking.</span>")
return
if(H.mind)
span = H.mind.speech_span
if((COMIC in H.mutations) || H.get_int_organ(/obj/item/organ/internal/cyberimp/brain/clown_voice))
span = "sans"
if(spamcheck)
@@ -27,7 +27,7 @@
desc = "A box suited for pizzas."
icon_state = "pizzabox1"
return
timer = Clamp(timer, 10, 100)
timer = clamp(timer, 10, 100)
icon_state = "pizzabox1"
to_chat(user, "<span class='notice'>You set the timer to [timer / 10] before activating the payload and closing \the [src].")
message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[loc.x];Y=[loc.y];Z=[loc.z]'>(JMP)</a>.")
@@ -52,7 +52,7 @@
if(disarmed)
visible_message("<span class='danger'>[bicon(src)] Sparks briefly jump out of the [correct_wire] wire on \the [src], but it's disarmed!")
return
src.audible_message("[bicon(src)] <b>[src]</b> beeps, \"Enjoy the pizza!\"")
atom_say("Enjoy the pizza!")
src.visible_message("<span class='userdanger'>\The [src] violently explodes!</span>")
explosion(src.loc,1,2,4,flame_range = 2) //Identical to a minibomb
qdel(src)
@@ -65,7 +65,7 @@
else if(href_list["code"])
code += text2num(href_list["code"])
code = round(code)
code = Clamp(code, 1, 100)
code = clamp(code, 1, 100)
else if(href_list["power"])
on = !on
@@ -46,16 +46,15 @@
name = "station intercom (Security)"
frequency = SEC_I_FREQ
/obj/item/radio/intercom/New(turf/loc, ndir, building = 3)
..()
/obj/item/radio/intercom/New(turf/loc, direction, building = 3)
. = ..()
buildstage = building
if(buildstage)
START_PROCESSING(SSobj, src)
else
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH) ? (ndir == NORTH ? 28 : -28) : 0
dir=ndir
if(direction)
setDir(direction)
set_pixel_offsets_from_dir(28, -28, 28, -28)
b_stat=1
on = 0
GLOB.global_intercoms.Add(src)
@@ -204,7 +203,7 @@
STOP_PROCESSING(SSobj, src)
/obj/item/radio/intercom/welder_act(mob/user, obj/item/I)
if(!buildstage)
if(buildstage != 0)
return
. = TRUE
if(!I.tool_use_check(user, 3))
@@ -226,7 +226,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
channels[chan_name] |= FREQ_LISTENING
. = 1
else if(href_list["spec_freq"])
var freq = href_list["spec_freq"]
var/freq = href_list["spec_freq"]
if(has_channel_access(usr, freq))
set_frequency(text2num(freq))
. = 1
@@ -272,7 +272,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
tcm.sender_job = "Automated Announcement"
tcm.vname = "synthesized voice"
tcm.data = SIGNALTYPE_AINOTRACK
// Datum radios dont have a location (obviously
// Datum radios dont have a location (obviously)
if(loc && loc.z)
tcm.source_level = loc.z // For anyone that reads this: This used to pull from a LIST from the CONFIG DATUM. WHYYYYYYYYY!!!!!!!! -aa
else
@@ -295,7 +295,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
universal_speak = 1
/mob/living/automatedannouncer/New()
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), SecondsToTicks(10), TIMER_STOPPABLE)
lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), 10 SECONDS, TIMER_STOPPABLE)
..()
/mob/living/automatedannouncer/Destroy()
@@ -440,10 +440,11 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
if(!instant)
// Simulate two seconds of lag
addtimer(CALLBACK(GLOBAL_PROC, .proc/broadcast_message, tcm), 20)
QDEL_IN(tcm, 20)
else
// Nukeops + Deathsquad headsets are instant and should work the same, whether there is comms or not
broadcast_message(tcm)
qdel(tcm) // Delete the message datum
qdel(tcm) // Delete the message datum
return TRUE
// If we didnt get here, oh fuck
@@ -622,6 +623,9 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
..()
set_frequency(ERT_FREQ)
/obj/item/radio/borg/ert/specops
keyslot = new /obj/item/encryptionkey/centcom
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/encryptionkey/))
user.set_machine(src)
+4 -4
View File
@@ -141,7 +141,7 @@ REAGENT SCANNER
// Used by the PDA medical scanner too
/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
if(!ishuman(M) || M.isSynthetic())
if(!ishuman(M) || ismachineperson(M))
//these sensors are designed for organic life
to_chat(user, "<span class='notice'>Analyzing Results for ERROR:\n\t Overall Status: ERROR</span>")
to_chat(user, "\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>")
@@ -859,11 +859,11 @@ REAGENT SCANNER
dat += "<td>[i.name]</td><td>N/A</td><td>[i.damage]</td><td>[infection]:[mech]</td><td></td>"
dat += "</tr>"
dat += "</table>"
if(target.disabilities & BLIND)
if(BLINDNESS in target.mutations)
dat += "<font color='red'>Cataracts detected.</font><BR>"
if(target.disabilities & COLOURBLIND)
if(COLOURBLIND in target.mutations)
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><BR>"
if(target.disabilities & NEARSIGHTED)
if(NEARSIGHTED in target.mutations)
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
return dat
@@ -6,7 +6,7 @@
w_class = WEIGHT_CLASS_SMALL
slot_flags = SLOT_BELT
origin_tech = "programming=3;materials=3;magnets=3"
var/datum/nano_module/crew_monitor/crew_monitor
var/datum/tgui_module/crew_monitor/crew_monitor
/obj/item/sensor_device/New()
..()
@@ -17,7 +17,7 @@
return ..()
/obj/item/sensor_device/attack_self(mob/user as mob)
ui_interact(user)
tgui_interact(user)
/obj/item/sensor_device/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
crew_monitor.ui_interact(user, ui_key, ui, force_open)
/obj/item/sensor_device/tgui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/tgui_state/state = GLOB.tgui_default_state)
crew_monitor.tgui_interact(user, ui_key, ui, force_open)
@@ -131,7 +131,6 @@ GLOBAL_LIST_EMPTY(world_uplinks)
else
var/datum/uplink_item/UI = ItemsReference[href_list["buy_item"]]
return buy(UI, UI ? UI.reference : "")
return 0
/obj/item/uplink/proc/buy(var/datum/uplink_item/UI, var/reference)
if(!UI)
+1 -1
View File
@@ -118,7 +118,7 @@
/obj/item/mixing_bowl/Topic(href, href_list)
if(..())
return
if("dispose")
if(href_list["dispose"])
dispose()
return
@@ -6,5 +6,5 @@
mount_reqs = list("simfloor", "nospace")
/obj/item/mounted/frame/firealarm/do_build(turf/on_wall, mob/user)
new /obj/machinery/firealarm(get_turf(src), get_dir(on_wall, user), 1)
new /obj/machinery/firealarm(get_turf(src), get_dir(user, on_wall), 1)
qdel(src)
+14 -14
View File
@@ -253,7 +253,16 @@
to_chat(user, "<span class='warning'>This [W] does not seem to fit.</span>")
return
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1)
var/datum/ai_laws/laws_to_give
if(M.syndiemmi)
aisync = FALSE
lawsync = FALSE
laws_to_give = new /datum/ai_laws/syndicate_override
if(!aisync)
lawsync = FALSE
var/mob/living/silicon/robot/O = new /mob/living/silicon/robot(get_turf(loc), unfinished = 1, ai_to_sync_to = forced_ai)
if(!O)
return
@@ -263,24 +272,15 @@
if(istype(task))
task.unit_completed()
if(M.syndiemmi)
aisync = 0
lawsync = 0
O.laws = new /datum/ai_laws/syndicate_override
O.invisibility = 0
//Transfer debug settings to new mob
O.custom_name = created_name
O.rename_character(O.real_name, O.get_default_name())
O.locked = panel_locked
if(!aisync)
lawsync = 0
O.connected_ai = null
else
O.notify_ai(1)
if(forced_ai)
O.connected_ai = forced_ai
if(!lawsync && !M.syndiemmi)
if(laws_to_give)
O.laws = laws_to_give
else if(!lawsync)
O.lawupdate = 0
O.make_laws()
+37 -26
View File
@@ -9,23 +9,23 @@
origin_tech = "programming=2"
var/locked = 0
var/installed = 0
var/require_module = 0
var/require_module = FALSE
var/module_type = null
/obj/item/borg/upgrade/proc/action(mob/living/silicon/robot/R)
if(R.stat == DEAD)
to_chat(usr, "<span class='notice'>[src] will not function on a deceased cyborg.</span>")
return 1
return TRUE
if(module_type && !istype(R.module, module_type))
to_chat(R, "Upgrade mounting error! No suitable hardpoint detected!")
to_chat(usr, "There's no mounting point for the module!")
return 1
return TRUE
/obj/item/borg/upgrade/reset
name = "cyborg module reset board"
desc = "Used to reset a cyborg's module. Destroys any other upgrades applied to the cyborg."
icon_state = "cyborg_upgrade1"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/reset/action(mob/living/silicon/robot/R)
if(..())
@@ -48,14 +48,14 @@
if(..())
return
if(!R.allow_rename)
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
return 0
R.notify_ai(3, R.name, heldname)
R.name = heldname
R.custom_name = heldname
R.real_name = heldname
return 1
return TRUE
/obj/item/borg/upgrade/restart
name = "cyborg emergency reboot module"
@@ -74,17 +74,17 @@
R.stat = CONSCIOUS
GLOB.dead_mob_list -= R //please never forget this ever kthx
GLOB.living_mob_list += R
GLOB.alive_mob_list += R
R.notify_ai(1)
return 1
return TRUE
/obj/item/borg/upgrade/vtec
name = "robotic VTEC Module"
desc = "Used to kick in a robot's VTEC systems, increasing their speed."
icon_state = "cyborg_upgrade2"
require_module = 1
require_module = TRUE
origin_tech = "engineering=4;materials=5;programming=4"
/obj/item/borg/upgrade/vtec/action(var/mob/living/silicon/robot/R)
@@ -97,14 +97,14 @@
R.speed = -1 // Gotta go fast.
return 1
return TRUE
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid disabler cooling module"
desc = "Used to cool a mounted disabler, increasing the potential current in it and thus its recharge rate."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;powerstorage=4;combat=4"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/security
/obj/item/borg/upgrade/disablercooler/action(mob/living/silicon/robot/R)
@@ -122,7 +122,7 @@
T.charge_delay = max(2 , T.charge_delay - 4)
return 1
return TRUE
/obj/item/borg/upgrade/thrusters
name = "ion thruster upgrade"
@@ -139,14 +139,14 @@
return
R.ionpulse = 1
return 1
return TRUE
/obj/item/borg/upgrade/ddrill
name = "mining cyborg diamond drill"
desc = "A diamond drill replacement for the mining module's standard drill."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=5"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/ddrill/action(mob/living/silicon/robot/R)
@@ -161,14 +161,14 @@
R.module.modules += new /obj/item/pickaxe/drill/cyborg/diamond(R.module)
R.module.rebuild()
return 1
return TRUE
/obj/item/borg/upgrade/soh
name = "mining cyborg satchel of holding"
desc = "A satchel of holding replacement for mining cyborg's ore satchel module."
icon_state = "cyborg_upgrade3"
origin_tech = "engineering=4;materials=4;bluespace=4"
require_module = 1
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/soh/action(mob/living/silicon/robot/R)
@@ -181,35 +181,46 @@
R.module.modules += new /obj/item/storage/bag/ore/holding(R.module)
R.module.rebuild()
return 1
return TRUE
/obj/item/borg/upgrade/syndicate
name = "illegal equipment module"
name = "safety override module"
desc = "Unlocks the hidden, deadlier functions of a cyborg. Also prevents emag subversion."
icon_state = "cyborg_upgrade3"
origin_tech = "combat=4;syndicate=1"
require_module = 1
require_module = TRUE
/obj/item/borg/upgrade/syndicate/action(mob/living/silicon/robot/R)
if(..())
return
if(R.emagged)
return
if(R.weapons_unlock)
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>");
to_chat(R, "<span class='warning'>Internal diagnostic error: incompatible upgrade module detected.</span>")
return
R.emagged = 1
return TRUE
return 1
/obj/item/borg/upgrade/lavaproof
name = "mining cyborg lavaproof chassis"
desc = "An upgrade kit to apply specialized coolant systems and insulation layers to a mining cyborg's chassis, enabling them to withstand exposure to molten rock."
icon_state = "ash_plating"
resistance_flags = LAVA_PROOF | FIRE_PROOF
require_module = TRUE
module_type = /obj/item/robot_module/miner
/obj/item/borg/upgrade/lavaproof/action(mob/living/silicon/robot/R)
if(..())
return
if(istype(R))
R.weather_immunities += "lava"
return TRUE
/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
desc = "This module will repair the cyborg over time."
icon_state = "cyborg_upgrade5"
require_module = 1
require_module = TRUE
var/repair_amount = -1
var/repair_tick = 1
var/msg_cooldown = 0
@@ -230,7 +241,7 @@
icon_state = "selfrepair_off"
var/datum/action/A = new /datum/action/item_action/toggle(src)
A.Grant(R)
return 1
return TRUE
/obj/item/borg/upgrade/selfrepair/Destroy()
cyborg = null
+34 -99
View File
@@ -4,24 +4,23 @@
desc = "A shooting target."
icon = 'icons/obj/objects.dmi'
icon_state = "target_h"
density = 0
density = FALSE
var/hp = 1800
var/icon/virtualIcon
var/list/bulletholes = list()
/obj/item/target/Destroy()
cut_overlays()
// if a target is deleted and associated with a stake, force stake to forget
for(var/obj/structure/target_stake/T in view(3,src))
for(var/obj/structure/target_stake/T in view(3, src))
if(T.pinned_target == src)
T.pinned_target = null
T.density = 1
T.density = TRUE
break
return ..() // delete target
/obj/item/target/Move()
..()
// After target moves, check for nearby stakes. If associated, move to target
for(var/obj/structure/target_stake/M in view(3,src))
for(var/obj/structure/target_stake/M in view(3, src))
if(M.density == 0 && M.pinned_target == src)
M.loc = loc
@@ -33,12 +32,12 @@
/obj/item/target/welder_act(mob/user, obj/item/I)
. = TRUE
if(!use_tool(src, user, 0,, volume = I.tool_volume))
if(!use_tool(src, user, 0, volume = I.tool_volume))
return
overlays.Cut()
to_chat(usr, "You slice off [src]'s uneven chunks of aluminum and scorch marks.")
to_chat(user, "<span class='notice'>You slice off [src]'s uneven chunks of aluminium and scorch marks.</span>")
/obj/item/target/attack_hand(mob/user as mob)
/obj/item/target/attack_hand(mob/user)
// taking pinned targets off!
var/obj/structure/target_stake/stake
for(var/obj/structure/target_stake/T in view(3,src))
@@ -48,8 +47,8 @@
if(stake)
if(stake.pinned_target)
stake.density = 1
density = 0
stake.density = TRUE
density = FALSE
layer = OBJ_LAYER
loc = user.loc
@@ -77,101 +76,37 @@
desc = "A shooting target that looks like a xenomorphic alien."
hp = 2350 // alium onest too kinda
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
var/decaltype = 1 // 1 - scorch, 2 - bullet
#define DECALTYPE_SCORCH 1
#define DECALTYPE_BULLET 2
if(istype(/obj/item/projectile/bullet, Proj))
decaltype = 2
/obj/item/target/bullet_act(obj/item/projectile/P)
var/p_x = P.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset P.p_x!"
var/p_y = P.p_y + pick(0,0,0,0,0,-1,1)
var/decaltype = DECALTYPE_SCORCH
if(istype(P, /obj/item/projectile/bullet))
decaltype = DECALTYPE_BULLET
virtualIcon = new(icon, icon_state)
if( virtualIcon.GetPixel(p_x, p_y) ) // if the located pixel isn't blank (null)
hp -= Proj.damage
var/icon/C = icon(icon, icon_state)
if(LAZYLEN(overlays) <= 35 && C.GetPixel(p_x, p_y)) // if the located pixel isn't blank (null)
hp -= P.damage
if(hp <= 0)
visible_message("<span class='warning'>[src] breaks into tiny pieces and collapses!</span>")
visible_message("<span class='danger'>[src] breaks into tiny pieces and collapses!</span>")
qdel(src)
// Create a temporary object to represent the damage
var/obj/bmark = new
bmark.pixel_x = p_x
bmark.pixel_y = p_y
bmark.icon = 'icons/effects/effects.dmi'
bmark.layer = 3.5
bmark.icon_state = "scorch"
if(decaltype == 1)
// Energy weapons are hot. they scorch!
// offset correction
bmark.pixel_x--
bmark.pixel_y--
if(Proj.damage >= 20 || istype(Proj, /obj/item/projectile/beam/practice))
bmark.icon_state = "scorch"
bmark.dir = pick(NORTH,SOUTH,EAST,WEST) // random scorch design
return
var/image/bullet_hole = image('icons/effects/effects.dmi', "scorch", OBJ_LAYER + 0.5)
bullet_hole.pixel_x = p_x - 1 //offset correction
bullet_hole.pixel_y = p_y - 1
if(decaltype == DECALTYPE_SCORCH)
if(P.damage >= 20 || istype(P, /obj/item/projectile/beam/practice))
bullet_hole.setDir(pick(NORTH,SOUTH,EAST,WEST))// random scorch design. light_scorch does not have different directions
else
bmark.icon_state = "light_scorch"
bullet_hole.icon_state = "light_scorch"
else
// Bullets are hard. They make dents!
bmark.icon_state = "dent"
if(Proj.damage >= 10 && bulletholes.len <= 35) // maximum of 35 bullet holes
if(decaltype == 2) // bullet
if(prob(Proj.damage+30)) // bullets make holes more commonly!
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
else // Lasers!
if(prob(Proj.damage-10)) // lasers make holes less commonly
new/datum/bullethole(src, bmark.pixel_x, bmark.pixel_y) // create new bullet hole
// draw bullet holes
for(var/datum/bullethole/B in bulletholes)
virtualIcon.DrawBox(null, B.b1x1, B.b1y, B.b1x2, B.b1y) // horizontal line, left to right
virtualIcon.DrawBox(null, B.b2x, B.b2y1, B.b2x, B.b2y2) // vertical line, top to bottom
overlays += bmark // add the decal
icon = virtualIcon // apply bulletholes over decals
bullet_hole.icon_state = "dent"
add_overlay(bullet_hole)
return
return -1 // the bullet/projectile goes through the target! Ie, you missed
// Small memory holder entity for transparent bullet holes
/datum/bullethole
// First box
var/b1x1 = 0
var/b1x2 = 0
var/b1y = 0
// Second box
var/b2x = 0
var/b2y1 = 0
var/b2y2 = 0
/datum/bullethole/New(obj/item/target/Target, pixel_x = 0, pixel_y = 0)
if(!Target) return
// Randomize the first box
b1x1 = pixel_x - pick(1,1,1,1,2,2,3,3,4)
b1x2 = pixel_x + pick(1,1,1,1,2,2,3,3,4)
b1y = pixel_y
if(prob(35))
b1y += rand(-4,4)
// Randomize the second box
b2x = pixel_x
if(prob(35))
b2x += rand(-4,4)
b2y1 = pixel_y + pick(1,1,1,1,2,2,3,3,4)
b2y2 = pixel_y - pick(1,1,1,1,2,2,3,3,4)
Target.bulletholes.Add(src)
#undef DECALTYPE_SCORCH
#undef DECALTYPE_BULLET
+1 -1
View File
@@ -57,7 +57,7 @@
E.heal_damage(0, remheal, 0, 1) //Healing Burn
remheal = nremheal
user.visible_message("<span class='notice'>\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].</span>")
if(H.bleed_rate && H.isSynthetic())
if(H.bleed_rate && ismachineperson(H))
H.bleed_rate = 0
else
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")
@@ -17,9 +17,9 @@
GLOBAL_LIST_INIT(glass_recipes, list ( \
new/datum/stack_recipe/window("directional window", /obj/structure/window/basic, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe/window("fulltile window", /obj/structure/window/full/basic, 2, time = 0, on_floor = TRUE, window_checks = TRUE), \
new/datum/stack_recipe("fishbowl", /obj/machinery/fishtank/bowl, 1, time = 0), \
new/datum/stack_recipe("fish tank", /obj/machinery/fishtank/tank, 3, time = 0, on_floor = TRUE), \
new/datum/stack_recipe("wall aquariam", /obj/machinery/fishtank/wall, 4, time = 0, on_floor = TRUE) \
new/datum/stack_recipe("fishbowl", /obj/machinery/fishtank/bowl, 1, time = 10), \
new/datum/stack_recipe("fish tank", /obj/machinery/fishtank/tank, 3, time = 20, on_floor = TRUE), \
new/datum/stack_recipe("wall aquariam", /obj/machinery/fishtank/wall, 4, time = 40, on_floor = TRUE) \
))
/obj/item/stack/sheet/glass
@@ -169,9 +169,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
return
if(is_type_in_typecache(target, goliath_platable_armor_typecache))
var/obj/item/clothing/C = target
var/list/current_armor = C.armor
if(current_armor["melee"] < 60)
current_armor["melee"] = min(current_armor["melee"] + 10, 60)
var/datum/armor/current_armor = C.armor
if(current_armor.getRating("melee") < 60)
C.armor = current_armor.setRating(melee_value = min(current_armor.getRating("melee") + 10, 60))
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
use(1)
else
@@ -180,9 +180,9 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
var/obj/mecha/working/ripley/D = target
if(D.hides < 3)
D.hides++
D.armor["melee"] = min(D.armor["melee"] + 10, 70)
D.armor["bullet"] = min(D.armor["bullet"] + 5, 50)
D.armor["laser"] = min(D.armor["laser"] + 5, 50)
D.armor = D.armor.setRating(melee_value = min(D.armor.getRating("melee") + 10, 70))
D.armor = D.armor.setRating(bullet_value = min(D.armor.getRating("bullet") + 5, 50))
D.armor = D.armor.setRating(laser_value = min(D.armor.getRating("laser") + 5, 50))
to_chat(user, "<span class='info'>You strengthen [target], improving its resistance against melee attacks.</span>")
D.update_icon()
if(D.hides == 3)
@@ -242,7 +242,7 @@ GLOBAL_LIST_INIT(sinew_recipes, list ( \
HS.amount++
src.use(1)
wetness = initial(wetness)
break
return
//If it gets to here it means it did not find a suitable stack on the tile.
var/obj/item/stack/sheet/leather/HS = new(src.loc)
HS.amount = 1
@@ -218,10 +218,22 @@ GLOBAL_LIST_INIT(sandbag_recipes, list ( \
/obj/item/stack/sheet/mineral/plasma/welder_act(mob/user, obj/item/I)
if(I.use_tool(src, user, volume = I.tool_volume))
message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) in ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>)",0,1)
log_game("Plasma sheets ignited by [key_name(user)] in ([x],[y],[z])")
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]","atmos")
fire_act()
log_and_set_aflame(user, I)
return TRUE
/obj/item/stack/sheet/mineral/plasma/attackby(obj/item/I, mob/living/user, params)
if(is_hot(I))
log_and_set_aflame(user, I)
else
return ..()
/obj/item/stack/sheet/mineral/plasma/proc/log_and_set_aflame(mob/user, obj/item/I)
var/turf/T = get_turf(src)
message_admins("Plasma sheets ignited by [key_name_admin(user)]([ADMIN_QUE(user, "?")]) ([ADMIN_FLW(user, "FLW")]) in ([COORD(T)] - [ADMIN_JMP(T)]")
log_game("Plasma sheets ignited by [key_name(user)] in [COORD(T)]")
investigate_log("was <font color='red'><b>ignited</b></font> by [key_name(user)]", "atmos")
user.create_log(MISC_LOG, "Plasma sheets ignited using [I]", src)
fire_act()
/obj/item/stack/sheet/mineral/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
..()
+1 -1
View File
@@ -204,7 +204,7 @@
if(amount < 1) // Just in case a stack's amount ends up fractional somehow
var/oldsrc = src
src = null //dont kill proc after del()
src = null //dont kill proc after qdel()
usr.unEquip(oldsrc, 1)
qdel(oldsrc)
if(istype(O, /obj/item))
@@ -4,7 +4,7 @@
// No delay means there is no start message, and no reason to call tool_start_check before use_tool.
// Run the start check here so we wouldn't have to call it manually.
target.add_fingerprint(user)
if(!tool_start_check(user, amount) && !delay)
if(!tool_start_check(target, user, amount) && !delay)
return
delay *= toolspeed
@@ -39,7 +39,7 @@
// Called before use_tool if there is a delay, or by use_tool if there isn't.
// Only ever used by welding tools and stacks, so it's not added on any other use_tool checks.
/obj/item/proc/tool_start_check(mob/living/user, amount=0)
/obj/item/proc/tool_start_check(atom/target, mob/living/user, amount=0)
return tool_use_check(user, amount)
// A check called by tool_start_check once, and by use_tool on every tick of delay.
+18 -11
View File
@@ -35,10 +35,12 @@
..()
create_reagents(maximum_fuel)
reagents.add_reagent("fuel", maximum_fuel)
if(refills_over_time)
reagents.reagents_generated_per_cycle += list("fuel" = 1)
update_icon()
/obj/item/weldingtool/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weldingtool/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0)
@@ -49,11 +51,15 @@
return FIRELOSS
/obj/item/weldingtool/process()
var/turf/T = get_turf(src)
if(T) // Implants for instance won't find a turf
T.hotspot_expose(2500, 5)
if(prob(5))
remove_fuel(1)
if(tool_enabled)
var/turf/T = get_turf(src)
if(T) // Implants for instance won't find a turf
T.hotspot_expose(2500, 5)
if(prob(5))
remove_fuel(1)
if(refills_over_time)
if(GET_FUEL < maximum_fuel)
reagents.add_reagent("fuel", 1)
..()
/obj/item/weldingtool/attack_self(mob/user)
@@ -77,7 +83,8 @@
playsound(loc, activation_sound, 50, 1)
set_light(light_intensity)
else
STOP_PROCESSING(SSobj, src)
if(!refills_over_time)
STOP_PROCESSING(SSobj, src)
damtype = BRUTE
force = 3
hitsound = "swing_hit"
@@ -101,9 +108,9 @@
return FALSE
// When welding is about to start, run a normal tool_use_check, then flash a mob if it succeeds.
/obj/item/weldingtool/tool_start_check(mob/living/user, amount=0)
/obj/item/weldingtool/tool_start_check(atom/target, mob/living/user, amount=0)
. = tool_use_check(user, amount)
if(. && user)
if(. && user && !ismob(target)) // Don't flash the user if they're repairing robo limbs or repairing a borg etc. Only flash them if the target is an object
user.flash_eyes(light_intensity)
/obj/item/weldingtool/use(amount)
@@ -160,7 +167,7 @@
/obj/item/weldingtool/update_icon()
if(low_fuel_changes_icon)
var/ratio = GET_FUEL / maximum_fuel
ratio = Ceiling(ratio*4) * 25
ratio = CEILING(ratio*4, 1) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
+38 -11
View File
@@ -1023,6 +1023,18 @@ obj/item/toy/cards/deck/syndicate/black
name = "orange fox plushie"
icon_state = "orangefox"
/obj/item/toy/plushie/orange_fox/grump
name = "grumpy fox"
desc = "An ancient plushie that seems particularly grumpy."
/obj/item/toy/plushie/orange_fox/grump/ComponentInitialize()
. = ..()
var/static/list/grumps = list("Ahh, yes, you're so clever, var editing that.", "Really?", "If you make a runtime with var edits, it's your own damn fault.",
"Don't you dare post issues on the git when you don't even know how this works.", "Was that necessary?", "Ohhh, setting admin edited var must be your favorite pastime!",
"Oh, so you have time to var edit, but you don't have time to ban that greytider?", "Oh boy, is this another one of those 'events'?", "Seriously, just stop.", "You do realize this is incurring proc call overhead.",
"Congrats, you just left a reference with your dirty client and now that thing you edited will never garbage collect properly.", "Is it that time of day, again, for unecessary adminbus?")
AddComponent(/datum/component/edit_complainer, grumps)
/obj/item/toy/plushie/coffee_fox
name = "coffee fox plushie"
icon_state = "coffeefox"
@@ -1087,6 +1099,21 @@ obj/item/toy/cards/deck/syndicate/black
return
..()
/obj/item/toy/plushie/ipcplushie
name = "IPC plushie"
desc = "An adorable IPC plushie, straight from New Canaan. Arguably more durable than the real deal. Toaster functionality included."
icon_state = "plushie_ipc"
item_state = "plushie_ipc"
/obj/item/toy/plushie/ipcplushie/attackby(obj/item/B, mob/user, params)
if(istype(B, /obj/item/reagent_containers/food/snacks/breadslice))
new /obj/item/reagent_containers/food/snacks/toast(get_turf(loc))
to_chat(user, "<span class='notice'> You insert bread into the toaster. </span>")
playsound(loc, 'sound/machines/ding.ogg', 50, 1)
qdel(B)
else
return ..()
//New generation TG plushies
/obj/item/toy/plushie/lizardplushie
@@ -1117,15 +1144,15 @@ obj/item/toy/cards/deck/syndicate/black
* Foam Armblade
*/
/obj/item/toy/foamblade
name = "foam armblade"
desc = "it says \"Sternside Changs #1 fan\" on it. "
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
attack_verb = list("pricked", "absorbed", "gored")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
/obj/item/toy/foamblade
name = "foam armblade"
desc = "it says \"Sternside Changs #1 fan\" on it. "
icon = 'icons/obj/toy.dmi'
icon_state = "foamblade"
item_state = "arm_blade"
attack_verb = list("pricked", "absorbed", "gored")
w_class = WEIGHT_CLASS_SMALL
resistance_flags = FLAMMABLE
/*
* Toy/fake flash
@@ -1220,7 +1247,6 @@ obj/item/toy/cards/deck/syndicate/black
spawn(20)
cooldown = FALSE
return
..()
/obj/item/toy/owl
name = "owl action figure"
@@ -1382,6 +1408,7 @@ obj/item/toy/cards/deck/syndicate/black
name = "xenomorph action figure"
desc = "MEGA presents the new Xenos Isolated action figure! Comes complete with realistic sounds! Pull back string to use."
w_class = WEIGHT_CLASS_SMALL
bubble_icon = "alien"
var/cooldown = 0
/obj/item/toy/toy_xeno/attack_self(mob/user)
@@ -1390,7 +1417,7 @@ obj/item/toy/cards/deck/syndicate/black
user.visible_message("<span class='notice'>[user] pulls back the string on [src].</span>")
icon_state = "[initial(icon_state)]_used"
sleep(5)
audible_message("<span class='danger'>[bicon(src)] Hiss!</span>")
atom_say("Hiss!")
var/list/possible_sounds = list('sound/voice/hiss1.ogg', 'sound/voice/hiss2.ogg', 'sound/voice/hiss3.ogg', 'sound/voice/hiss4.ogg')
playsound(get_turf(src), pick(possible_sounds), 50, 1)
spawn(45)
+7
View File
@@ -8,6 +8,13 @@
desc = "This is rubbish."
resistance_flags = FLAMMABLE
/obj/item/trash/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["metal"] += 2
C.stored_comms["wood"] += 1
C.stored_comms["glass"] += 1
qdel(src)
return TRUE
/obj/item/trash/raisins
name = "4no raisins"
icon_state= "4no_raisins"
+1 -3
View File
@@ -477,9 +477,7 @@ GLOBAL_LIST_INIT(rcd_door_types, list(
return R.cell.charge >= (amount * use_multiplier)
/obj/item/rcd/proc/detonate_pulse()
audible_message("<span class='danger'><b>[src] begins to vibrate and \
buzz loudly!</b></span>","<span class='danger'><b>[src] begins \
vibrating violently!</b></span>")
audible_message("<span class='danger'><b>[src] begins to vibrate and buzz loudly!</b></span>", "<span class='danger'><b>[src] begins vibrating violently!</b></span>")
// 5 seconds to get rid of it
addtimer(CALLBACK(src, .proc/detonate_pulse_explode), 50)
+1 -1
View File
@@ -58,7 +58,7 @@ RSF
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
var spawn_location
var/spawn_location
var/turf/T = get_turf(A)
if(istype(T) && !T.density)
spawn_location = T
+2 -2
View File
@@ -361,13 +361,13 @@
/obj/item/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
var t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
var/t = reject_bad_name(input(user, "What name would you like to use on this card?", "Agent Card name", ishuman(user) ? user.real_name : user.name))
if(!t)
to_chat(user, "<span class='warning'>Invalid name.</span>")
return
src.registered_name = t
var u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN))
var/u = sanitize(stripped_input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than maintenance.", "Agent Card Job Assignment", "Agent", MAX_MESSAGE_LEN))
if(!u)
to_chat(user, "<span class='warning'>Invalid assignment.</span>")
src.registered_name = ""
@@ -188,7 +188,7 @@
/obj/structure/chrono_field/update_icon()
var/ttk_frame = 1 - (tickstokill / initial(tickstokill))
ttk_frame = Clamp(Ceiling(ttk_frame * CHRONO_FRAME_COUNT), 1, CHRONO_FRAME_COUNT)
ttk_frame = clamp(CEILING(ttk_frame * CHRONO_FRAME_COUNT, 1), 1, CHRONO_FRAME_COUNT)
if(ttk_frame != RPpos)
RPpos = ttk_frame
mob_underlay.icon_state = "frame[RPpos]"
+11 -3
View File
@@ -31,6 +31,7 @@ LIGHTERS ARE IN LIGHTERS.DM
var/smoketime = 150
var/chem_volume = 60
var/list/list_reagents = list("nicotine" = 40)
var/first_puff = TRUE // the first puff is a bit more reagents ingested
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi',
"Unathi" = 'icons/mob/species/unathi/mask.dmi',
@@ -194,8 +195,9 @@ LIGHTERS ARE IN LIGHTERS.DM
if(reagents && reagents.total_volume) // check if it has any reagents at all
if(is_being_smoked) // if it's being smoked, transfer reagents to the mob
var/mob/living/carbon/C = loc
for (var/datum/reagent/R in reagents.reagent_list)
reagents.trans_id_to(C, R.id, max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
for(var/datum/reagent/R in reagents.reagent_list)
reagents.trans_id_to(C, R.id, first_puff ? 1 : max(REAGENTS_METABOLISM / reagents.reagent_list.len, 0.1)) //transfer at least .1 of each chem
first_puff = FALSE
if(!reagents.total_volume) // There were reagents, but now they're gone
to_chat(C, "<span class='notice'>Your [name] loses its flavor.</span>")
else // else just remove some of the reagents
@@ -309,6 +311,11 @@ LIGHTERS ARE IN LIGHTERS.DM
pixel_y = rand(-10,10)
transform = turn(transform,rand(0,360))
/obj/item/cigbutt/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["wood"] += 1
qdel(src)
return TRUE
/obj/item/cigbutt/cigarbutt
name = "cigar butt"
desc = "A manky old cigar butt."
@@ -360,7 +367,7 @@ LIGHTERS ARE IN LIGHTERS.DM
lit = FALSE
icon_state = icon_off
item_state = icon_off
M.update_inv_wear_mask(0)
M.update_inv_wear_mask()
STOP_PROCESSING(SSobj, src)
return
smoke()
@@ -377,6 +384,7 @@ LIGHTERS ARE IN LIGHTERS.DM
to_chat(user, "<span class='notice'>You refill the pipe with tobacco.</span>")
reagents.add_reagent("nicotine", chem_volume)
smoketime = initial(smoketime)
first_puff = TRUE
/obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/reagent_containers))
+32 -28
View File
@@ -5,16 +5,22 @@
icon_state = "lipstick"
w_class = WEIGHT_CLASS_TINY
var/colour = "red"
var/open = 0
var/list/lipstick_colors = list(
"purple" = "purple",
"jade" = "#216F43",
"lime" = "lime",
"black" = "black",
"green" = "green",
"blue" = "blue",
"white" = "white")
var/open = FALSE
var/static/list/lipstick_colors
/obj/item/lipstick/Initialize(mapload)
. = ..()
if(!lipstick_colors)
lipstick_colors = list(
"black" = "#000000",
"white" = "#FFFFFF",
"red" = "#FF0000",
"green" = "#00C000",
"blue" = "#0000FF",
"purple" = "#D55CD0",
"jade" = "#216F43",
"lime" = "#00FF00",
)
/obj/item/lipstick/purple
name = "purple lipstick"
@@ -22,7 +28,7 @@
/obj/item/lipstick/jade
name = "jade lipstick"
colour = "#216F43"
colour = "jade"
/obj/item/lipstick/lime
name = "lime lipstick"
@@ -47,40 +53,38 @@
/obj/item/lipstick/random
name = "lipstick"
/obj/item/lipstick/random/New()
..()
var/lscolor = pick(lipstick_colors)//A random color is picked from the var defined initially in a new var.
colour = lipstick_colors[lscolor]//The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
name = "[lscolor] lipstick"//The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
/obj/item/lipstick/random/Initialize(mapload)
. = ..()
var/lscolor = pick(lipstick_colors) // A random color is picked from the var defined initially in a new var.
colour = lipstick_colors[lscolor] // The color of the lipstick is pulled from the new variable (right hand side, HTML & Hex RGB)
name = "[lscolor] lipstick" // The new variable is also used to match the name to the color of the lipstick. Kudos to Desolate & Lemon
/obj/item/lipstick/attack_self(mob/user as mob)
overlays.Cut()
/obj/item/lipstick/attack_self(mob/user)
cut_overlays()
to_chat(user, "<span class='notice'>You twist \the [src] [open ? "closed" : "open"].</span>")
open = !open
if(open)
var/image/colored = image("icon"='icons/obj/items.dmi', "icon_state"="lipstick_uncap_color")
colored.color = colour
var/image/colored = mutable_appearance('icons/obj/items.dmi', "lipstick_uncap_color")
colored.color = lipstick_colors[colour]
icon_state = "lipstick_uncap"
overlays += colored
add_overlay(colored)
else
icon_state = "lipstick"
/obj/item/lipstick/attack(mob/M as mob, mob/user as mob)
if(!open) return
if(!istype(M, /mob)) return
/obj/item/lipstick/attack(mob/M, mob/user)
if(!open || !istype(M))
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.lip_style) //if they already have lipstick on
if(H.lip_style) // If they already have lipstick on
to_chat(user, "<span class='notice'>You need to wipe off the old lipstick first!</span>")
return
if(H == user)
user.visible_message("<span class='notice'>[user] does [user.p_their()] lips with [src].</span>", \
"<span class='notice'>You take a moment to apply [src]. Perfect!</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.lip_color = lipstick_colors[colour]
H.update_body()
else
user.visible_message("<span class='warning'>[user] begins to do [H]'s lips with \the [src].</span>", \
@@ -89,7 +93,7 @@
user.visible_message("<span class='notice'>[user] does [H]'s lips with \the [src].</span>", \
"<span class='notice'>You apply \the [src].</span>")
H.lip_style = "lipstick"
H.lip_color = colour
H.lip_color = lipstick_colors[colour]
H.update_body()
else
to_chat(user, "<span class='notice'>Where are the lips on that?</span>")
+1 -1
View File
@@ -72,7 +72,7 @@
if(powered) //so it doesn't show charge if it's unpowered
if(cell)
var/ratio = cell.charge / cell.maxcharge
ratio = Ceiling(ratio*4) * 25
ratio = CEILING(ratio*4, 1) * 25
overlays += "[icon_state]-charge[ratio]"
/obj/item/defibrillator/CheckParts(list/parts_list)
+1 -1
View File
@@ -138,7 +138,7 @@
/obj/item/dice/proc/diceroll(mob/user)
result = roll(sides)
if(rigged != DICE_NOT_RIGGED && result != rigged_value)
if(rigged == DICE_BASICALLY_RIGGED && prob(Clamp(1/(sides - 1) * 100, 25, 80)))
if(rigged == DICE_BASICALLY_RIGGED && prob(clamp(1/(sides - 1) * 100, 25, 80)))
result = rigged_value
else if(rigged == DICE_TOTALLY_RIGGED)
result = rigged_value
@@ -147,10 +147,6 @@
to_chat(user, "<span class='notice'>You inject yourself with [src].</span>")
add_attack_logs(user, M, attack_log, ATKLOG_ALL)
if(!iscarbon(user))
M.LAssailant = null
else
M.LAssailant = user
inject(M, user)
used = TRUE
@@ -45,7 +45,7 @@
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.update_body()
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
H.reset_markings() //...Or markings.
H.dna.ResetUIFrom(H)
@@ -62,7 +62,7 @@
return
var/newtime = input(usr, "Please set the timer.", "Timer", det_time) as num
if(user.is_in_active_hand(src))
newtime = Clamp(newtime, 10, 60000)
newtime = clamp(newtime, 10, 60000)
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")
@@ -49,8 +49,7 @@
to_chat(user, "<span class='notice'>You cut open the present.</span>")
for(var/mob/M in src) //Should only be one but whatever.
M.loc = src.loc
M.reset_perspective(null)
M.forceMove(loc)
qdel(src)
@@ -13,22 +13,12 @@
/obj/item/grenade/clown_grenade/prime()
..()
playsound(src.loc, 'sound/items/bikehorn.ogg', 25, -3)
/*
for(var/turf/simulated/floor/T in view(affected_area, src.loc))
if(prob(75))
banana(T)
*/
var/i = 0
var/number = 0
for(var/direction in GLOB.alldirs)
for(i = 0; i < 2; i++)
number++
var/obj/item/grown/bananapeel/traitorpeel/peel = new /obj/item/grown/bananapeel/traitorpeel(get_turf(src.loc))
/* var/direction = pick(alldirs)
var/spaces = pick(1;150, 2)
var/a = 0
for(a = 0; a < spaces; a++)
step(peel,direction)*/
var/a = 1
if(number & 2)
for(a = 1; a <= 2; a++)
@@ -39,21 +29,17 @@
qdel(src)
return
/obj/item/grown/bananapeel/traitorpeel
trip_stun = 0
trip_weaken = 7
trip_tiles = 4
trip_walksafe = FALSE
trip_chance = 100
/obj/item/grown/bananapeel/traitorpeel/on_trip(mob/living/carbon/human/H)
/obj/item/grown/bananapeel/traitorpeel/New(newloc, obj/item/seeds/new_seed)
. = ..()
if(.)
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
H.take_overall_damage(0, rand(2,8))
H.take_organ_damage(2) // Was 5 -- TLE
// The reason this AddComponent is here and not in ComponentInitialize() is because if it's put there, it will be ran before the parent New proc for /grown types.
// And then be overriden by the generic component placed onto it by the `/datum/plant_gene/trait/slip`.
AddComponent(/datum/component/slippery, src, 0, 7, 100, 4, FALSE)
/obj/item/grown/bananapeel/traitorpeel/after_slip(mob/living/carbon/human/H)
to_chat(H, "<span class='warning'>Your feet feel like they're on fire!</span>")
H.take_overall_damage(0, rand(2,8))
H.take_organ_damage(2)
return ..()
/obj/item/grown/bananapeel/traitorpeel/throw_impact(atom/hit_atom)
var/burned = rand(1,3)
@@ -488,7 +488,7 @@
var/mob/living/carbon/human/holder = loc
if(src == holder.l_hand || src == holder.r_hand) // Holding this in your hand will
for(var/mob/living/carbon/human/H in range(5, loc))
if(H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full))
if(H.mind && H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full))
H.mind.vampire.nullified = max(5, H.mind.vampire.nullified + 2)
if(prob(10))
to_chat(H, "<span class='userdanger'>Being in the presence of [holder]'s [src] is interfering with your powers!</span>")
+7 -1
View File
@@ -244,12 +244,18 @@
else
..()
/obj/item/match/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(burnt)
C.stored_comms["wood"] += 1
qdel(src)
return TRUE
return ..()
/obj/item/proc/help_light_cig(mob/living/M)
var/mask_item = M.get_item_by_slot(slot_wear_mask)
if(istype(mask_item, /obj/item/clothing/mask/cigarette))
return mask_item
/obj/item/match/firebrand
name = "firebrand"
desc = "An unlit firebrand. It makes you wonder why it's not just called a stick."
@@ -5,6 +5,7 @@
icon = 'icons/obj/library.dmi'
due_date = 0 // Game time in 1/10th seconds
unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified
has_drm = TRUE // No reuploading. Piracy is a crime
/obj/item/book/manual/engineering_construction
@@ -6,7 +6,7 @@
var/list/nemesis_factions //Any mob with a faction that exists in this list will take bonus damage/effects
w_class = WEIGHT_CLASS_SMALL
var/w_class_on = WEIGHT_CLASS_BULKY
var/icon_state_on = "axe1"
var/icon_state_on
var/list/attack_verb_on = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
hitsound = 'sound/weapons/blade1.ogg' // Probably more appropriate than the previous hitsound. -- Dave
usesound = 'sound/weapons/blade1.ogg'
@@ -37,7 +37,7 @@
return BRUTELOSS|FIRELOSS
/obj/item/melee/energy/attack_self(mob/living/carbon/user)
if(user.disabilities & CLUMSY && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
user.take_organ_damage(5,5)
active = !active
@@ -48,9 +48,9 @@
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
if(icon_state_on)
icon_state = icon_state_on
set_light(brightness_on)
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
@@ -80,6 +80,7 @@
name = "energy axe"
desc = "An energised battle axe."
icon_state = "axe0"
icon_state_on = "axe1"
force = 40
force_on = 150
throwforce = 25
@@ -290,7 +291,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.disabilities & CLUMSY && prob(50))
if((CLUMSY in H.mutations) && prob(50))
to_chat(H, "<span class='warning'>You accidentally cut yourself with [src], like a doofus!</span>")
H.take_organ_damage(10,10)
active = !active
@@ -301,9 +302,9 @@
throw_speed = 4
if(attack_verb_on.len)
attack_verb = attack_verb_on
if(!item_color)
if(icon_state_on)
icon_state = icon_state_on
set_light(brightness_on)
set_light(brightness_on, l_color = item_color ? colormap[item_color] : null)
else
icon_state = "sword[item_color]"
set_light(brightness_on, l_color=colormap[item_color])
+1 -1
View File
@@ -100,7 +100,7 @@
break
if(!success)
user.loc = pick(L)
user.forceMove(pick(L))
smoke.start()
src.uses -= 1
@@ -88,6 +88,11 @@
playsound(loc, 'sound/effects/glass_step.ogg', 50, TRUE)
return ..()
/obj/item/shard/decompile_act(obj/item/matter_decompiler/C, mob/user)
C.stored_comms["glass"] += 3
qdel(src)
return TRUE
/obj/item/shard/plasma
name = "plasma shard"
desc = "A shard of plasma glass. Considerably tougher then normal glass shards. Apparently not tough enough to be a window."
+1 -1
View File
@@ -76,7 +76,7 @@
return (active)
/obj/item/shield/energy/attack_self(mob/living/carbon/human/user)
if(user.disabilities & CLUMSY && prob(50))
if((CLUMSY in user.mutations) && prob(50))
to_chat(user, "<span class='warning'>You beat yourself in the head with [src].</span>")
user.take_organ_damage(5)
active = !active
+3 -7
View File
@@ -11,15 +11,11 @@
throw_speed = 4
throw_range = 20
discrete = 1
trip_stun = 4
trip_weaken = 2
trip_chance = 100
trip_walksafe = FALSE
trip_verb = TV_SLIP
var/cleanspeed = 50 //slower than mop
/obj/item/soap/ComponentInitialize()
AddComponent(/datum/component/slippery, src, 4, 2, 100, 0, FALSE)
/obj/item/soap/afterattack(atom/target, mob/user, proximity)
if(!proximity) return
//I couldn't feasibly fix the overlay bugs caused by cleaning items we are wearing.
+15 -16
View File
@@ -33,9 +33,11 @@
icon_state = "trashbag"
item_state = "trashbag"
w_class = WEIGHT_CLASS_TINY
w_class = WEIGHT_CLASS_BULKY
max_w_class = WEIGHT_CLASS_SMALL
slot_flags = null
storage_slots = 30
max_combined_w_class = 30
can_hold = list() // any
cant_hold = list(/obj/item/disk/nuclear)
@@ -45,18 +47,15 @@
return TOXLOSS
/obj/item/storage/bag/trash/update_icon()
if(contents.len == 0)
w_class = WEIGHT_CLASS_TINY
icon_state = "[initial(icon_state)]"
else if(contents.len < 12)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]1"
else if(contents.len < 21)
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]2"
else
w_class = WEIGHT_CLASS_BULKY
icon_state = "[initial(icon_state)]3"
switch(contents.len)
if(20 to INFINITY)
icon_state = "[initial(icon_state)]3"
if(11 to 20)
icon_state = "[initial(icon_state)]2"
if(1 to 11)
icon_state = "[initial(icon_state)]1"
else
icon_state = "[initial(icon_state)]"
/obj/item/storage/bag/trash/cyborg
@@ -422,13 +421,13 @@
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
if( isturf(target) || istype(target,/obj/structure/table) )
var foundtable = istype(target,/obj/structure/table/)
var/foundtable = istype(target,/obj/structure/table/)
if( !foundtable ) //it must be a turf!
for(var/obj/structure/table/T in target)
foundtable = 1
break
var turf/dropspot
var/turf/dropspot
if( !foundtable ) // don't unload things onto walls or other silly places.
dropspot = user.loc
else if( isturf(target) ) // they clicked on a turf with a table in it
@@ -438,7 +437,7 @@
overlays = null
var droppedSomething = 0
var/droppedSomething = 0
for(var/obj/item/I in contents)
I.loc = dropspot
@@ -215,6 +215,13 @@
//if we get this far, handle the insertion checks as normal
.=..()
/obj/item/storage/fancy/cigarettes/decompile_act(obj/item/matter_decompiler/C, mob/user)
if(!length(contents))
C.stored_comms["wood"] += 1
qdel(src)
return TRUE
return ..()
/obj/item/storage/fancy/cigarettes/dromedaryco
name = "\improper DromedaryCo packet"
desc = "A packet of six imported DromedaryCo cancer sticks. A label on the packaging reads, \"Wouldn't a slow death make a change?\""
@@ -83,13 +83,14 @@
return
/obj/item/storage/AltClick(mob/user)
if(Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
if(ishuman(user) && Adjacent(user) && !user.incapacitated(FALSE, TRUE, TRUE))
orient2hud(user)
if(user.s_active)
user.s_active.close(user)
show_to(user)
playsound(loc, "rustle", 50, 1, -5)
add_fingerprint(user)
return ..()
/obj/item/storage/proc/return_inv()
@@ -540,7 +541,7 @@
return depth
/obj/item/storage/serialize()
var data = ..()
var/data = ..()
var/list/content_list = list()
data["content"] = content_list
data["slots"] = storage_slots
@@ -121,19 +121,6 @@
desc = "A sleek, sturdy box"
icon_state = "box_of_doom"
/obj/item/storage/box/syndie_kit/romerol
name = "Romerol Kit"
desc = "A box containing a deadly virus capable of reanimating dead as zombies."
max_w_class = WEIGHT_CLASS_NORMAL
can_hold = list(/obj/item/reagent_containers/glass/bottle/romerol,/obj/item/reagent_containers/syringe,/obj/item/reagent_containers/dropper)
/obj/item/storage/box/syndie_kit/romerol/New()
..()
new /obj/item/reagent_containers/glass/bottle/romerol(src)
new /obj/item/reagent_containers/syringe(src)
new /obj/item/reagent_containers/dropper(src)
return
/obj/item/storage/box/syndie_kit/space
name = "Boxed Space Suit and Helmet"
can_hold = list(/obj/item/clothing/suit/space/syndicate/black/red, /obj/item/clothing/head/helmet/space/syndicate/black/red, /obj/item/tank/emergency_oxygen/syndi, /obj/item/clothing/mask/gas/syndicate)
+2 -2
View File
@@ -189,8 +189,8 @@
L.apply_effect(STUTTER, stunforce)
if(user)
user.lastattacked = L
L.lastattacker = user
L.lastattacker = user.real_name
L.lastattackerckey = user.ckey
L.visible_message("<span class='danger'>[user] has stunned [L] with [src]!</span>", \
"<span class='userdanger'>[user] has stunned you with [src]!</span>")
add_attack_logs(user, L, "stunned")
@@ -53,13 +53,8 @@ obj/item/tank/oxygen/empty/New()
/obj/item/tank/anesthetic/New()
..()
air_contents.oxygen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
var/datum/gas/sleeping_agent/trace_gas = new()
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
air_contents.trace_gases += trace_gas
air_contents.oxygen = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * O2STANDARD
air_contents.sleeping_agent = (3 * ONE_ATMOSPHERE) * 70 / (R_IDEAL_GAS_EQUATION * T20C) * N2STANDARD
/*
* Air
@@ -115,7 +115,7 @@ Frequency:
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in world)
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
-785
View File
@@ -1,785 +0,0 @@
#define HEALPERWELD 15
/* Tools!
* Note: Multitools are in devices
*
* Contains:
* Wrench
* Screwdriver
* Wirecutters
* Welding Tool
* Crowbar
* Revolver Conversion Kit
*/
//Wrench
/obj/item/wrench
name = "wrench"
desc = "A wrench with common uses. Can be found in your hand."
icon = 'icons/obj/tools.dmi'
icon_state = "wrench"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
usesound = 'sound/items/ratchet.ogg'
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/wrench/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/wrench/cyborg
name = "automatic wrench"
desc = "An advanced robotic wrench. Can be found in construction cyborgs."
toolspeed = 0.5
/obj/item/wrench/brass
name = "brass wrench"
desc = "A brass wrench. It's faintly warm to the touch."
icon_state = "wrench_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wrench/abductor
name = "alien wrench"
desc = "A polarized wrench. It causes anything placed between the jaws to turn."
icon = 'icons/obj/abductor.dmi'
icon_state = "wrench"
usesound = 'sound/effects/empulse.ogg'
toolspeed = 0.1
origin_tech = "materials=5;engineering=5;abductor=3"
/obj/item/wrench/power
name = "hand drill"
desc = "A simple powered drill with a bolt bit."
icon_state = "drill_bolt"
item_state = "drill"
usesound = 'sound/items/drill_use.ogg'
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
attack_verb = list("drilled", "screwed", "jabbed")
toolspeed = 0.25
/obj/item/wrench/power/attack_self(mob/user)
playsound(get_turf(user),'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wirecutters/power/s_drill = new /obj/item/screwdriver/power
to_chat(user, "<span class='notice'>You attach the screwdriver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(s_drill)
/obj/item/wrench/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is pressing [src] against [user.p_their()] head! It looks like [user.p_theyre()] trying to commit suicide!")
return BRUTELOSS
/obj/item/wrench/medical
name = "medical wrench"
desc = "A medical wrench with common (medical?) uses. Can be found in your hand."
icon_state = "wrench_medical"
force = 2 //MEDICAL
throwforce = 4
origin_tech = "materials=1;engineering=1;biotech=3"
attack_verb = list("wrenched", "medicaled", "tapped", "jabbed", "whacked")
/obj/item/wrench/medical/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is praying to the medical wrench to take [user.p_their()] soul. It looks like [user.p_theyre()] trying to commit suicide!</span>")
// TODO Make them glow with the power of the M E D I C A L W R E N C H
// during their ascension
// Stun stops them from wandering off
user.Stun(5)
playsound(loc, 'sound/effects/pray.ogg', 50, 1, -1)
// Let the sound effect finish playing
sleep(20)
if(!user)
return
for(var/obj/item/W in user)
user.unEquip(W)
var/obj/item/wrench/medical/W = new /obj/item/wrench/medical(loc)
W.add_fingerprint(user)
W.desc += " For some reason, it reminds you of [user.name]."
if(!user)
return
user.dust()
return OBLITERATION
//Screwdriver
/obj/item/screwdriver
name = "screwdriver"
desc = "You can be totally screwy with this."
icon = 'icons/obj/tools.dmi'
icon_state = "screwdriver_map"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
w_class = WEIGHT_CLASS_TINY
throwforce = 5
throw_speed = 3
throw_range = 5
materials = list(MAT_METAL=75)
attack_verb = list("stabbed")
hitsound = 'sound/weapons/bladeslice.ogg'
usesound = 'sound/items/screwdriver.ogg'
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE //if the screwdriver uses random coloring
/obj/item/screwdriver/nuke
name = "screwdriver"
desc = "A screwdriver with an ultra thin tip."
icon_state = "screwdriver_nuke"
toolspeed = 0.5
/obj/item/screwdriver/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is stabbing [src] into [user.p_their()] [pick("temple", "heart")]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/New(loc, var/param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("red","blue","pink","brown","green","cyan","yellow")
icon_state = "screwdriver_[param_color]"
if (prob(75))
src.pixel_y = rand(0, 16)
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
if(!istype(M) || user.a_intent == INTENT_HELP)
return ..()
if(user.zone_selected != "eyes" && user.zone_selected != "head")
return ..()
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [M]!</span>")
return
if((CLUMSY in user.mutations) && prob(50))
M = user
return eyestab(M,user)
/obj/item/screwdriver/brass
name = "brass screwdriver"
desc = "A screwdriver made of brass. The handle feels freezing cold."
icon_state = "screwdriver_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/screwdriver/abductor
name = "alien screwdriver"
desc = "An ultrasonic screwdriver."
icon = 'icons/obj/abductor.dmi'
icon_state = "screwdriver"
usesound = 'sound/items/pshoom.ogg'
toolspeed = 0.1
random_color = FALSE
/obj/item/screwdriver/power
name = "hand drill"
desc = "A simple hand drill with a screwdriver bit attached."
icon_state = "drill_screw"
item_state = "drill"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2" //done for balance reasons, making them high value for research, but harder to get
force = 8 //might or might not be too high, subject to change
throwforce = 8
throw_speed = 2
throw_range = 3//it's heavier than a screw driver/wrench, so it does more damage, but can't be thrown as far
attack_verb = list("drilled", "screwed", "jabbed","whacked")
hitsound = 'sound/items/drill_hit.ogg'
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/screwdriver/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [src] to [user.p_their()] temple. It looks like [user.p_theyre()] trying to commit suicide!</span>")
return BRUTELOSS
/obj/item/screwdriver/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_drill.ogg', 50, 1)
var/obj/item/wrench/power/b_drill = new /obj/item/wrench/power
to_chat(user, "<span class='notice'>You attach the bolt driver bit to [src].</span>")
qdel(src)
user.put_in_active_hand(b_drill)
/obj/item/screwdriver/cyborg
name = "powered screwdriver"
desc = "An electrical screwdriver, designed to be both precise and quick."
usesound = 'sound/items/drill_use.ogg'
toolspeed = 0.5
//Wirecutters
/obj/item/wirecutters
name = "wirecutters"
desc = "This cuts wires."
icon = 'icons/obj/tools.dmi'
icon_state = "cutters"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throw_speed = 3
throw_range = 7
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
hitsound = 'sound/items/wirecutter.ogg'
usesound = 'sound/items/wirecutter.ogg'
sharp = 1
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
var/random_color = TRUE
/obj/item/wirecutters/New(loc, param_color = null)
..()
if(random_color)
if(!param_color)
param_color = pick("yellow", "red")
icon_state = "cutters_[param_color]"
/obj/item/wirecutters/attack(mob/living/carbon/C, mob/user)
if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/restraints/handcuffs/cable))
user.visible_message("<span class='notice'>[user] cuts [C]'s restraints with [src]!</span>")
QDEL_NULL(C.handcuffed)
if(C.buckled && C.buckled.buckle_requires_restraints)
C.buckled.unbuckle_mob(C)
C.update_handcuffed()
return
else
..()
/obj/item/wirecutters/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is cutting at [user.p_their()] arteries with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, usesound, 50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/brass
name = "brass wirecutters"
desc = "A pair of wirecutters made of brass. The handle feels freezing cold to the touch."
icon_state = "cutters_brass"
toolspeed = 0.5
random_color = FALSE
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/wirecutters/abductor
name = "alien wirecutters"
desc = "Extremely sharp wirecutters, made out of a silvery-green metal."
icon = 'icons/obj/abductor.dmi'
icon_state = "cutters"
toolspeed = 0.1
origin_tech = "materials=5;engineering=4;abductor=3"
random_color = FALSE
/obj/item/wirecutters/cyborg
name = "wirecutters"
desc = "This cuts wires."
toolspeed = 0.5
/obj/item/wirecutters/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a cutting head."
icon_state = "jaws_cutter"
item_state = "jawsoflife"
origin_tech = "materials=2;engineering=2"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
usesound = 'sound/items/jaws_cut.ogg'
toolspeed = 0.25
random_color = FALSE
/obj/item/wirecutters/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is wrapping \the [src] around [user.p_their()] neck. It looks like [user.p_theyre()] trying to rip [user.p_their()] head off!</span>")
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"]
if(head)
head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE)
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
return BRUTELOSS
/obj/item/wirecutters/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/crowbar/power/pryjaws = new /obj/item/crowbar/power
to_chat(user, "<span class='notice'>You attach the pry jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(pryjaws)
//Welding Tool
/obj/item/weldingtool
name = "welding tool"
desc = "A standard edition welder provided by Nanotrasen."
icon = 'icons/obj/tools.dmi'
icon_state = "welder"
item_state = "welder"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 3
throwforce = 5
throw_speed = 3
throw_range = 5
hitsound = "swing_hit"
usesound = 'sound/items/welder.ogg'
var/acti_sound = 'sound/items/welderactivate.ogg'
var/deac_sound = 'sound/items/welderdeactivate.ogg'
w_class = WEIGHT_CLASS_SMALL
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 30)
resistance_flags = FIRE_PROOF
materials = list(MAT_METAL=70, MAT_GLASS=30)
origin_tech = "engineering=1;plasmatech=1"
toolspeed = 1
var/welding = 0 //Whether or not the welding tool is off(0), on(1) or currently welding(2)
var/status = 1 //Whether the welder is secured or unsecured (able to attach rods to it to make a flamethrower)
var/max_fuel = 20 //The max amount of fuel the welder can hold
var/change_icons = 1
var/can_off_process = 0
var/light_intensity = 2 //how powerful the emitted light is when used.
var/nextrefueltick = 0
/obj/item/weldingtool/New()
..()
create_reagents(max_fuel)
reagents.add_reagent("fuel", max_fuel)
update_icon()
/obj/item/weldingtool/examine(mob/user)
. = ..()
if(get_dist(user, src) <= 0)
. += "It contains [get_fuel()] unit\s of fuel out of [max_fuel]."
/obj/item/weldingtool/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] welds [user.p_their()] every orifice closed! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return FIRELOSS
/obj/item/weldingtool/proc/update_torch()
overlays.Cut()
if(welding)
overlays += "[initial(icon_state)]-on"
item_state = "[initial(item_state)]1"
else
item_state = "[initial(item_state)]"
/obj/item/weldingtool/update_icon()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = Ceiling(ratio*4) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)][ratio]"
update_torch()
..()
/obj/item/weldingtool/process()
switch(welding)
if(0)
force = 3
damtype = "brute"
update_icon()
if(!can_off_process)
STOP_PROCESSING(SSobj, src)
return
//Welders left on now use up fuel, but lets not have them run out quite that fast
if(1)
force = 15
damtype = "fire"
if(prob(5))
remove_fuel(1)
update_icon()
//This is to start fires. process() is only called if the welder is on.
var/turf/location = loc
if(ismob(location))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = get_turf(M)
if(isturf(location))
location.hotspot_expose(700, 5)
/obj/item/weldingtool/attackby(obj/item/I, mob/user, params)
if(isscrewdriver(I))
flamethrower_screwdriver(I, user)
else if(istype(I, /obj/item/stack/rods))
flamethrower_rods(I, user)
else
..()
/obj/item/weldingtool/attack(mob/M, mob/user)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.bodyparts_by_name[user.zone_selected]
if(!S)
return
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
return ..()
if(!isOn()) //why wasn't this being checked already?
to_chat(user, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
return 1
if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
return
if(!S.brute_dam)
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
if(get_fuel() >= 1)
if(H == user)
if(!do_mob(user, H, 10))
return 1
if(!remove_fuel(1,null))
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
var/rembrute = HEALPERWELD
var/nrembrute = 0
var/childlist
if(!isnull(S.children))
childlist = S.children.Copy()
var/parenthealed = FALSE
while(rembrute > 0)
var/obj/item/organ/external/E
if(S.brute_dam)
E = S
else if(LAZYLEN(childlist))
E = pick_n_take(childlist)
if(!E.brute_dam || !E.is_robotic())
continue
else if(S.parent && !parenthealed)
E = S.parent
parenthealed = TRUE
if(!E.brute_dam || !E.is_robotic())
break
else
break
playsound(src.loc, usesound, 50, 1)
nrembrute = max(rembrute - E.brute_dam, 0)
E.heal_damage(rembrute,0,0,1)
rembrute = nrembrute
user.visible_message("<span class='alert'>\The [user] patches some dents on \the [M]'s [E.name] with \the [src].</span>")
if(H.bleed_rate && H.isSynthetic())
H.bleed_rate = 0
user.visible_message("<span class='alert'>\The [user] patches some leaks on [M] with \the [src].</span>")
return 1
else
return ..()
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity)
return
if(welding)
remove_fuel(1)
var/turf/location = get_turf(user)
location.hotspot_expose(700, 50, 1)
if(get_fuel() <= 0)
set_light(0)
if(isliving(O))
var/mob/living/L = O
if(L.IgniteMob())
message_admins("[key_name_admin(user)] set [key_name_admin(L)] on fire")
log_game("[key_name(user)] set [key_name(L)] on fire")
/obj/item/weldingtool/attack_self(mob/user)
switched_on(user)
if(welding)
set_light(light_intensity)
update_icon()
//Returns the amount of fuel in the welder
/obj/item/weldingtool/proc/get_fuel()
return reagents.get_reagent_amount("fuel")
//Removes fuel from the welding tool. If a mob is passed, it will try to flash the mob's eyes. This should probably be renamed to use()
/obj/item/weldingtool/proc/remove_fuel(amount = 1, mob/living/M = null)
if(!welding || !check_fuel())
return FALSE
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
check_fuel()
if(M)
M.flash_eyes(light_intensity)
return TRUE
else
if(M)
to_chat(M, "<span class='notice'>You need more welding fuel to complete this task.</span>")
return FALSE
//Returns whether or not the welding tool is currently on.
/obj/item/weldingtool/proc/isOn()
return welding
//Turns off the welder if there is no more fuel (does this really need to be its own proc?)
/obj/item/weldingtool/proc/check_fuel(mob/user)
if(get_fuel() <= 0 && welding)
switched_on(user)
update_icon()
//mob icon update
if(ismob(loc))
var/mob/M = loc
M.update_inv_r_hand(0)
M.update_inv_l_hand(0)
return 0
return 1
//Switches the welder on
/obj/item/weldingtool/proc/switched_on(mob/user)
if(!status)
to_chat(user, "<span class='warning'>[src] can't be turned on while unsecured!</span>")
return
welding = !welding
if(welding)
if(get_fuel() >= 1)
to_chat(user, "<span class='notice'>You switch [src] on.</span>")
playsound(loc, acti_sound, 50, 1)
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
update_icon()
START_PROCESSING(SSobj, src)
else
to_chat(user, "<span class='warning'>You need more fuel!</span>")
switched_off(user)
else
if(user)
to_chat(user, "<span class='notice'>You switch [src] off.</span>")
playsound(loc, deac_sound, 50, 1)
switched_off(user)
//Switches the welder off
/obj/item/weldingtool/proc/switched_off(mob/user)
welding = 0
set_light(0)
force = 3
damtype = "brute"
hitsound = "swing_hit"
update_icon()
/obj/item/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user)
if(welding)
to_chat(user, "<span class='warning'>Turn it off first!</span>")
return
status = !status
if(status)
to_chat(user, "<span class='notice'>You resecure [src].</span>")
else
to_chat(user, "<span class='notice'>[src] can now be attached and modified.</span>")
add_fingerprint(user)
/obj/item/weldingtool/proc/flamethrower_rods(obj/item/I, mob/user)
if(!status)
var/obj/item/stack/rods/R = I
if(R.use(1))
var/obj/item/flamethrower/F = new /obj/item/flamethrower(user.loc)
if(!remove_item_from_storage(F))
user.unEquip(src)
loc = F
F.weldtool = src
add_fingerprint(user)
to_chat(user, "<span class='notice'>You add a rod to a welder, starting to build a flamethrower.</span>")
user.put_in_hands(F)
else
to_chat(user, "<span class='warning'>You need one rod to start building a flamethrower!</span>")
/obj/item/weldingtool/largetank
name = "Industrial Welding Tool"
desc = "A slightly larger welder with a larger tank."
icon_state = "indwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=60)
origin_tech = "engineering=2;plasmatech=2"
/obj/item/weldingtool/largetank/cyborg
name = "integrated welding tool"
desc = "An advanced welder designed to be used in robotic systems."
toolspeed = 0.5
/obj/item/weldingtool/largetank/flamethrower_screwdriver()
return
/obj/item/weldingtool/mini
name = "emergency welding tool"
desc = "A miniature welder used during emergencies."
icon_state = "miniwelder"
max_fuel = 10
w_class = WEIGHT_CLASS_TINY
materials = list(MAT_METAL=30, MAT_GLASS=10)
change_icons = 0
/obj/item/weldingtool/mini/flamethrower_screwdriver()
return
/obj/item/weldingtool/abductor
name = "alien welding tool"
desc = "An alien welding tool. Whatever fuel it uses, it never runs out."
icon = 'icons/obj/abductor.dmi'
icon_state = "welder"
toolspeed = 0.1
light_intensity = 0
change_icons = 0
origin_tech = "plasmatech=5;engineering=5;abductor=3"
can_off_process = 1
/obj/item/weldingtool/abductor/process()
if(get_fuel() <= max_fuel)
reagents.add_reagent("fuel", 1)
..()
/obj/item/weldingtool/hugetank
name = "Upgraded Welding Tool"
desc = "An upgraded welder based off the industrial welder."
icon_state = "upindwelder"
item_state = "upindwelder"
max_fuel = 80
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "engineering=3;plasmatech=2"
/obj/item/weldingtool/experimental
name = "Experimental Welding Tool"
desc = "An experimental welder capable of self-fuel generation and less harmful to the eyes."
icon_state = "exwelder"
item_state = "exwelder"
max_fuel = 40
materials = list(MAT_METAL=70, MAT_GLASS=120)
origin_tech = "materials=4;engineering=4;bluespace=3;plasmatech=4"
change_icons = 0
can_off_process = 1
light_intensity = 1
toolspeed = 0.5
var/last_gen = 0
/obj/item/weldingtool/experimental/brass
name = "brass welding tool"
desc = "A brass welder that seems to constantly refuel itself. It is faintly warm to the touch."
icon_state = "brasswelder"
item_state = "brasswelder"
resistance_flags = FIRE_PROOF | ACID_PROOF
obj/item/weldingtool/experimental/process()
..()
if(get_fuel() < max_fuel && nextrefueltick < world.time)
nextrefueltick = world.time + 10
reagents.add_reagent("fuel", 1)
//Crowbar
/obj/item/crowbar
name = "pocket crowbar"
desc = "A small crowbar. This handy tool is useful for lots of things, such as prying floor tiles or opening unpowered doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
item_state = "crowbar"
usesound = 'sound/items/crowbar.ogg'
flags = CONDUCT
slot_flags = SLOT_BELT
force = 5
throwforce = 7
item_state = "crowbar"
w_class = WEIGHT_CLASS_SMALL
materials = list(MAT_METAL=50)
origin_tech = "engineering=1;combat=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
toolspeed = 1
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 30)
/obj/item/crowbar/red
icon_state = "crowbar_red"
item_state = "crowbar_red"
force = 8
/obj/item/crowbar/brass
name = "brass crowbar"
desc = "A brass crowbar. It feels faintly warm to the touch."
icon_state = "crowbar_brass"
item_state = "crowbar_brass"
toolspeed = 0.5
resistance_flags = FIRE_PROOF | ACID_PROOF
/obj/item/crowbar/abductor
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = "combat=4;engineering=4;abductor=3"
/obj/item/crowbar/large
name = "crowbar"
desc = "It's a big crowbar. It doesn't fit in your pockets, because its too big."
force = 12
w_class = WEIGHT_CLASS_NORMAL
throw_speed = 3
throw_range = 3
materials = list(MAT_METAL=70)
icon_state = "crowbar_large"
item_state = "crowbar_large"
toolspeed = 0.5
/obj/item/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbar in construction cyborgs."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, the magic of science has managed to fit it down into a device small enough to fit in a tool belt. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
materials = list(MAT_METAL=150,MAT_SILVER=50,MAT_TITANIUM=25)
origin_tech = "materials=2;engineering=2"
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/airlock_open_time = 100 // Time required to open powered airlocks
/obj/item/crowbar/power/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is putting [user.p_their()] head in [src]. It looks like [user.p_theyre()] trying to commit suicide!</span>")
playsound(loc, 'sound/items/jaws_pry.ogg', 50, 1, -1)
return BRUTELOSS
/obj/item/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
var/obj/item/wirecutters/power/cutjaws = new /obj/item/wirecutters/power
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")
qdel(src)
user.put_in_active_hand(cutjaws)
// Conversion kit
/obj/item/conversion_kit
name = "\improper Revolver Conversion Kit"
desc = "A professional conversion kit used to convert any knock off revolver into the real deal capable of shooting lethal .357 rounds without the possibility of catastrophic failure."
icon_state = "kit"
flags = CONDUCT
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=2"
var/open = 0
/obj/item/conversion_kit/New()
..()
update_icon()
/obj/item/conversion_kit/update_icon()
icon_state = "[initial(icon_state)]_[open]"
/obj/item/conversion_kit/attack_self(mob/user)
open = !open
to_chat(user, "<span class='notice'>You [open ? "open" : "close"] the conversion kit.</span>")
update_icon()
+3 -3
View File
@@ -34,15 +34,15 @@
if(TH.force_wielded > initial(TH.force_wielded))
to_chat(user, "<span class='warning'>[TH] has already been refined before. It cannot be sharpened further!</span>")
return
TH.force_wielded = Clamp(TH.force_wielded + increment, 0, max)//wieldforce is increased since normal force wont stay
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, "<span class='warning'>[I] has already been refined before. It cannot be sharpened further!</span>")
return
user.visible_message("<span class='notice'>[user] sharpens [I] with [src]!</span>", "<span class='notice'>You sharpen [I], making it much more deadly than before.</span>")
if(!requires_sharpness)
I.sharp = 1
I.force = Clamp(I.force + increment, 0, max)
I.throwforce = Clamp(I.throwforce + increment, 0, max)
I.force = clamp(I.force + increment, 0, max)
I.throwforce = clamp(I.throwforce + increment, 0, max)
I.name = "[prefix] [I.name]"
playsound(get_turf(src), usesound, 50, 1)
name = "worn out [name]"
+3 -3
View File
@@ -30,9 +30,9 @@
return 0
var/armor_protection = 0
if(damage_flag)
armor_protection = armor[damage_flag]
armor_protection = armor.getRating(damage_flag)
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
armor_protection = clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
///the sound played when the obj is damaged.
@@ -201,7 +201,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
return
..()
if(exposed_temperature && !(resistance_flags & FIRE_PROOF))
take_damage(Clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
take_damage(clamp(0.02 * exposed_temperature, 0, 20), BURN, "fire", 0)
if(!(resistance_flags & ON_FIRE) && (resistance_flags & FLAMMABLE) && !(resistance_flags & FIRE_PROOF))
resistance_flags |= ON_FIRE
SSfires.processing[src] = src
+58 -51
View File
@@ -1,15 +1,14 @@
/obj
//var/datum/module/mod //not used
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/crit_fail = 0
var/crit_fail = FALSE
animate_movement = 2
var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
var/sharp = 0 // whether this object cuts
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/sharp = FALSE // whether this object cuts
var/in_use = FALSE // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
var/force = 0
var/list/armor
var/datum/armor/armor
var/obj_integrity //defaults to max_integrity
var/max_integrity = 500
var/integrity_failure = 0 //0 if we have no special broken behavior
@@ -22,9 +21,9 @@
var/can_be_hit = TRUE //can this be bludgeoned by items?
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
var/Mtoollink = FALSE // variable to decide if an object should show the multitool menu linking menu, not all objects use it
var/being_shocked = 0
var/being_shocked = FALSE
var/speed_process = FALSE
var/on_blueprints = FALSE //Are we visible on the station blueprints at roundstart?
@@ -33,8 +32,6 @@
/obj/New()
..()
if(!armor)
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
if(obj_integrity == null)
obj_integrity = max_integrity
if(on_blueprints && isturf(loc))
@@ -44,25 +41,34 @@
else
T.add_blueprints_preround(src)
/obj/Topic(href, href_list, var/nowindow = 0, var/datum/topic_state/state = GLOB.default_state)
/obj/Initialize(mapload)
. = ..()
if(islist(armor))
armor = getArmor(arglist(armor))
else if(!armor)
armor = getArmor()
else if(!istype(armor, /datum/armor))
stack_trace("Invalid type [armor.type] found in .armor during /obj Initialize()")
/obj/Topic(href, href_list, nowindow = FALSE, datum/topic_state/state = GLOB.default_state)
// Calling Topic without a corresponding window open causes runtime errors
if(!nowindow && ..())
return 1
return TRUE
// In the far future no checks are made in an overriding Topic() beyond if(..()) return
// Instead any such checks are made in CanUseTopic()
if(CanUseTopic(usr, state, href_list) == STATUS_INTERACTIVE)
CouldUseTopic(usr)
return 0
return FALSE
CouldNotUseTopic(usr)
return 1
return TRUE
/obj/proc/CouldUseTopic(var/mob/user)
/obj/proc/CouldUseTopic(mob/user)
var/atom/host = nano_host()
host.add_fingerprint(user)
/obj/proc/CouldNotUseTopic(var/mob/user)
/obj/proc/CouldNotUseTopic(mob/user)
// Nada
/obj/Destroy()
@@ -110,23 +116,23 @@
// null if object handles breathing logic for lifeform
// datum/air_group to tell lifeform to process using that breath return
//DEFAULT: Take air from turf to give to have mob process
if(breath_request>0)
if(breath_request > 0)
return remove_air(breath_request)
else
return null
/obj/proc/updateUsrDialog()
if(in_use)
var/is_in_use = 0
var/is_in_use = FALSE
var/list/nearby = viewers(1, src)
for(var/mob/M in nearby)
if((M.client && M.machine == src))
is_in_use = 1
is_in_use = TRUE
src.attack_hand(M)
if(istype(usr, /mob/living/silicon/ai) || istype(usr, /mob/living/silicon/robot))
if(!(usr in nearby))
if(usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = 1
is_in_use = TRUE
src.attack_ai(usr)
// check for TK users
@@ -134,8 +140,8 @@
if(istype(usr, /mob/living/carbon/human))
if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
if(!(usr in nearby))
if(usr.client && usr.machine==src)
is_in_use = 1
if(usr.client && usr.machine == src)
is_in_use = TRUE
src.attack_hand(usr)
in_use = is_in_use
@@ -143,15 +149,15 @@
// Check that people are actually using the machine. If not, don't update anymore.
if(in_use)
var/list/nearby = viewers(1, src)
var/is_in_use = 0
var/is_in_use = FALSE
for(var/mob/M in nearby)
if((M.client && M.machine == src))
is_in_use = 1
is_in_use = TRUE
src.interact(M)
var/ai_in_use = AutoUpdateAI(src)
if(!ai_in_use && !is_in_use)
in_use = 0
in_use = FALSE
/obj/proc/interact(mob/user)
return
@@ -168,12 +174,12 @@
/atom/movable/proc/on_unset_machine(mob/user)
return
/mob/proc/set_machine(var/obj/O)
/mob/proc/set_machine(obj/O)
if(src.machine)
unset_machine()
src.machine = O
if(istype(O))
O.in_use = 1
O.in_use = TRUE
/obj/item/proc/updateSelfDialog()
var/mob/M = src.loc
@@ -183,48 +189,48 @@
/obj/proc/hide(h)
return
/obj/proc/hear_talk(mob/M, list/message_pieces)
return
/obj/proc/hear_message(mob/M as mob, text)
/obj/proc/hear_message(mob/M, text)
/obj/proc/multitool_menu(var/mob/user,var/obj/item/multitool/P)
/obj/proc/multitool_menu(mob/user, obj/item/multitool/P)
return "<b>NO MULTITOOL_MENU!</b>"
/obj/proc/linkWith(var/mob/user, var/obj/buffer, var/context)
return 0
/obj/proc/linkWith(mob/user, obj/buffer, context)
return FALSE
/obj/proc/unlinkFrom(var/mob/user, var/obj/buffer)
return 0
/obj/proc/unlinkFrom(mob/user, obj/buffer)
return FALSE
/obj/proc/canLink(var/obj/O, var/context)
return 0
/obj/proc/canLink(obj/O, list/context)
return FALSE
/obj/proc/isLinkedWith(var/obj/O)
return 0
/obj/proc/isLinkedWith(obj/O)
return FALSE
/obj/proc/getLink(var/idx)
/obj/proc/getLink(idx)
return null
/obj/proc/linkMenu(var/obj/O)
var/dat=""
/obj/proc/linkMenu(obj/O)
var/dat = ""
if(canLink(O, list()))
dat += " <a href='?src=[UID()];link=1'>\[Link\]</a> "
return dat
/obj/proc/format_tag(var/label,var/varname, var/act="set_tag")
/obj/proc/format_tag(label, varname, act = "set_tag")
var/value = vars[varname]
if(!value || value=="")
value="-----"
if(!value || value == "")
value = "-----"
return "<b>[label]:</b> <a href=\"?src=[UID()];[act]=[varname]\">[value]</a>"
/obj/proc/update_multitool_menu(mob/user as mob)
/obj/proc/update_multitool_menu(mob/user)
var/obj/item/multitool/P = get_multitool(user)
if(!istype(P))
return 0
return FALSE
var/dat = {"<html>
<head>
<title>[name] Configuration</title>
@@ -246,13 +252,13 @@ a {
<h3>[name]</h3>
"}
if(allowed(user))//no, assistants, you're not ruining all vents on the station with just a multitool
dat += multitool_menu(user,P)
dat += multitool_menu(user, P)
if(Mtoollink)
if(P)
if(P.buffer)
var/id = null
if("id_tag" in P.buffer.vars)
id=P.buffer:id_tag
id = P.buffer:id_tag
dat += "<p><b>MULTITOOL BUFFER:</b> [P.buffer] [id ? "([id])" : ""]"
dat += linkMenu(P.buffer)
@@ -309,12 +315,12 @@ a {
/obj/singularity_pull(S, current_size)
..()
if(!anchored || current_size >= STAGE_FIVE)
step_towards(src,S)
step_towards(src, S)
/obj/proc/container_resist(var/mob/living)
/obj/proc/container_resist(mob/living)
return
/obj/proc/CanAStarPass()
/obj/proc/CanAStarPass(ID, dir, caller)
. = !density
/obj/proc/on_mob_move(dir, mob/user)
@@ -341,6 +347,7 @@ a {
.["Make speed process"] = "?_src_=vars;makespeedy=[UID()]"
else
.["Make normal process"] = "?_src_=vars;makenormalspeed=[UID()]"
.["Modify armor values"] = "?_src_=vars;modifyarmor=[UID()]"
/obj/proc/check_uplink_validity()
return 1
return TRUE
+5 -2
View File
@@ -7,8 +7,6 @@
var/broken = FALSE
/obj/structure/New()
if (!armor)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
..()
if(smooth)
if(SSticker && SSticker.current_state == GAME_STATE_PLAYING)
@@ -20,6 +18,11 @@
if(SSticker)
GLOB.cameranet.updateVisibility(src)
/obj/structure/Initialize(mapload)
if(!armor)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 50, "acid" = 50)
return ..()
/obj/structure/Destroy()
if(SSticker)
GLOB.cameranet.updateVisibility(src)
-1
View File
@@ -141,7 +141,6 @@
return ..()
/obj/structure/alien/weeds/proc/Life()
set background = BACKGROUND_ENABLED
var/turf/U = get_turf(src)
if(istype(U, /turf/space))
@@ -12,6 +12,8 @@
var/opened = FALSE
var/welded = FALSE
var/locked = FALSE
var/large = TRUE
var/can_be_emaged = FALSE
var/wall_mounted = 0 //never solid (You can always pass over it)
var/lastbang
var/sound = 'sound/machines/click.ogg'
@@ -143,84 +145,21 @@
/obj/structure/closet/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs) && !opened)
if(user in contents) //to prevent self-teleporting.
return
var/obj/item/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
if(!is_level_reachable(z))
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
else
areaindex[tmpname] = 1
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
E.teleporting = 1
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(user in contents)
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [name]...</span>")
E.teleporting = 1
if(!do_after(user, 50, E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(user in contents)
to_chat(user, "<span class='warning'>Error: User located in container--aborting for safety.</span>")
playsound(E.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
to_chat(user, "<span class='warning'>Out of charges.</span>")
return
E.try_send_container(user, src)
return
if(opened)
if(istype(W, /obj/item/grab))
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
if(istype(W,/obj/item/tk_grab))
var/obj/item/grab/G = W
if(large)
MouseDrop_T(G.affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>[src] is too small to stuff [G.affecting] into!</span>")
if(istype(W, /obj/item/tk_grab))
return FALSE
if(user.a_intent != INTENT_HELP) // Stops you from putting your baton in the closet on accident
return
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
@@ -228,13 +167,20 @@
return
if(W)
W.forceMove(loc)
return TRUE // It's resolved. No afterattack needed. Stops you from emagging lockers when putting in an emag
else if(can_be_emaged && (istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade) && !broken))
emag_act(user)
else if(istype(W, /obj/item/stack/packageWrap))
return
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
closed_item_click(user)
else
return ..()
// What happens when the closet is attacked by a random item not on harm mode
/obj/structure/closet/proc/closed_item_click(mob/user)
attack_hand(user)
/obj/structure/closet/welder_act(mob/user, obj/item/I)
. = TRUE
if(!opened && user.loc == src)
@@ -284,7 +230,7 @@
add_fingerprint(user)
/obj/structure/closet/attack_ai(mob/user)
if(isrobot(user) && Adjacent(user)) //Robots can open/close it, but not the AI
if(isrobot(user) && Adjacent(user) && !istype(user.loc, /obj/machinery/atmospherics)) //Robots can open/close it, but not the AI
attack_hand(user)
/obj/structure/closet/relaymove(mob/user)
@@ -115,6 +115,8 @@
new /obj/item/clothing/shoes/black(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/glasses/sunglasses/big(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
//Paramedic
@@ -54,36 +54,33 @@
new /obj/item/storage/backpack/satchel/withwallet( src )
new /obj/item/radio/headset( src )
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W as obj, mob/user as mob, params)
if(src.opened)
if(istype(W, /obj/item/grab))
src.MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
user.drop_item()
if(W) W.forceMove(loc)
else if(istype(W, /obj/item/card/id))
if(src.broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
var/obj/item/card/id/I = W
if(!I || !I.registered_name) return
if(src == user.loc)
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
else if(src.allowed(user) || !src.registered_name || (istype(I) && (src.registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
src.locked = !( src.locked )
if(src.locked)
src.icon_state = src.icon_locked
else
src.icon_state = src.icon_closed
registered_name = null
desc = initial(desc)
if(!src.registered_name && src.locked)
src.registered_name = I.registered_name
src.desc = "Owned by [I.registered_name]."
else
to_chat(user, "<span class='warning'>Access Denied</span>")
else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken)
emag_act(user)
else
/obj/structure/closet/secure_closet/personal/attackby(obj/item/W, mob/user, params)
if(opened || !istype(W, /obj/item/card/id))
return ..()
if(broken)
to_chat(user, "<span class='warning'>It appears to be broken.</span>")
return
var/obj/item/card/id/I = W
if(!I || !I.registered_name)
return
if(src == user.loc)
to_chat(user, "<span class='notice'>You can't reach the lock from inside.</span>")
else if(allowed(user) || !registered_name || (istype(I) && (registered_name == I.registered_name)))
//they can open all lockers, or nobody owns this, or they own this locker
locked = !locked
if(locked)
icon_state = icon_locked
else
icon_state = icon_closed
registered_name = null
desc = initial(desc)
if(!registered_name && locked)
registered_name = I.registered_name
desc = "Owned by [I.registered_name]."
else
to_chat(user, "<span class='warning'>Access Denied</span>")
@@ -7,10 +7,10 @@
opened = 0
locked = 1
broken = 0
can_be_emaged = TRUE
max_integrity = 250
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
damage_deflection = 20
var/large = 1
icon_closed = "secure"
var/icon_locked = "secure1"
icon_opened = "secureopen"
@@ -66,31 +66,8 @@
else
to_chat(user, "<span class='notice'>Access Denied</span>")
/obj/structure/closet/secure_closet/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs))
return ..()
if(opened)
if(istype(W, /obj/item/grab))
if(large)
MouseDrop_T(W:affecting, user) //act like they were dragged onto the closet
else
to_chat(user, "<span class='notice'>The locker is too small to stuff [W:affecting] into!</span>")
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken)
emag_act(user)
else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool))
return ..(W, user)
else if(user.a_intent != INTENT_HARM)
togglelock(user)
else
return ..()
/obj/structure/closet/secure_closet/closed_item_click(mob/user)
togglelock(user)
/obj/structure/closet/secure_closet/emag_act(mob/user)
if(!broken)
@@ -426,7 +426,7 @@
icon_off = "wall-lockeroff"
//too small to put a man in
large = 0
large = FALSE
/obj/structure/closet/secure_closet/wall/update_icon()
if(broken)
@@ -466,3 +466,4 @@
new /obj/item/gavelhammer(src)
new /obj/item/clothing/head/justice_wig(src)
new /obj/item/clothing/accessory/medal/legal(src)
new /obj/item/clothing/accessory/lawyers_badge(src)
@@ -19,7 +19,7 @@
L.buckled = 0
L.anchored = 0
L.forceMove(src)
L.disabilities += MUTE
L.mutations |= MUTE
max_integrity = L.health + 100 //stoning damaged mobs will result in easier to shatter statues
intialTox = L.getToxLoss()
intialFire = L.getFireLoss()
@@ -69,7 +69,7 @@
for(var/mob/living/M in src)
M.forceMove(loc)
M.disabilities -= MUTE
M.mutations -= MUTE
M.take_overall_damage((M.health - obj_integrity - 100),0) //any new damage the statue incurred is transfered to the mob
..()
@@ -79,111 +79,42 @@
return TRUE
/obj/structure/closet/crate/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/rcs) && !src.opened)
var/obj/item/rcs/E = W
if(E.rcell && (E.rcell.charge >= E.chargecost))
if(!is_level_reachable(src.z)) // This is inconsistent with the closet sending code
to_chat(user, "<span class='warning'>The rapid-crate-sender can't locate any telepads!</span>")
return
if(E.mode == 0)
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
for(var/obj/machinery/telepad_cargo/R in world)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
if(areaindex[tmpname])
tmpname = "[tmpname] ([++areaindex[tmpname]])"
else
areaindex[tmpname] = 1
L[tmpname] = R
var/desc = input("Please select a telepad.", "RCS") in L
E.pad = L[desc]
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
E.teleporting = TRUE
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = 0
return
E.teleporting = 0
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, E.pad, 0)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
E.rand_x = rand(50,200)
E.rand_y = rand(50,200)
var/L = locate(E.rand_x, E.rand_y, 6)
if(!Adjacent(user))
to_chat(user, "<span class='notice'>Unable to teleport, too far from crate.</span>")
return
playsound(E.loc, E.usesound, 50, 1)
to_chat(user, "<span class='notice'>Teleporting [src.name]...</span>")
E.teleporting = TRUE
if(!do_after(user, 50 * E.toolspeed, target = src))
E.teleporting = FALSE
return
E.teleporting = 0
if(!(E.rcell && E.rcell.use(E.chargecost)))
to_chat(user, "<span class='notice'>Unable to teleport, insufficient charge.</span>")
return
do_sparks(5, 1, src)
do_teleport(src, L)
to_chat(user, "<span class='notice'>Teleport successful. [round(E.rcell.charge/E.chargecost)] charge\s left.</span>")
return
else
to_chat(user, "<span class='warning'>Out of charges.</span>")
return
if(opened)
if(isrobot(user))
return
if(!user.drop_item()) //couldn't drop the item
to_chat(user, "<span class='notice'>\The [W] is stuck to your hand, you cannot put it in \the [src]!</span>")
return
if(W)
W.forceMove(loc)
else if(istype(W, /obj/item/stack/packageWrap))
if(!opened && try_rig(W, user))
return
else if(istype(W, /obj/item/stack/cable_coil))
return ..()
/obj/structure/closet/crate/proc/try_rig(obj/item/W, mob/user)
if(istype(W, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = W
if(rigged)
to_chat(user, "<span class='notice'>[src] is already rigged!</span>")
return
return TRUE
if(C.use(15))
to_chat(user, "<span class='notice'>You rig [src].</span>")
rigged = TRUE
else
to_chat(user, "<span class='warning'>You need atleast 15 wires to rig [src]!</span>")
return
else if(istype(W, /obj/item/radio/electropack))
return TRUE
if(istype(W, /obj/item/radio/electropack))
if(rigged)
if(!user.drop_item())
to_chat(user, "<span class='warning'>[W] seems to be stuck to your hand!</span>")
return TRUE
to_chat(user, "<span class='notice'>You attach [W] to [src].</span>")
user.drop_item()
W.forceMove(src)
return
else if(istype(W, /obj/item/wirecutters))
if(rigged)
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
playsound(loc, W.usesound, 100, 1)
rigged = FALSE
return
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
else
return ..()
return TRUE
/obj/structure/closet/singularity_act()
dump_contents()
..()
/obj/structure/closet/crate/wirecutter_act(mob/living/user, obj/item/I)
if(opened)
return
if(!rigged)
return
if(I.use_tool(src, user))
to_chat(user, "<span class='notice'>You cut away the wiring.</span>")
playsound(loc, I.usesound, 100, 1)
rigged = FALSE
return TRUE
/obj/structure/closet/crate/welder_act()
return
@@ -229,9 +160,10 @@
max_integrity = 500
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
damage_deflection = 25
var/tamperproof = 0
broken = 0
locked = 1
var/tamperproof = FALSE
broken = FALSE
locked = TRUE
can_be_emaged = TRUE
/obj/structure/closet/crate/secure/update_icon()
..()
@@ -306,17 +238,8 @@
else
src.toggle(user)
/obj/structure/closet/crate/secure/attackby(obj/item/W, mob/user, params)
if(is_type_in_list(W, list(/obj/item/stack/packageWrap, /obj/item/stack/cable_coil, /obj/item/radio/electropack, /obj/item/wirecutters,/obj/item/rcs)))
return ..()
if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)))
emag_act(user)
return
if(!opened)
src.togglelock(user)
return
return ..()
/obj/structure/closet/crate/secure/closed_item_click(mob/user)
togglelock(user)
/obj/structure/closet/crate/secure/emag_act(mob/user)
if(locked)
+2 -2
View File
@@ -46,7 +46,7 @@
/obj/structure/curtain/screwdriver_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
if(anchored)
user.visible_message("<span class='warning'>[user] unscrews [src] from the floor.</span>", "<span class='notice'>You start to unscrew [src] from the floor...</span>", "You hear rustling noises.")
@@ -65,7 +65,7 @@
if(anchored)
return
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
WIRECUTTER_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 50, volume = I.tool_volume))
+1 -1
View File
@@ -56,7 +56,7 @@
/obj/structure/dresser/crowbar_act(mob/user, obj/item/I)
. = TRUE
if(!I.tool_start_check(user, 0))
if(!I.tool_start_check(src, user, 0))
return
TOOL_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 50, volume = I.tool_volume))
+5 -6
View File
@@ -17,11 +17,11 @@
var/opened = 0
var/material_drop = /obj/item/stack/sheet/metal
/obj/structure/extinguisher_cabinet/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/New(turf/loc, direction = null)
..()
if(ndir)
pixel_x = (ndir & EAST|WEST) ? (ndir == EAST ? 28 : -28) : 0
pixel_y = (ndir & NORTH|SOUTH)? (ndir == WEST ? 28 : -28) : 0
if(direction)
setDir(direction)
set_pixel_offsets_from_dir(28, -28, 30, -30)
switch(extinguishertype)
if(NO_EXTINGUISHER)
return
@@ -165,9 +165,8 @@
else
icon_state = "extinguisher_empty"
/obj/structure/extinguisher_cabinet/empty/New(turf/loc, ndir = null)
/obj/structure/extinguisher_cabinet/empty
extinguishertype = NO_EXTINGUISHER
..()
#undef NO_EXTINGUISHER
#undef NORMAL_EXTINGUISHER
+2 -2
View File
@@ -40,7 +40,7 @@
food_slots[s]=I
update_icon()
success = 1
break;
break
if(!success)
to_chat(user, fail_msg)
else if(istype(I, /obj/item/reagent_containers/food/drinks))
@@ -51,7 +51,7 @@
drink_slots[s]=I
update_icon()
success = 1
break;
break
if(!success)
to_chat(user, fail_msg)
else if(istype(I, /obj/item/wrench))
+1 -1
View File
@@ -374,7 +374,7 @@
/obj/structure/girder/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
+1 -1
View File
@@ -111,7 +111,7 @@
/obj/structure/grille/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
@@ -69,9 +69,9 @@
if(isliving(G.affecting))
if(!has_buckled_mobs())
if(do_mob(user, src, 120))
if(spike(G.affecting))
G.affecting.visible_message("<span class='danger'>[user] slams [G.affecting] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
qdel(G)
var/mob/living/affected = G.affecting
if(spike(affected))
affected.visible_message("<span class='danger'>[user] slams [affected] onto the meat spike!</span>", "<span class='userdanger'>[user] slams you onto the meat spike!</span>", "<span class='italics'>You hear a squishy wet noise.</span>")
return
return ..()
@@ -130,16 +130,18 @@
release_mob(M)
/obj/structure/kitchenspike/proc/release_mob(mob/living/M)
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
M.pixel_y = M.get_standard_pixel_y_offset(180)
M.adjustBruteLoss(30)
src.visible_message(text("<span class='danger'>[M] falls free of [src]!</span>"))
unbuckle_mob(M, force = TRUE)
M.emote("scream")
M.AdjustWeakened(10)
/obj/structure/kitchenspike/post_unbuckle_mob(mob/living/M)
M.pixel_y = M.get_standard_pixel_y_offset(0)
var/matrix/m180 = matrix(M.transform)
m180.Turn(180)
animate(M, transform = m180, time = 3)
/obj/structure/kitchenspike/Destroy()
if(has_buckled_mobs())
for(var/mob/living/L in buckled_mobs)
+1 -1
View File
@@ -232,7 +232,7 @@
/obj/structure/tray/m_tray/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
+3 -2
View File
@@ -246,7 +246,7 @@ GLOBAL_LIST_EMPTY(safes)
var/ticks = text2num(href_list["turnright"])
for(var/i = 1 to ticks)
dial = Wrap(dial - 1, 0, 100)
dial = WRAP(dial - 1, 0, 100)
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
@@ -274,7 +274,7 @@ GLOBAL_LIST_EMPTY(safes)
var/ticks = text2num(href_list["turnleft"])
for(var/i = 1 to ticks)
dial = Wrap(dial + 1, 0, 100)
dial = WRAP(dial + 1, 0, 100)
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
@@ -373,6 +373,7 @@ GLOBAL_LIST_EMPTY(safes)
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
/obj/item/paper/safe_code/Initialize(mapload)
..()
return INITIALIZE_HINT_LATELOAD
/obj/item/paper/safe_code/LateInitialize(mapload)
+22 -16
View File
@@ -288,6 +288,28 @@
return
setDir(turn(dir, 90))
/obj/structure/statue/kidanstatue
name = "Obsidian Kidan warrior statue"
desc = "A beautifully carved and menacing statue of a Kidan warrior made out of obsidian. It looks very heavy."
icon_state = "kidan"
anchored = TRUE
oreAmount = 0
/obj/structure/statue/chickenstatue
name = "Bronze Chickenman Statue"
desc = "An antique and oriental-looking statue of a Chickenman made of bronze."
icon_state = "chicken"
anchored = TRUE
oreAmount = 0
/obj/structure/statue/russian_mulebot
desc = "Like a MULEbot, but more Russian and less functional.";
icon = 'icons/obj/aibots.dmi';
icon_state = "mulebot0";
name = "OXENbot"
anchored = TRUE
oreAmount = 10
////////////////////////////////
/obj/structure/snowman
@@ -320,19 +342,3 @@
..()
qdel(src)
/obj/structure/kidanstatue
name = "Obsidian Kidan warrior statue"
desc = "A beautifully carved and menacing statue of a Kidan warrior made out of obsidian. It looks very heavy."
icon = 'icons/obj/decorations.dmi'
icon_state = "kidanstatue"
anchored = 1
density = 1
/obj/structure/chickenstatue
name = "Bronze Chickenman Statue"
desc = "An antique and oriental-looking statue of a Chickenman made of bronze."
icon = 'icons/obj/decorations.dmi'
icon_state = "chickenstatue"
anchored = 1
density = 1
+4 -4
View File
@@ -128,7 +128,7 @@
/obj/structure/table/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
@@ -224,8 +224,8 @@
if(!click_params || !click_params["icon-x"] || !click_params["icon-y"])
return
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_x = clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
item_placed(I)
else
return ..()
@@ -666,7 +666,7 @@
/obj/structure/rack/CanAStarPass(ID, dir, caller)
. = !density
if(ismovableatom(caller))
if(ismovable(caller))
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSTABLE)
+86 -61
View File
@@ -1,3 +1,5 @@
#define MAX_TANK_STORAGE 10
/obj/structure/dispenser
name = "tank storage unit"
desc = "A simple yet bulky storage device for gas tanks. Has room for up to ten oxygen tanks, and ten plasma tanks."
@@ -5,29 +7,51 @@
icon_state = "dispenser"
density = 1
anchored = 1.0
var/oxygentanks = 10
var/plasmatanks = 10
var/list/oxytanks = list() //sorry for the similar var names
var/list/platanks = list()
var/starting_oxygen_tanks = MAX_TANK_STORAGE // The starting amount of oxygen tanks the dispenser gets when it's spawned
var/starting_plasma_tanks = MAX_TANK_STORAGE // Starting amount of plasma tanks
var/list/stored_oxygen_tanks = list() // List of currently stored oxygen tanks
var/list/stored_plasma_tanks = list() // And plasma tanks
/obj/structure/dispenser/oxygen
plasmatanks = 0
starting_plasma_tanks = 0
/obj/structure/dispenser/plasma
oxygentanks = 0
starting_oxygen_tanks = 0
/obj/structure/dispenser/New()
..()
initialize_tanks()
update_icon()
/obj/structure/dispenser/Destroy()
QDEL_LIST(stored_plasma_tanks)
QDEL_LIST(stored_oxygen_tanks)
return ..()
/obj/structure/dispenser/proc/initialize_tanks()
for(var/I in 1 to starting_plasma_tanks)
var/obj/item/tank/plasma/P = new(src)
stored_plasma_tanks.Add(P)
for(var/I in 1 to starting_oxygen_tanks)
var/obj/item/tank/oxygen/O = new(src)
stored_oxygen_tanks.Add(O)
/obj/structure/dispenser/update_icon()
overlays.Cut()
switch(oxygentanks)
if(1 to 3) overlays += "oxygen-[oxygentanks]"
if(4 to INFINITY) overlays += "oxygen-4"
switch(plasmatanks)
if(1 to 4) overlays += "plasma-[plasmatanks]"
if(5 to INFINITY) overlays += "plasma-5"
cut_overlays()
var/oxy_tank_amount = LAZYLEN(stored_oxygen_tanks)
switch(oxy_tank_amount)
if(1 to 3)
overlays += "oxygen-[oxy_tank_amount]"
if(4 to INFINITY)
overlays += "oxygen-4"
var/pla_tank_amount = LAZYLEN(stored_plasma_tanks)
switch(pla_tank_amount)
if(1 to 4)
overlays += "plasma-[pla_tank_amount]"
if(5 to INFINITY)
overlays += "plasma-5"
/obj/structure/dispenser/attack_hand(mob/user)
if(..())
@@ -38,7 +62,7 @@
/obj/structure/dispenser/attack_ghost(mob/user)
ui_interact(user)
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
/obj/structure/dispenser/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, master_ui = null, datum/topic_state/state = GLOB.default_state)
user.set_machine(src)
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
if(!ui)
@@ -47,35 +71,19 @@
/obj/structure/dispenser/ui_data(user)
var/list/data = list()
data["o_tanks"] = oxygentanks
data["p_tanks"] = plasmatanks
data["o_tanks"] = LAZYLEN(stored_oxygen_tanks)
data["p_tanks"] = LAZYLEN(stored_plasma_tanks)
return data
/obj/structure/dispenser/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/tank/oxygen) || istype(I, /obj/item/tank/air) || istype(I, /obj/item/tank/anesthetic))
if(oxygentanks < 10)
user.drop_item()
I.forceMove(src)
oxytanks.Add(I)
oxygentanks++
update_icon()
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is full.</span>")
SSnanoui.update_uis(src)
try_insert_tank(user, stored_oxygen_tanks, I)
return
if(istype(I, /obj/item/tank/plasma))
if(plasmatanks < 10)
user.drop_item()
I.forceMove(src)
platanks.Add(I)
plasmatanks++
update_icon()
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
else
to_chat(user, "<span class='notice'>[src] is full.</span>")
SSnanoui.update_uis(src)
try_insert_tank(user, stored_plasma_tanks, I)
return
if(istype(I, /obj/item/wrench))
if(anchored)
to_chat(user, "<span class='notice'>You lean down and unwrench [src].</span>")
@@ -88,40 +96,55 @@
/obj/structure/dispenser/Topic(href, href_list)
if(..())
return 1
return TRUE
if(Adjacent(usr))
usr.set_machine(src)
// The oxygen tank button
if(href_list["oxygen"])
if(oxygentanks > 0)
var/obj/item/tank/oxygen/O
if(oxytanks.len == oxygentanks)
O = oxytanks[1]
oxytanks.Remove(O)
else
O = new /obj/item/tank/oxygen(loc)
O.loc = loc
to_chat(usr, "<span class='notice'>You take [O] out of [src].</span>")
oxygentanks--
update_icon()
try_remove_tank(usr, stored_oxygen_tanks)
// The plasma tank button
if(href_list["plasma"])
if(plasmatanks > 0)
var/obj/item/tank/plasma/P
if(platanks.len == plasmatanks)
P = platanks[1]
platanks.Remove(P)
else
P = new /obj/item/tank/plasma(loc)
P.loc = loc
to_chat(usr, "<span class='notice'>You take [P] out of [src].</span>")
plasmatanks--
update_icon()
try_remove_tank(usr, stored_plasma_tanks)
add_fingerprint(usr)
updateUsrDialog()
SSnanoui.update_uis(src)
SSnanoui.try_update_ui(usr, src)
else
SSnanoui.close_user_uis(usr,src)
return 1
return TRUE
/// Called when the user clicks on the oxygen or plasma tank UI buttons, and tries to withdraw a tank.
/obj/structure/dispenser/proc/try_remove_tank(mob/living/user, list/tank_list)
if(!LAZYLEN(tank_list))
return // There are no tanks left to withdraw.
var/obj/item/tank/T = tank_list[1]
tank_list.Remove(T)
if(!user.put_in_hands(T))
T.forceMove(loc) // If the user's hands are full, place it on the tile of the dispenser.
to_chat(user, "<span class='notice'>You take [T] out of [src].</span>")
update_icon()
/// Called when the user clicks on the dispenser with a tank. Tries to insert the tank into the dispenser, and updates the UI if successful.
/obj/structure/dispenser/proc/try_insert_tank(mob/living/user, list/tank_list, obj/item/tank/T)
if(LAZYLEN(tank_list) >= MAX_TANK_STORAGE)
to_chat(user, "<span class='warning'>[src] is full.</span>")
return
if(!user.drop_item()) // Antidrop check
to_chat(user, "<span class='warning'>[T] is stuck to your hand!</span>")
return
T.forceMove(src)
tank_list.Add(T)
update_icon()
to_chat(user, "<span class='notice'>You put [T] in [src].</span>")
SSnanoui.try_update_ui(user, src)
/obj/structure/tank_dispenser/deconstruct(disassembled = TRUE)
if(!(flags & NODECONSTRUCT))
@@ -130,3 +153,5 @@
I.forceMove(loc)
new /obj/item/stack/sheet/metal(loc, 2)
qdel(src)
#undef MAX_TANK_STORAGE
@@ -144,9 +144,7 @@
if(istype(mob, /mob) && mob.client)
// If the pod is not in a tube at all, you can get out at any time.
if(!(locate(/obj/structure/transit_tube) in loc))
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
mob.forceMove(loc)
//if(moving && istype(loc, /turf/space))
// Todo: If you get out of a moving pod in space, you should move as well.
@@ -158,9 +156,7 @@
if(!station.pod_moving)
if(direction == station.dir)
if(station.icon_state == "open")
mob.loc = loc
mob.client.Move(get_step(loc, direction), direction)
mob.reset_perspective(null)
mob.forceMove(loc)
else
station.open_animation()
+1 -69
View File
@@ -403,75 +403,7 @@
L.ExtinguishMob()
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
to_chat(L, "<span class='warning'>You've been drenched in water!</span>")
if(iscarbon(O))
var/mob/living/carbon/M = O
if(M.r_hand)
M.r_hand.clean_blood()
if(M.l_hand)
M.l_hand.clean_blood()
if(M.back)
if(M.back.clean_blood())
M.update_inv_back(0)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/washgloves = 1
var/washshoes = 1
var/washmask = 1
var/washears = 1
var/washglasses = 1
if(H.wear_suit)
washgloves = !(H.wear_suit.flags_inv & HIDEGLOVES)
washshoes = !(H.wear_suit.flags_inv & HIDESHOES)
if(H.head)
washmask = !(H.head.flags_inv & HIDEMASK)
washglasses = !(H.head.flags_inv & HIDEEYES)
washears = !(H.head.flags_inv & HIDEEARS)
if(H.wear_mask)
if(washears)
washears = !(H.wear_mask.flags_inv & HIDEEARS)
if(washglasses)
washglasses = !(H.wear_mask.flags_inv & HIDEEYES)
if(H.head)
if(H.head.clean_blood())
H.update_inv_head(0,0)
if(H.wear_suit)
if(H.wear_suit.clean_blood())
H.update_inv_wear_suit(0,0)
else if(H.w_uniform)
if(H.w_uniform.clean_blood())
H.update_inv_w_uniform(0,0)
if(H.gloves && washgloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
if(H.shoes && washshoes)
if(H.shoes.clean_blood())
H.update_inv_shoes(0,0)
if(H.wear_mask && washmask)
if(H.wear_mask.clean_blood())
H.update_inv_wear_mask(0)
if(H.glasses && washglasses)
if(H.glasses.clean_blood())
H.update_inv_glasses(0)
if(H.l_ear && washears)
if(H.l_ear.clean_blood())
H.update_inv_ears(0)
if(H.r_ear && washears)
if(H.r_ear.clean_blood())
H.update_inv_ears(0)
if(H.belt)
if(H.belt.clean_blood())
H.update_inv_belt(0)
else
if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags
if(M.wear_mask.clean_blood())
M.update_inv_wear_mask(0)
else
O.clean_blood()
L.clean_blood()
if(isturf(loc))
var/turf/tile = loc