Skip to content

Commit

Permalink
Merge pull request Civ13#2931 from Bierkraan/working-branch
Browse files Browse the repository at this point in the history
Campaign changes
  • Loading branch information
Bierkraan authored Jun 8, 2024
2 parents aa406df + 4090092 commit 4a2d547
Show file tree
Hide file tree
Showing 39 changed files with 1,653 additions and 564 deletions.
2 changes: 1 addition & 1 deletion civ13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1159,5 +1159,5 @@
#include "code\processes\lighting\sources.dm"
#include "interface\interface.dm"
#include "interface\skin.dmf"
#include "maps\1943\smallingrad.dmm"
#include "maps\campaign\campaign2.dmm"
// END_INCLUDE
6 changes: 6 additions & 0 deletions code/game/area/caribbean.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1257,6 +1257,9 @@
location = AREA_OUTSIDE
base_turf = /turf/floor/dirt

/area/caribbean/faction1/collector
name = "Collection Area"

/area/caribbean/faction1/inside
icon_state = "red3"
location = AREA_INSIDE
Expand Down Expand Up @@ -1299,6 +1302,9 @@
location = AREA_OUTSIDE
base_turf = /turf/floor/dirt

/area/caribbean/faction2/collector
name = "Collection Area"

/area/caribbean/faction2/inside
icon_state = "blue3"
location = AREA_INSIDE
Expand Down
2 changes: 1 addition & 1 deletion code/game/mob/living/carbon/human/corpse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ mob/living/human/corpse/british_sailor
invisibility = 101
dir = pick(NORTH,SOUTH,EAST,WEST)
invisibility = 0
equip_to_slot_or_del(new /obj/item/clothing/shoes/workboots(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/clothing/shoes/jackboots(src), slot_shoes)
equip_to_slot_or_del(new /obj/item/clothing/under/reporter(src), slot_w_uniform)
equip_to_slot_or_del(new /obj/item/clothing/head/helmet/kevlarhelmet/press(src), slot_head)
equip_to_slot_or_del(new /obj/item/clothing/suit/storage/hazard/yellow(src), slot_r_store)
Expand Down
13 changes: 0 additions & 13 deletions code/game/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,6 @@ var/global/list/damage_icon_parts = list()
overlays_standing[HAIR_LAYER] = null
if (update_icons) update_icons()
return
else if (istype(wear_suit, /obj/item/clothing/suit/storage/jacket/kool_kids_klub))
overlays_standing[HAIR_LAYER] = null
if (update_icons) update_icons()
return
//base icons
var/icon/face_standing = new /icon('icons/mob/human_face.dmi',"bald_s")

Expand Down Expand Up @@ -415,13 +411,6 @@ var/global/list/damage_icon_parts = list()
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "bald_s")
face_standing.Blend(hair_s, ICON_OVERLAY)


else if (istype(wear_suit, /obj/item/clothing/suit/storage/jacket/kool_kids_klub))
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if (hair_style && (species.get_bodytype() in hair_style.species_allowed))
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if (hair_style.do_colouration)
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
else
var/datum/sprite_accessory/hair_style = hair_styles_list[h_style]
if (hair_style && (species.get_bodytype() in hair_style.species_allowed))
Expand Down Expand Up @@ -1148,8 +1137,6 @@ var/global/list/damage_icon_parts = list()
update_hair(1)
else
update_hair(1)
else if (wear_suit && istype(wear_suit, /obj/item/clothing/suit/storage/jacket/kool_kids_klub))
update_hair(1)
else
overlays_standing[SUIT_LAYER] = null
update_inv_shoes(0)
Expand Down
1 change: 1 addition & 0 deletions code/game/mob/living/simple_animal/friendly/horse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
layer = 3.99
a_intent = I_HARM
can_ride = TRUE
stop_automated_movement_when_pulled = TRUE
ride_pixel_x = -13
ride_pixel_y = -21

Expand Down
24 changes: 13 additions & 11 deletions code/game/mob/living/simple_animal/friendly/hostage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,35 @@ var/global/civvies_killed = list()
..()
if(uniquenum in civvies_killed)
return
var/killer = "none"
var/killer
var/obj/map_metadata/campaign/CM = map
var/obj/map_metadata/bank_robbery/BR = map
var/obj/map_metadata/kandahar/SA = map

civvies_killed += list(uniquenum)
if (map.ID == MAP_CAMPAIGN && CM)
killer = "Unknown"
if (harmer_factions["Redmenia"] > harmer_factions["Blugoslavia"])
killer = "Redmenia"
else if (harmer_factions["Redmenia"] < harmer_factions["Blugoslavia"])
killer = "Blugoslavia"
else if (harmer_factions["Redmenia"] == harmer_factions["Blugoslavia"] && harmer_factions["Blugoslavia"] > 0)
killer = "both factions"
if (killer != "none")
var/msg = "Civilian ([name]-[uniquenum]) killed by [killer] at ([src.x], [src.y], [src.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)!"
civvies_killed += list(uniquenum)
if (killer)
switch(killer)
if("Blugoslavia")
if ("Blugoslavia")
if(announce_death)
to_chat(world, "<font size=4>The <b>[name]</b> was killed by <font color='blue'><b>[killer]</b></font>!</font>")
CM.civilians_killed["Blugoslavia"]++
if("Redmenia")
if ("Redmenia")
if(announce_death)
to_chat(world, "<font size=4>The <b>[name]</b> was killed by <font color='red'><b>[killer]</b></font>!</font>")
CM.civilians_killed["Redmenia"]++
harmer_factions = list("Redmenia" = 0, "Blugoslavia" = 0)
if ("Unknown")
if(announce_death)
to_chat(world, "<font size=4>The <b>[name]</b> was killed by <font color='red'><b>[killer]</b></font>!</font>")
CM.civilians_killed["Unknown"]++
var/msg = "Civilian ([name]-[uniquenum]) killed by [killer] at ([src.x], [src.y], [src.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)!"
game_log("CIVDEATH: [msg]")
message_admins(msg)

Expand All @@ -98,8 +102,7 @@ var/global/civvies_killed = list()
else if (harmer_factions["Police"] == harmer_factions["Robbers"] && harmer_factions["Robbers"] > 0)
killer = "both sides"

if (killer != "none")
civvies_killed += list(uniquenum)
if (killer)
switch(killer)
if("Robbers")
to_chat(world, "<font size=2>A <b>[name]</b> has been killed by the <font color='red'><b>[killer]</b></font>!</font>")
Expand All @@ -118,8 +121,7 @@ var/global/civvies_killed = list()
killer = "Mujahideen"
else if (harmer_factions["DRA"] > (harmer_factions["Mujahideen"]||harmer_factions["Soviets"]))
killer = "DRA"
if (killer != "none")
civvies_killed = list(uniquenum)
if (killer)
switch(killer)
if("Soviets")
to_chat(world, "A <b>[name]</b> has been killed by the <font color='red'><b>[killer]</b></font>. The alliance is losing local support!")
Expand Down
13 changes: 7 additions & 6 deletions code/game/mob/living/simple_animal/hostile/campaign.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
mob_size = MOB_MEDIUM
starves = FALSE
behaviour = "hostile"
faction = PIRATES
faction = REDFACTION
ranged = 1
rapid = 0
firedelay = 15
projectiletype = /obj/item/projectile/bullet/rifle/a762x39
grenade_type = /obj/item/weapon/grenade/coldwar/m67
casingtype = null
language = new/datum/language/redmenian
stop_automated_movement = TRUE
stop_automated_movement = FALSE
wander = 0
projectiletype = /obj/item/projectile/bullet/rifle/a762x39
grenade_type = /obj/item/weapon/grenade/coldwar/m67
New()
..()
firedelay += pick(-1,0,1)
Expand All @@ -54,16 +54,17 @@
icon_dead = "rng_sl_dead"
maxHealth = 150
health = 150
rapid = 0
rapid = 1
firedelay = 8
role = "officer"
projectiletype = /obj/item/projectile/bullet/rifle/a762x51
New()
..()
icon_state = "rng_sl"
icon_living = icon_state
icon_dead = "[icon_state]_dead"
grenades = 1
gun = new/obj/item/weapon/gun/projectile/submachinegun/ak101/ak103(src)
gun = new/obj/item/weapon/gun/projectile/submachinegun/g3(src)

/mob/living/simple_animal/hostile/human/redmenian_ng/medic
name = "NGR corpsman"
Expand Down
4 changes: 3 additions & 1 deletion code/game/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
T = RH
break
else
if (istype(L, /mob/living/simple_animal/civilian) && istype(src, /mob/living/simple_animal/hostile/human/redmenian_ng))
continue
if (L.faction == faction)
continue
else if (L in friends)
Expand Down Expand Up @@ -148,7 +150,7 @@


/mob/living/simple_animal/proc/ListTargets(var/dist = 8)
var/list/L = hearers(dist,src)
var/list/L = viewers(dist,src)
return L

/mob/living/simple_animal/proc/DestroySurroundings()
Expand Down
47 changes: 22 additions & 25 deletions code/game/mob/living/simple_animal/hostile/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
if (H.faction_text == faction && s_language.name == language.name)
if (findtext(message, "medic!") && target_action != "helping" && target_action != "bandaging" && target_action != "drag" && target_action != "moving")
if (H.getTotalDmg()>30)
say("!!Coming!", language)
say("!! Coming!", language)
target_action = "moving"
target_mob = null
target_obj = speaker
Expand Down Expand Up @@ -183,7 +183,7 @@

/mob/living/simple_animal/hostile/human/proc/OpenFire(target_mob)
if (grenades && prob(5) && target_mob in view(7,src))
var/do_it = FALSE
var/enemies_in_sight = 0
for(var/mob/living/L in range(3,target_mob))
if (L.faction == src.faction)
break
Expand All @@ -192,57 +192,54 @@
if (H.faction_text == faction)
break
else
do_it++
enemies_in_sight++
else
do_it++
if (do_it>=3 && grenades)
enemies_in_sight++
if (enemies_in_sight >= 3 && grenades)
grenades--
var/obj/item/weapon/grenade/GN = new grenade_type(loc)
GN.activate(src)
throw_item(GN,target_mob)
GN.active = TRUE
spawn(GN.det_time)
GN.prime()
spawn(1)
if (world.time>last_fire+firedelay)
last_fire = world.time
switch(rapid)
if(0) //singe-shot
Shoot(target_mob, src.loc, src)
if (0) //singe-shot
Shoot(target_mob)
if(casingtype)
new casingtype
if(1) //semi-auto
if (1) //semi-auto
var/shots = rand(1,3)
var/s_timer = 1
for(var/i = 1, i<= shots, i++)
spawn(s_timer)
Shoot(target_mob, src.loc, src)
Shoot(target_mob)
if(casingtype)
new casingtype(get_turf(src))
s_timer+=3
s_timer += 3
if (2) //automatic
var/shots = rand(3,5)
var/s_timer = 1
for(var/i = 1, i<= shots, i++)
spawn(s_timer)
Shoot(target_mob, src.loc, src)
Shoot(target_mob)
if(casingtype)
new casingtype(get_turf(src))
s_timer+=2
s_timer += 2
return

/mob/living/simple_animal/hostile/human/proc/Shoot(var/target, var/start, var/user, var/bullet = 0)
if(target == start || !gun)
return
/mob/living/simple_animal/hostile/human/proc/Shoot(var/target)
if(!gun) return
var/obj/item/projectile/projectile = new projectiletype(get_turf(src))
if(!projectile) return
playsound(src, gun.fire_sound, 100, TRUE)

var/obj/item/projectile/A = new projectiletype(get_turf(user))
playsound(user, gun.fire_sound, 100, TRUE)
if(!A) return
var/def_zone = "chest"
var/target_zone = "chest"
if (prob(20))
def_zone = "head"
target_zone = "head"
else if (prob(15))
def_zone = pick("l_arm","r_arm","r_leg","l_leg")
A.launch(target, user, src.gun, def_zone, rand(-1,1), rand(-1,1))
target_zone = pick("l_arm","r_arm","r_leg","l_leg")
gun.process_projectile(projectile, src, target, target_zone)
set_light(3)
spawn(5)
set_light(0)
Expand Down
14 changes: 11 additions & 3 deletions code/game/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,22 @@ var/global/redirect_all_players = null
temp_ckey = replacetext(temp_ckey," ", "")
temp_ckey = replacetext(temp_ckey,"_", "")
if (temp_ckey == client.ckey)
factjob = "BAF"
factjob = "blue"

for (var/i in faction_list_red)
var/temp_ckey = lowertext(i)
temp_ckey = replacetext(temp_ckey," ", "")
temp_ckey = replacetext(temp_ckey,"_", "")
if (temp_ckey == client.ckey)
factjob = "red"

if (!factjob)
for (var/i in faction_list_red)
for (var/i in faction_list_organizer)
var/temp_ckey = lowertext(i)
temp_ckey = replacetext(temp_ckey," ", "")
temp_ckey = replacetext(temp_ckey,"_", "")
if (temp_ckey == client.ckey)
factjob = "RDF"
factjob = "organizer"

if (factjob)
if (map.ID == MAP_CAMPAIGN)
Expand Down
Loading

0 comments on commit 4a2d547

Please sign in to comment.