Merge branch 'master' into var/const-to-define

This commit is contained in:
AffectedArc07
2020-03-03 22:44:07 +00:00
101 changed files with 614 additions and 436 deletions
+1 -1
View File
@@ -1181,7 +1181,7 @@ steam.start() -- spawns the effect
// Clamp all values to MAX_EXPLOSION_RANGE
if(round(amount/12) > 0)
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
devastation = min (MAX_EX_DEVASTATION_RANGE, devastation + round(amount/12))
if(round(amount/6) > 0)
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
@@ -172,7 +172,7 @@
// Clamp all values to MAX_EXPLOSION_RANGE
if(round(amount/12) > 0)
devastation = min (MAX_EX_DEVESTATION_RANGE, devastation + round(amount/12))
devastation = min (MAX_EX_DEVASTATION_RANGE, devastation + round(amount/12))
if(round(amount/6) > 0)
heavy = min (MAX_EX_HEAVY_RANGE, heavy + round(amount/6))
+1 -1
View File
@@ -11,7 +11,7 @@
if(!ignorecap)
// Clamp all values to MAX_EXPLOSION_RANGE
devastation_range = min (MAX_EX_DEVESTATION_RANGE, devastation_range)
devastation_range = min (MAX_EX_DEVASTATION_RANGE, devastation_range)
heavy_impact_range = min (MAX_EX_HEAVY_RANGE, heavy_impact_range)
light_impact_range = min (MAX_EX_LIGHT_RANGE, light_impact_range)
flash_range = min (MAX_EX_FLASH_RANGE, flash_range)
@@ -326,6 +326,7 @@
on = TRUE //Bio-luminesence has one setting, on.
/obj/item/flashlight/slime/New()
..()
set_light(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
@@ -9,6 +9,7 @@
var/datum/nano_module/crew_monitor/crew_monitor
/obj/item/sensor_device/New()
..()
crew_monitor = new(src)
/obj/item/sensor_device/Destroy()
@@ -15,11 +15,14 @@
var/obj/item/tape/mytape
var/open_panel = 0
var/canprint = 1
var/starts_with_tape = TRUE
/obj/item/taperecorder/New()
mytape = new /obj/item/tape/random(src)
update_icon()
..()
if(starts_with_tape)
mytape = new /obj/item/tape/random(src)
update_icon()
/obj/item/taperecorder/Destroy()
QDEL_NULL(mytape)
@@ -243,8 +246,8 @@
canprint = 1
//empty tape recorders
/obj/item/taperecorder/empty/New()
return
/obj/item/taperecorder/empty
starts_with_tape = FALSE
/obj/item/tape
@@ -317,4 +320,5 @@
//Random colour tapes
/obj/item/tape/random/New()
..()
icon_state = "tape_[pick("white", "blue", "red", "yellow", "purple")]"
@@ -10,6 +10,7 @@
var/datum/effect_system/spark_spread/spark_system
/obj/item/thermal_drill/New()
..()
soundloop = new(list(src), FALSE)
spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(1, 0, src)
@@ -316,6 +316,7 @@ var/list/world_uplinks = list()
// implant uplink (not the implant tool) and a preset headset uplink.
/obj/item/radio/uplink/New()
..()
hidden_uplink = new(src)
icon_state = "radio"
@@ -339,6 +340,7 @@ var/list/world_uplinks = list()
hidden_uplink.uplink_type = "sst"
/obj/item/multitool/uplink/New()
..()
hidden_uplink = new(src)
/obj/item/multitool/uplink/attack_self(mob/user as mob)
+2
View File
@@ -38,6 +38,7 @@
item_state = "balloon-empty"
/obj/item/toy/balloon/New()
..()
create_reagents(10)
/obj/item/toy/balloon/attack(mob/living/carbon/human/M as mob, mob/user as mob)
@@ -799,6 +800,7 @@ obj/item/toy/cards/deck/syndicate/black
resistance_flags = FLAMMABLE
/obj/item/toy/therapy/New()
..()
if(item_color)
name = "[item_color] therapy doll"
desc += " This one is [item_color]."
+1 -1
View File
@@ -18,6 +18,7 @@ RSF
var/list/configured_items = list()
/obj/item/rsf/New()
..()
desc = "A RSF. It currently holds [matter]/30 fabrication-units."
// configured_items[ID_NUMBER] = list("Human-readable name", price in energy, /type/path)
configured_items[++configured_items.len] = list("Dosh", 50, /obj/item/stack/spacecash/c10)
@@ -30,7 +31,6 @@ RSF
configured_items[++configured_items.len] = list("Snack - Donut", 4000, /obj/item/reagent_containers/food/snacks/donut)
configured_items[++configured_items.len] = list("Snack - Chicken Soup", 4000, /obj/item/reagent_containers/food/drinks/chicken_soup)
configured_items[++configured_items.len] = list("Snack - Turkey Burger", 4000, /obj/item/reagent_containers/food/snacks/tofuburger)
return
/obj/item/rsf/attackby(obj/item/W as obj, mob/user as mob, params)
..()
@@ -681,6 +681,7 @@
/obj/item/card/id/prisoner/random
/obj/item/card/id/prisoner/random/New()
..()
var/random_number = "#[rand(0, 99)]-[rand(0, 999)]"
name = "Prisoner [random_number]"
registered_name = name
@@ -48,6 +48,7 @@
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
@@ -46,6 +46,7 @@
/obj/item/extinguisher/New()
..()
create_reagents(max_water)
reagents.add_reagent("water", max_water)
@@ -26,6 +26,7 @@
var/cores = "" // Also for logging
/obj/item/grenade/chem_grenade/New()
..()
create_reagents(1000)
if(payload_name)
payload_name += " " // formatting, ignore me
@@ -47,4 +47,5 @@
hitsound = 'sound/weapons/pierce.ogg'
/obj/item/embedded/shrapnel/New()
..()
icon_state = pick("shrapnel1", "shrapnel2", "shrapnel3")
@@ -556,6 +556,7 @@
var/faith = 99 //a conversion requires 100 faith to attempt. faith recharges over time while you are wearing missionary robes that have been linked to the staff.
/obj/item/nullrod/missionary_staff/New()
..()
team_color = pick("red", "blue")
icon_state = "godstaff-[team_color]"
item_state = "godstaff-[team_color]"
+1 -1
View File
@@ -36,11 +36,11 @@
var/max_contents = 1
/obj/item/kitchen/utensil/New()
..()
if(prob(60))
src.pixel_y = rand(0, 4)
create_reagents(5)
return
/obj/item/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
+5 -4
View File
@@ -26,10 +26,11 @@
icon_off = "zippo"
/obj/item/lighter/random/New()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
..()
var/color = pick("r","c","y","g")
icon_on = "lighter-[color]-on"
icon_off = "lighter-[color]"
icon_state = icon_off
/obj/item/lighter/attack_self(mob/living/user)
if(user.r_hand == src || user.l_hand == src || isrobot(user))
@@ -119,6 +119,7 @@
var/hacked = 0
/obj/item/melee/energy/sword/New()
..()
if(item_color == null)
item_color = pick("red", "blue", "green", "purple")
@@ -219,9 +220,6 @@
icon_state_on = "cutlass1"
light_color = LIGHT_COLOR_RED
/obj/item/melee/energy/sword/pirate/New()
return
/obj/item/melee/energy/blade
name = "energy blade"
desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal."
+2 -1
View File
@@ -90,7 +90,8 @@
desc = "test lightning"
/obj/item/lightning/New()
icon_state = "1"
..()
icon_state = "1"
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
var/angle = get_angle(A, user)
+3 -49
View File
@@ -27,57 +27,11 @@
return
if(ishuman(M))
var/mob/living/carbon/human/H = M
//see code/modules/mob/new_player/preferences.dm at approx line 545 for comments!
//this is largely copypasted from there.
//handle facial hair (if necessary)
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 || isvulpkanin(H))
if(C.dna.species)
for(var/i in GLOB.facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = GLOB.facial_hair_styles_list[i]
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.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
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
else
species_facial_hair = GLOB.facial_hair_styles_list
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
//facial hair
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in H.generate_valid_facial_hairstyles()
//handle normal hair
var/list/species_hair = list()
if(C.dna.species)
for(var/i in GLOB.hair_styles_public_list)
var/datum/sprite_accessory/hair/tmp_hair = GLOB.hair_styles_public_list[i]
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.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
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
else
species_hair = GLOB.hair_styles_public_list
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in H.generate_valid_hairstyles()
user.visible_message("<span class='notice'>[user] starts cutting [M]'s hair!</span>", "<span class='notice'>You start cutting [M]'s hair!</span>") //arguments for this are: 1. what others see 2. what the user sees. --Fixed grammar, (TGameCo)
playsound(loc, 'sound/goonstation/misc/scissor.ogg', 100, 1)
if(do_after(user, 50 * toolspeed, target = H)) //this is the part that adds a delay. delay is in deciseconds. --Made it 5 seconds, because hair isn't cut in one second in real life, and I want at least a little bit longer time, (TGameCo)
@@ -68,6 +68,7 @@
usesound = 'sound/items/deconstruct.ogg'
/obj/item/stock_parts/New()
..()
src.pixel_x = rand(-5.0, 5)
src.pixel_y = rand(-5.0, 5)
@@ -61,10 +61,6 @@
cant_hold = list(/obj/item/storage/backpack/holding)
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 60, "acid" = 50)
/obj/item/storage/backpack/holding/New()
..()
return
/obj/item/storage/backpack/holding/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/storage/backpack/holding))
var/response = alert(user, "This creates a singularity, destroying you and much of the station. Are you SURE?","IMMINENT DEATH!", "No", "Yes")
@@ -373,6 +369,10 @@
new /obj/item/clothing/under/rank/miner/lavaland(src)
new /obj/item/encryptionkey/headset_cargo(src)
new /obj/item/clothing/mask/gas/explorer(src)
new /obj/item/gun/energy/kinetic_accelerator(src)
new /obj/item/kitchen/knife/combat/survival(src)
new /obj/item/flashlight/seclite(src)
new /obj/item/clothing/suit/hooded/explorer(src)
/obj/item/storage/backpack/duffel/syndie/ammo/smg
@@ -1099,6 +1099,7 @@
desc = "Contains a variety of deluxe stock parts."
/obj/item/storage/box/stockparts/deluxe/New()
..()
for(var/i in 1 to 3)
new /obj/item/stock_parts/capacitor/quadratic(src)
new /obj/item/stock_parts/scanning_module/triphasic(src)
@@ -240,6 +240,7 @@
var/colormap = list(red=LIGHT_COLOR_RED, blue=LIGHT_COLOR_LIGHTBLUE, green=LIGHT_COLOR_GREEN, purple=LIGHT_COLOR_PURPLE, rainbow=LIGHT_COLOR_WHITE)
/obj/item/twohanded/dualsaber/New()
..()
if(!blade_color)
blade_color = pick("red", "blue", "green", "purple")
+1 -1
View File
@@ -293,7 +293,7 @@ a {
return FALSE
if(I.tool_behaviour != TOOL_WRENCH)
return FALSE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
if(!I.tool_use_check(user, 0))
return FALSE
if(!(flags & NODECONSTRUCT))
to_chat(user, "<span class='notice'>Now [anchored ? "un" : ""]securing [name].</span>")
+1 -1
View File
@@ -241,7 +241,7 @@
return
TOOL_ATTEMPT_DISMANTLE_MESSAGE
if(I.use_tool(src, user, 20, volume = I.tool_volume) && deconstruction_ready)
deconstruct(TRUE, 1)
deconstruct(TRUE)
TOOL_DISMANTLE_SUCCESS_MESSAGE
/obj/structure/table/wrench_act(mob/user, obj/item/I)