mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 12:13:06 +00:00
Merge remote-tracking branch 'upstream/dev' into emergency-shuttle
Conflicts: code/setup.dm
This commit is contained in:
@@ -18,10 +18,10 @@
|
||||
#define MAX_DEEP_COUNT 300
|
||||
#define ITERATE_BEFORE_FAIL 200
|
||||
|
||||
#define RESOURCE_HIGH_MAX 8
|
||||
#define RESOURCE_HIGH_MIN 5
|
||||
#define RESOURCE_MID_MAX 4
|
||||
#define RESOURCE_MID_MIN 2
|
||||
#define RESOURCE_HIGH_MAX 3
|
||||
#define RESOURCE_HIGH_MIN 0
|
||||
#define RESOURCE_MID_MAX 2
|
||||
#define RESOURCE_MID_MIN 1
|
||||
#define RESOURCE_LOW_MAX 1
|
||||
#define RESOURCE_LOW_MIN 0
|
||||
|
||||
@@ -52,10 +52,6 @@ Deep minerals:
|
||||
var/random_variance_chance = 25
|
||||
var/random_element = 0.5
|
||||
|
||||
//Called by the drilling rigs each process().
|
||||
/datum/ore_distribution/proc/get_ore(var/x,var/y)
|
||||
return "Nope."
|
||||
|
||||
/datum/ore_distribution/proc/map_is_sane()
|
||||
if(!map) return 0
|
||||
|
||||
@@ -79,12 +75,13 @@ Deep minerals:
|
||||
//Halfassed diamond-square algorithm with some fuckery since it's a single dimension array.
|
||||
/datum/ore_distribution/proc/populate_distribution_map()
|
||||
|
||||
//Seed beginning values.
|
||||
//Announce it!
|
||||
world << "<b><font color='red'>Generating resource distribution map.</b></font>"
|
||||
|
||||
//Seed beginning values.
|
||||
var/x = 1
|
||||
var/y = 1
|
||||
var/size = real_size-1
|
||||
|
||||
map[MAP_TOP_LEFT] = (range/3)+rand(range/5)
|
||||
map[MAP_TOP_RIGHT] = (range/3)+rand(range/5)
|
||||
map[MAP_BOTTOM_LEFT] = (range/3)+rand(range/5)
|
||||
@@ -131,11 +128,16 @@ Deep minerals:
|
||||
|
||||
/datum/ore_distribution/proc/apply_to_asteroid()
|
||||
|
||||
var/origin_x = 13
|
||||
var/origin_y = 32
|
||||
var/limit_x = 217
|
||||
var/limit_y = 223
|
||||
var/asteroid_z = 5
|
||||
// THESE VALUES DETERMINE THE AREA THAT THE DISTRIBUTION MAP IS APPLIED TO.
|
||||
// IF YOU DO NOT RUN OFFICIAL BAYCODE ASTEROID MAP YOU NEED TO CHANGE THEM.
|
||||
// ORIGIN IS THE BOTTOM LEFT CORNER OF THE SQUARE CONTAINING ALL ASTEROID
|
||||
// TILES YOU WISH TO APPLY THE DISTRIBUTION MAP TO.
|
||||
|
||||
var/origin_x = 13 //We start here...
|
||||
var/origin_y = 32 //...and here...
|
||||
var/limit_x = 217 //...and iterate until here...
|
||||
var/limit_y = 223 //...and here...
|
||||
var/asteroid_z = 5 //...on this Z-level.
|
||||
|
||||
var/tx = origin_x
|
||||
var/ty = origin_y
|
||||
@@ -155,18 +157,9 @@ Deep minerals:
|
||||
|
||||
target_turf = locate(tx+j, ty+i, asteroid_z)
|
||||
|
||||
if(target_turf.has_resources)
|
||||
if(target_turf && target_turf.has_resources)
|
||||
|
||||
var/printcolor
|
||||
if(map[MAP_CELL] > (range*0.60))
|
||||
printcolor = "#FF0000"
|
||||
else if(map[MAP_CELL] > (range*0.40))
|
||||
printcolor = "#00FF00"
|
||||
else
|
||||
printcolor = "#0000FF"
|
||||
target_turf.color = "#[printcolor]"
|
||||
target_turf.resources = list()
|
||||
|
||||
target_turf.resources["silicates"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
target_turf.resources["carbonaceous rock"] = rand(RESOURCE_HIGH_MIN,RESOURCE_HIGH_MAX)
|
||||
|
||||
@@ -202,24 +195,8 @@ Deep minerals:
|
||||
tx = origin_x
|
||||
ty += chunk_size
|
||||
|
||||
/datum/ore_distribution/proc/print_map()
|
||||
world << "---"
|
||||
var/string = ""
|
||||
for(var/y = 1, y <= real_size, y++)
|
||||
for(var/x = 1, x <= real_size, x++)
|
||||
|
||||
var/printcolor
|
||||
if(map[MAP_CELL] > (range*0.60))
|
||||
printcolor = "#FF0000"
|
||||
else if(map[MAP_CELL] > (range*0.40))
|
||||
printcolor = "#00FF00"
|
||||
else
|
||||
printcolor = "#0000FF"
|
||||
string += "<font color='[printcolor]'>#</font>"
|
||||
|
||||
world << string
|
||||
string = ""
|
||||
world << "---"
|
||||
world << "<b><font color='red'>Resource map generation complete.</font></b>"
|
||||
return
|
||||
|
||||
#undef MAP_CELL
|
||||
#undef MAP_CENTRE
|
||||
@@ -245,4 +222,4 @@ Deep minerals:
|
||||
#undef RESOURCE_MID_MAX
|
||||
#undef RESOURCE_MID_MIN
|
||||
#undef RESOURCE_LOW_MAX
|
||||
#undef RESOURCE_LOW_MIN
|
||||
#undef RESOURCE_LOW_MIN
|
||||
|
||||
@@ -34,6 +34,22 @@
|
||||
for(var/mob/living/M in contents)
|
||||
M.show_message(message,m_type)
|
||||
|
||||
//Mob procs and vars for scooping up
|
||||
/mob/living/var/holder_type
|
||||
|
||||
/mob/living/proc/get_scooped(var/mob/living/carbon/grabber)
|
||||
if(!holder_type)
|
||||
return
|
||||
var/obj/item/weapon/holder/H = new holder_type(loc)
|
||||
src.loc = H
|
||||
H.name = loc.name
|
||||
H.attack_hand(grabber)
|
||||
|
||||
grabber << "You scoop up [src]."
|
||||
src << "[grabber] scoops you up."
|
||||
grabber.status_flags |= PASSEMOTES
|
||||
return
|
||||
|
||||
//Mob specific holders.
|
||||
|
||||
/obj/item/weapon/holder/diona
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
var/ready_evolve = 0
|
||||
universal_understand = 0 // Dionaea do not need to speak to people
|
||||
universal_speak = 0 // before becoming an adult. Use *chirp.
|
||||
holder_type = /obj/item/weapon/holder/diona
|
||||
|
||||
/mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
@@ -24,14 +25,7 @@
|
||||
src.verbs -= /mob/living/carbon/monkey/diona/proc/merge
|
||||
src.loc = M
|
||||
else
|
||||
var/obj/item/weapon/holder/diona/D = new(loc)
|
||||
src.loc = D
|
||||
D.name = loc.name
|
||||
D.attack_hand(M)
|
||||
M << "You scoop up [src]."
|
||||
src << "[M] scoops you up."
|
||||
M.status_flags |= PASSEMOTES
|
||||
return
|
||||
get_scooped(M)
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
//Used for self-mailing.
|
||||
var/mail_destination = ""
|
||||
|
||||
//Used for pulling.
|
||||
|
||||
holder_type = /obj/item/weapon/holder/drone
|
||||
/mob/living/silicon/robot/drone/New()
|
||||
|
||||
..()
|
||||
@@ -60,7 +59,6 @@
|
||||
|
||||
//Some tidying-up.
|
||||
flavor_text = "It's a tiny little repair drone. The casing is stamped with an NT logo and the subscript: 'NanoTrasen Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
|
||||
updatename()
|
||||
updateicon()
|
||||
|
||||
//Redefining some robot procs...
|
||||
@@ -104,15 +102,8 @@
|
||||
if(copytext(message,1,2) == "*")
|
||||
return emote(copytext(message,2))
|
||||
else if(length(message) >= 2)
|
||||
if(copytext(message, 1 ,3) == ":b" || copytext(message, 1 ,3) == ":B")
|
||||
|
||||
if(!is_component_functioning("comms"))
|
||||
src << "\red Your binary communications component isn't functional."
|
||||
return
|
||||
|
||||
robot_talk(trim(copytext(message,3)))
|
||||
|
||||
else if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":D")
|
||||
if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":D")
|
||||
|
||||
if(!is_component_functioning("radio"))
|
||||
src << "\red Your radio transmitter isn't functional."
|
||||
@@ -329,8 +320,8 @@
|
||||
full_law_reset()
|
||||
src << "<br><b>You are a maintenance drone, a tiny-brained robotic repair machine</b>."
|
||||
src << "You have no individual will, no personality, and no drives or urges other than your laws."
|
||||
src << "Use <b>:b</b> to talk to your fellow synthetics, <b>:d</b> to talk to other drones, and <b>say</b> to speak silently to your nearby fellows."
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>."
|
||||
src << "Use <b>:d</b> to talk to other drones and <b>say</b> to speak silently to your nearby fellows."
|
||||
src << "Remember, you are <b>lawed against interference with the crew</b>. Also remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "<b>Don't invade their worksites, don't steal their resources, don't tell them about the changeling in the toilets.</b>"
|
||||
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your third law</i></b>."
|
||||
|
||||
|
||||
@@ -47,12 +47,5 @@
|
||||
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
|
||||
|
||||
if(M.a_intent == "help")
|
||||
var/obj/item/weapon/holder/drone/D = new(loc)
|
||||
src.loc = D
|
||||
D.attack_hand(M)
|
||||
M << "You scoop up [src]."
|
||||
src << "[M] scoops you up."
|
||||
M.status_flags |= PASSEMOTES
|
||||
return
|
||||
|
||||
get_scooped(M)
|
||||
..()
|
||||
@@ -318,8 +318,8 @@
|
||||
src.modules += new /obj/item/weapon/matter_decompiler(src)
|
||||
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/card/emag(src)
|
||||
src.emag.name = "Cryptographic Sequencer"
|
||||
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
src.emag.name = "Plasma Cutter"
|
||||
|
||||
for(var/T in stacktypes)
|
||||
var/obj/item/stack/sheet/W = new T(src)
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
min_oxy = 16 //Require atleast 16kPA oxygen
|
||||
minbodytemp = 223 //Below -50 Degrees Celcius
|
||||
maxbodytemp = 323 //Above 50 Degrees Celcius
|
||||
holder_type = /obj/item/weapon/holder/cat
|
||||
|
||||
/mob/living/simple_animal/cat/Life()
|
||||
//MICE!
|
||||
@@ -63,18 +64,11 @@
|
||||
|
||||
/mob/living/simple_animal/cat/MouseDrop(atom/over_object)
|
||||
|
||||
var/mob/living/carbon/human/H = over_object
|
||||
var/mob/living/carbon/H = over_object
|
||||
if(!istype(H)) return ..()
|
||||
|
||||
//This REALLY needs to be moved to a general mob proc somewhere.
|
||||
if(H.a_intent == "help")
|
||||
var/obj/item/weapon/holder/cat/C = new(loc)
|
||||
src.loc = C
|
||||
C.name = loc.name
|
||||
C.attack_hand(H)
|
||||
H << "You scoop up [src]."
|
||||
src << "[H] scoops you up."
|
||||
H.status_flags |= PASSEMOTES
|
||||
get_scooped(H)
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -61,7 +61,10 @@
|
||||
usr << browse("", "window=[name]") //Closes the dialog
|
||||
P = src[page]
|
||||
P.attackby(W, user)
|
||||
|
||||
|
||||
update_icon()
|
||||
attack_self(usr) //Update the browsed page.
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user