mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-26 10:03:45 +00:00
@@ -330,14 +330,6 @@
|
||||
|
||||
// Simple helper to face what you clicked on, in case it should be needed in more than one place
|
||||
/mob/proc/face_atom(var/atom/A)
|
||||
// Snowflake for space vines.
|
||||
var/is_buckled = 0
|
||||
if(buckled)
|
||||
if(istype(buckled))
|
||||
if(!buckled.movable)
|
||||
is_buckled = 1
|
||||
else
|
||||
is_buckled = 0
|
||||
if(!A || !x || !y || !A.x || !A.y) return
|
||||
var/dx = A.x - x
|
||||
var/dy = A.y - y
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
return
|
||||
|
||||
if(melee_damage_upper == 0 && istype(A,/mob/living))
|
||||
custom_emote(1,"[friendly] [src]!")
|
||||
custom_emote(1,"[friendly] [A]!")
|
||||
return
|
||||
|
||||
var/damage = rand(melee_damage_lower, melee_damage_upper)
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
var/vend_power_usage = 150 //actuators and stuff
|
||||
|
||||
var/active = 1 //No sales pitches if off!
|
||||
var/delay_product_spawn // If set, uses sleep() in product spawn proc (mostly for seeds to retrieve correct names).
|
||||
var/vend_ready = 1 //Are we ready to vend?? Is it time??
|
||||
var/vend_delay = 10 //How long does it take to vend?
|
||||
var/datum/data/vending_product/currently_vending = null // A /datum/data/vending_product instance of what we're paying for right now.
|
||||
@@ -122,9 +121,6 @@
|
||||
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
|
||||
|
||||
if(delay_product_spawn)
|
||||
sleep(15) //Make ABSOLUTELY SURE the seed datum is properly populated.
|
||||
|
||||
for(var/typepath in productlist)
|
||||
var/amount = productlist[typepath]
|
||||
var/price = prices[typepath]
|
||||
@@ -147,9 +143,6 @@
|
||||
R.category=CAT_NORMAL
|
||||
product_records += R
|
||||
|
||||
if(delay_product_spawn)
|
||||
sleep(5) //sleep(1) did not seem to cut it, so here we are.
|
||||
|
||||
var/atom/temp = typepath
|
||||
R.product_name = initial(temp.name)
|
||||
|
||||
@@ -791,7 +784,6 @@
|
||||
product_slogans = "THIS'S WHERE TH' SEEDS LIVE! GIT YOU SOME!;Hands down the best seed selection on the station!;Also certain mushroom varieties available, more for experts! Get certified today!"
|
||||
product_ads = "We like plants!;Grow some crops!;Grow, baby, growww!;Aw h'yeah son!"
|
||||
icon_state = "seeds"
|
||||
delay_product_spawn = 1
|
||||
|
||||
products = list(/obj/item/seeds/bananaseed = 3,/obj/item/seeds/berryseed = 3,/obj/item/seeds/carrotseed = 3,/obj/item/seeds/chantermycelium = 3,/obj/item/seeds/chiliseed = 3,
|
||||
/obj/item/seeds/cornseed = 3, /obj/item/seeds/eggplantseed = 3, /obj/item/seeds/potatoseed = 3, /obj/item/seeds/replicapod = 3,/obj/item/seeds/soyaseed = 3,
|
||||
@@ -803,6 +795,34 @@
|
||||
/obj/item/seeds/nettleseed = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/reishimycelium = 2,/obj/item/seeds/shandseed = 2,)
|
||||
premium = list(/obj/item/toy/waterflower = 1)
|
||||
|
||||
/obj/machinery/vending/hydroseeds/build_inventory(var/list/productlist,hidden=0,req_coin=0)
|
||||
|
||||
for(var/typepath in productlist)
|
||||
var/amount = productlist[typepath]
|
||||
var/price = prices[typepath]
|
||||
if(isnull(amount)) amount = 1
|
||||
|
||||
var/datum/data/vending_product/R = new /datum/data/vending_product()
|
||||
|
||||
R.product_path = typepath
|
||||
R.amount = amount
|
||||
R.price = price
|
||||
R.display_color = pick("red","blue","green")
|
||||
|
||||
if(hidden)
|
||||
R.category=CAT_HIDDEN
|
||||
hidden_records += R
|
||||
else if(req_coin)
|
||||
R.category=CAT_COIN
|
||||
coin_records += R
|
||||
else
|
||||
R.category=CAT_NORMAL
|
||||
product_records += R
|
||||
|
||||
var/obj/item/seeds/S = new typepath(src)
|
||||
R.product_name = S.name
|
||||
del(S)
|
||||
return
|
||||
|
||||
/obj/machinery/vending/magivend
|
||||
name = "MagiVend"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
icon_state = "utilitybelt"
|
||||
item_state = "utility"
|
||||
can_hold = list(
|
||||
"/obj/item/weapon/combitool",
|
||||
"/obj/item/weapon/crowbar",
|
||||
"/obj/item/weapon/screwdriver",
|
||||
"/obj/item/weapon/weldingtool",
|
||||
|
||||
@@ -478,6 +478,7 @@
|
||||
desc = "It even has one of those nubbins for doing the thingy."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "combitool"
|
||||
w_class = 2
|
||||
|
||||
var/list/spawn_tools = list(
|
||||
/obj/item/weapon/screwdriver,
|
||||
@@ -511,11 +512,17 @@
|
||||
user << "You switch \the [src] to the [tool.name] fitting."
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/combitool/attack(var/atom/target, var/mob/living/user)
|
||||
/obj/item/weapon/combitool/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
var/obj/item/tool = tools[current_tool]
|
||||
if(!tool)
|
||||
return ..()
|
||||
if(!tool) return 0
|
||||
return (tool ? tool.attack(M,user) : 0)
|
||||
|
||||
/obj/item/weapon/combitool/afterattack(var/atom/target, var/mob/living/user, proximity, params)
|
||||
var/obj/item/tool = tools[current_tool]
|
||||
if(!tool) return 0
|
||||
tool.loc = user
|
||||
var/resolved = target.attackby(tool,user)
|
||||
if(!resolved && tool && target)
|
||||
tool.afterattack(target,user,1)
|
||||
return 1
|
||||
if(tool)
|
||||
tool.loc = src
|
||||
@@ -353,6 +353,9 @@
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
|
||||
if(istype(W, /obj/item/weapon/melee/energy/blade))
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
@@ -582,6 +585,8 @@
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
if(W.loc != user) // This should stop mounted modules ending up outside the module.
|
||||
return
|
||||
user.drop_item()
|
||||
if(W && W.loc) W.loc = src.loc
|
||||
return
|
||||
@@ -815,6 +815,11 @@ var/global/list/gear_datums = list()
|
||||
sort_category = "misc"
|
||||
cost = 2
|
||||
|
||||
/datum/gear/combitool
|
||||
display_name = "combi-tool"
|
||||
path = /obj/item/weapon/combitool
|
||||
cost = 3
|
||||
|
||||
// Stuff worn on the ears. Items here go in the "ears" sort_category but they must not use
|
||||
// the slot_r_ear or slot_l_ear as the slot, or else players will spawn with no headset.
|
||||
/datum/gear/skrell_chain
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
usr << "<span class='warning'>The suit is not initialized.</span>"
|
||||
return 0
|
||||
|
||||
if(holder.security_check_enabled && !(istype(usr,/mob/living/silicon) || holder.allowed(usr)))
|
||||
if(holder.security_check_enabled && !holder.check_suit_access(usr))
|
||||
usr << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
armor = list(melee = 40, bullet = 5, laser = 20,energy = 5, bomb = 35, bio = 100, rad = 20)
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_COLD_PROTECTION_TEMPERATURE
|
||||
max_heat_protection_temperature = SPACE_SUIT_MAX_HEAT_PROTECTION_TEMPERATURE
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0
|
||||
siemens_coefficient = 0.1
|
||||
permeability_coefficient = 0.1
|
||||
|
||||
var/interface_path = "hardsuit.tmpl"
|
||||
var/ai_interface_path = "hardsuit.tmpl"
|
||||
@@ -278,7 +278,7 @@
|
||||
module.deactivate()
|
||||
for(var/obj/item/piece in list(helmet,boots,gloves,chest))
|
||||
if(!piece) continue
|
||||
if(canremove && (flags & AIRTIGHT))
|
||||
if(canremove)
|
||||
piece.flags &= ~STOPSPRESSUREDMAGE
|
||||
piece.flags &= ~AIRTIGHT
|
||||
else
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
desc = "A suit worn by the commander of a NanoTrasen Emergency Response Team. Has blue highlights. Armoured and space ready."
|
||||
suit_type = "ERT commander"
|
||||
icon_state = "ert_commander_rig"
|
||||
siemens_coefficient = 0.6
|
||||
offline_slowdown = 3
|
||||
|
||||
helm_type = /obj/item/clothing/head/helmet/space/rig/ert
|
||||
|
||||
@@ -878,7 +878,7 @@ I said no!
|
||||
|
||||
/datum/recipe/poppypretzel
|
||||
items = list(
|
||||
/obj/item/seeds/poppyseed,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/poppy,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/dough,
|
||||
)
|
||||
result = /obj/item/weapon/reagent_containers/food/snacks/poppypretzel
|
||||
|
||||
@@ -56,9 +56,6 @@
|
||||
/obj/item/seeds/replicapod
|
||||
seed_type = "diona"
|
||||
|
||||
/obj/item/seeds/poppyseed
|
||||
seed_type = "poppies"
|
||||
|
||||
/obj/item/seeds/chiliseed
|
||||
seed_type = "chili"
|
||||
|
||||
|
||||
@@ -88,8 +88,12 @@
|
||||
if(wrapped) //Already have an item.
|
||||
//Temporary put wrapped into user so target's attackby() checks pass.
|
||||
wrapped.loc = user
|
||||
|
||||
//Pass the attack on to the target. This might delete/relocate wrapped.
|
||||
wrapped.afterattack(target,user)
|
||||
var/resolved = target.attackby(wrapped,user)
|
||||
if(!resolved && wrapped && target)
|
||||
wrapped.afterattack(target,user,1)
|
||||
|
||||
//If wrapped was neither deleted nor put into target, put it back into the gripper.
|
||||
if(wrapped && user && (wrapped.loc == user))
|
||||
wrapped.loc = src
|
||||
|
||||
@@ -89,17 +89,17 @@
|
||||
/mob/living/simple_animal/hostile/proc/AttackingTarget()
|
||||
if(!Adjacent(target_mob))
|
||||
return
|
||||
//if(isliving(target_mob))
|
||||
//var/mob/living/L = target_mob
|
||||
//L.attack_animal(src)
|
||||
//return L
|
||||
//if(istype(target_mob,/obj/mecha))
|
||||
//var/obj/mecha/M = target_mob
|
||||
//M.attack_animal(src)
|
||||
//return M
|
||||
//if(istype(target_mob,/obj/machinery/bot))
|
||||
//var/obj/machinery/bot/B = target_mob
|
||||
//B.attack_animal(src)
|
||||
if(isliving(target_mob))
|
||||
var/mob/living/L = target_mob
|
||||
L.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
return L
|
||||
if(istype(target_mob,/obj/mecha))
|
||||
var/obj/mecha/M = target_mob
|
||||
M.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
return M
|
||||
if(istype(target_mob,/obj/machinery/bot))
|
||||
var/obj/machinery/bot/B = target_mob
|
||||
B.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/LoseTarget()
|
||||
stance = HOSTILE_STANCE_IDLE
|
||||
@@ -193,10 +193,10 @@
|
||||
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
|
||||
if(prob(break_stuff_probability))
|
||||
for(var/dir in cardinal) // North, South, East, West
|
||||
//for(var/obj/structure/window/obstacle in get_step(src, dir))
|
||||
//if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
|
||||
//obstacle.attack_animal(src)
|
||||
//return
|
||||
//var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
//if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
//obstacle.attack_animal(src)
|
||||
for(var/obj/structure/window/obstacle in get_step(src, dir))
|
||||
if(obstacle.dir == reverse_dir[dir]) // So that windows get smashed in the right order
|
||||
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
return
|
||||
var/obj/structure/obstacle = locate(/obj/structure, get_step(src, dir))
|
||||
if(istype(obstacle, /obj/structure/window) || istype(obstacle, /obj/structure/closet) || istype(obstacle, /obj/structure/table) || istype(obstacle, /obj/structure/grille))
|
||||
obstacle.attack_generic(src,rand(melee_damage_lower,melee_damage_upper),attacktext)
|
||||
|
||||
Reference in New Issue
Block a user