Fixes merge conflict

This commit is contained in:
Anasari
2018-07-31 14:31:14 +08:00
464 changed files with 12262 additions and 9822 deletions
@@ -81,7 +81,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if((HULK in H.mutations) || (NOGUNS in H.species.species_traits))
if((HULK in H.mutations) || (NOGUNS in H.dna.species.species_traits))
user << "<span class='warning'>Your fingers can't press the button!</span>"
return
+1 -1
View File
@@ -24,7 +24,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/abductor/H = user
if(H && H.mind.abductor)
if(isabductor(H))
to_chat(user, "<span class='warning'>Megaphones can't project psionic communication!</span>")
return
if(ishuman(user))
@@ -1,7 +1,7 @@
/obj/item/pizza_bomb
name = "pizza box"
desc = "A box suited for pizzas."
icon = 'icons/obj/food/food.dmi'
icon = 'icons/obj/food/pizza.dmi'
icon_state = "pizzabox1"
var/timer = 10 //Adjustable timer
var/timer_set = 0
+1 -1
View File
@@ -245,7 +245,7 @@ REAGENT SCANNER
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse == PULSE_THREADY || H.pulse == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
var/implant_detect
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
if(CI.status == ORGAN_ROBOT)
if(CI.is_robotic())
implant_detect += "[H.name] is modified with a [CI.name].<br>"
if(implant_detect)
user.show_message("<span class='notice'>Detected cybernetic modifications:</span>")
+1 -3
View File
@@ -130,8 +130,7 @@
/obj/item/storage/pill_bottle/random_meds/New()
..()
var/i = 1
while(i < storage_slots)
for(var/i in 1 to storage_slots)
var/list/possible_medicines = standard_medicines.Copy()
if(prob(50))
possible_medicines += rare_medicines.Copy()
@@ -144,7 +143,6 @@
P.reagents.add_reagent(R, rand(2, 5)*10)
P.name = "Unlabelled Pill"
P.desc = "Something about this pill entices you to try it, against your better judgement."
i++
pixel_x = rand(-10, 10)
pixel_y = rand(-10, 10)
+44 -8
View File
@@ -12,6 +12,7 @@
var/self_delay = 20
var/unique_handling = 0 //some things give a special prompt, do we want to bypass some checks in parent?
var/stop_bleeding = 0
var/healverb = "bandage"
/obj/item/stack/medical/attack(mob/living/M, mob/user)
if(!iscarbon(M) && !isanimal(M))
@@ -34,7 +35,7 @@
to_chat(user, "<span class='danger'>That limb is missing!</span>")
return 1
if(affecting.status & ORGAN_ROBOT)
if(affecting.is_robotic())
to_chat(user, "<span class='danger'>This can't be used on a robotic limb.</span>")
return 1
@@ -77,6 +78,42 @@
"<span class='green'>You apply [src] on [M].</span>")
use(1)
/obj/item/stack/medical/proc/heal(mob/living/M, mob/user)
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
user.visible_message("<span class='green'>[user] [healverb]s the wounds on [H]'s [affecting.name].</span>", \
"<span class='green'>You [healverb] the wounds on [H]'s [affecting.name].</span>" )
var/rembrute = max(0, heal_brute - affecting.brute_dam) // Maxed with 0 since heal_damage let you pass in a negative value
var/remburn = max(0, heal_burn - affecting.burn_dam) // And deduct it from their health (aka deal damage)
var/nrembrute = rembrute
var/nremburn = remburn
affecting.heal_damage(heal_brute, heal_burn)
var/list/achildlist
if(!isnull(affecting.children))
achildlist = affecting.children.Copy()
var/parenthealed = FALSE
while(rembrute + remburn > 0) // Don't bother if there's not enough leftover heal
var/obj/item/organ/external/E
if(LAZYLEN(achildlist))
E = pick_n_take(achildlist) // Pick a random children and then remove it from the list
else if(affecting.parent && !parenthealed) // If there's a parent and no healing attempt was made on it
E = affecting.parent
parenthealed = TRUE
else
break // If the organ have no child left and no parent / parent healed, break
if(E.status & ORGAN_ROBOT || E.open) // Ignore robotic or open limb
continue
else if(!E.brute_dam && !E.burn_dam) // Ignore undamaged limb
continue
nrembrute = max(0, rembrute - E.brute_dam) // Deduct the healed damage from the remain
nremburn = max(0, remburn - E.burn_dam)
E.heal_damage(rembrute, remburn)
rembrute = nrembrute
remburn = nremburn
user.visible_message("<span class='green'>[user] [healverb]s the wounds on [H]'s [E.name] with the remaining medication.</span>", \
"<span class='green'>You [healverb] the wounds on [H]'s [E.name] with the remaining medication.</span>" )
//Bruise Packs//
/obj/item/stack/medical/bruise_pack
@@ -98,13 +135,12 @@
if(affecting.open == 0)
affecting.germ_level = 0
user.visible_message("<span class='green'>[user] bandages the wounds on [H]'s [affecting.name].</span>", \
"<span class='green'>You bandage the wounds on [H]'s [affecting.name].</span>" )
if(stop_bleeding)
if(!H.bleedsuppress) //so you can't stack bleed suppression
H.suppress_bloodloss(stop_bleeding)
affecting.heal_damage(heal_brute, heal_burn)
heal(H, user)
H.UpdateDamageIcon()
use(1)
else
@@ -131,6 +167,7 @@
singular_name = "ointment"
icon_state = "ointment"
origin_tech = "biotech=2"
healverb = "salve"
/obj/item/stack/medical/ointment/attack(mob/living/M, mob/user)
if(..())
@@ -143,9 +180,8 @@
if(affecting.open == 0)
affecting.germ_level = 0
user.visible_message("<span class='green'>[user] salves the wounds on [H]'s [affecting.name].</span>", \
"<span class='green'>You salve the wounds on [H]'s [affecting.name].</span>" )
affecting.heal_damage(heal_brute, heal_burn)
heal(H, user)
H.UpdateDamageIcon()
use(1)
else
+1 -1
View File
@@ -28,7 +28,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
if(S && (S.status & ORGAN_ROBOT))
if(S && S.is_robotic())
if(S.get_damage())
S.heal_damage(15, 15, robo_repair = 1)
H.updatehealth()
+3 -6
View File
@@ -57,16 +57,13 @@ RSF
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
return
var spawn_location
if(istype(A, /obj/structure/table))
spawn_location = A.loc
else if (istype(A, /obj/structure/table))
spawn_location = A
var/turf/T = get_turf(A)
if(istype(T) && !T.density)
spawn_location = T
else
to_chat(user, "The RSF can only create service items on tables, or floors.")
return
if(isrobot(user))
var/mob/living/silicon/robot/engy = user
if(!engy.cell.use(configured_items[mode][2]))
+2 -2
View File
@@ -86,7 +86,7 @@
icon_state = "id"
item_state = "card-id"
var/mining_points = 0 //For redeeming at mining equipment lockers
var/access = list()
var/list/access = list()
var/registered_name = "Unknown" // The name registered_name on the card
slot_flags = SLOT_ID
var/untrackable // Can not be tracked by AI's
@@ -463,7 +463,7 @@
var/new_job = "Civilian"
if(department == "Custom")
new_job = sanitize(stripped_input(user,"Choose a custom jon title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
new_job = sanitize(stripped_input(user,"Choose a custom job title:","Agent Card Occupation", "Civilian", MAX_MESSAGE_LEN))
else if(department != "Civilian")
switch(department)
if("Engineering")
+3 -3
View File
@@ -99,7 +99,7 @@
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(C.f_style == "Shaved")
@@ -130,13 +130,13 @@
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
if(M.get_species() == "Skrell")
if(isskrell(M))
to_chat(user, "<span class='warning'>Your razor isn't going to cut through tentacles.</span>")
return
if(H == user) //shaving yourself
+7
View File
@@ -375,6 +375,13 @@
update_icon()
return
else
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
if(heart.status & ORGAN_DEAD)
user.visible_message("<span class='boldnotice'>[defib] buzzes: Resuscitation failed - Heart necrosis detected.</span>")
playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
busy = 0
update_icon()
return
H.set_heartattack(FALSE)
user.visible_message("<span class='boldnotice'>[defib] pings: Cardiac arrhythmia corrected.</span>")
M.visible_message("<span class='warning'>[M]'s body convulses a bit.")
@@ -74,7 +74,7 @@
H = M
spawn(0) //Some mutations have sleeps in them, like monkey
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.species.species_traits))) // prevents drained people from having their DNA changed
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.dna.species.species_traits))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
var/mutflags = 0
// UI in syringe.
@@ -113,7 +113,7 @@
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
var/mob/living/carbon/human/H = M
if(NO_DNA in H.species.species_traits)
if(NO_DNA in H.dna.species.species_traits)
return 0
if(!user.IsAdvancedToolUser())
@@ -24,7 +24,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(NO_DNA in H.species.species_traits)
if(NO_DNA in H.dna.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.</span>")
return
@@ -43,7 +43,7 @@
if(istype(target))
var/mob/living/carbon/human/H = target
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.species.name) //Give them a name that makes sense for their species.
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.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
@@ -28,8 +28,9 @@
var/obj/machinery/abductor/console/console
if(ishuman(source))
var/mob/living/carbon/human/H = source
if(H.get_species() == "Abductor")
console = get_team_console(H.mind.abductor.team)
if(isabductor(H))
var/datum/species/abductor/S = H.dna.species
console = get_team_console(S.team)
home = console.pad
if(!home)
+113 -180
View File
@@ -2,28 +2,8 @@
Rapid Pipe Dispenser
*/
#define SIMPLE_CAP 20
#define SUPPLY_CAP 32
#define SCRUBBERS_CAP 33
#define HE_EXCHANGER 17
#define CONNECTOR 4
#define UNARY_VENT 7
#define PASSIVE_VENT 37
#define GAS_SCRUBBER 10
#define INJECTOR 34
#define GAS_SENSOR 98
#define METER 99
#define DISPOSALS_JUNCTION 2
#define ATMOS_MODE 1
#define DISPOSALS_MODE 2
#define ROTATION_MODE 3
#define FLIP_MODE 4
#define DELETE_MODE 5
#define ATMOS_PIPING 1
#define SUPPLY_PIPING 2
#define SCRUBBERS_PIPING 3
#define DEVICES 4
#define HEAT_PIPING 5
#define RPD_COOLDOWN_TIME 4 //How long should we have to wait between dispensing pipes?
#define RPD_WALLBUILD_TIME 40 //How long should drilling into a wall take?
/obj/item/rpd
name = "rapid pipe dispenser"
@@ -43,13 +23,13 @@
origin_tech = "engineering=4;materials=2"
var/datum/effect_system/spark_spread/spark_system
var/lastused
var/iconrotation = 0 //used to orient icons and pipes
var/mode = 1 //Disposals, atmospherics, etc.
var/pipetype = 1//For nanoUI menus
var/whatpipe = 0 //What kind of pipe is it? See code/game/machinery/pipe/construction.dm for a list of defines
var/whatdpipe = 0 //What kind of disposals pipe is it? See code/game/machinery/pipe/dispenser.dm for a list of defines
var/spawndelay = 4 //How long should we have to wait between dispensing pipes?
var/walldelay = 40 //How long should drilling into a wall take?
var/iconrotation = 0 //Used to orient icons and pipes
var/mode = RPD_ATMOS_MODE //Disposals, atmospherics, etc.
var/pipe_category = RPD_ATMOS_PIPING//For nanoUI menus, this is a subtype of pipes e.g. scrubbers pipes, devices
var/whatpipe = PIPE_SIMPLE_STRAIGHT //What kind of atmos pipe is it?
var/whatdpipe = PIPE_DISPOSALS_STRAIGHT //What kind of disposals pipe is it?
var/spawndelay = RPD_COOLDOWN_TIME
var/walldelay = RPD_WALLBUILD_TIME
/obj/item/rpd/New()
..()
@@ -57,82 +37,112 @@
spark_system.set_up(1, 0, src)
spark_system.attach(src)
/obj/item/rpd/Destroy()
QDEL_NULL(spark_system)
return ..()
//Procs
/obj/item/rpd/proc/Activaterpd(delay)
/obj/item/rpd/proc/activate_rpd(delay) //Maybe makes sparks and activates cooldown if there is a delay
playsound(loc, "sound/machines/click.ogg", 50, 1)
if(prob(15))
spark_system.start()
if(delay)
lastused = world.time
/obj/item/rpd/proc/Manipulatepipes(subject, atmosverb, disposalsverb)
if(istype(subject, /obj/item/pipe))
call(subject, atmosverb)()
else if(istype(subject, /obj/structure/disposalconstruct/))
call(subject, disposalsverb)()
/obj/item/rpd/proc/can_dispense_pipe(var/pipe_id, var/pipe_type) //Returns TRUE if this is a legit pipe we can dispense, otherwise returns FALSE
for(var/list/L in GLOB.rpd_pipe_list)
if(pipe_type != L["pipe_type"]) //Sometimes pipes in different categories have the same pipe_id, so we need to skip anything not in the category we want
continue
if(pipe_id == L["pipe_id"]) //Found the pipe, we can dispense it
return TRUE
/obj/item/rpd/proc/create_atmos_pipe(mob/user, turf/T) //Make an atmos pipe, meter, or gas sensor
if(!can_dispense_pipe(whatpipe, RPD_ATMOS_MODE))
log_runtime(EXCEPTION("Failed to spawn [get_pipe_name(whatpipe, PIPETYPE_ATMOS)] - possible tampering detected")) //Damn dirty apes -- I mean hackers
return
var/obj/item/pipe/P
if(whatpipe == PIPE_GAS_SENSOR)
P = new /obj/item/pipe_gsensor(T)
else if(whatpipe == PIPE_METER)
P = new /obj/item/pipe_meter(T)
else
P = new(T, whatpipe, iconrotation) //Make the pipe, BUT WAIT! There's more!
if(!iconrotation && P.is_bent_pipe()) //Automatically rotates dispensed pipes if the user selected auto-rotation
P.dir = turn(user.dir, 135)
else if(!iconrotation && P.pipe_type in list(PIPE_CONNECTOR, PIPE_UVENT, PIPE_SCRUBBER, PIPE_HEAT_EXCHANGE, PIPE_CAP, PIPE_SUPPLY_CAP, PIPE_SCRUBBERS_CAP, PIPE_INJECTOR, PIPE_PASV_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
P.flip()
else if(iconrotation && P.is_bent_pipe()) //If user selected a rotation and the pipe is bent
P.dir = turn(iconrotation, -45)
else if(!iconrotation) //If user selected a rotation
P.dir = user.dir
to_chat(user, "<span class='notice'>[src] rapidly dispenses [P]!</span>")
activate_rpd(TRUE)
/obj/item/rpd/proc/create_disposals_pipe(mob/user, turf/T) //Make a disposals pipe / construct
if(!can_dispense_pipe(whatdpipe, RPD_DISPOSALS_MODE))
log_runtime(EXCEPTION("Failed to spawn [get_pipe_name(whatdpipe, PIPETYPE_DISPOSAL)] - possible tampering detected"))
return
var/obj/structure/disposalconstruct/P = new(T, whatdpipe, iconrotation)
if(!iconrotation) //Automatic rotation
P.dir = user.dir
if(!iconrotation && whatdpipe != PIPE_DISPOSALS_JUNCTION_RIGHT) //Disposals pipes are in the opposite direction to atmos pipes, so we need to flip them. Junctions don't have this quirk though
P.flip()
to_chat(user, "<span class='notice'>[src] rapidly dispenses [P]!</span>")
activate_rpd(TRUE)
/obj/item/rpd/proc/rotate_all_pipes(mob/user, turf/T) //Rotate all pipes on a turf
for(var/obj/item/pipe/P in T)
P.rotate()
for(var/obj/structure/disposalconstruct/D in T)
D.rotate()
/obj/item/rpd/proc/flip_all_pipes(mob/user, turf/T) //Flip all pipes on a turf
for(var/obj/item/pipe/P in T)
P.flip()
for(var/obj/structure/disposalconstruct/D in T)
D.flip()
/obj/item/rpd/proc/delete_all_pipes(mob/user, turf/T) //Delete all pipes on a turf
var/eaten
for(var/obj/item/pipe/P in T)
QDEL_NULL(P)
eaten = TRUE
for(var/obj/item/pipe_gsensor/G in T)
QDEL_NULL(G)
eaten = TRUE
for(var/obj/item/pipe_meter/M in T)
QDEL_NULL(M)
eaten = TRUE
for(var/obj/structure/disposalconstruct/D in T)
if(!D.anchored)
QDEL_NULL(D)
eaten = TRUE
if(eaten)
to_chat(user, "<span class='notice'>[src] sucks up the loose pipes on [T].")
activate_rpd()
else
to_chat(user, "<span class='notice'>There were no loose pipes on [T].</span>")
/obj/item/rpd/proc/delete_single_pipe(mob/user, obj/P) //Delete a single pipe
to_chat(user, "<span class='notice'>[src] sucks up [P].</span>")
QDEL_NULL(P)
activate_rpd()
//Lists of things
var/list/pipelist = list( //id refers to the pipe_type found in construction.dm, icon refers to the name of the icon state in icons/obj/pipe-item.dmi. Icons are made with the asset-cache
list("pipename" = "Straight pipe", "id" = 0, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent pipe", "id" = 1, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "T-manifold", "id" = 5, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way manifold", "id" = 19, "category" = ATMOS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Pipe cap", "id" = 20, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Manual valve", "id" = 8, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "mvalve"),
list("pipename" = "Digital valve", "id" = 35, "category" = ATMOS_PIPING, "orientations" = 2, "icon" = "dvalve"),
list("pipename" = "Manual T-valve", "id" = 18, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "tvalve"),
list("pipename" = "Digital T-valve", "id" = 38, "category" = ATMOS_PIPING, "orientations" = 4, "icon" = "dtvalve"),
list("pipename" = "Straight supply pipe", "id" = 24, "category" = SUPPLY_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent supply pipe", "id" = 25, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Supply T-manifold", "id" = 28, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way supply manifold", "id" = 30, "category" = SUPPLY_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Supply pipe cap", "id" = 32, "category" = SUPPLY_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Straight scrubbers pipe", "id" = 26, "category" = SCRUBBERS_PIPING, "orientations" = 2, "icon" = "simple"),
list("pipename" = "Bent scrubbers pipe", "id" = 27, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "simple", "bendy" = 1),
list("pipename" = "Scrubbers T-manifold", "id" = 29, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "manifold"),
list("pipename" = "4-way scrubbers manifold", "id" = 31, "category" = SCRUBBERS_PIPING, "orientations" = 1, "icon" = "manifold4w"),
list("pipename" = "Scrubbers pipe cap", "id" = 33, "category" = SCRUBBERS_PIPING, "orientations" = 4, "icon" = "cap"),
list("pipename" = "Universal pipe adapter", "id" = 23, "category" = DEVICES, "orientations" = 2, "icon" = "universal"),
list("pipename" = "Connector", "id" = 4, "category" = DEVICES, "orientations" = 4, "icon" = "connector"),
list("pipename" = "Unary vent", "id" = 7, "category" = DEVICES, "orientations" = 4, "icon" = "uvent"),
list("pipename" = "Scrubber", "id" = 10, "category" = DEVICES, "orientations" = 4, "icon" = "scrubber"),
list("pipename" = "Gas pump", "id" = 9, "category" = DEVICES, "orientations" = 4, "icon" = "pump"),
list("pipename" = "Volume pump", "id" = 16, "category" = DEVICES, "orientations" = 4, "icon" = "volumepump"),
list("pipename" = "Passive gate", "id" = 15, "category" = DEVICES, "orientations" = 4, "icon" = "passivegate"),
list("pipename" = "Gas filter", "id" = 13, "category" = DEVICES, "orientations" = 4, "icon" = "filter"),
list("pipename" = "Gas mixer", "id" = 14, "category" = DEVICES, "orientations" = 4, "icon" = "mixer"),
list("pipename" = "Gas sensor", "id" = 98, "category" = DEVICES, "orientations" = 1, "icon" = "sensor"),
list("pipename" = "Meter", "id" = 99, "category" = DEVICES, "orientations" = 1, "icon" = "meter"),
list("pipename" = "Passive vent", "id" = 37, "category" = DEVICES, "orientations" = 4, "icon" = "passive vent"),
list("pipename" = "Dual-port vent pump", "id" = 36, "category" = DEVICES, "orientations" = 2, "icon" = "dual-port vent"),
list("pipename" = "Air injector", "id" = 34, "category" = DEVICES, "orientations" = 4, "icon" = "injector"),
list("pipename" = "Straight HE pipe", "id" = 2, "category" = HEAT_PIPING, "orientations" = 2, "icon" = "he"),
list("pipename" = "Bent HE pipe", "id" = 3, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "he", "bendy" = 1),
list("pipename" = "Junction", "id" = 6, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "junction"),
list("pipename" = "Heat exchanger", "id" = 17, "category" = HEAT_PIPING, "orientations" = 4, "icon" = "heunary"))
var/list/dpipelist = list(
list("pipename" = "Straight pipe", "id" = 0, "orientations" = 2, "icon" = "conpipe-s"),
list("pipename" = "Bent pipe", "id" = 1, "orientations" = 4, "icon" = "conpipe-c"),
list("pipename" = "Junction", "id" = 2, "orientations" = 4, "icon" = "conpipe-j1"),
list("pipename" = "Y-junction", "id" = 4, "orientations" = 4, "icon" = "conpipe-y"),
list("pipename" = "Trunk", "id" = 5, "orientations" = 4, "icon" = "conpipe-t"),
list("pipename" = "Bin", "id" = 6, "orientations" = 1, "icon" = "condisposal"),
list("pipename" = "Outlet", "id" = 7, "orientations" = 4, "icon" = "outlet"),
list("pipename" = "Chute", "id" = 8, "orientations" = 4, "icon" = "intake"))
var/list/mainmenu = list(
list("category" = "Atmospherics", "mode" = 1, "icon" = "wrench"),
list("category" = "Disposals", "mode" = 2, "icon" = "recycle"),
list("category" = "Rotate", "mode" = 3, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = 4, "icon" = "exchange"),
list("category" = "Recycle", "mode" = 5, "icon" = "trash"))
list("category" = "Atmospherics", "mode" = RPD_ATMOS_MODE, "icon" = "wrench"),
list("category" = "Disposals", "mode" = RPD_DISPOSALS_MODE, "icon" = "recycle"),
list("category" = "Rotate", "mode" = RPD_ROTATE_MODE, "icon" = "rotate-right"),
list("category" = "Flip", "mode" = RPD_FLIP_MODE, "icon" = "exchange"),
list("category" = "Recycle", "mode" = RPD_DELETE_MODE, "icon" = "trash"))
var/list/pipemenu = list(
list("pipecategory" = "Normal", "pipemode" = 1),
list("pipecategory" = "Supply", "pipemode" = 2),
list("pipecategory" = "Scrubber", "pipemode" = 3),
list("pipecategory" = "Devices", "pipemode" = 4),
list("pipecategory" = "Heat exchange", "pipemode" = 5))
list("category" = "Normal", "pipemode" = RPD_ATMOS_PIPING),
list("category" = "Supply", "pipemode" = RPD_SUPPLY_PIPING),
list("category" = "Scrubber", "pipemode" = RPD_SCRUBBERS_PIPING),
list("category" = "Devices", "pipemode" = RPD_DEVICES),
list("category" = "Heat exchange", "pipemode" = RPD_HEAT_PIPING))
//NanoUI stuff
@@ -148,13 +158,12 @@ var/list/pipemenu = list(
/obj/item/rpd/ui_data(mob/user, ui_key = "main", datum/topic_state/state = inventory_state)
var/data[0]
data["dpipelist"] = dpipelist
data["iconrotation"] = iconrotation
data["mainmenu"] = mainmenu
data["mode"] = mode
data["pipelist"] = pipelist
data["pipelist"] = GLOB.rpd_pipe_list
data["pipemenu"] = pipemenu
data["pipetype"] = pipetype
data["pipe_category"] = pipe_category
data["whatdpipe"] = whatdpipe
data["whatpipe"] = whatpipe
return data
@@ -167,99 +176,23 @@ var/list/pipemenu = list(
whatpipe = text2num(sanitize(href_list["whatpipe"]))
else if(href_list["whatdpipe"])
whatdpipe = text2num(sanitize(href_list["whatdpipe"]))
else if(href_list["pipetype"])
pipetype = text2num(sanitize(href_list["pipetype"]))
else if(href_list["pipe_category"])
pipe_category = text2num(sanitize(href_list["pipe_category"]))
else if(href_list["mode"])
mode = text2num(sanitize(href_list["mode"]))
else
return
SSnanoui.update_uis(src)
//What the RPD actually does
/obj/item/rpd/afterattack(atom/target, mob/user, proximity)
..()
var/turf/T = get_turf(target)
if(loc != user || ismob(target) || istype(target, /obj/structure/window) || !proximity || world.time < lastused + spawndelay)
if(loc != user)
return
if(!(T.flags & RPD_ALLOWED_HERE))
to_chat(user, "<span class='notice'>[src] beeps, \"Unable to interface with [T]. Please try again later.\"</span>")
if(!proximity)
return
if(mode == ATMOS_MODE)
if(istype(T, /turf/simulated/wall)) //Drilling into walls takes time
playsound(loc, "sound/weapons/circsawhit.ogg", 50, 1)
user.visible_message("<span class = 'notice'>[user] starts drilling a hole in [T]...</span>", "<span class = 'notice'>You start drilling a hole in [T]...</span>", "<span class = 'warning'>You hear a drill.</span>")
if(!do_after(user, walldelay, target = T))
return
user.visible_message("<span class = 'notice'>[user] finishes drilling a hole in [T]!</span>", "<span class = 'notice'>You finish drilling a hole in [T]!</span>", "<span class = 'warning'>You hear clanking.</span>")
var/obj/item/pipe/P
if(whatpipe == GAS_SENSOR)
P = new /obj/item/pipe_gsensor(T)
else if(whatpipe == METER)
P = new /obj/item/pipe_meter(T)
else
P = new(T, pipe_type = whatpipe, dir = user.dir)
if(iconrotation == 0 && P.is_bent_pipe()) //Automatic rotation of dispensed pipes
P.dir = turn(user.dir, 135)
else if(iconrotation == 0 && P.pipe_type in list(CONNECTOR, UNARY_VENT, GAS_SCRUBBER, HE_EXCHANGER, SIMPLE_CAP, SUPPLY_CAP, SCRUBBERS_CAP, INJECTOR, PASSIVE_VENT)) //Some pipes dispense oppositely to what you'd expect, but we don't want to do anything if they selected a direction
P.flip()
else if(iconrotation != 0 && P.is_bent_pipe()) //If they selected a rotation and the pipe is bent
P.dir = turn(iconrotation, -45)
else if(iconrotation != 0)
P.dir = iconrotation
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == DISPOSALS_MODE && !istype(T, /turf/simulated/shuttle))
if(istype(T, /turf/simulated/wall)) //No disposals pipes on walls
to_chat(user, "<span class = 'warning'>That type of pipe won't fit on [T]!</span>")
return
var/obj/structure/disposalconstruct/P = new(T) //Now we make the pipe
P.dir = iconrotation
P.ptype = whatdpipe
if(iconrotation == 0) //Automatic rotation
P.dir = user.dir
if(iconrotation == 0 && whatdpipe != DISPOSALS_JUNCTION) //Disposals pipes are in the opposite direction to atmos pipes, so we need to flip them. Junctions don't have this quirk though
P.flip()
P.update()
to_chat(user, "<span class = 'notice'>[src] rapidly dispenses [P]!</span>")
Activaterpd(1)
else if(mode == ROTATION_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/rotate, /obj/structure/disposalconstruct/verb/rotate)
else if(mode == FLIP_MODE)
for(var/obj/W in T)
Manipulatepipes(W, /obj/item/pipe/verb/flip, /obj/structure/disposalconstruct/verb/flip)
else if(mode == DELETE_MODE)
var/eaten
for(var/obj/W in T)
if(istype(W, /obj/item/pipe) || istype(W, /obj/item/pipe_meter) || istype(W, /obj/item/pipe_gsensor) || istype(W, /obj/structure/disposalconstruct) && !W.anchored)
QDEL_NULL(W)
eaten = TRUE
if(eaten)
to_chat(user, "<span class='notice'>[src] sucks up the loose pipes on [T].")
Activaterpd()
else
to_chat(user, "<span class='notice'>There were no loose pipes on [T].</span>")
if(world.time < lastused + spawndelay)
return
target.rpd_act(user, src) //Handle RPD effects in separate procs
#undef SIMPLE_CAP
#undef SUPPLY_CAP
#undef SCRUBBERS_CAP
#undef HE_EXCHANGER
#undef CONNECTOR
#undef UNARY_VENT
#undef PASSIVE_VENT
#undef GAS_SCRUBBER
#undef INJECTOR
#undef GAS_SENSOR
#undef METER
#undef DISPOSALS_JUNCTION
#undef ATMOS_MODE
#undef DISPOSALS_MODE
#undef ROTATION_MODE
#undef FLIP_MODE
#undef DELETE_MODE
#undef ATMOS_PIPING
#undef SUPPLY_PIPING
#undef SCRUBBERS_PIPING
#undef DEVICES
#undef HEAT_PIPING
#undef RPD_COOLDOWN_TIME
#undef RPD_WALLBUILD_TIME
+9 -9
View File
@@ -33,19 +33,19 @@
var/list/species_facial_hair = list()
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || H.get_species() == "Vulpkanin")
if(C.species)
if(H.gender == MALE || isvulpkanin(H))
if(C.dna.species)
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(C.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.dna.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_facial_hair += i
else
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_facial.species_allowed)
species_facial_hair += i
@@ -57,18 +57,18 @@
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
//handle normal hair
var/list/species_hair = list()
if(C.species)
if(C.dna.species)
for(var/i in hair_styles_public_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i]
if(C.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.dna.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_hair += i
else
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_hair.species_allowed)
species_hair += i
+2 -2
View File
@@ -45,7 +45,7 @@
var/mob/living/carbon/human/H = user
if(!H.gloves)
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
if(affecting.status & ORGAN_ROBOT)
if(affecting.is_robotic())
return
to_chat(H, "<span class='warning'>[src] cuts into your hand!</span>")
if(affecting.receive_damage(force*0.5))
@@ -82,7 +82,7 @@
var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot"))
if(!affecting)
return
if(affecting.status & ORGAN_ROBOT)
if(affecting.is_robotic())
return
H.Weaken(3)
if(affecting.receive_damage(5, 0))
+1 -1
View File
@@ -26,7 +26,7 @@
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
var/mob/living/carbon/human/muncher = user
if(muncher && muncher.get_species() == "Drask")
if(muncher && isdrask(muncher))
to_chat(user, "You take a bite of the [name]. Delicious!")
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
user.nutrition += 2
@@ -371,7 +371,7 @@
*/
/obj/item/storage/bag/tray
name = "tray"
icon = 'icons/obj/food/food.dmi'
icon = 'icons/obj/food/containers.dmi'
icon_state = "tray"
desc = "A metal tray to lay food on."
force = 5
@@ -26,6 +26,7 @@
item_state = "syringe_kit"
burn_state = FLAMMABLE
var/foldable = /obj/item/stack/sheet/cardboard
var/amt = 1
/obj/item/storage/box/attack_self(mob/user)
..()
@@ -49,7 +50,7 @@
return
to_chat(user, "<span class='notice'>You fold [src] flat.</span>")
var/obj/item/I = new foldable(get_turf(src))
var/obj/item/stack/I = new foldable(get_turf(src), amt)
user.put_in_hands(I)
qdel(src)
@@ -59,6 +60,7 @@
icon_state = "largebox"
w_class = 42 // Big, bulky.
foldable = /obj/item/stack/sheet/cardboard
amt = 4
storage_slots = 21
max_combined_w_class = 42 // 21*2
@@ -14,7 +14,7 @@
*/
/obj/item/storage/fancy/
icon = 'icons/obj/food/food.dmi'
icon = 'icons/obj/food/containers.dmi'
icon_state = "donutbox6"
name = "donut box"
burn_state = FLAMMABLE
@@ -43,7 +43,6 @@
*/
/obj/item/storage/fancy/donut_box
icon = 'icons/obj/food/food.dmi'
icon_state = "donutbox6"
icon_type = "donut"
name = "donut box"
@@ -61,7 +60,6 @@
*/
/obj/item/storage/fancy/egg_box
icon = 'icons/obj/food/food.dmi'
icon_state = "eggbox"
icon_type = "egg"
name = "egg box"
@@ -357,19 +357,22 @@
remove_from_storage(Item, loc, burn)
//This proc is called when you want to place an item into the storage item.
/obj/item/storage/attackby(obj/item/W as obj, mob/user as mob, params)
/obj/item/storage/attackby(obj/item/I, mob/user, params)
..()
if(istype(I, /obj/item/hand_labeler))
var/obj/item/hand_labeler/labeler = I
if(labeler.mode)
return FALSE
. = 1 //no afterattack
if(isrobot(user))
to_chat(user, "<span class='notice'>You're a robot. No.</span>")
return 1//Robots can't interact with storage items.
return //Robots can't interact with storage items.
if(!can_be_inserted(W))
return 0
handle_item_insertion(W)
return 1
if(!can_be_inserted(I))
if(contents.len >= storage_slots) //don't use items on the backpack if they don't fit
return TRUE
return FALSE
handle_item_insertion(I)
/obj/item/storage/attack_hand(mob/user as mob)
playsound(src.loc, "rustle", 50, 1, -5)
+1 -1
View File
@@ -400,7 +400,7 @@
if(!S)
return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2)
if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2)
return ..()
if(!isOn()) //why wasn't this being checked already?
+1 -27
View File
@@ -58,7 +58,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
if(H.dna.species.is_small)
to_chat(user, "<span class='warning'>It's too heavy for you to wield fully.</span>")
return
if(user.get_inactive_hand())
@@ -313,7 +313,6 @@
sharp = TRUE
no_spin_thrown = TRUE
var/obj/item/grenade/explosive = null
var/war_cry = "AAAAARGH!!!"
/obj/item/twohanded/spear/update_icon()
if(explosive)
@@ -327,7 +326,6 @@
if(isturf(AM)) //So you can actually melee with it
return
if(explosive && wielded)
user.say("[war_cry]")
explosive.forceMove(AM)
explosive.prime()
qdel(src)
@@ -338,30 +336,6 @@
explosive.prime()
qdel(src)
/obj/item/twohanded/spear/AltClick(mob/user)
..()
if(!explosive)
return
if(ishuman(loc))
var/mob/living/carbon/human/M = loc
var/input = stripped_input(M, "What do you want your war cry to be? You will shout it when you hit someone in melee.", ,"", 50)
if(input)
war_cry = input
/obj/item/twohanded/spear/CheckParts(list/parts_list)
..()
if(explosive)
explosive.forceMove(get_turf(loc))
explosive = null
update_icon()
var/obj/item/grenade/G = locate() in contents
if(G)
explosive = G
name = "explosive lance"
embed_chance = 0
desc = "A makeshift spear with [G] attached to it. Alt+click on the spear to set your war cry!"
update_icon()
//GREY TIDE
/obj/item/twohanded/spear/grey_tide
icon_state = "spearglass0"
+1 -1
View File
@@ -179,7 +179,7 @@ obj/item/wirerod/attackby(obj/item/I, mob/user, params)
return
to_chat(user, "<span class='warning'>You begin gathering strength...</span>")
playsound(get_turf(src), 'sound/magic/lightning_chargeup.ogg', 65, 1)
if(do_after(user, 90, target = src))
if(do_after(user, 90, target = user))
to_chat(user, "<span class='userdanger'>You gather power! Time for a home run!</span>")
homerun_ready = 1
..()
+14 -4
View File
@@ -10,6 +10,7 @@
var/max = 30
var/prefix = "sharpened"
var/requires_sharpness = 1
var/claw_damage_increase = 1
/obj/item/whetstone/attackby(obj/item/I, mob/user, params)
@@ -46,16 +47,24 @@
playsound(get_turf(src), usesound, 50, 1)
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = 1
used = TRUE
update_icon()
/obj/item/whetstone/attack_self(mob/user as mob) //This is just fluff for now. Species datums are global and not newly created instances, so we can't adjust unarmed damage on a per mob basis.
/obj/item/whetstone/attack_self(mob/user)
if(used)
to_chat(user, "<span class='warning'>The whetstone is too worn to use again!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/datum/unarmed_attack/attack = H.species.unarmed
var/datum/unarmed_attack/attack = H.dna.species.unarmed
if(istype(attack, /datum/unarmed_attack/claws))
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on the [src]!</span>", "<span class='notice'>You sharpen your claws on the [src].</span>")
attack.damage += claw_damage_increase
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on [src]!</span>", "<span class='notice'>You sharpen your claws on [src].</span>")
playsound(get_turf(H), usesound, 50, 1)
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = TRUE
update_icon()
/obj/item/whetstone/super
name = "super whetstone block"
@@ -64,3 +73,4 @@
max = 200
prefix = "super-sharpened"
requires_sharpness = 0
claw_damage_increase = 200