Skip to content

Commit

Permalink
Merge branch 'CeladonSS13:beta-dev' into cringe26
Browse files Browse the repository at this point in the history
  • Loading branch information
molnizz authored Oct 21, 2024
2 parents a1d76b8 + b1b9a22 commit 9824138
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 34 deletions.
10 changes: 6 additions & 4 deletions code/controllers/subsystem/overmap_move.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,18 @@ TIMER_SUBSYSTEM_DEF(overmap_movement)
var/obj/machinery/computer/helm/a = A.helms[arpdequeue_pointer]
a.say("Collision impact with vessel \"[B.name]\".")
playsound(a, 'sound/machines/engine_alert2.ogg', 50, FALSE)
var/opposite_x = sin(SIMPLIFY_DEGREES(bearing+180))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, max(B.speed_x, -B.speed_x))
var/opposite_y = cos(SIMPLIFY_DEGREES(bearing+180))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, max(B.speed_y, -B.speed_y))
var/opposite_x = sin(SIMPLIFY_DEGREES(bearing+180))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, abs(B.speed_x))
var/opposite_y = cos(SIMPLIFY_DEGREES(bearing+180))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, abs(B.speed_y))
var/alt_opposite_x = sin(SIMPLIFY_DEGREES(bearing))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, abs(B.speed_x))
var/alt_opposite_y = cos(SIMPLIFY_DEGREES(bearing))*(B.shuttle_port.turf_count/A.shuttle_port.turf_count)*max(0.002, abs(B.speed_y))
if(!(A.datum_flags & DF_ISPROCESSING))
A.adjust_speed(-A.speed_x/2 + opposite_x, -A.speed_y/2 + opposite_y)
else
A.vector_to_add = list("x" = -A.speed_x/2 + opposite_x, "y" = -A.speed_y/2 + opposite_y)
if(!(B.datum_flags & DF_ISPROCESSING))
B.adjust_speed(-B.speed_x/2 + opposite_x, -B.speed_y/2 + opposite_y)
B.adjust_speed(-B.speed_x/2 + alt_opposite_x, -B.speed_y/2 + alt_opposite_y)
else
B.vector_to_add = list("x" = -B.speed_x/2 + -opposite_x, "y" = -B.speed_y/2 + -opposite_y)
B.vector_to_add = list("x" = -B.speed_x/2 + alt_opposite_x, "y" = -B.speed_y/2 + alt_opposite_y)
spawn_meteors_alt(round(60 SECONDS * MAGNITUDE(relative_motion_x, relative_motion_y))+1, list(/obj/effect/meteor/invisible), A.shuttle_port.get_virtual_level(), angle2dir_cardinal(SIMPLIFY_DEGREES((bearing-A.bow_heading+90))))
spawn_meteors_alt(round(60 SECONDS * MAGNITUDE(relative_motion_x, relative_motion_y))+1, list(/obj/effect/meteor/invisible), B.shuttle_port.get_virtual_level(), angle2dir_cardinal(SIMPLIFY_DEGREES((bearing-A.bow_heading+270))))

Expand Down
31 changes: 16 additions & 15 deletions code/controllers/subsystem/overmap_stuff.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,10 @@ SUBSYSTEM_DEF(overmap_stuff)

animate(i.token, pixel_w = smooth_anim["x"], pixel_z = smooth_anim["y"], wait, 1)
if(i.token.ship_image)
if(i.token.ship_image.loc != i.token.loc)
i.token.ship_image.forceMove(i.token.loc)
i.token.ship_image.pixel_w = i.last_anim["x"]
i.token.ship_image.pixel_z = i.last_anim["y"]
animate(i.token.ship_image, pixel_w = smooth_anim["x"], pixel_z = smooth_anim["y"], wait, 1)
if(i.token.move_vec)
if(i.token.move_vec.loc != i.token.loc)
i.token.move_vec.forceMove(i.token.loc)
i.token.move_vec.pixel_w = i.last_anim["x"]
i.token.move_vec.pixel_z = i.last_anim["y"]
animate(i.token.move_vec, pixel_w = smooth_anim["x"], pixel_z = smooth_anim["y"], wait, 1)
Expand Down Expand Up @@ -93,11 +89,6 @@ SUBSYSTEM_DEF(overmap_rotation_velocity)
controlled_ships = SSovermap.controlled_ships
for(var/datum/overmap/ship/i in controlled_ships)
if(!i.docked_to)
if(i.token)
if(i.token.ship_image)
i.token.ship_image.alpha = 255
if(i.token.move_vec)
i.token.move_vec.alpha = 255
if(i.rotating == 1)
i.bow_heading = SIMPLIFY_DEGREES(i.bow_heading+i.rotation_velocity)
i.rotation_velocity = min(90, i.rotation_velocity+1)
Expand All @@ -109,11 +100,21 @@ SUBSYSTEM_DEF(overmap_rotation_velocity)
N.Turn(i.bow_heading)
if(i.token.ship_image)
i.token.ship_image.transform = N
else
if(i.token)
if(i.token.ship_image)
i.token.ship_image.alpha = 0
if(i.token.move_vec)
i.token.move_vec.alpha = 0

/datum/overmap/ship/complete_dock(datum/overmap/dock_target, datum/docking_ticket/ticket)
if(token)
if(token.ship_image)
token.ship_image.forceMove(token)
if(token.move_vec)
token.move_vec.forceMove(token)
. = ..()

/datum/overmap/ship/complete_undock()
if(token)
if(token.ship_image)
token.ship_image.forceMove(get_turf(docked_to.token))
if(token.move_vec)
token.move_vec.forceMove(get_turf(docked_to.token))
. = ..()

// [/CELADON-ADD]
4 changes: 4 additions & 0 deletions code/modules/overmap/_overmap_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@
while(container && !container.x || !container.y)
container = container.docked_to
SSovermap.overmap_container[container.x][container.y] += src
//[CELADON-ADD] - CELADON_FIXES
token.pixel_w = container.token.pixel_w+(pick(6, -6))
token.pixel_z = container.token.pixel_z+(pick(6, -6))
//[/CELADON-ADD]
x = container.x
y = container.y
docked_to.contents -= src
Expand Down
4 changes: 2 additions & 2 deletions code/modules/overmap/overmap_token.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@
// [CELADON-ADD] - OVERMAP ICON - Это вагабонд насрал
if(istype(parent, /datum/overmap/ship/controlled))
if(!move_vec)
move_vec = new (loc)
move_vec = new (src)
move_vec.icon = 'mod_celadon/_storge_icons/icons/overmap/overmap.dmi'
move_vec.icon_state = "movement_vector"
move_vec.layer = move_vec.layer+1
if(!ship_image)
ship_image = new (loc)
ship_image = new (src)
ship_image.icon = 'mod_celadon/_storge_icons/icons/overmap/overmap.dmi'
ship_image.icon_state = "ship"
ship_image.layer = ship_image.layer+2
Expand Down
5 changes: 5 additions & 0 deletions code/modules/overmap/ships/ship_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@
speed_y = speed_y+vector_to_add["y"]
vector_to_add["x"] = 0
vector_to_add["y"] = 0

if(60 SECONDS * MAGNITUDE(speed_x, speed_y) >= 60)
speed_x = speed_x*0.98
speed_y = speed_y*0.98

// [/CELADON-EDIT]

update_visuals()
Expand Down
21 changes: 10 additions & 11 deletions config/game_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ NEAR_DEATH_EXPERIENCE
## Set to 1 for "custom", silicons will start with the custom laws defined in silicon_laws.txt. (If silicon_laws.txt is empty, the AI will spawn with asimov and Custom boards will auto-delete.)
## Set to 2 for "random", silicons will start with a random lawset picked from random laws specified below.
## Set to 3 for "weighted random", using values in "silicon_weights.txt", a law will be selected, with weights specifed in that file.
DEFAULT_LAWS 0
DEFAULT_LAWS 2

## RANDOM LAWS ##
## ------------------------------------------------------------------------------------------
Expand All @@ -352,10 +352,10 @@ RANDOM_LAWS robocop
RANDOM_LAWS corporate

## Quirky laws. Shouldn't cause too much harm
#RANDOM_LAWS hippocratic
#RANDOM_LAWS maintain
RANDOM_LAWS hippocratic
RANDOM_LAWS maintain
#RANDOM_LAWS drone
#RANDOM_LAWS liveandletlive
RANDOM_LAWS liveandletlive
#RANDOM_LAWS peacekeeper
#RANDOM_LAWS reporter
#RANDOM_LAWS hulkamania
Expand Down Expand Up @@ -434,11 +434,10 @@ ROUNDSTART_RACES felinid
ROUNDSTART_RACES kepori
ROUNDSTART_RACES rachnid
ROUNDSTART_RACES vox

## [CELADON-ADD] - TAJARA, CELADON_RIOL, LANIUS
ROUNDSTART_RACES tajara
ROUNDSTART_RACES riol
ROUNDSTART_RACES lanius
ROUNDSTART_RACES riol
## [/CELADON-ADD]

## Races that are better than humans in some ways, but worse in others
Expand Down Expand Up @@ -572,27 +571,27 @@ ECONOMY
## Overmap Settings ##

## Put max amount of different event clusters you want to spawn here
MAX_OVERMAP_EVENT_CLUSTERS 6
MAX_OVERMAP_EVENT_CLUSTERS 27

## Put the maximum amount of overmap events here
MAX_OVERMAP_EVENTS 50
MAX_OVERMAP_EVENTS 500

## Put the maximum amount of dynamic overmap locations here
MAX_OVERMAP_DYNAMIC_EVENTS 10

## Size of the overmap squared
OVERMAP_SIZE 12
OVERMAP_SIZE 30

## Which overmap generator to use
## Valid values are: "random", "solar_system"
OVERMAP_GENERATOR_TYPE solar_system

## Size of overmap encounters, vertical and width with a 3 tile border
OVERMAP_ENCOUNTER_SIZE 191
OVERMAP_ENCOUNTER_SIZE 100

## The time required before a ship is allowed to bluespace jump. -1 disables it entirely
## In deciseconds, valid values are -1 to INFINITY
BLUESPACE_JUMP_WAIT 12000
BLUESPACE_JUMP_WAIT 1200

## Whether this server is an authentication server
#AUTH_ONLY
Expand Down
4 changes: 2 additions & 2 deletions mod_celadon/wideband/code/signal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
GLOB.news_network.SubmitArticle("<b>Получен сигнал S.O.S.</b> <br> Наши локаторы получили сигнал бедствия, который исходит от судна '" + name + "' по координатам: X - " + x + " / Y - " + y + ". <br><b>" + name + " запрашивает скорейшей помощи!</b>", "Outpost Distress Beacon System", "Колониальная сеть объявлений", adminMessage = 0, allow_comments = 1)
// Отправляем сообщения в Discord о помощи в чат Shiptest`a.
if(CONFIG_GET(string/servername) == "\[RU] Celadon Shiptest: Alpha")
send2chat("<:Celadon:1200703387717619814> \[Shiptest: Alpha] > Внимание! Судно **" + name + "** подаёт сигнал бедствия **S.O.S.** на координатах: **X - " + x + "** / **Y - " + y + "**.", "round-report")
send2chat("<:Celadon:1200703387717619814> \[Shiptest: Alpha] > Внимание! Судно **`" + name + "`** подаёт сигнал бедствия **S.O.S.** на координатах: **X - " + x + "** / **Y - " + y + "**.", "round-report")
if(CONFIG_GET(string/servername) == "\[RU] Celadon Shiptest: Beta")
send2chat("<:Celadon:1200703387717619814> \[Shiptest: Beta] > Внимание! Судно **" + name + "** подаёт сигнал бедствия **S.O.S.** на координатах: **X - " + x + "** / **Y - " + y + "**.", "round-report")
send2chat("<:Celadon:1200703387717619814> \[Shiptest: Beta] > Внимание! Судно **`" + name + "`** подаёт сигнал бедствия **S.O.S.** на координатах: **X - " + x + "** / **Y - " + y + "**.", "round-report")
// Логируем действия.
message_admins("[key_name_admin(usr)] send signal S.O.S.")
log_admin("[key_name(usr)] - [key_name(src)] send signal S.O.S.")
Expand Down

0 comments on commit 9824138

Please sign in to comment.